Information sharing method, apparatus and electronic device
Patent Information
- Application Number
- CN202210246703.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-14
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2042-03-14
AI Technical Summary
现有技术中,电子设备之间的信息共享只能传输整个文档或文件,无法灵活传输文档或页面中的部分信息,导致信息共享复杂度高。
通过在第一电子设备中检测剪切板状态是否满足更新条件,并在满足条件时将第二电子设备的剪切板中最近更新的内容存储到第一电子设备的剪切板内,支持多种内容形式的共享,包括部分文档或整个文件。
实现了电子设备之间灵活多样的信息共享,提高了共享信息的便捷性和可控性,减少了不适宜粘贴新内容时覆盖已有内容的风险。
Smart Images

Figure CN114816787B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of information processing, and more particularly to an information sharing method and device and electronic equipment. BACKGROUND
[0002] In daily life and work, users often need to share information such as text or files between different electronic devices.
[0003] A common way is to transmit files between different electronic devices through a Bluetooth wireless connection established between different electronic devices. However, based on the wireless connection between electronic devices, only the entire document or file can be transmitted. If the user wants to transmit part of the content in the document or page, the user needs to copy the part of the information to the document or file before transmission, which makes the information sharing process more complex. SUMMARY
[0004] The present application provides an information sharing method, device and electronic equipment.
[0005] The information sharing method is applied to a first electronic device and includes the following steps.
[0006] Obtaining a clipboard update indication transmitted by a second electronic device, the clipboard update indication indicating that the clipboard of the second electronic device has content updates, and the first electronic device and the second electronic device are connected;
[0007] If the clipboard state of the clipboard in the first electronic device meets the update condition, storing the most recently updated content in the clipboard of the second electronic device into the clipboard of the first electronic device.
[0008] In one possible implementation, the clipboard state of the clipboard in the first electronic device meets the update condition, including:
[0009] There is no content available for pasting in the clipboard of the first electronic device;
[0010] Or,
[0011] The content stored in the clipboard of the first electronic device the last time has been pasted for a set number of times.
[0012] In another possible implementation, after obtaining the clipboard update indication transmitted by the second electronic device, the method further includes the following steps.
[0013] Feeding back application running state information to the second electronic device;
[0014] Obtaining the clipboard sharing indication returned by the second electronic device;
[0015] if the clipboard sharing indication is a first type of clipboard sharing indication, storing the most recently updated update content in the clipboard of the second electronic device into the clipboard of the first electronic device, the first type of clipboard sharing indication being generated by the second electronic device in a case that the first electronic device is determined to have a demand for obtaining clipboard sharing content based on the application running state information;
[0016] if the clipboard sharing indication is a second type of clipboard sharing indication, obtaining a clipboard state of the clipboard of the first electronic device, the second type of clipboard sharing indication being generated by the second electronic device in a case that the first electronic device is not determined to have a demand for obtaining clipboard sharing content based on the application running state information.
[0017] In yet another possible implementation, the storing the most recently updated update content in the clipboard of the second electronic device into the clipboard of the first electronic device comprises:
[0018] sending a clipboard write request to an operating system, the clipboard write request carrying the most recently updated update content in the clipboard of the second electronic device;
[0019] storing, by the operating system, the update content into a memory region corresponding to the clipboard of the first electronic device.
[0020] In yet another possible implementation, the obtaining the clipboard update indication transmitted by the second electronic device comprises:
[0021] obtaining clipboard sharing content transmitted by the second electronic device, the clipboard sharing content being updated content in the clipboard of the second electronic device obtained by the second electronic device after there is content update in the clipboard of the second electronic device;
[0022] The storing the most recently updated update content in the clipboard of the second electronic device into the clipboard of the first electronic device if the clipboard state of the clipboard in the first electronic device meets an update condition comprises:
[0023] storing the clipboard sharing content into the clipboard of the first electronic device if the clipboard state of the clipboard of the first electronic device meets an update condition.
[0024] In yet another possible implementation, the storing the most recently updated update content in the clipboard of the second electronic device into the clipboard of the first electronic device if the clipboard state of the clipboard in the first electronic device meets an update condition comprises:
[0025] if the clipboard state of the first electronic device satisfies the update condition, requesting the second electronic device for the clipboard update indication indicating the indicated clipboard update content;
[0026] obtaining the clipboard update content transmitted by the second electronic device, the clipboard update content being the updated content in the clipboard of the second electronic device obtained by the second electronic device after the content in the clipboard of the second electronic device is updated;
[0027] storing the clipboard update content into the clipboard of the first electronic device.
[0028] In yet another possible implementation, the method further includes:
[0029] if the clipboard state of the first electronic device does not satisfy the update condition, outputting a clipboard sharing reminder for prompting that there is the updated content to be shared in the clipboard of the second electronic device.
[0030] In yet another possible implementation, the method further includes:
[0031] if the consent sharing indication for the clipboard sharing reminder is detected, storing the most recently updated updated content in the clipboard of the second electronic device into the clipboard of the first electronic device.
[0032] The information sharing apparatus is applied to a first electronic device and includes:
[0033] an update indication obtaining unit configured to obtain a clipboard update indication transmitted by a second electronic device, the clipboard update indication indicating that there is content update in the clipboard of the second electronic device, and the second electronic device being connected with the first electronic device;
[0034] an information storing unit configured to, if a clipboard state of the clipboard of the first electronic device satisfies an update condition, store the most recently updated updated content in the clipboard of the second electronic device into the clipboard of the first electronic device.
[0035] The electronic device at least includes a memory and a processor.
[0036] The processor is configured to perform the information sharing method in any of the above.
[0037] The memory is configured to store programs required by the processor for performing operations.
[0038] It can be known from the above scheme that the updated content in the second electronic device can be shared into the first electronic device according to the application. The content in the second electronic device can be a part of document or an entire file, and the content can be shared between the electronic devices in various forms, which improves the flexibility and convenience of the shared information.
[0039] Moreover, after the first electronic device obtains the indication of the update of the second electronic device, the first electronic device can paste the recently updated content in the second electronic device into the first electronic device only when the state of the clipboard of the first electronic device meets the update condition, which can reduce the covering of the content in the first electronic device, and improves the controllability and flexibility of the information sharing. BRIEF DESCRIPTION OF DRAWINGS
[0040] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiments will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative effort.
[0041] Figure 1 A flowchart of the information sharing method provided by the embodiments of the present application;
[0042] Figure 2 Another flowchart of the information sharing method provided by the embodiments of the present application;
[0043] Figure 3 Another flowchart of the information sharing method provided by the embodiments of the present application;
[0044] Figure 4 Another flowchart of the information sharing method provided by the embodiments of the present application;
[0045] Figure 5 Another flowchart of the information sharing method provided by the embodiments of the present application;
[0046] Figure 6 A component structure diagram of the information sharing device provided by the embodiments of the present application;
[0047] Figure 7 A component structure diagram of the electronic device provided by the embodiments of the present application.
[0048] The terms "first", "second", "third", "fourth" and the like in the description and in the claims, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the use of these terms herein is to be construed to cover a generalised use of these terms to describe elements distinguishable from one another, unless specifically applied to a particular sequence or chronological order. DETAILED DESCRIPTION
[0049] The technical solutions in the embodiments of the present application will be apparently and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application. Based on the embodiments in the present application, all the other embodiments obtained by a person of ordinary skill in the art without creative effort belong to the protection scope of the present application.
[0050] As shown in Figure 1 FIG. 1, which shows a flow diagram of an information sharing method provided by an embodiment of the present application. The present embodiment is applied to a first electronic device, which can be a mobile phone, a tablet computer or a desktop computer, etc., without limitation.
[0051] The method of the present embodiment can include the following steps.
[0052] S101, obtaining a clipboard update indication transmitted by a second electronic device.
[0053] The second electronic device is an electronic device other than the first electronic device. The second electronic device can also be a mobile phone, a tablet computer or a desktop computer, etc., without limitation.
[0054] In the present application, there is a connection between the second electronic device and the first electronic device. The connection between the first electronic device and the second electronic device can be a wired connection or a wireless connection.
[0055] For example, the first electronic device and the second electronic device can be connected through a Universal Serial Bus (USB).
[0056] For another example, the first electronic device and the second electronic device can be wirelessly connected through Bluetooth or other wireless networks, etc.
[0057] The clipboard update indication represents that the second electronic device has content update in its clipboard.
[0058] It can be understood that there can be multiple ways for the second electronic device to determine that there is content update in its clipboard, and correspondingly, there can be multiple ways for the second electronic device to send the clipboard update indication.
[0059] For example, the existence of the updated content in the second electronic device's clipboard can be that there is a cut or copy operation on the second electronic device. Based on this, the second electronic device can send the clipboard update indication to the first electronic device when detecting that there is a cut or copy operation on the second electronic device.
[0060] For another example, if there is a content cut or copy operation on the second electronic device, the clipboard of the electronic device will store the to-be-pasted content triggered by the cut or copy operation, and the to-be-pasted content is the updated content updated into the clipboard. Based on this, the second electronic device can send the clipboard update indication to the first electronic device when detecting that the updated content is stored in the clipboard (the clipboard has new content, so that the new content covers the historical pasted content in the clipboard).
[0061] S102, if the clipboard state of the clipboard in the first electronic device meets the update condition, store the most recently updated updated content in the second electronic device's clipboard into the first electronic device's clipboard.
[0062] The clipboard state is used to represent the data storage status and usage of the clipboard.
[0063] For example, the clipboard state reflects one or more of the following information: whether there is content available for pasting in the clipboard, historical stored content in the clipboard, and usage of the current and historical stored content in the clipboard.
[0064] In this application, the clipboard state of the first electronic device's clipboard meeting the update condition means that it is currently appropriate to store the content shared from the second electronic device into the first electronic device's clipboard, that is, it is appropriate to store the updated content in the second electronic device's clipboard into the first electronic device's clipboard. For example, the clipboard state of the first electronic device meeting the update condition can mean that the first electronic device currently has no demand for pasting operation using the clipboard.
[0065] Correspondingly, under the condition that the clipboard state of the first electronic device meets the update condition, the updated content in the second electronic device's clipboard is stored into the first electronic device's clipboard, which can realize information sharing based on the clipboard, and can also reduce the useful information in the first electronic device's clipboard being covered due to information sharing.
[0066] In actual application, the update condition required to be met by the clipboard state can have multiple possibilities.
[0067] For example, in one possible case, the clipboard state of the first electronic device meeting the update condition can be that there is no content available for pasting in the first electronic device's clipboard.
[0068] In this case, the clipboard of the first electronic device does not contain any content that can be pasted, which could mean that the clipboard of the first electronic device is empty. For example, the electronic device has not performed any copy or cut operations during this startup, so the clipboard has not stored any content to be pasted.
[0069] The first electronic device's clipboard may not contain content that can be pasted, or the most recently stored content in the clipboard may be invalid.
[0070] It is understandable that the absence of content available for pasting in the clipboard of the first electronic device indicates that the user does not need to paste the content from the clipboard of the second electronic device. In this case, storing updated content from the clipboard of the second electronic device into the clipboard of the first electronic device will not affect the user's use of the clipboard on the first electronic device side, nor will it result in the loss of the information to be pasted by the user.
[0071] In another possible scenario, the clipboard state of the first electronic device can satisfy the update condition if the most recently stored content in the clipboard of the first electronic device has been pasted a set number of times. This set number of times can be set as needed; for example, it can be 1 time or other numbers.
[0072] It is understandable that if the most recently stored content in the clipboard of the first electronic device has been pasted a set number of times, it means that the user has already used the content stored in the clipboard. The likelihood that the user will need to continue pasting the currently stored content in the clipboard is relatively small. Therefore, in this case, sharing the information in the clipboard of the second electronic device with the clipboard of the first electronic device can reduce the situation where the content that the user needs to paste is overwritten due to the content of the clipboard of the first electronic device being overwritten by the updated content from the clipboard of the second electronic device.
[0073] In another possible scenario, the clipboard state of the first electronic device may meet the update condition if the time elapsed since the most recently stored content in the clipboard was last used exceeds a set time limit. It's understandable that if a user hasn't used the content in the clipboard of the first electronic device for pasting for an extended period, it means the user no longer needs that content. In this case, storing content from the second electronic device into the clipboard of the first electronic device can reduce the likelihood of useful content in the clipboard of the first electronic device being overwritten.
[0074] It is understandable that the clipboard is a storage space allocated in memory by the operating system. The clipboard supports various forms of content storage. For example, the clipboard not only supports the storage of the entire file or document, but also supports the storage of partial text segments in documents or web pages. Therefore, the updated content in the clipboard of the second electronic device is also more diverse, which enables the first electronic device to obtain various forms of shared information through the clipboard of the second electronic device.
[0075] As can be seen from the above, this application can share the updated content in the clipboard of the second electronic device to the clipboard of the first electronic device. Since the updated content in the clipboard of the second electronic device can be in various forms such as partial documents or the entire file that are cut or copied by the second electronic device, the electronic devices can flexibly share information in various forms, improving the flexibility and convenience of information sharing.
[0076] Moreover, after the first electronic device receives the clipboard update instruction from the second electronic device, the first electronic device will only paste the most recently updated content from the second electronic device's clipboard into its clipboard if the clipboard state of its clipboard meets the update conditions. This reduces the risk of overwriting existing content in the clipboard of the first electronic device when the clipboard of the first electronic device is not suitable for pasting new content, thereby improving the controllability and flexibility of information sharing.
[0077] Understandably, when the clipboard state of the first electronic device meets the update conditions, the first electronic device needs to store the updated content from the clipboard of the second electronic device into the clipboard of the first electronic device. Therefore, before storing the updated content from the clipboard of the second electronic device into the first electronic device, it is necessary to obtain the updated content from the clipboard of the second electronic device.
[0078] There are several possible ways to obtain the updated content from the clipboard of the second electronic device. The solution of this application will be described below with reference to different scenarios where the first electronic device obtains the updated content from the clipboard of the second electronic device.
[0079] In one possible scenario, the first electronic device, after determining that the clipboard state meets the update conditions, can request the updated content from the clipboard on the second electronic device's side. The following is in conjunction with... Figure 2 This possible situation will be explained.
[0080] like Figure 2 As shown, it illustrates another flowchart of an information sharing method according to this application. The method of this embodiment is applied to a first electronic device, and this embodiment may include:
[0081] S201, obtaining a clipboard update indication transmitted by the second electronic device.
[0082] The clipboard update indication indicates that the content of the clipboard of the second electronic device is updated.
[0083] For example, the second electronic device can send the clipboard update indication to the first electronic device when detecting that there is a cut or copy operation on the second electronic device, so that the first electronic device can obtain the updated content in the clipboard of the second electronic device.
[0084] Of course, the clipboard update indication transmitted by the second electronic device to the first electronic device in other ways mentioned above is also applicable to the present embodiment, and will not be repeated here.
[0085] S202, if the clipboard state of the clipboard in the first electronic device meets the update condition, requesting the clipboard update content indicated by the clipboard update indication from the second electronic device.
[0086] The clipboard state meeting the update condition can refer to the related description above, for example, if the content of the clipboard in the first electronic device is used after the last update, the clipboard update content in the clipboard of the second electronic device is requested from the second electronic device.
[0087] The clipboard update content is the updated content in the clipboard of the second electronic device after the content of the clipboard of the second electronic device is updated.
[0088] For example, the second electronic device detects the copy operation of object A, and the first electronic device stores the content of object A in the clipboard of the second electronic device. In this case, the second electronic device sends the clipboard update indication to the first electronic device. Correspondingly, if the first electronic device determines that the clipboard state of the clipboard meets the update condition, the content of object A can be requested from the second electronic device, so as to store the content of object A in the clipboard of the first electronic device, so that the content stored in the clipboard of the first electronic device and the second electronic device is the same and can be used for pasting.
[0089] S203, storing the clipboard update content in the clipboard of the first electronic device.
[0090] In this embodiment, after receiving the clipboard update instruction from the second electronic device, the first electronic device first determines whether the clipboard state on the first electronic device side meets the update conditions. Only when the clipboard state of the first electronic device meets the update conditions will the first electronic device obtain the clipboard update content from the second electronic device side and store it in the clipboard of the first electronic device. This can reduce the situation where the clipboard of the first electronic device is not suitable for synchronization with the clipboard of the second electronic device side, and thus reduce the waste of resources caused by transmitting unnecessary clipboard update content.
[0091] In another possible scenario, if the clipboard update instruction sent by the second electronic device to the first electronic device carries clipboard update content, or if the clipboard update instruction exists in the form of transmitted clipboard shared content, then after determining that its clipboard state meets the update conditions, the first electronic device can directly store the obtained update content belonging to the clipboard of the second electronic device into its clipboard.
[0092] The following describes this possible situation using a specific implementation example. For example... Figure 3 As shown, this illustrates another flowchart of the information sharing method provided in this application embodiment. The method of this embodiment is applied to a first electronic device, and the method includes:
[0093] S301, Obtain clipboard shared content transmitted by the second electronic device.
[0094] The clipboard shared content refers to the updated content in the clipboard of the second electronic device obtained by the second electronic device after the clipboard of the second electronic device has been updated.
[0095] In this embodiment, after the second electronic device confirms the existence of a clipboard update event, it can determine the clipboard update content that updates its clipboard and transmit this clipboard update content to the first electronic device as clipboard sharing content that needs to be shared with the first electronic device. This allows the first electronic device to determine that the clipboard of the second electronic device has been updated and to obtain the specific updated content of the clipboard on the second electronic device side.
[0096] In one alternative approach, in order for the first electronic device to be able to clearly identify that the shared content transmitted by the second electronic device belongs to clipboard shared content, a clipboard sharing application may be installed on both the first and second electronic devices.
[0097] On this basis, the second electronic device detects that there is a cut or copy operation on the second electronic device through the clipboard sharing application, or detects that there is an update on the clipboard of the second electronic device through the clipboard sharing application, and determines that the clipboard of the second electronic device has content update. Correspondingly, the second electronic device can transmit the object content of the cut or copy operation, or the updated content currently updated on the clipboard, to the clipboard sharing application on the first electronic device side through the clipboard application. The clipboard sharing application on the first electronic device side obtains the shared information transmitted by the clipboard sharing application on the second electronic device side, and determines that the clipboard sharing content is obtained.
[0098] It can be understood that the installation of the clipboard sharing application on the first electronic device and the second electronic device is also applicable to other embodiments of the present application, but the operation content or sequence of the clipboard sharing application of the two electronic devices in different embodiments will be different.
[0099] Of course, the installation of the clipboard application on the first electronic device and the second electronic device to realize the sharing of the clipboard content is only one implementation manner, and other ways to realize the transmission of the updated content in the clipboard between the two electronic devices are also applicable to the present application.
[0100] S302, if the clipboard state of the clipboard of the first electronic device meets the update condition, the clipboard sharing content is stored in the clipboard of the first electronic device.
[0101] The update condition met by the clipboard state in the embodiment can also be referred to the related description in the previous embodiment, which will not be repeated here.
[0102] It can be understood that since the second electronic device will directly transmit the updated content in the clipboard as the clipboard sharing content to the first electronic device when there is an update in the clipboard of the second electronic device, when the first electronic device determines that the clipboard state meets the update condition, it is not necessary to request the clipboard update content from the second electronic device, and the clipboard sharing content can be directly stored in the clipboard of the first electronic device, so as to improve the efficiency of content sharing between electronic devices.
[0103] It can be understood that when the first electronic device determines that the clipboard state of the clipboard does not meet the update condition, in order to reduce the situation that the updated content of the clipboard on the second electronic device side cannot be synchronized to the clipboard side of the first electronic device due to misjudgment and the like, the present application can also output a clipboard sharing reminder.
[0104] The clipboard sharing reminder is used to prompt that there is updated content to be shared in the clipboard of the second electronic device.
[0105] Understandably, the user on the first electronic device can be notified of an update to the clipboard on the second electronic device based on the clipboard sharing notification. In this case, the user on the first electronic device can control whether to update their local clipboard as needed, or adjust the update conditions, etc.
[0106] For example, in one possible scenario, after the first electronic device outputs a clipboard sharing notification, the user can choose whether to agree to update their local clipboard as needed. Correspondingly, if the first electronic device detects an agreement to share the clipboard notification, it can store the most recently updated content from the second electronic device's clipboard into the first electronic device's clipboard.
[0107] The "agree to share" instruction indicates that the user wishes to synchronize the most recently updated information stored in the clipboard of the second electronic device to the clipboard of the first electronic device.
[0108] It is understandable that after the first electronic device obtains the consent sharing instruction, the way the first electronic device obtains the most recently updated content of the clipboard of the second electronic device can also be one of the possible scenarios mentioned above, without any restrictions.
[0109] To facilitate understanding, the solution of this application will be described below in conjunction with one implementation of the update conditions and one possible scenario in which the first electronic device obtains the clipboard of the second electronic device.
[0110] like Figure 4 As shown, this illustrates another flowchart of the information sharing method provided in this application embodiment. The method of this embodiment is applied to a first electronic device, and the method includes:
[0111] S401, receive clipboard update instruction transmitted by the second electronic device.
[0112] The clipboard update indicator indicates that the clipboard of the second electronic device has been updated.
[0113] This step can be referred to in the relevant description of any of the preceding embodiments, and will not be repeated here.
[0114] S402, detect whether the clipboard of the first electronic device is empty or whether the content of the clipboard of the first electronic device was last updated and used a set number of times. If yes, proceed to step S403; if no, proceed to step S405.
[0115] If the clipboard of the first electronic device is empty, it means that there is no content in the clipboard of the first electronic device that can be pasted.
[0116] It can be understood that this step is exemplarily explained in the case that the first electronic device's clipboard is empty or the clipboard state satisfies the update condition that the first electronic device's side last time updates the content of the clipboard is used for a set number of times, and the update condition is also applicable to the embodiment for other conditions.
[0117] S403, requesting the second electronic device for the clipboard update content indicated by the clipboard update indication.
[0118] S404, storing the clipboard update content into the clipboard of the first electronic device.
[0119] S405, outputting the clipboard sharing prompt.
[0120] The clipboard sharing prompt is used to prompt that there is update content to be shared in the clipboard of the second electronic device.
[0121] S406, if the first electronic device detects the consent sharing indication for the clipboard sharing prompt, requesting the second electronic device for the clipboard update content indicated by the clipboard update indication.
[0122] For example, when the first electronic device outputs the clipboard sharing prompt, two selection items can be presented at the same time, one selection item is "agree", and the other selection item is "disagree", and after the first electronic device detects that the user clicks the "agree" selection item, it is confirmed that the consent sharing indication for the clipboard sharing prompt is detected.
[0123] S407, storing the clipboard update content into the clipboard of the first electronic device.
[0124] It can be understood that if the first electronic device outputs the clipboard sharing prompt and does not detect the consent sharing indication for the clipboard sharing prompt, or receives the refusal sharing indication for the clipboard sharing prompt, the clipboard update indication sent by the second electronic device can be ignored.
[0125] It can be understood that for the case that the clipboard update indication sent by the second electronic device is the clipboard sharing content, if the first electronic device outputs the clipboard sharing prompt and does not detect the consent sharing indication for the clipboard sharing prompt, the first electronic device can discard the clipboard sharing content.
[0126] It can be understood that the clipboard is a dynamic space opened by the operating system in the memory, and the clipboard is maintained by the operating system and can be accessed by multiple application processes. On this basis, the first electronic device stores the most recently updated update content in the clipboard of the second electronic device into the clipboard of the first electronic device can be completed by means of the operating system. Specifically, the first electronic device can send a clipboard write request to its operating system, and the clipboard write request carries the most recently updated update content in the clipboard of the second electronic device.
[0127] For example, when the clipboard state of the first electronic device meets the update condition, and the first electronic device obtains the updated update content in the clipboard of the second electronic device through any one of the above-mentioned several ways, the first electronic device can send a clipboard write request to the operating system, and the clipboard write request carries the updated update content in the clipboard of the second electronic device.
[0128] On the basis of the above, the first electronic device can store the update content in the clipboard of the second electronic device into the memory area corresponding to the clipboard of the first electronic device through the operating system.
[0129] It can be understood that when information sharing between two electronic devices is realized by traditional device cooperation or cross-screen transmission, the user may need to drag and move the file to the window or interface of the specified application, which is relatively complex, and only the file can be shared, and the sharing of part of the content such as the document cannot be realized. In the information sharing method of the present application, the types of content that can be shared between different devices by the user are more diversified, and the operation is more flexible.
[0130] In addition, when information sharing between electronic devices is realized by traditional device cooperation or cross-screen transmission, the information in the other electronic device is actually stored under the directory of the specified application of the electronic device. In this case, if the electronic device wants to use the shared information in other applications, it needs to copy the information in the specified application again and then paste it into other applications.
[0131] In the scheme of the present application, after the first electronic device obtains the updated information in the clipboard of the second electronic device, the first electronic device stores the updated information in the clipboard of the first electronic device. The clipboard itself is a memory area, and does not belong to a certain application process and can be accessed by multiple application processes, so any application process can obtain the updated information from the clipboard. Moreover, the information in the clipboard can be used multiple times, which is beneficial to the user of the first electronic device to paste the updated information in the windows or files of multiple different applications.
[0132] It can be understood that, in the case that the first electronic device and the second electronic device have established a connection, if the user wishes to obtain some information from the second electronic device side and perform a paste operation on the first electronic device side, the user can open a specific application or make the application in a certain specific state on the first electronic device side, and the like. In this case, after the first electronic device side obtains the clipboard update indication, it is not necessary to detect whether the clipboard state meets the update condition, and the first electronic device side can directly store the update content of the clipboard update of the second electronic device side into the clipboard of the first electronic device.
[0133] The following is described in conjunction with a flowchart. As shown in the flowchart, a flowchart of one embodiment of the information sharing method of the present application is shown, and the method of the present embodiment can be applied to the first electronic device. The present embodiment can include the following steps: Figure 5
[0134] S501, obtaining a clipboard update indication transmitted by a second electronic device.
[0135] The clipboard update indication represents that the clipboard of the second electronic device has content update.
[0136] The step S501 can refer to the related description of the previous embodiment, which will not be repeated here.
[0137] S502, feeding back application running state information to the second electronic device.
[0138] The application running state information can reflect the application running in the first electronic device and the state of the application. For example, which application is running in the foreground of the first electronic device, whether the application is currently in use, and the like.
[0139] In particular, the application running state information can also be the application running state corresponding to at least one specified application. For example, the running state of the specified application can be whether the specified application is started, whether the specified application is currently running in the foreground, whether the user interaction window of the application is displayed, and the like.
[0140] S503, obtaining a clipboard sharing indication returned by the second electronic device.
[0141] The clipboard sharing indication is generated by the second electronic device in combination with the application running state information fed back by the first electronic device. The clipboard sharing indication is divided into two types, i.e., a first type of clipboard sharing indication and a second type of clipboard sharing indication.
[0142] The first type of clipboard sharing indication is generated by the second electronic device in the case that the second electronic device determines that the first electronic device has a demand to obtain the clipboard sharing content based on the application running state information.
[0143] The second type of the clip board sharing indication is generated by the second electronic device when the first electronic device does not have the demand of obtaining the clip board sharing content based on the application running state information.
[0144] For example, if the application running state information meets the pre-set application running state suitable for sharing the clip board, the second electronic device generates the first type of the clip board sharing indication; otherwise, the second electronic device generates the second type of the clip board sharing indication.
[0145] For example, if the first electronic device is a mobile phone and the second electronic device is a notebook computer, and the mobile phone and the notebook computer have established a connection, if the user opens an instant messaging application on the mobile phone and the display interface of the mobile phone displays a chat window of the instant messaging application, and if there is a copy operation on the notebook computer, it can be considered that the user wants to share the content on the notebook computer to the mobile phone. Of course, it can also be pre-set that the application running state that the display interface of the mobile phone displays the chat window of the instant messaging application belongs to the application running state in which the mobile phone accepts the clip board sharing.
[0146] In this case, after the notebook computer detects the copy operation and sends the clip board update indication to the mobile phone, if the notebook computer obtains the running state representation of the instant messaging application fed back by the mobile phone, that is, the instant messaging application opens the chat window, the notebook computer directly sends the first type of the clip board sharing indication to the mobile phone, so that the mobile phone can directly store the updated content updated in the clip board of the notebook computer in its clip board.
[0147] S504, if the clip board sharing indication is the first type of the clip board sharing indication, storing the recently updated content in the clip board of the second electronic device into the clip board of the first electronic device.
[0148] If the clip board sharing indication is the first type of the clip board sharing indication, the first electronic device can directly paste the updated content in the clip board of the second electronic device into its clip board without judging the clip board state of its clip board.
[0149] It can be understood that in the case that the clip board sharing indication is the first type of the clip board sharing indication, if the clip board update indication sent by the second electronic device previously contains the recently updated content in the clip board of the second electronic device, the first electronic device can directly store the updated content in its clip board; if the clip board update indication sent by the first electronic device does not contain the recently updated content in the clip board of the second electronic device, the first electronic device can also request the recently updated content in the clip board of the second electronic device from the second electronic device.
[0150] In particular, in the case that the clipboard sharing indication is a first type of clipboard sharing indication, if the second electronic device has not previously transmitted a clipboard update indication containing the most recently updated update content in the clipboard of the second electronic device, the second electronic device can further carry the most recently updated update content in the clipboard of the second electronic device in the first type of clipboard sharing indication, and on this basis, the first electronic device can directly store the update content in its clipboard.
[0151] S505, if the clipboard sharing indication is a second type of clipboard sharing indication, obtaining a clipboard state of a clipboard of the first electronic device.
[0152] S506, if the clipboard state of the clipboard of the first electronic device satisfies an update condition, storing the clipboard sharing content in the clipboard of the first electronic device.
[0153] The steps S505 and S506 can refer to the related description of the foregoing embodiments, and will not be described here again.
[0154] Corresponding to the information sharing method of the present application, the present application further provides an information sharing device. As shown in the figure, a constituent structure schematic diagram of an information sharing device of the present application is shown, which can be applied to a first electronic device. The device can include: Figure 6
[0155] An update indication obtaining unit 601 is configured to obtain a clipboard update indication transmitted by a second electronic device, the clipboard update indication indicating that there is update content in the clipboard of the second electronic device, and the second electronic device is connected to the first electronic device;
[0156] An information storage unit 602 is configured to, if a clipboard state of a clipboard of the first electronic device satisfies an update condition, store the most recently updated update content in the clipboard of the second electronic device into the clipboard of the first electronic device.
[0157] In a possible case, the information storage unit determines that the clipboard state of the clipboard of the first electronic device satisfies the update condition, which can include:
[0158] There is no content available for pasting in the clipboard of the first electronic device;
[0159] Or,
[0160] The content stored in the clipboard of the first electronic device most recently has been pasted for a set number of times.
[0161] In another possible implementation, the device further includes:
[0162] application state feedback unit, configured to feed back application running state information to the second electronic device after the update indication obtaining unit obtains the clipboard update indication transmitted by the second electronic device;
[0163] shared indication obtaining unit, configured to obtain the clipboard shared indication transmitted by the second electronic device;
[0164] first indication processing unit, configured to store the most recently updated update content in the clipboard of the second electronic device into the clipboard of the first electronic device if the clipboard shared indication is a first type of clipboard shared indication, the first type of clipboard shared indication being generated by the second electronic device in a case that the second electronic device determines that the first electronic device has a demand for obtaining clipboard shared content based on the application running state information;
[0165] second indication processing unit, configured to obtain the clipboard state of the clipboard of the first electronic device if the clipboard shared indication is a second type of clipboard shared indication, the second type of clipboard shared indication being generated by the second electronic device in a case that the second electronic device does not determine that the first electronic device has a demand for obtaining clipboard shared content based on the application running state information.
[0166] In yet another possible implementation, the information storage unit comprises:
[0167] write request unit, configured to send a clipboard write request to an operating system if the clipboard state of the clipboard in the first electronic device meets an update condition, the clipboard write request carrying the most recently updated update content in the clipboard of the second electronic device;
[0168] information write unit, configured to store the update content into a memory area corresponding to the clipboard of the first electronic device through the operating system.
[0169] In yet another possible implementation, the update indication obtaining unit comprises:
[0170] content obtaining sub-unit, configured to obtain the clipboard shared content transmitted by the second electronic device, the clipboard shared content being the updated content in the clipboard of the second electronic device obtained by the second electronic device after there is content update in the clipboard of the second electronic device;
[0171] The information storage unit comprises:
[0172] first information storage sub-unit, configured to store the clipboard shared content into the clipboard of the first electronic device if the clipboard state of the clipboard of the first electronic device meets an update condition.
[0173] In yet another possible implementation, the information storage unit comprises:
[0174] The content request sub-unit is configured to request, from the second electronic device, the content update indicated by the clipboard update indication if the clipboard state of the clipboard of the first electronic device meets the update condition.
[0175] The information obtaining sub-unit is configured to obtain the clipboard update content transmitted by the second electronic device, the clipboard update content being the updated content in the clipboard of the second electronic device obtained by the second electronic device after the content in the clipboard of the second electronic device is updated.
[0176] The second information storage sub-unit is configured to store the clipboard update content into the clipboard of the first electronic device.
[0177] In yet another possible implementation, the apparatus further comprises:
[0178] The reminding output unit is configured to output a clipboard sharing reminder if the clipboard state of the clipboard of the first electronic device does not meet the update condition, the clipboard sharing reminder being used to prompt that there is the update content to be shared in the clipboard of the second electronic device.
[0179] In an optional implementation, the apparatus further comprises
[0180] The information update unit is configured to store the most recently updated update content in the clipboard of the second electronic device into the clipboard of the first electronic device if the consent sharing indication for the clipboard sharing reminder is detected.
[0181] In yet another aspect, the present application also provides an electronic device, such as Figure 7 As shown in the figure, a schematic diagram of a component structure of the electronic device is shown, the electronic device can be any type of electronic device, and the electronic device at least comprises a memory 701 and a processor 702.
[0182] The processor 701 is configured to perform the information sharing method in any one of the above embodiments.
[0183] The memory 702 is configured to store programs required by the processor for performing operations.
[0184] It can be understood that the electronic device can further comprise a display unit 703 and an input unit 704.
[0185] Of course, the electronic device can also have more or less components, and no limitation is made in this regard. Figure 7 More or less components can be included in the electronic device, and no limitation is made in this regard.
[0186] In another aspect, the present application also provides a computer readable storage medium, wherein at least one instruction, at least one program, a code set or an instruction set is stored, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by a processor to implement the information sharing method according to any one of the above embodiments.
[0187] The present application also provides a computer program, which comprises computer instructions stored in a computer readable storage medium. The computer program is used to execute the information sharing method according to any one of the above embodiments when running on an electronic device.
[0188] It should be noted that each of the above-described embodiments of the present application is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. Therefore, the same or similar parts among the embodiments can be mutually referred to. Meanwhile, the features described in each of the embodiments can be replaced or combined with each other, so as to enable or use the present application. For the device embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the description of the method embodiments.
[0189] Finally, it should be noted that in this document, the terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between the entities or operations. Moreover, the terms "include", "contain" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or device. Without more limitations, the element defined by the statement "including a" does not exclude the presence of other identical elements in the process, method, article or device including the element.
[0190] The above description of the disclosed embodiments enables a person skilled in the art to implement or use the present application. Various modifications to the embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. An information sharing method, applied to a first electronic device, comprising: Obtain a clipboard update indication transmitted by a second electronic device, the clipboard update indication indicating that there is a content update in the clipboard of the second electronic device, and there is a connection between the second electronic device and the first electronic device; If the clipboard state of the clipboard in the first electronic device meets the update condition, the most recently updated content in the clipboard of the second electronic device is stored in the clipboard of the first electronic device; the clipboard state of the clipboard in the first electronic device meeting the update condition indicates that it is suitable to store content shared from the second electronic device into the clipboard of the first electronic device.
2. The method according to claim 1, wherein the shear plate state of the shear plate in the first electronic device satisfies the update condition, including: The clipboard of the first electronic device does not contain any content that can be pasted. or, The most recently stored content in the clipboard of the first electronic device has been pasted a set number of times.
3. The method according to claim 1 or 2, further comprising, after obtaining the clipboard update instruction transmitted by the second electronic device: Feedback of application running status information to the second electronic device; Obtain the clipboard sharing indication returned by the second electronic device; If the clipboard sharing indication is a first type of clipboard sharing indication, the most recently updated content in the clipboard of the second electronic device is stored in the clipboard of the first electronic device. The first type of clipboard sharing indication is generated by the second electronic device when it is determined, based on the application running status information, that the first electronic device has a need to obtain clipboard shared content. If the clipboard sharing indication is a second type of clipboard sharing indication, the clipboard status of the first electronic device is obtained. The second type of clipboard sharing indication is generated by the second electronic device when the application running status information does not determine that the first electronic device has a need to obtain clipboard shared content.
4. The method according to claim 1, wherein storing the most recently updated content in the clipboard of the second electronic device into the clipboard of the first electronic device comprises: Send a clipboard write request to the operating system, the clipboard write request carrying the most recently updated content in the clipboard of the second electronic device; The operating system stores the updated content in the memory area corresponding to the clipboard of the first electronic device.
5. The method according to claim 1, wherein obtaining the clipboard update indication transmitted by the second electronic device comprises: Obtain the clipboard shared content transmitted by the second electronic device, wherein the clipboard shared content is the updated content in the clipboard of the second electronic device obtained after the clipboard of the second electronic device has been updated; The step of storing the most recently updated content from the clipboard of the second electronic device into the clipboard of the first electronic device if the clipboard state in the first electronic device meets the update condition includes: If the clipboard state of the clipboard of the first electronic device meets the update condition, the shared content of the clipboard is stored in the clipboard of the first electronic device.
6. The method according to claim 1, wherein if the clipboard state of the clipboard in the first electronic device meets the update condition, storing the most recently updated content in the clipboard of the second electronic device into the clipboard of the first electronic device, comprises: If the clipboard status of the clipboard of the first electronic device meets the update conditions, the second electronic device is requested to provide the clipboard update content indicated by the clipboard update instruction. Obtain the clipboard update content transmitted by the second electronic device, wherein the clipboard update content is the updated content in the clipboard of the second electronic device obtained after the clipboard of the second electronic device has been updated; The updated clipboard content is stored in the clipboard of the first electronic device.
7. The method according to claim 1 or 2, further comprising: If the clipboard status of the first electronic device does not meet the update conditions, a clipboard sharing reminder is output. The clipboard sharing reminder is used to indicate that there is update content to be shared in the clipboard of the second electronic device.
8. The method according to claim 7, further comprising: If an agreement to share is detected in response to the clipboard sharing notification, the most recently updated content in the clipboard of the second electronic device is stored in the clipboard of the first electronic device.
9. An information sharing device applied to a first electronic device, comprising: An update indication obtaining unit is used to obtain a clipboard update indication transmitted by a second electronic device, wherein the clipboard update indication indicates that there is a content update in the clipboard of the second electronic device, and there is a connection between the second electronic device and the first electronic device. An information storage unit is configured to store the most recently updated content in the clipboard of the second electronic device into the clipboard of the first electronic device if the clipboard state of the clipboard in the first electronic device meets the update condition; the clipboard state of the clipboard in the first electronic device meeting the update condition indicates that it is suitable to store content shared from the second electronic device into the clipboard of the first electronic device.
10. An electronic device, comprising at least a memory and a processor; in, The processor is configured to execute the information sharing method as described in any one of claims 1 to 8 above; The memory is used to store the programs required for the processor to perform operations.
Citation Information
Patent Citations
Method and device for sharing data
CN103530342A