Shear plate data pasting and sending method and device, electronic equipment and medium

By implementing the publishing and subscription mechanism of clipboard event notification between multiple devices and using soft buses for data transmission, the problem of cumbersome and low efficiency of clipboard data sharing between multiple devices in the prior art is solved, and efficient and convenient cross-device and cross-operating systems is realized.

CN119883669APending Publication Date: 2025-04-25BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311394332.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-25
Publication Date
2025-04-25

Smart Images

  • Figure CN119883669A_ABST
    Figure CN119883669A_ABST
Patent Text Reader

Abstract

The invention relates to a clipboard data pasting and sending method and device, electronic equipment and a medium in the technical field of data communication, and the method comprises the steps that a sending end issues a clipboard event notification under the condition that clipboard data is newly added; the receiving end displays the clipboard event notification in response to the clipboard event notification published by the sending end, and displays a loading window at the receiving end in response to a pasting behavior for the clipboard event notification; and the sending end sends the clipboard data corresponding to the clipboard event notification in response to the pasting behavior of the receiving end for the clipboard event notification. And the receiving end pastes the clipboard data when acquiring the clipboard data corresponding to the clipboard event notice. The operation convenience of sharing the clipboard data is improved, and the efficiency is high.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of data communication technology, and in particular to a method, device, electronic device and medium for pasting and sending clipboard data. Background Art

[0002] When information needs to be shared between mobile phones, tablet computers, laptops or desktop computers, it is usually achieved through methods such as email, instant messaging, cloud storage, etc., which not only has the problem of cumbersome sharing operations, but also has low efficiency. Summary of the invention

[0003] In order to overcome the problems existing in the related art, the present disclosure provides a method, device, electronic device and medium for pasting and sending clipboard data.

[0004] According to a first aspect of an embodiment of the present disclosure, a method for pasting clipboard data is provided, which is applied to a receiving end and includes:

[0005] In response to a clipboard event notification issued by a sending end, display the clipboard event notification;

[0006] In response to a pasting action for the clipboard event notification, displaying a loading window at the receiving end;

[0007] When the clipboard data corresponding to the clipboard event notification is acquired, the clipboard data is pasted.

[0008] Optionally, in the case where the clipboard data corresponding to the clipboard event notification is acquired, before pasting the clipboard data, the method includes:

[0009] Parsing the clipboard event notification to obtain storage address information carried in the clipboard event notification;

[0010] According to the storage address information, a query instruction for querying the clipboard data corresponding to the clipboard event notification is sent to the soft bus, and the query instruction is used to instruct the sending end to upload the target clipping item corresponding to the clipboard event notification to the soft bus.

[0011] Optionally, the method further comprises:

[0012] Download the target cutting project from the soft bus;

[0013] The target clipping item is parsed to obtain clipping board data corresponding to the clipping board event notification carried in the target clipping item.

[0014] Optionally, the parsing the clipboard event notification to obtain storage address information carried in the clipboard event notification includes:

[0015] Sending the clipboard event notification to the upper layer application of the receiving end through the system clipboard service of the receiving end;

[0016] The clipboard event notification is parsed by the upper layer application to obtain storage address information carried in the clipboard event notification.

[0017] Optionally, the displaying of the clipboard event notification in response to the clipboard event notification issued by the sending end includes:

[0018] In response to a clipboard event notification issued by a sending end in a network with the receiving end, the clipboard event notification is downloaded and displayed from a target service, wherein the target service is a service corresponding to the connection path determined by the sending end based on multiple connection paths with the receiving end.

[0019] According to a second aspect of an embodiment of the present disclosure, a method for sending clipboard data is provided, which is applied to a sending end and includes:

[0020] When new clipboard data is added on the sending end, issuing a clipboard event notification;

[0021] In response to the receiving end's pasting behavior for the clipboard event notification, the clipboard data corresponding to the clipboard event notification is sent.

[0022] Optionally, when the clipboard data on the sending end is newly added, issuing a clipboard event notification includes:

[0023] In the case where the clipboard data on the sending end is newly added, generating a target clipping item of a character string type in the form of an item format with the newly added clipboard data;

[0024] Saving the target clipping item to a local clipboard service, and generating storage address information corresponding to the target clipping item;

[0025] Generating a clipboard event notification in the form of a standard data header according to the storage address information;

[0026] The clipboard event notification is saved to the local clipboard service and the clipboard event notification is published on a soft bus.

[0027] Optionally, in response to the receiving end's pasting behavior of the clipboard event notification, sending the clipboard data corresponding to the clipboard event notification includes:

[0028] In response to the receiving end's pasting behavior in response to the clipboard event notification, querying the local clipboard service for a corresponding target clipping item according to the storage address information sent by the receiving end;

[0029] The target clipping item corresponding to the clipboard event notification is sent to the soft bus, so that the receiving end downloads and parses the target clipping item from the soft bus to obtain the clipboard data corresponding to the clipboard event notification.

[0030] Optionally, publishing the clipboard event notification to a soft bus includes:

[0031] Determine whether there is a receiving end in the network;

[0032] In a case where the receiving end exists in the network, establishing a long connection with the receiving end;

[0033] The publishing interface is called to publish the clipboard event notification on the soft bus.

[0034] Optionally, determining whether a receiving end exists in the network includes:

[0035] Determine a connection path supported by the receiving end; the connection path includes at least one of a low-power Bluetooth path, a local area network broadcast path, and a P2P path;

[0036] Determining in sequence whether the receiving end exists in the network according to the priority of the supported connection paths;

[0037] The establishing a long connection with the receiving end when the receiving end exists in the network includes:

[0038] In the case where the receiving end exists in the network, a long connection is established with the receiving end via the supported connection path with the highest priority.

[0039] Optionally, generating a target clipping project in a project format with the newly added clipboard data includes:

[0040] Determine the file type of the newly added clipboard data;

[0041] The target clipping project corresponding to the file type is generated in a project format according to the new addition time of the clipboard data.

[0042] According to a third aspect of an embodiment of the present disclosure, a device for pasting clipboard data is provided, which is applied to a receiving end, and the device includes:

[0043] a notification display module, configured to display the clipboard event notification in response to the clipboard event notification issued by the sending end;

[0044] A loading window display module, configured to display a loading window at the receiving end in response to a paste action for the clipboard event notification;

[0045] The pasting module is configured to paste the clipboard data when the clipboard data corresponding to the clipboard event notification is acquired.

[0046] According to a fourth aspect of an embodiment of the present disclosure, a device for sending clipboard data is provided, which is applied to a sending end, and the device includes:

[0047] A publishing module, configured to publish a clipboard event notification when new clipboard data is added on the sending end;

[0048] The sending module is configured to send the clipboard data corresponding to the clipboard event notification in response to the pasting behavior of the receiving end to the clipboard event notification.

[0049] According to a fifth aspect of an embodiment of the present disclosure, there is provided an electronic device, including:

[0050] processor;

[0051] a memory for storing processor-executable instructions;

[0052] The processor is configured to execute the executable instructions stored in the memory to implement the method described in any one of the first aspect or the second aspect.

[0053] According to a sixth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored. When the program instructions are executed by a processor, the steps of the method described in any one of the first aspect or the second aspect are implemented.

[0054] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:

[0055] When the clipboard data is newly added, the sending end issues a clipboard event notification; the receiving end displays the clipboard event notification in response to the clipboard event notification issued by the sending end, and displays a loading window in response to the paste behavior of the clipboard event notification; the sending end sends the clipboard data corresponding to the clipboard event notification in response to the paste behavior of the clipboard event notification by the receiving end. When the receiving end obtains the clipboard data corresponding to the clipboard event notification, it pastes the clipboard data. The convenience of the operation of sharing clipboard data is improved, and the efficiency is high.

[0056] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0058] Figure 1 The present invention is a flowchart of a method for pasting clipboard data according to an exemplary embodiment.

[0059] Figure 2 The invention is a block diagram showing an architecture of clipboard data sending and pasting according to an exemplary embodiment.

[0060] Figure 3 The figure is a flow chart of another method for pasting clipboard data according to an exemplary embodiment.

[0061] Figure 4 The figure is a timing diagram of a method for pasting clipboard data according to an exemplary embodiment.

[0062] Figure 5 The figure is a flow chart of a method for sending clipboard data according to an exemplary embodiment.

[0063] Figure 6 An implementation according to an exemplary embodiment is shown Figure 5 Flowchart of step S51 in FIG.

[0064] Figure 7 An implementation according to an exemplary embodiment is shown Figure 5 Flowchart of step S52 in FIG.

[0065] Figure 8 The present invention is a block diagram showing a device for pasting clipboard data according to an exemplary embodiment.

[0066] Fig. 9 The figure is a block diagram of a device for sending clipboard data according to an exemplary embodiment.

[0067] Fig.10 It is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION

[0068] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0069] It should be noted that all actions of acquiring signals, information or data in the present disclosure are carried out in compliance with the relevant data protection laws and policies of the country where the device is located and with the authorization given by the owner of the corresponding device.

[0070] Before introducing a method, device, electronic device and medium for pasting and sending clipboard data provided by the present disclosure, the technical means and existing defects of the relevant scenarios are explained. In the relevant scenarios, in order to solve the problem that content sharing between multiple devices can only be achieved through emails and instant messages, the operation is cumbersome and inefficient. By sharing the copied content on one device to another device, the other device can directly paste the content copied by other devices without any intermediate steps. For example, a user can copy a text on a mobile phone and then paste it on a computer immediately, and vice versa. Thereby improving convenience and efficiency.

[0071] In the implementation means of the relevant scenarios, it is first necessary to log in to the same account on multiple devices that need to share content, and the multiple devices are connected via short-range communication methods such as Bluetooth or Wi-Fi. When the user copies text, images, videos or other multimedia content on the first device, the content will be automatically synchronized to the clipboard of the second device via short-range communication connections such as Bluetooth or Wi-Fi. Then, the information copied on the first device can be directly pasted on the second device. Then, the copied content can be pasted on the first device, and the content copied by the first device can be pasted on the second device.

[0072] However, the content copied to the clipboard can be used for pasting on the second device for a short period of time. After the time is exceeded, the content copied and shared on the first device will no longer be available for pasting on the second device. In addition, multiple devices need to be connected via short-range communication, which usually has a connection range of only a few meters. Moreover, in an environment with strong or more interference, the content shared and copied via short-range communication will be interfered or interrupted.

[0073] In addition, only multiple devices with the same operating system or the same manufacturer can share content across device clipboards, such as iOS operating systems. For devices using other operating systems, cross-device clipboard sharing is not possible. In addition, the content type of cross-device clipboard sharing is limited, and specific data formats or application-specific clipboard data are not supported. For example, code cannot share content across device clipboards.

[0074] Figure 1 is a flow chart of a method for pasting clipboard data according to an exemplary embodiment. Figure 1As shown, it is applied to a receiving end, which can be a PC, a mobile phone, a tablet computer, a game console terminal, etc. The clipboard data pasting method includes the following steps.

[0075] In step S11, in response to the clipboard event notification issued by the sending end, the clipboard event notification is displayed.

[0076] In one embodiment of the present disclosure, the clipboard event notification can be displayed in a notification bar or in a pop-up window. Furthermore, it can be explained that the clipboard event notification does not carry clipboard data, but is only a notification message. Among them, the clipboard event notification of the notification message can be Clip Data containing only URI constructed by the sender according to the MIME type, which can avoid the direct sending of clipboard data to the receiving end in the related technology, and the receiving end may not choose to paste the clipboard data in the end, resulting in large signaling consumption and power consumption.

[0077] In one embodiment of the present disclosure, see Figure 2 As shown, the receiving end can subscribe to the clipboard event notification in the shared clipboard service or the remote service by subscription, and then obtain the clipboard event notification in time when the sending end publishes the clipboard event notification on the shared clipboard service or the remote service. Among them, the shared clipboard service can build a network through at least one connection path of WIFI and Bluetooth, and the remote service can build a network through at least one connection path of mobile data or local area network.

[0078] The clipboard event notification or clipboard data may be sent based on at least one of BLE Bluetooth, MDNS broadcast, or at least one of IP / GATT connection.

[0079] Furthermore, multiple electronic devices can all serve as receiving ends to subscribe to clipboard event notifications on a shared clipboard service or a remotely provided service, and the multiple electronic devices can be devices of different types or produced by different manufacturers. For example, the multiple electronic devices can be PCs, mobile phones, and tablet computers.

[0080] Therefore, for the user, for example, the clipboard data can be copied on mobile phone A, and then mobile phone A can share the clipboard service or publish the clipboard event notification on the remote provision service, and then the clipboard event notification can be displayed on the PC, mobile phone B and tablet computer. In this way, the user does not need to select the target device for clipboard data sharing on the sending end. Similarly, the user can also copy the clipboard data on the PC, and then display the clipboard event notification on mobile phone A, mobile phone B and tablet computer. This reduces the complexity of the operation, and at the same time, one-to-many cross-device clipboard data sharing can be realized.

[0081] Among them, the PC, mobile phone A, mobile phone B and tablet computer in the aforementioned embodiments can be devices produced by different manufacturers, or devices with different operating systems. This can overcome manufacturer restrictions and operating system restrictions, realize cross-device clipboard data sharing, and further improve the convenience of clipboard data sharing.

[0082] In one embodiment of the present disclosure, the vehicle computer can also subscribe to clipboard event notifications, and then, when a copy or cut action is performed on a mobile phone, a tablet computer, or a PC, the vehicle computer can receive clipboard event notifications, and then the clipboard data on the mobile phone, the tablet computer, or the PC can be copied to the vehicle computer. Similarly, the clipboard data on the vehicle computer can be copied to the mobile phone, the tablet computer, or the PC.

[0083] In step S12, in response to the pasting behavior of the clipboard event notification, a loading window is displayed on the receiving end.

[0084] In an embodiment of the present disclosure, the upper layer application may intercept the paste action, and then identify the intercepted paste action to determine whether the user has executed the paste behavior in response to the clipboard event notification.

[0085] In one embodiment of the present disclosure, the user can choose to paste in response to the clipboard event notification, or can choose not to paste in response to the clipboard event notification. Accordingly, if the user chooses to paste, a loading window is displayed on the receiving end in response to the paste behavior in response to the clipboard event notification. The loading window is used to prompt the user to wait for obtaining the corresponding clipboard data. If the user chooses not to paste, there is no need to display the prompt information and the corresponding clipboard data is not obtained.

[0086] In one embodiment of the present disclosure, a paste button or a give up paste button may be displayed for the clipboard event notification, so that the user can make a selection. In one implementation, if the user's paste behavior is not received after the clipboard event notification is displayed for a preset time, the user is assumed to give up pasting.

[0087] In one implementation of the present disclosure, the loading window may be directly displayed on the user interface, or after the user selects to paste, the paste button may be hidden and the loading window may be displayed at the position after the paste button is hidden.

[0088] In step S13, when the clipboard data corresponding to the clipboard event notification is acquired, the clipboard data is pasted.

[0089] In the disclosed embodiment, when the clipboard data corresponding to the clipboard event notification is acquired, the clipboard data is pasted through the local clipboard.

[0090] In one embodiment of the present disclosure, after the clipboard data is decrypted, the format of the clipboard data can be identified, and then the clipboard data whose format has been successfully identified can be pasted, wherein a prompt window can be displayed before pasting to prompt the user where the clipboard data is to be pasted, and then after the user confirms the desired paste position, the paste is performed at the desired paste position, and after the paste is performed, the pasted position of the clipboard data can also be displayed.

[0091] In the above technical solution, when the clipboard data is newly added, the sending end issues a clipboard event notification; the receiving end displays the clipboard event notification in response to the clipboard event notification issued by the sending end, and displays a loading window in response to the pasting behavior of the clipboard event notification; the sending end sends the clipboard data corresponding to the clipboard event notification in response to the pasting behavior of the receiving end to the clipboard event notification. When the receiving end obtains the clipboard data corresponding to the clipboard event notification, it pastes the clipboard data. The convenience of the operation of sharing clipboard data is improved, and the efficiency is relatively high.

[0092] Alternatively, see Figure 3 As shown, in step S13, when the clipboard data corresponding to the clipboard event notification is obtained, before pasting the clipboard data, it includes:

[0093] In step S21, the clipboard event notification is parsed to obtain storage address information carried in the clipboard event notification.

[0094] See also Figure 4 As shown, the storage address information may be a URI, so that the upper layer application may parse the clipboard event notification to obtain the URI carried in the clipboard event notification.

[0095] In step S22, according to the storage address information, a query instruction for querying the clipboard data corresponding to the clipboard event notification is sent to the soft bus, and the query instruction is used to instruct the sending end to upload the target clipping item corresponding to the clipboard event notification to the soft bus.

[0096] In the disclosed embodiment, the soft bus may be a distributed soft bus, which is a distributed operating system that can adapt to a variety of terminal forms and can support a variety of terminal devices such as mobile phones, tablets, smart wearables, PCs, smart screens, and car computers.

[0097] In one embodiment of the present disclosure, the storage address information is stored in the clipboard service of the sending end in the form of a standard data header and the corresponding clipboard data. The clipboard service includes a certain amount of clipboard data within a period of time. The query instruction can carry the storage address information, and then the corresponding clipboard data can be queried from the clipboard service according to the storage address information.

[0098] Optionally, continue to see Figure 3 As shown, the method also includes:

[0099] In step S23, the target cutting item is downloaded from the soft bus.

[0100] Among them, the target cutting item is the soft bus of the sending end. When the soft bus of the sending end receives the query instruction, the clipboard service of the sending end obtains the corresponding URI through the business callback, and then calls the sending interface to send the target cutting item to the soft bus of the sending end, and the soft bus of the sending end sends it to the soft bus of the receiving end.

[0101] In step S24, the target clipping item is parsed to obtain clipboard data corresponding to the clipboard event notification carried in the target clipping item.

[0102] The parsing of the target clipping item is to process data from different operating systems or different manufacturers, and then reassemble the processed data to obtain clipboard data corresponding to the clipboard event notification.

[0103] In some embodiments of the present disclosure, the target cut item may be data obtained by cutting or copying once compressed in any one of MP3 format, zip format, and rar format.

[0104] Optionally, in step S21, parsing the clipboard event notification to obtain storage address information carried in the clipboard event notification includes:

[0105] The clipboard event notification is sent to an upper layer application of the receiving end through the system clipboard service of the receiving end.

[0106] Continue to see Figure 4As shown, when the soft bus of the receiving end receives the clipboard event notification from the sending end, the copy event management can receive the clipboard event notification and insert the clipboard event notification into the shared clipboard service. The shared clipboard service can construct the initial clipping data when the receiving end subscribes to the notification. When the system clipboard receives the initial clipping data, the upper-level application can send an instruction to obtain the initial clipping data, and then the system clipboard service provides the clipboard event notification to the upper-level application.

[0107] The clipboard event notification is parsed by the upper layer application to obtain storage address information carried in the clipboard event notification.

[0108] In one embodiment of the present disclosure, see Figure 4 As shown, the upper-level application can send a query instruction to the soft bus through the shared clipboard service according to the parsed URI. After the shared clipboard service receives the query instruction, it first displays a loading window to prompt the user to wait, and then sends a query instruction to the soft bus to obtain the real clipboard data corresponding to the clipboard event notification. It can be understood that the real clipboard data is carried in the target clipping item.

[0109] In one embodiment of the present disclosure, if the query instruction is called by the UI (User Interface) thread and the time length for obtaining the target cutting item exceeds the preset time length, ANR (Application Not Responding) is triggered, where the preset time length can be 5 seconds, for example.

[0110] Optionally, in step S11, in response to the clipboard event notification issued by the sending end, displaying the clipboard event notification includes:

[0111] In response to a clipboard event notification issued by a sending end in a network with the receiving end, the clipboard event notification is downloaded and displayed from a target service, wherein the target service is a service corresponding to the connection path determined by the sending end based on multiple connection paths with the receiving end.

[0112] In some embodiments of the present disclosure, multiple terminal devices may be networked through multiple connection path components, and then multiple terminal devices may obtain clipboard event notifications issued by any sender through one or more connection paths within the network.

[0113] The present disclosure provides a method for sending clipboard data, which is applied to a sending end, which can be a PC, a mobile phone, a tablet computer, a game console terminal, etc. Figure 5 As shown, the clipboard data sending method includes the following steps.

[0114] In step S51, when the clipboard data on the sending end is newly added, a clipboard event notification is issued.

[0115] The clipboard data addition may be, for example, text copying or cutting performed by the user on the sending end, or pictures, videos, documents or tables, or text that is blacked, underlined or colored. In this way, not only simple text sharing can be performed between multiple terminals, but also text formats, files, pictures, videos, documents or tables can be shared.

[0116] In some embodiments of the present disclosure, the sending end monitors the copy or cut action of the clipboard by monitoring, and then monitors the copy or cut behavior from the local clipboard by callback. Then, when the copy or cut behavior is monitored, it is determined that the clipboard data is newly added.

[0117] In step S52, in response to the receiving end's pasting action for the clipboard event notification, the clipboard data corresponding to the clipboard event notification is sent.

[0118] In some embodiments of the present disclosure, since there may be multiple receiving ends, the sending end needs to know the specific clipboard data pasted by the receiving end, so the pasting behavior of the receiving end can indicate the clipboard data to be pasted through corresponding information. When the sending end receives the information of the pasting behavior of the receiving end for the clipboard event notification, it can send the clipboard data corresponding to the clipboard event notification according to the information returned by the receiving end, so as to avoid pasting wrong information to the receiving end.

[0119] In some embodiments of the present disclosure, if there are multiple receiving ends that perform a paste action for the same clipboard event notification, then the multiple receiving ends can all receive the clipboard data corresponding to the clipboard event notification sent by the sending end. Therefore, the present application can send the clipboard data to a soft bus or a remote service through networking, so that multiple receiving ends can download the clipboard data from the soft bus or the remote service. This enables one-to-many clipboard data sharing.

[0120] Alternatively, see Figure 6 As shown, in step S51, when the clipboard data on the sending end is newly added, a clipboard event notification is issued, including:

[0121] In step S511, when the clipboard data on the sending end is newly added, the newly added clipboard data is used to generate a target clipping item of a character string type in the form of an item format.

[0122] In some embodiments of the present disclosure, based on the Multipurpose Internet Mail Extensions protocol, the newly added clipboard data is used to generate a target clipping item of a character string type in the form of an item format.

[0123] In some embodiments of the present disclosure, clipboard data is generated in the form of item to generate a target clipping item of string type, and different clipboard data are included in different items, that is, different clipboard data are saved in the clipboard service of the sending end in the form of target clipping items.

[0124] The string type may include at least one of string, byte, and stream.

[0125] In step S512, the target clipping item is saved to a local clipboard service, and storage address information corresponding to the target clipping item is generated.

[0126] The storage address information can be used to query the storage address of the target cut item in the clipboard service, and then when there is a pasting behavior at the receiving end, the corresponding target cut item can be queried from the clipboard service through the storage address information.

[0127] It can be explained that a copy or cut session may contain multiple target cut items, and the multiple target cut items may be in different formats but carry the same clipboard data, so that different types of receiving terminals can parse the target cut items.

[0128] In step S513, a clipboard event notification is generated in the form of a standard data header according to the storage address information.

[0129] In some embodiments of the present disclosure, the clipboard event notification of the standard data header may describe the encoding format, and the clipboard event notification is plain text content.

[0130] In step S514, the clipboard event notification is saved to the local clipboard service and the clipboard event notification is published on the soft bus.

[0131] In some embodiments of the present disclosure, clipboard event notifications may be saved in the form of session IDs, which not only allows the order of clipboard event notifications to be determined based on the session IDs, but also allows the clipboard event notifications to be saved in an orderly manner.

[0132] Alternatively, see Figure 7 As shown, in step S52, in response to the receiving end's pasting behavior for the clipboard event notification, sending the clipboard data corresponding to the clipboard event notification includes:

[0133] In step S521, in response to the receiving end's pasting behavior in response to the clipboard event notification, the corresponding target clipping item is queried from the local clipboard service according to the storage address information sent by the receiving end.

[0134] In some embodiments of the present disclosure, when the sending end receives a query instruction sent by the receiving end, the sending end queries the corresponding target clipping item from the local clipboard service of the sending end according to the storage address information carried in the query instruction, such as the URI carried in the query instruction.

[0135] In step S522, the target clipping item corresponding to the clipboard event notification is sent to the soft bus, so that the receiving end downloads and parses the target clipping item from the soft bus to obtain the clipboard data corresponding to the clipboard event notification.

[0136] In some embodiments of the present disclosure, when the sending end establishes a connection with the receiving end and sends a clipboard event notification, the sending end maintains the connection with the receiving end, and then based on the connection, receives the storage address information corresponding to the paste behavior of the receiving end. Then, based on the connection, the target clipping item corresponding to the clipboard event notification is sent to the soft bus.

[0137] Optionally, in step S522, publishing the clipboard event notification to the soft bus includes:

[0138] Determine whether there is a receiving end in the network.

[0139] In some embodiments of the present disclosure, if there is no receiving end in the network, it means that the user does not know how to share the clipboard data among multiple devices, and the corresponding clipboard data is directly saved on the clipboard without performing operations such as clipboard time notification and subsequent sending of clipboard data.

[0140] In a case where the receiving end exists in the network, establishing a long connection with the receiving end;

[0141] In some embodiments of the present disclosure, the method of establishing a long connection is selected by the sending end according to the state of the current connection path.

[0142] The publishing interface is called to publish the clipboard event notification on the soft bus.

[0143] For example, when mobile phone A monitors the addition of clipboard data, mobile phone A executes the action of obtaining network status, and then establishes a long connection with mobile phone B and PC, and then mobile phone A calls the publishing interface and publishes the clipboard event notification on the soft bus, so that mobile phone B and PC can receive the clipboard event notification published by mobile phone A on their respective soft buses. Then, the paste action can be performed on PC or mobile phone B.

[0144] Optionally, determining whether a receiving end exists in the network includes:

[0145] Determine a connection path supported by the receiving end; the connection path includes at least one of a low-power Bluetooth path, a local area network broadcast path, and a P2P path;

[0146] According to the priorities of the supported connection paths, it is determined in turn whether the receiving end exists in the network.

[0147] Among them, from the supported connection paths, according to the priority from high to low, determine whether to support sending clipboard data from the connection path with the highest priority. If the connection path with the high priority does not support sending clipboard data, then determine whether the connection path with the low priority supports sending clipboard data.

[0148] The establishing a long connection with the receiving end when the receiving end exists in the network includes:

[0149] In the case where the receiving end exists in the network, a long connection is established with the receiving end via the supported connection path with the highest priority.

[0150] In the disclosed embodiment, the autonomous network usually has the highest priority, followed by the P2P network, and Bluetooth and the local area network have the lowest priority. Therefore, the network status of the autonomous network is obtained first, and when the network status of the autonomous network can meet the sending requirements, the clipboard event notification is issued through the autonomous network. When the network status of the autonomous network cannot meet the sending requirements, the network status of the P2P network is obtained, and when the network status of the P2P network can meet the sending requirements, the clipboard event notification is issued through the P2P network. When the network status of the P2P network cannot meet the sending requirements, the clipboard event notification is issued through Bluetooth or the local area network.

[0151] Optionally, generating a target clipping project in a project format with the newly added clipboard data includes:

[0152] Determine the file type of the newly added clipboard data.

[0153] In the disclosed embodiment, the file type of the clipboard data is used to determine how it is saved. For example, clipboard data of the picture type can be saved in JPG format, while text with special formats such as bold, underline or color can be saved in zip format.

[0154] The target clipping project corresponding to the file type is generated in a project format according to the new addition time of the clipboard data.

[0155] It can be explained that the clipboard data corresponding to a copy or paste time can be included in target clipping items of different formats, but the clipboard event notification is the same. For example, a picture copied on mobile phone A can be saved as item 1 in ZIP format or as item 2 in mp3 format, but the session IDs corresponding to item 1 and item 2 are both 122.

[0156] The above technical solution can support different devices and operating system platforms, break the constraints of brands and systems, and improve the experience of cross-device clipboard data sharing. Various types of content, such as graphics, text, multimedia, etc., can be transmitted between devices, further enhancing the interactive experience of content. A one-to-many message transmission architecture can be implemented, data transmission is more stable, and the data transmission failure rate caused by unstable connection is significantly reduced. Improve the transmission speed. Tests show that the transmission speed of the above technical solution is increased by about 30% and the delay is reduced by about 25%.

[0157] The present disclosure also provides a clipboard data pasting device, which is applied to a receiving end. Figure 8 As shown, the device comprises:

[0158] The notification display module 110 is configured to display the clipboard event notification in response to the clipboard event notification issued by the sending end;

[0159] A loading window display module 120, configured to display a loading window at the receiving end in response to a paste action for the clipboard event notification;

[0160] The pasting module 130 is configured to paste the clipboard data when the clipboard data corresponding to the clipboard event notification is acquired.

[0161] Optionally, the device further comprises:

[0162] A parsing module, configured to parse the clipboard event notification to obtain storage address information carried in the clipboard event notification;

[0163] The query module is configured to send a query instruction for querying the clipboard data corresponding to the clipboard event notification to the soft bus according to the storage address information, and the query instruction is used to instruct the sending end to upload the target clipping item corresponding to the clipboard event notification to the soft bus.

[0164] Optionally, the device further comprises:

[0165] A download module, configured to download the target cutting item from the soft bus;

[0166] The parsing module is further configured to parse the target clipping item to obtain clipboard data corresponding to the clipboard event notification carried in the target clipping item.

[0167] Optionally, the parsing module is configured to:

[0168] Sending the clipboard event notification to the upper layer application of the receiving end through the system clipboard service of the receiving end;

[0169] The clipboard event notification is parsed by the upper layer application to obtain storage address information carried in the clipboard event notification.

[0170] Optionally, the notification display module 110 is configured to respond to a clipboard event notification issued by a sending end in a network with the receiving end, download and display the clipboard event notification from a target service, wherein the target service is a service corresponding to the connection path determined by the sending end based on multiple connection paths with the receiving end.

[0171] The present disclosure also provides a clipboard data sending device, which is applied to a sending end, see Fig. 9 As shown, the device comprises:

[0172] A publishing module 210, configured to publish a clipboard event notification when new clipboard data is added on the sending end;

[0173] The sending module 220 is configured to send the clipboard data corresponding to the clipboard event notification in response to the pasting behavior of the receiving end to the clipboard event notification.

[0174] Optionally, the publishing module 210 is configured to:

[0175] In the case where the clipboard data on the sending end is newly added, generating a target clipping item of a character string type in the form of an item format with the newly added clipboard data;

[0176] Saving the target clipping item to a local clipboard service, and generating storage address information corresponding to the target clipping item;

[0177] Generating a clipboard event notification in the form of a standard data header according to the storage address information;

[0178] The clipboard event notification is saved to the local clipboard service and the clipboard event notification is published on a soft bus.

[0179] Optionally, the sending module 220 is configured to:

[0180] In response to the receiving end's pasting behavior in response to the clipboard event notification, querying the local clipboard service for a corresponding target clipping item according to the storage address information sent by the receiving end;

[0181] The target clipping item corresponding to the clipboard event notification is sent to the soft bus, so that the receiving end downloads and parses the target clipping item from the soft bus to obtain the clipboard data corresponding to the clipboard event notification.

[0182] Optionally, the publishing module 210 is configured to:

[0183] Determine whether there is a receiving end in the network;

[0184] In a case where the receiving end exists in the network, establishing a long connection with the receiving end;

[0185] The publishing interface is called to publish the clipboard event notification on the soft bus.

[0186] Optionally, the publishing module 210 is configured to:

[0187] Determine a connection path supported by the receiving end; the connection path includes at least one of a low-power Bluetooth path, a local area network broadcast path, and a P2P path;

[0188] Determining in sequence whether the receiving end exists in the network according to the priority of the supported connection paths;

[0189] The establishing a long connection with the receiving end when the receiving end exists in the network includes:

[0190] In the case where the receiving end exists in the network, a long connection is established with the receiving end via the supported connection path with the highest priority.

[0191] Optionally, the publishing module 210 is configured to:

[0192] Determine the file type of the newly added clipboard data;

[0193] The target clipping project corresponding to the file type is generated in a project format according to the new addition time of the clipboard data.

[0194] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0195] The present disclosure also provides an electronic device, including:

[0196] processor;

[0197] a memory for storing processor-executable instructions;

[0198] The processor is configured to execute the executable instructions stored in the memory to implement the method described in any one of the aforementioned embodiments.

[0199] It is understandable that the electronic device can act as a transmitter to send local clipboard event notifications and clipboard data, or as a receiver to receive clipboard event notifications and clipboard data from other electronic devices. This depends on whether there is new clipboard data on the electronic device, and whether there are clipboard event notifications reported by other electronic devices in the subscribed service.

[0200] Fig.10 8 is a block diagram of an electronic device 800 according to an exemplary embodiment. For example, the electronic device 800 can be used as a transmitting end or a receiving end, and the electronic device 800 can be a mobile phone, a computer, a digital broadcast terminal, a message transceiver device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0201] Reference Figure 8 , the electronic device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output interface 812 , a sensor component 814 , and a communication component 816 .

[0202] The processing component 802 generally controls the overall operation of the electronic device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.

[0203] The memory 804 is configured to store various types of data to support operations on the electronic device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0204] The power supply component 806 provides power to the various components of the electronic device 800. The power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 800.

[0205] The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the electronic device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

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

[0207] The input / output interface 812 provides an interface between the processing component 802 and the peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.

[0208] The sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for the electronic device 800. For example, the sensor assembly 814 can detect the open / closed state of the electronic device 800, the relative positioning of the components, such as the display and keypad of the electronic device 800, and the sensor assembly 814 can also detect the position change of the electronic device 800 or a component of the electronic device 800, the presence or absence of contact between the user and the electronic device 800, the orientation or acceleration / deceleration of the electronic device 800, and the temperature change of the electronic device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0209] The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0210] In an exemplary embodiment, the electronic device 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.

[0211] The embodiments of the present disclosure further provide a computer-readable storage medium having computer program instructions stored thereon, which implement the steps of the method described in any one of the aforementioned embodiments when the program instructions are executed by a processor.

[0212] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is provided, see Figure 8 As shown, for example, a memory 804 including instructions, the instructions can be executed by a processor 820 of the electronic device 800 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0213] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the present disclosure. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0214] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A method for pasting clipboard data, characterized in that: Applied to the receiving end, including: In response to a clipboard event notification issued by a sending end, display the clipboard event notification; In response to a pasting action for the clipboard event notification, displaying a loading window at the receiving end; When the clipboard data corresponding to the clipboard event notification is acquired, the clipboard data is pasted.

2. The method according to claim 1, characterized in that In the case where the clipboard data corresponding to the clipboard event notification is obtained, before pasting the clipboard data, the method includes: Parsing the clipboard event notification to obtain storage address information carried in the clipboard event notification; According to the storage address information, a query instruction for querying the clipboard data corresponding to the clipboard event notification is sent to the soft bus, and the query instruction is used to instruct the sending end to upload the target clipping item corresponding to the clipboard event notification to the soft bus.

3. The method according to claim 2, characterized in that The method further comprises: Download the target cutting project from the soft bus; The target clipping item is parsed to obtain clipping board data corresponding to the clipping board event notification carried in the target clipping item.

4. The method according to claim 2, characterized in that: The parsing of the clipboard event notification to obtain the storage address information carried in the clipboard event notification includes: Sending the clipboard event notification to the upper layer application of the receiving end through the system clipboard service of the receiving end; The clipboard event notification is parsed by the upper layer application to obtain storage address information carried in the clipboard event notification.

5. The method according to any one of claims 1 to 4, characterized in that The step of displaying the clipboard event notification in response to the clipboard event notification issued by the sending end includes: In response to a clipboard event notification issued by a sending end in a network with the receiving end, the clipboard event notification is downloaded and displayed from a target service, wherein the target service is a service corresponding to the connection path determined by the sending end based on multiple connection paths with the receiving end.

6. A method for sending clipboard data, characterized in that: Applied to the sending end, including: When new clipboard data is added on the sending end, issuing a clipboard event notification; In response to the receiving end's pasting behavior for the clipboard event notification, the clipboard data corresponding to the clipboard event notification is sent.

7. The method according to claim 6, characterized in that When the clipboard data on the sending end is newly added, issuing a clipboard event notification includes: In the case where the clipboard data on the sending end is newly added, generating a target clipping item of a character string type in the form of an item format with the newly added clipboard data; Saving the target clipping item to a local clipboard service, and generating storage address information corresponding to the target clipping item; Generating a clipboard event notification in the form of a standard data header according to the storage address information; The clipboard event notification is saved to the local clipboard service and the clipboard event notification is published on a soft bus.

8. The method according to claim 7, characterized in that The step of sending the clipboard data corresponding to the clipboard event notification in response to the pasting behavior of the receiving end to the clipboard event notification includes: In response to the receiving end's pasting behavior in response to the clipboard event notification, querying the local clipboard service for a corresponding target clipping item according to the storage address information sent by the receiving end; The target clipping item corresponding to the clipboard event notification is sent to the soft bus, so that the receiving end downloads and parses the target clipping item from the soft bus to obtain the clipboard data corresponding to the clipboard event notification.

9. The method according to claim 7, characterized in that: The step of publishing the clipboard event notification to the soft bus includes: Determine whether there is a receiving end in the network; In a case where the receiving end exists in the network, establishing a long connection with the receiving end; The publishing interface is called to publish the clipboard event notification on the soft bus.

10. The method according to claim 9, characterized in that The determining whether there is a receiving end in the network includes: Determine a connection path supported by the receiving end; the connection path includes at least one of a low-power Bluetooth path, a local area network broadcast path, and a P2P path; Determining in sequence whether the receiving end exists in the network according to the priority of the supported connection paths; The establishing a long connection with the receiving end when the receiving end exists in the network includes: In the case where the receiving end exists in the network, a long connection is established with the receiving end via the supported connection path with the highest priority.

11. The method according to any one of claims 7 to 10, characterized in that: The step of generating a target clipping project in the form of a project format using the newly added clipboard data includes: Determine the file type of the newly added clipboard data; The target clipping project corresponding to the file type is generated in a project format according to the new addition time of the clipboard data.

12. A clipboard data pasting device, characterized in that: Applied to a receiving end, the device comprises: a notification display module, configured to display the clipboard event notification in response to the clipboard event notification issued by the sending end; A loading window display module, configured to display a loading window at the receiving end in response to a paste action for the clipboard event notification; The pasting module is configured to paste the clipboard data when the clipboard data corresponding to the clipboard event notification is acquired.

13. A clipboard data sending device, characterized in that: Applied to a transmitting end, the device comprises: A publishing module, configured to publish a clipboard event notification when new clipboard data is added on the sending end; The sending module is configured to send the clipboard data corresponding to the clipboard event notification in response to the pasting behavior of the receiving end to the clipboard event notification.

14. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to execute the executable instructions stored in the memory to implement the method according to any one of claims 1 to 11.

15. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the program instructions are executed by a processor, the steps of the method described in any one of claims 1 to 11 are implemented.