CN115499945A - Data sharing method and device, electronic equipment and storage medium - Google Patents

Data sharing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115499945A
CN115499945A CN202211110687.5A CN202211110687A CN115499945A CN 115499945 A CN115499945 A CN 115499945A CN 202211110687 A CN202211110687 A CN 202211110687A CN 115499945 A CN115499945 A CN 115499945A
Authority
CN
China
Prior art keywords
data
electronic device
clipboard
updated
data sharing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211110687.5A
Other languages
Chinese (zh)
Inventor
张磊
谭伯成
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202211110687.5A priority Critical patent/CN115499945A/en
Publication of CN115499945A publication Critical patent/CN115499945A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/543User-generated data transfer, e.g. clipboards, dynamic data exchange [DDE], object linking and embedding [OLE]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W56/00Synchronisation arrangements
    • H04W56/001Synchronization between nodes

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the application discloses a data sharing method and device, electronic equipment and a storage medium. The first electronic device establishes a data sharing channel between the first electronic device and the second electronic device based on the data connection by establishing the data connection with the second electronic device. And then detecting first clipboard data of the first electronic equipment, and when the first clipboard data is updated, sending the updated first clipboard data to the second electronic equipment through the data sharing channel. Therefore, the first electronic device shares the first clipboard data with the second electronic device.

Description

Data sharing method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of communications technologies, and in particular, to a data sharing method and apparatus, an electronic device, and a storage medium.
Background
With the development of network technology, a scheme of interconnection of multiple devices has appeared on the market, and in some scenarios, different devices may share some data, such as a user interface, multimedia data, and the like.
In some scenarios, after copying some data from one end electronic device to a clipboard, a user wants to obtain the copied data on the clipboard from the other end electronic device. In the prior art, the copied data is shared after the electronic devices at two ends are connected, but the problem that the copied data is not successfully shared exists.
Disclosure of Invention
The embodiment of the application provides a data sharing method and device, electronic equipment and a storage medium. The data sharing method can enable clipboard data to be shared between the first electronic device and the second electronic device.
In a first aspect, an embodiment of the present application provides a data sharing method, applied to a first electronic device, including:
establishing a data connection with a second electronic device, and establishing a data sharing channel between the first electronic device and the second electronic device based on the data connection;
detecting first clipboard data of the first electronic device;
and when the first clipboard data is updated, sending the updated first clipboard data to the second electronic equipment through the data sharing channel.
In a second aspect, an embodiment of the present application provides a data sharing method, applied to a second electronic device, including:
establishing a data connection with a first electronic device, and establishing a data sharing channel between the first electronic device and a second electronic device based on the data connection;
receiving first clipboard data sent by the first electronic device through the data sharing channel;
and updating the first clipboard data to a clipboard of the second electronic device to obtain target second clipboard data.
In a third aspect, an embodiment of the present application provides a data sharing apparatus, applied to a first electronic device, including:
the first connection module is used for establishing data connection with second electronic equipment and establishing a data sharing channel between the first electronic equipment and the second electronic equipment based on the data connection;
the detection module is used for detecting first clipboard data of the first electronic equipment;
the first sending module is used for sending the updated first clipboard data to the second electronic device through the data sharing channel when the first clipboard data is updated.
In a fourth aspect, an embodiment of the present application provides a data sharing apparatus, applied to a second electronic device, including:
the second connection module is used for establishing data connection with first electronic equipment and establishing a data sharing channel between the first electronic equipment and the second electronic equipment based on the data connection;
the receiving module is used for receiving first clipboard data sent by the first electronic equipment through the data sharing channel;
and the updating module is used for updating the first clipboard data to the clipboard of the second electronic device so as to obtain target second clipboard data.
In a fifth aspect, an embodiment of the present application provides a storage medium, on which a computer program is stored, and when the computer program is executed on a computer, the computer is caused to execute the data sharing method provided by the embodiment of the present application.
In a sixth aspect, an embodiment of the present application further provides an electronic device, which includes a memory and a processor, where the processor is configured to execute the data sharing method provided in the embodiment of the present application by calling a computer program stored in the memory.
In the embodiment of the application, by establishing the data sharing channel between the first electronic device and the second electronic device, when the first clipboard data of the first electronic device and/or the second clipboard data of the second electronic device are updated, the updated first clipboard data can be synchronized to the second electronic device and/or the updated second clipboard data can be synchronized to the first electronic device through the data sharing channel, so that clipboard data sharing between the first electronic device and the second electronic device is realized.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic diagram of a system architecture of a data processing method according to an embodiment of the present application.
Fig. 2 is a module frame diagram of a first connection module provided in an embodiment of the present application.
Fig. 3 is a schematic interaction diagram between electronic devices provided in an embodiment of the present application.
Fig. 4 is another interaction diagram between electronic devices provided in an embodiment of the present application.
Fig. 5 is a schematic flowchart of a data sharing method according to an embodiment of the present application.
Fig. 6 is another schematic flow chart of a data sharing method according to an embodiment of the present application.
Fig. 7 is a schematic diagram of a shared switch of a clipboard according to an embodiment of the present application.
Fig. 8 is another schematic flow chart of a data sharing method according to an embodiment of the present application.
Fig. 9 is a schematic flowchart of a data sharing method according to an embodiment of the present application.
Fig. 10 is a schematic flowchart of a data sharing method according to an embodiment of the present application.
Fig. 11 is a schematic diagram of types of a first electronic device and a second electronic device provided in an embodiment of the present application.
Fig. 12 is a schematic structural diagram of a data sharing device according to an embodiment of the present application.
Fig. 13 is a schematic structural diagram of another data sharing apparatus according to an embodiment of the present application.
Fig. 14 is a schematic structural diagram of an electronic device provided in an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In some scenarios, after copying some data from one end electronic device to a clipboard, a user wants to obtain the copied data on the clipboard from the other end electronic device. In the prior art, the copied data is shared after the electronic devices at two ends are connected, but the problem that the copied data is not successfully shared exists.
In order to solve the technical problem, embodiments of the present application provide a data processing method, an apparatus, an electronic device, and a storage medium.
The data processing method is established on a connection service matched with a first electronic device and a second electronic device, for example, a connection framework of a unified standard is established between the first electronic device and the second electronic device, the connection framework includes a corresponding software module and a connection protocol, the first electronic device and the second electronic device can be connected through the corresponding software module and the connection protocol, and data can be mutually transmitted and synchronized between the first electronic device and the second electronic device.
The first electronic device and the second electronic device may be a tablet computer, a mobile phone, a television, a computer, and other various types of electronic devices, which are not limited herein.
Referring to fig. 1, fig. 1 is a schematic diagram of a system architecture of a data processing method according to an embodiment of the present application.
The first electronic device and the second electronic device comprise an application layer, an interconnection frame layer and a hardware layer. As shown in fig. 1, the album, the file manager, the setting center, and the notification center are self-contained system applications of the first electronic device and the second electronic device, such as self-contained system applications of a tablet computer or a mobile phone, and the functions of file transmission and access, clipboard data sharing, and the like are realized through linkage with related applications.
In the interconnection frame layer, the first electronic device includes a first connection module and a first data connection module, and the first connection module may be understood as an application for cross-screen interconnection between the first electronic device and the second electronic device. The first connection module is responsible for providing core functions of cross-screen interconnection function entry management of the first electronic equipment side, screen projection content display from the second electronic equipment side to the first electronic equipment side, screen projection reverse control, data synchronization and the like. Specifically, the first connection module may perform distributed and collaborative invocation, such as file synchronization, clipboard synchronization, auxiliary input, and the like.
The first data connection module may be understood as an application, and the first data connection module is configured to provide implementation of an interconnection protocol, for example, provide corresponding protocols and interfaces between different smart devices, so that scanning, discovery and connection between different devices may be performed.
The first connection module comprises a first data sharing module and a first screen projection module. The first data sharing module can be understood as a software service framework, a corresponding software communication protocol is built in the software service framework, and the first data sharing module can provide functions such as capability calling and cross-terminal operation for a plurality of intelligent devices.
The first screen projection module can play screen projection contents and convert and transmit reverse control events. For example, the first screen projection module may play the screen projection content transmitted by the second electronic device.
In the interconnection framework layer, the second electronic device includes a second connection module and a second data connection module, and the second connection module can be understood as an application for cross-screen interconnection between the first electronic device and the second electronic device. The second connection module can be connected with the first connection module through a corresponding protocol, so that data transmission and sharing between the first electronic equipment and the second electronic equipment are realized.
The second data connection module may be understood as an application, and the second data connection module is configured to provide implementation of an interconnection protocol, for example, provide corresponding protocols and interfaces between different smart devices, so that different devices may scan, discover and connect with each other.
The second connection module comprises a second data sharing module and a second screen projection module. The second data sharing module can be understood as a software service framework, a corresponding software communication protocol is built in the software service framework, and the first data sharing module can provide functions of capability calling, cross-terminal operation and the like among a plurality of intelligent devices.
The second screen projection module can be responsible for initiating a screen projection process and control of the first electronic device side at the second electronic device side, and transmitting various types of data between the first electronic device and the second electronic device.
As shown in fig. 1, the P2P module is a point-to-point connection technology for the hardware layer, and can directly establish tcp/ip connection between two electronic devices without involvement of the application processor.
In this embodiment of the application, the screen-casting content (such as foreground screen-casting content or background screen-casting content) generated by the second electronic device may be transmitted to the first connection module of the first electronic device through the second connection module, and then displayed on the screen of the first electronic device.
Some data in the first electronic device may be transmitted to the second module of the second electronic device through the first connection module, such as transmitting the first clipboard data of the first electronic device to a clipboard of the second electronic device.
For a more detailed understanding of the first connection module of the first electronic device in the present application, please refer to fig. 2, wherein fig. 2 is a schematic diagram of a module frame of the first connection module according to an embodiment of the present application.
The first connection module further comprises an interface display module, a background control module and a multimedia module. The interface display module comprises a connection interface unit, a code scanning interface unit, a screen projection floating window unit, a full screen unit, a floating ball unit, a dragging unit, a file transmission unit, a prompt unit, an authority unit, a notification unit and a setting interface unit, so that the display of various functional interfaces is realized through various units. For example, the connection interface unit can realize the display of the connection interface when the first electronic device is connected with the second electronic device; the scanning interface unit can provide a corresponding code scanning interface for the first electronic device when the second electronic device scans the code for the first electronic device.
The background control module is used for controlling the clipboard of the first electronic device and controlling file transmission, so that the clipboard and the file transmission can normally run in the background.
The multimedia module is used for controlling the playing of audio and video, and is also provided with a multi-terminal unified player SDK for providing reverse control of the playing, touch and key events of screen projection contents.
Referring to fig. 3, fig. 3 is a schematic view of interaction between electronic devices according to an embodiment of the present disclosure.
In a scene that the first electronic device and the second electronic device are interconnected, the first electronic device is connected through the first data connection module and the second data connection module of the second electronic device, so that data connection between the first electronic device and the second electronic device is established. For example, both may invoke respective wireless components, such as bluetooth components or Wi-Fi components, to establish a point-to-point wireless data connection, or invoke respective wired components, such as universal serial interface components, to establish a point-to-point wired data connection.
Specifically, the first connection module of the first electronic device and the second connection module of the second electronic device may implement communication based on the data connection.
In some embodiments, the first connection module and the second connection module may establish a data sharing channel based on the data connection, and the data sharing channel may be used to transmit various types of data such as notification messages, files, clipboard data, and the like.
In some embodiments, the first electronic device may detect the clipboard of the first electronic device through the first connection module, for example, the first connection module may detect the first electronic clipboard at intervals, so as to determine whether the first clipboard data of the first electronic device is updated.
If the first connection module detects that a user performs a copy operation on a first foreground user interface of the first electronic device, the first clipboard data of the first electronic device is updated, the first connection module obtains the updated first clipboard data, and then sends the updated first clipboard data to a second connection module of the second electronic device through the data sharing channel.
After receiving the updated first clipboard data, the second connection module generates corresponding response information, so that a corresponding prompt is given to the user on the second electronic device. For example, the second connection module may generate a corresponding prompt box based on the graphical user interface, within which a corresponding prompt message is generated to prompt the user that the clipboard of the first electronic device has been synchronized.
The user may copy the updated first clipboard data in the second foreground user interface of the second electronic device, and paste the copied data into a corresponding input area of the second electronic device, such as an input area of a document opened on the second electronic device, or an input box of a chat interface, or a website bar of a browser. Therefore, the user can directly paste the first clipboard data copied on the clipboard of the first electronic device on the second electronic device.
Because the first electronic equipment is directly connected with the second electronic equipment, the data transmission method has high transmission rate and low time delay, and the network is stable. In addition, the first connection module of the first electronic device and the second connection module of the second electronic device have at least partially the same software service framework, so that the data transmission and data processing are faster and more stable, and the transmission data loss is avoided.
Therefore, after the first electronic device copies the data, the obtained updated first clipboard data can be quickly and stably transmitted to the second electronic device, and meanwhile, the second electronic device can quickly process the updated first clipboard data. Therefore, the user is difficult to perceive the delay of the first clipboard data synchronously updated on the second electronic equipment in the using process, and the updated first clipboard data on the first electronic equipment is pasted on the second electronic equipment.
Referring to fig. 4, fig. 4 is another schematic interaction diagram between electronic devices according to an embodiment of the disclosure.
For a simpler understanding of the data sharing method provided in the embodiments of the present application, the present embodiment is described in terms of direct interaction between the first electronic device and the second electronic device.
The clipboard sharing service can be understood as one of the first connection module and the second connection module, and the clipboard sharing service can be used for cross-terminal and cross-process access.
When the end user of the first electronic device performs a copy operation, such as copying a piece of text, the first electronic device may obtain the copied text and determine it as the updated first clipboard data. And the first electronic equipment sends the updated first clipboard data to the second electronic equipment through the data sharing channel.
After receiving the updated first clipboard data, the second electronic device sets the updated first clipboard data in the clipboard of the second electronic device, and generates corresponding prompt information of the clipboard synchronized with the first electronic device at the second electronic device.
The user can perform an operation of pasting the updated first clipboard data according to the prompt information. In addition, the user can copy some data on the second electronic device, and after the second electronic device detects the copy operation, the copied data is determined as the updated second clipboard data, and then the second clipboard data is sent to the first electronic device through the data sharing channel.
After receiving the updated second clipboard data, the first electronic device updates the updated second clipboard data into the clipboard of the first electronic device, and generates corresponding prompt information of the clipboard synchronized with the second electronic device at the first electronic device.
That is to say, in the embodiment of the present application, after the first electronic device and the second electronic device are interconnected in a cross-terminal manner, the clipboard data of the first electronic device and the clipboard data of the second electronic device can be synchronized through the data connection between the first electronic device and the second electronic device, so that the user can share the transaction clipboard data on the multi-terminal device.
Referring to fig. 5, fig. 5 is a schematic flowchart illustrating a data sharing method according to an embodiment of the present disclosure. The data sharing method may be applied to the first electronic device. The data sharing method may include the steps of:
110. and establishing a data connection with the second electronic equipment, and establishing a data sharing channel between the first electronic equipment and the second electronic equipment based on the data connection.
The first electronic device is a currently used electronic device, and the first electronic device can actively or passively establish data connection with the second electronic device. Based on the data connection, the first electronic device may obtain display content of the second electronic device or transmit the display content of the first electronic device to the second electronic device. The first electronic device and the second electronic device may also send respective clipboard data to each other.
In some embodiments, on the basis of the data connection established between the first electronic device and the second electronic device, for example, the first electronic device and the second electronic device may establish the data connection through a P2P format. The first electronic device may establish a data sharing channel between the first data sharing module and a second data sharing module of the second electronic device, and the data sharing channel may transmit the first clipboard data of the first electronic device to the second electronic device.
The first electronic device can also establish a screen projection channel between the first screen projection module and a second screen projection module of the second electronic device, and the first electronic device can acquire screen projection data sent by the second electronic device through the screen projection channel, so that display content of the second electronic device is displayed on the first electronic device. Or the first electronic equipment sends the screen projection data of the first electronic equipment to the second electronic equipment through the screen projection channel, so that the display content of the first electronic equipment is displayed on the second electronic equipment.
In some embodiments, in consideration of the fact that a user performs operations such as screen sharing and data sharing with a high probability when performing interconnection of multi-terminal devices, after the data connection is established between the first electronic device and the second electronic device, a screen projection channel may be established between the first electronic device and the second electronic device first, and then a data sharing channel may be established.
120. First clipboard data of a first electronic device is detected.
In some implementations, the first electronic device can detect its first clipboard data through the first connection module. First clipboard data of the first electronic device is detected, such as by a clipboard data sharing service, through the first connection module.
The first electronic device can operate the first connection module in a background mode, so that the first clipboard data can be monitored in real time under the condition that the application used by a user foreground is interfered.
130. When the first clipboard data is updated, the updated first clipboard data is sent to the second electronic device through the data sharing channel.
In some embodiments, a user may copy some files or data while using the first electronic device, causing updated first clipboard data to appear on the clipboard of the first electronic device.
For example, in a scenario where a user views an article using the first clipboard data, the user feels that a sentence written in the article is copied to the clipboard through a copy operation, and the first clipboard data of the first electronic device is updated. The first electronic device can send the updated first clipboard data to the second electronic device through the data sharing channel, so that the updated first clipboard data can be synchronized on the second electronic device.
In the embodiment of the application, the first electronic device establishes a data sharing channel between the first electronic device and the second electronic device based on the data connection by establishing the data connection with the second electronic device. And then detecting first clipboard data of the first electronic equipment, and when the first clipboard data is updated, sending the updated first clipboard data to the second electronic equipment through the data sharing channel. Therefore, the first electronic device shares the first clipboard data with the second electronic device.
Referring to fig. 6, fig. 6 is another schematic flow chart of a data sharing method according to an embodiment of the present disclosure. The data sharing method is applied to the first electronic equipment, and can comprise the following steps:
201. and establishing a data connection with the second electronic equipment, and determining the equipment information of the second electronic equipment.
In some embodiments, after the first electronic device and the second electronic device establish the data connection, it is also possible that a data transmission channel is established between the first electronic device and another electronic device other than the second electronic device.
In the interconnection framework adopted by the first electronic equipment, at least part of communication protocols and software services in the first connection module are the same as those adopted in the interconnection framework of other electronic equipment, so that cross-screen interconnection among the multi-terminal electronic equipment is realized. If the first electronic device is connected with the second electronic device after being connected with the other electronic device, it is easy to cause that the data channel used after the connection with the second electronic device is the other electronic device, which finally results in the connection failure with the second electronic device, or results in that the data transmitted to the second electronic device is wrong, or even the corresponding data cannot be transmitted to the second electronic device.
In order to solve the technical problem, in the embodiment of the application, before a data sharing channel is established between a first electronic device and a second electronic device, the first electronic device may acquire device information of the second electronic device. For example, the device information includes a device model, a device code, a device hardware identification code, and the like.
202. And establishing a data sharing channel with the second electronic equipment according to the equipment information of the second electronic equipment.
In some embodiments, the first connection module of the first electronic device may set the corresponding data channel according to the device information of the second electronic device. For example, the corresponding data channel is determined according to the device model of the second electronic device, and for example, if the second electronic device is a tablet computer, the data channel with the tablet computer is established.
And then the first electronic device determines the data channel as a data sharing channel between the first electronic device and the second electronic device, and then performs subsequent clipboard data sharing through the data sharing channel.
It should be noted that the data sharing channel may also transmit other types of data, such as some file data, some notification data, and so on.
203. And binding the clipboard data sharing service with the second electronic device.
In some implementations, a first connection module of a first electronic device can generate a corresponding clipboard data sharing service and then bind the clipboard data sharing service with a second connection module of a second electronic device. So as to facilitate subsequent sharing of clipboard data between the first electronic device and the second electronic device.
204. First clipboard data of a first electronic device is detected according to a clipboard data sharing service.
In some embodiments, the first electronic device may create a clipboard data detection event through the clipboard data sharing service, so as to detect a clipboard of the first electronic device in the background, thereby determining whether the first clipboard data of the first electronic device is updated.
205. A set state of a first clipboard data sharing switch is determined.
Referring to fig. 7, fig. 7 is a schematic diagram of a sharing switch of a clipboard according to an embodiment of the present application.
In some embodiments, a shared switch for the first clipboard data may be provided on the first electronic device in order to allow for information security on the different device. As shown in fig. 7, in the connection and sharing column in the setting, the user can view the sharing switch of the shared clipboard with the second electronic device.
When the user turns on the shared switch, the updated first clipboard data is transmitted to the connected second electronic device, so that the privacy safety of the user is ensured.
In some embodiments, the first electronic device may also determine whether a landscape screen state of the first electronic device has changed. If the horizontal and vertical screen states of the first electronic device are changed, the setting state of the first clipboard data sharing switch is changed into a default setting state.
For example, when the user uses the first electronic device while the user is using the first electronic device while the user is writing a document, the user uses the first electronic device while the user is using the first electronic device while the user is writing a document. At this time, in order to ensure privacy security of the user, the first electronic device may switch the shared switch of the first clipboard data to a default setting state, for example, the default setting state is an off state.
In some usage scenarios, a user may make frequent bar and portrait screen switches, but want to retain clipboard sharing functionality. As shown in fig. 7, in the setting interface corresponding to the first electronic device, there is a switch option for automatically switching the shared clipboard switch, and after the user closes the switch option, when the first electronic device performs horizontal and vertical screen switching, the setting state of the shared switch of the first clipboard data is determined to be the state set by the user.
In some embodiments, the first electronic device may further send the setting state of the first clipboard data sharing switch to the second electronic device, then receive the setting state of the second clipboard data sharing switch of the second electronic device returned by the second electronic device, and finally determine whether to send the updated first clipboard data to the second electronic device according to the setting state of the second clipboard data sharing switch.
For example, when the setting state of the first clipboard data sharing switch of the first electronic device is the opened state, the opened state is sent to the second electronic device through the data sharing channel.
And then receiving the setting state of a second clipboard data sharing switch of the second electronic equipment, and if the setting state of the second clipboard data sharing switch is in an opened state, determining that the updated first clipboard data can be subsequently sent to the second electronic equipment. And if the setting state of the second clipboard data sharing switch is the closed state, determining that the updated first clipboard data is not sent to the second electronic equipment subsequently.
In some embodiments, after the first electronic device and the second electronic device establish the data connection, there may be a problem that the first electronic device and the second electronic device are disconnected, and at this time, the user may repeatedly operate the setting state of the sharing switch of the first clipboard data or repeatedly operate the setting state of the sharing switch of the second clipboard data.
In order to solve the problem, after the first electronic device and the second electronic device reestablish the data connection, the first electronic device and the second electronic device may transmit the setting state of the shared switch of their clipboards through the data connection. Thereby enabling the first electronic device and the second electronic device to determine whether to continue to share the clipboard according to the setting state of the sharing switch of the clipboard of the other party.
206. And if the setting state is the opened state, when the first clipboard data is updated, sending the updated first clipboard data to the second electronic equipment through the data sharing channel.
In some embodiments, if the setting state is the opened state, when the first clipboard data is updated, the first electronic device may determine a data type of the updated first clipboard data, and determine whether to send the updated first clipboard data to the second electronic device through the data sharing channel according to the data type.
For example, the updated first clipboard data may be a picture, text, video, and so forth. When the data type is a text type, determining to send the updated first clipboard data to the second electronic device through the data sharing channel.
In some embodiments, the array length of the updated first clipboard data is obtained within a preset number of times; and if the probability of obtaining the array length within the preset times is zero, determining that the updated first clipboard data is not sent to the second electronic equipment through the data sharing channel.
The first clipboard data copied to the clipboard by the user can be of various types, such as documents of various formats, including txt, html, rtf, xls, doc, ppt, wpd, pdf, and the like.
At this time, when the first electronic device may determine that the data type is the text type, it determines to send the updated first clipboard data to the second electronic device through the data sharing channel.
For clipboard data of other format types, the array length may be obtained again after the obtaining fails if the probability of the array length of the updated first clipboard data is zero. If the corresponding array length still cannot be obtained from the updated first clipboard data within the preset times, the text data cannot be obtained, and the obtaining is quitted at this moment. The first electronic device determines not to send the updated first clipboard data.
If the first connection module can obtain the array length of the updated first clipboard data, it indicates that the updated first clipboard data is text data, and at this time, it may be determined that the updated first clipboard data is sent to the second electronic device through the data sharing channel.
It should be noted that, for the second electronic device, the second clipboard data of the second electronic device may also be processed in this manner.
Referring to fig. 8, fig. 8 is another schematic flow chart illustrating a data sharing method according to an embodiment of the present disclosure. The data sharing method can also comprise the following steps:
301. when the first clipboard data is updated, the updated first clipboard data and the first clipboard data updated last time are determined.
In some implementations, when an update occurs to the first clipboard data, the first electronic device can determine the updated first clipboard data, as well as the first clipboard data that was last updated.
For example, the update time of the updated first clipboard data is determined, and then the first clipboard data updated last time is obtained according to the update time and the preset time interval.
302. And comparing the updated first clipboard data with the first clipboard data updated last time to obtain a comparison result.
The current updated first clipboard data and the last updated first clipboard data may or may not be the same.
The updated first clipboard data and the first clipboard data updated last time can be compared to obtain a comparison result, and the comparison result can be the same or different.
If the current updated first clipboard data is the same as the last updated first clipboard data, and in the process of interconnecting the first electronic device and the second electronic device, it means that it is not necessary to send the updated first clipboard data to the second electronic device any more.
If the current updated first clipboard data is the same as the last updated first clipboard data, step 303 is entered.
303. And if the updated first clipboard data is different from the first clipboard data updated last time, determining to send the updated first clipboard data.
And if the current updated first clipboard data is not the same as the last updated first clipboard data, determining to send the updated first clipboard data. Thereby enabling synchronization of the updated first clipboard data of the first electronic device on the second electronic device.
304. And sending the updated first clipboard data to the second electronic equipment through the data sharing channel.
The first electronic device may send the updated first clipboard data to the second electronic device through the data sharing channel.
Because the first electronic equipment is directly connected with the second electronic equipment, the data transmission method has high transmission rate and low time delay, and the network is stable. In addition, the first connection module of the first electronic device and the second connection module of the second electronic device have at least partially the same software service framework, so that the data transmission and data processing are faster and more stable, and the transmission data loss is avoided.
Therefore, after the first electronic device copies the data, the obtained updated first clipboard data can be quickly and stably transmitted to the second electronic device, and meanwhile, the second electronic device can quickly process the updated first clipboard data. Therefore, the user is difficult to perceive the delay of the first clipboard data synchronously updated on the second electronic equipment in the using process, and the updated first clipboard data on the first electronic equipment is pasted on the second electronic equipment.
Referring to fig. 7, in 207, if the data connection between the first electronic device and the second electronic device is disconnected, the first clipboard data sharing switch of the first electronic device is changed to a default setting state.
In some embodiments, if the data connection between the first electronic device and the second electronic device is broken, the set state of the first clipboard data sharing switch of the first electronic device is changed to a default set state. For example, the setting state of the first clipboard data sharing switch of the first electronic device is changed to the off state, so that privacy disclosure of the user is avoided.
In the embodiment of the application, the first electronic device determines the device information of the second electronic device by establishing a data connection with the second electronic device. And then establishing a data sharing channel with the second electronic equipment according to the equipment information of the second electronic equipment. And binding clipboard data sharing service with the second electronic device, and detecting the first clipboard data of the first electronic device according to the clipboard data sharing service. And then determining that the setting state of the first clipboard data sharing switch is the opened state, and when the first clipboard data is updated, sending the updated first clipboard data to the second electronic equipment through the data sharing channel. Therefore, the first electronic device shares the updated first clipboard data with the second electronic device.
Referring to fig. 9, fig. 9 is a schematic flowchart illustrating a data sharing method according to an embodiment of the present application. The data sharing method may be applied to the second electronic device, and the data sharing method may include the steps of:
410. establishing data connection with the first electronic equipment, and establishing a data sharing channel between the first electronic equipment and the second electronic equipment based on the data connection.
The second electronic device is a currently used electronic device, and the second electronic device can actively or passively establish data connection with the first electronic device. Based on the data connection, the second electronic device may obtain display content of the first electronic device or transmit the display content of the second electronic device to the first electronic device. The first electronic device and the second electronic device may also send respective clipboard data to each other.
In some embodiments, on the basis of the data connection established between the first electronic device and the second electronic device, for example, the first electronic device and the second electronic device may establish the data connection through a P2P format. The second electronic device may establish a data sharing channel between the second data sharing module and the first data sharing module of the first electronic device, and the data sharing channel may be used to receive the updated first clipboard data transmitted by the first electronic device.
The second electronic device can also establish a screen projection channel between the second screen projection module and the first screen projection module of the first electronic device, and the second electronic device sends the screen projection data of the second electronic device to the first electronic device through the screen projection channel, so that the display content of the second electronic device is displayed on the first electronic device.
In some embodiments, in consideration of the fact that a user performs operations such as screen sharing and data sharing with a high probability when performing interconnection of multi-terminal devices, after the data connection is established between the first electronic device and the second electronic device, a screen projection channel may be established between the second electronic device and the first electronic device first, and then a data sharing channel may be established.
420. And receiving the first clipboard data sent by the first electronic device through the data sharing channel.
In some embodiments, the second electronic device may receive the first clipboard data sent by the first electronic device through the data sharing channel, so as to update the first clipboard data sent by the first electronic device into the clipboard of the second electronic device.
430. And updating the first clipboard data to a clipboard of the second electronic device to obtain target second clipboard data.
In some implementations, the second electronic device can update the first clipboard data to the latest second clipboard data while determining the latest second clipboard data as the target second clipboard data. Thereby, the synchronization of the first clipboard data transmitted by the first electronic device is realized.
In the embodiment of the application, the second electronic device establishes a data sharing channel between the first electronic device and the second electronic device based on the data connection by establishing the data connection with the first electronic device. And finally, updating the first clipboard data to a clipboard of a second electronic device to obtain target second clipboard data. Thereby, the synchronization of the first clipboard data sent by the first electronic device is realized.
Referring to fig. 10, fig. 10 is a schematic flowchart of a data sharing method according to an embodiment of the present disclosure. The data sharing method may be applied to the second electronic device, and the data sharing method may include the steps of:
501. establishing data connection with the first electronic equipment, and establishing a data sharing channel between the first electronic equipment and the second electronic equipment based on the data connection.
502. And receiving the first clipboard data sent by the first electronic device through the data sharing channel.
503. And updating the first clipboard data to a clipboard of the second electronic device to obtain target second clipboard data.
504. And displaying a prompt message of the target second clipboard data based on the graphical user interface.
Since the second electronic device is running in the background while synchronizing the first clipboard data sent by the first electronic device, the user cannot perceive it, so that the prompt message of the updated second clipboard data can be presented based on the graphical user interface. For example, the user is prompted by a message popup, a floating message box, or the like that the first clipboard data of the first electronic device has been synchronized.
505. And pasting the target second clipboard data to the input area corresponding to the second electronic equipment in response to the input paste instruction.
In some embodiments, the user may select the paste button to paste the updated target second clipboard data into a corresponding input area of the second electronic device, such as an input area of a document opened on the second electronic device, or an input box of a chat interface, or a website bar of a browser.
506. And when the second clipboard data of the second electronic device is updated, sending the updated second clipboard data to the first electronic device through the shared channel.
In some implementations, when the second clipboard data of the second electronic device is updated, the updated second clipboard data is sent to the first electronic device through the shared channel.
The second electronic device may determine a source of the current updated second clipboard data, and if the source of the updated second clipboard data is shared by the first electronic device, the second electronic device does not send the updated second clipboard data to the first electronic device through the shared channel.
If the source of the updated second clipboard data is not shared by the first electronic device, then the second electronic device sends the updated second clipboard data to the first electronic device over the shared channel.
Because the first electronic equipment directly establishes the data connection with the second electronic equipment, the method has high transmission rate and low time delay, and the network is stable. In addition, the first connection module of the first electronic device and the second connection module of the second electronic device have at least partially the same software service framework, so that the data transmission and data processing are faster and more stable, and the transmission data loss is avoided. Thereby, clipboard data sharing between the first electronic device and the second electronic device is achieved.
In some embodiments, as shown in fig. 11, fig. 11 is a schematic diagram of types of a first electronic device and a second electronic device provided in an example of the present application. The data sharing method provided by the embodiment of the application can be applied to smart phones, televisions, tablet devices, desktop computers, notebook computers, terminal devices and PDAs.
In some scenarios, the first electronic device may be a smartphone and the second electronic device may be a tablet device. Or the first electronic device may be a tablet computer and the second electronic device may be a smartphone. Thereby realizing one-to-many cross-terminal interconnection, many-to-one cross-terminal interconnection and many-to-many cross-terminal interconnection.
Referring to fig. 12, fig. 12 is a schematic structural diagram of a data sharing device according to an embodiment of the present disclosure. The data sharing apparatus is applied to a first electronic device, and the data sharing apparatus 600 may include:
the first connection module 610 is configured to establish a data connection with a second electronic device, and establish a data sharing channel between the first electronic device and the second electronic device based on the data connection.
The first connection module 610 is further configured to determine device information of the second electronic device;
and establishing a data sharing channel with the second electronic equipment according to the equipment information of the second electronic equipment.
The first connection module 610 is further configured to establish a screen projection channel between the first electronic device and the second electronic device based on the data connection after establishing the data connection with the second electronic device;
and acquiring the display content of the second electronic equipment through the screen projection channel, or synchronizing the display content of the first electronic equipment to the second electronic equipment.
The detecting module 620 is configured to detect first clipboard data of the first electronic device.
The detecting module 620 is further configured to determine a setting state of the first clipboard data sharing switch.
The detecting module 620 is further configured to determine whether a horizontal screen state and a vertical screen state of the first electronic device change;
if the horizontal and vertical screen states of the first electronic device are changed, the setting state of the first clipboard data sharing switch is changed into a default setting state.
The detecting module 620 is further configured to send the setting state of the first clipboard data sharing switch to the second electronic device after determining the setting state of the first clipboard data sharing switch;
receiving the setting state of a second clipboard data sharing switch of the second electronic equipment, returned by the second electronic equipment;
and determining whether to send the updated first clipboard data to the second electronic equipment according to the setting state of the second clipboard data sharing switch.
The detecting module 620 is further configured to bind the clipboard data sharing service with the second electronic device;
first clipboard data of a first electronic device is detected according to a clipboard data sharing service.
The first sending module 630 is configured to send the updated first clipboard data to the second electronic device through the data sharing channel when the first clipboard data is updated.
A first sending module 630, further configured to determine a data type of the updated first clipboard data;
and determining whether to send the updated first clipboard data to the second electronic device through the data sharing channel according to the data type.
The first sending module 630 is further configured to determine to send the updated first clipboard data to the second electronic device through the data sharing channel when the data type is the text type.
The first sending module 630 is further configured to obtain the array length of the updated first clipboard data within a preset number of times;
and if the probability of obtaining the array length within the preset times is zero, determining that the updated first clipboard data is not sent to the second electronic equipment through the data sharing channel.
The first sending module 630 is further configured to determine, when the first clipboard data is updated, the updated first clipboard data and the first clipboard data updated last time;
comparing the updated first clipboard data with the first clipboard data updated last time to obtain a comparison result;
and determining whether to send the updated first clipboard data according to the comparison result.
The first sending module 630 is further configured to determine to send the updated first clipboard data if the updated first clipboard data is different from the first clipboard data updated last time;
and if the updated first clipboard data is the same as the first clipboard data updated last time, determining not to send the updated first clipboard data.
The first sending module 630 is further configured to change the setting state of the first clipboard data sharing switch of the first electronic device to a default setting state if the data connection between the first electronic device and the second electronic device is disconnected.
In the embodiment of the application, the first electronic device establishes a data sharing channel between the first electronic device and the second electronic device based on the data connection by establishing the data connection with the second electronic device. And then detecting first clipboard data of the first electronic equipment, and when the first clipboard data is updated, sending the updated first clipboard data to the second electronic equipment through the data sharing channel. Therefore, the first electronic device shares the first clipboard data with the second electronic device.
Referring to fig. 13, fig. 13 is a schematic structural diagram of another data sharing device according to an embodiment of the present disclosure. The other data sharing apparatus is applied to a second electronic device, and the other data sharing apparatus 700 includes:
the second connection module 710 is configured to establish a data connection with the first electronic device, and establish a data sharing channel between the first electronic device and the second electronic device based on the data connection.
The receiving module 720 is configured to receive, through the data sharing channel, the first clipboard data sent by the first electronic device.
The updating module 730 is configured to update the first clipboard data to a clipboard of the second electronic device to obtain target second clipboard data.
The updating module 730 is further configured to display a prompt message of the target second clipboard data based on the graphical user interface.
The updating module 730 is further configured to paste the target second clipboard data to the input area corresponding to the second electronic device in response to the input paste instruction.
The updating module 730 is further configured to, when the second clipboard data of the second electronic device is updated, send the updated second clipboard data to the first electronic device through the shared channel.
In the embodiment of the application, the second electronic device establishes a data sharing channel between the first electronic device and the second electronic device based on the data connection by establishing the data connection with the first electronic device. And finally, updating the first clipboard data to a clipboard of a second electronic device to obtain target second clipboard data. Thereby, the synchronization of the first clipboard data sent by the first electronic device is realized.
Correspondingly, the embodiment of the present application further provides an electronic device, where the electronic device may be a terminal or a server, and the terminal may be a terminal device such as a smart phone, a tablet Computer, a notebook Computer, a touch screen, a game machine, a Personal Computer (PC), a Personal Digital Assistant (PDA), and the like. As shown in fig. 14, fig. 14 is a schematic structural diagram of an electronic device according to an embodiment of the present application. The electronic device 800 includes a processor 801 with one or more processing cores, a memory 802 with one or more computer-readable storage media, and a computer program stored on the memory 802 and executable on the processor. The processor 801 is electrically connected to the memory 802. Those skilled in the art will appreciate that the electronic device configurations shown in the figures do not constitute limitations of the electronic device, and may include more or fewer components than shown, or some components in combination, or a different arrangement of components.
The processor 801 is a control center of the electronic device 800, connects various parts of the entire electronic device 800 using various interfaces and lines, and performs various functions of the electronic device 800 and processes data by running or loading software programs and/or modules stored in the memory 802 and calling data stored in the memory 802, thereby performing overall monitoring of the electronic device 800.
In this embodiment of the present application, the processor 801 in the electronic device 800 loads instructions corresponding to processes of one or more application programs into the memory 802, and the processor 801 executes the application programs stored in the memory 802, thereby implementing the data sharing method provided in any embodiment of the present application.
The above operations can be implemented in the foregoing embodiments, and are not described in detail herein.
Optionally, as shown in fig. 14, the electronic device 800 further includes: a touch display 803, a radio frequency circuit 804, an audio circuit 805, an input unit 806, and a power supply 807. The processor 801 is electrically connected to the touch display screen 803, the radio frequency circuit 804, the audio circuit 805, the input unit 806, and the power supply 807, respectively. Those skilled in the art will appreciate that the electronic device configuration shown in fig. 14 is not limiting of electronic devices and may include more or fewer components than shown, or some components may be combined, or a different arrangement of components.
The touch display screen 803 can be used for displaying a graphical user interface and receiving operation instructions generated by a user acting on the graphical user interface. The touch display 803 may include a display panel and a touch panel. The display panel may be used, among other things, to display information entered by or provided to a user and various graphical user interfaces of the electronic device, which may be made up of graphics, text, icons, video, and any combination thereof. Alternatively, the Display panel may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like. The touch panel may be used to collect touch operations of a user (for example, operations of the user on or near the touch panel by using a finger, a stylus pen, or any other suitable object or accessory) and generate corresponding operation instructions, and the operation instructions execute corresponding programs. Alternatively, the touch panel may include two parts, a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 801, and can receive and execute commands sent by the processor 801. The touch panel may overlay the display panel, and when the touch panel detects a touch operation thereon or nearby, the touch panel transmits the touch operation to the processor 801 to determine the type of the touch event, and then the processor 801 provides a corresponding visual output on the display panel according to the type of the touch event. In the embodiment of the present application, a touch panel and a display panel may be integrated into the touch display screen 803 to realize input and output functions. However, in some embodiments, the touch panel and the touch panel can be implemented as two separate components to perform the input and output functions. That is, the touch display 803 may also be used as a part of the input unit 806 to implement an input function.
The radio frequency circuit 804 may be configured to transmit and receive radio frequency signals to establish wireless communication with a network device or other electronic devices through wireless communication, and transmit and receive signals with the network device or other electronic devices.
The audio circuit 805 may be used to provide an audio interface between a user and an electronic device through a speaker, microphone, or the like. The audio circuit 805 may transmit the electrical signal converted from the received audio data to a speaker, and convert the electrical signal into an audio signal for output; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit 805 and converted into audio data, and the audio data is processed by the audio data output processor 801 and then sent to another electronic device via the rf circuit 804, or the audio data is output to the memory 802 for further processing. The audio circuit 805 may also include an earbud jack to provide communication of a peripheral headset with the electronic device.
The input unit 806 may be used to receive input numbers, character information, or user characteristic information (e.g., fingerprint, iris, facial information, etc.), and generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control.
The power supply 807 is used to power the various components of the electronic device 800. Optionally, the power supply 807 may be logically connected to the processor 801 through a power management system, so as to implement functions of managing charging, discharging, and power consumption through the power management system. The power supply 807 may also include any component of one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
Although not shown in fig. 14, the electronic device 800 may further include a camera, a sensor, a wireless fidelity module, a bluetooth module, etc., which are not described in detail herein.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by instructions or by associated hardware controlled by the instructions, which may be stored in a computer readable storage medium and loaded and executed by a processor.
To this end, the present application provides a computer-readable storage medium, in which a plurality of computer programs are stored, and the computer programs can be loaded by a processor to execute the steps in any data sharing method provided by the present application. For example, the computer program may execute the data sharing method provided in any embodiment of the present application.
Wherein the storage medium may include: read Only Memory (ROM), random Access Memory (RAM), magnetic or optical disks, and the like.
Since the computer program stored in the storage medium can execute the steps in any data sharing method provided in the embodiments of the present application, the beneficial effects that can be achieved by any data sharing method provided in the embodiments of the present application can be achieved, and detailed descriptions are omitted here for the foregoing embodiments.
The foregoing describes in detail a data sharing method, an apparatus, an electronic device, and a storage medium provided in the embodiments of the present application, and a specific example is applied in the present application to explain the principles and embodiments of the present application, and the description of the foregoing embodiments is only used to help understand the method and the core idea of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (20)

1. A data sharing method is applied to first electronic equipment and is characterized by comprising the following steps:
establishing a data connection with a second electronic device, and establishing a data sharing channel between the first electronic device and the second electronic device based on the data connection;
detecting first clipboard data of the first electronic device;
and when the first clipboard data is updated, sending the updated first clipboard data to the second electronic equipment through the data sharing channel.
2. The data sharing method of claim 1, wherein prior to the sending of the updated first clipboard data to the second electronic device via the data sharing channel, the method further comprises:
determining a setting state of the first clipboard data sharing switch;
the sending the updated first clipboard data to the second electronic device through the data sharing channel includes:
and if the setting state is the opened state, sending the updated first clipboard data to the second electronic equipment through the data sharing channel.
3. The data sharing method of claim 2, wherein the determining the setting state of the first clipboard data sharing switch comprises:
determining whether the horizontal and vertical screen states of the first electronic equipment are changed;
and if the horizontal and vertical screen states of the first electronic equipment are changed, changing the setting state of the first clipboard data sharing switch into a default setting state.
4. The data sharing method of claim 2, wherein after the determining the set state of the first clipboard data sharing switch, the method further comprises:
sending the setting state of the first clipboard data sharing switch to the second electronic equipment;
receiving a setting state of a second clipboard data sharing switch of the second electronic device returned by the second electronic device;
and determining whether to send the updated first clipboard data to the second electronic equipment according to the setting state of the second clipboard data sharing switch.
5. The data sharing method of claim 1, wherein the detecting the first clipboard data of the first electronic device comprises:
binding clipboard data sharing services with the second electronic device;
detecting first clipboard data of the first electronic device according to the clipboard data sharing service.
6. The data sharing method of claim 1, wherein before sending the updated first clipboard data to the second electronic device over the data sharing channel, the method further comprises:
determining a data type of the updated first clipboard data;
and determining whether to send the updated first clipboard data to the second electronic device through the data sharing channel according to the data type.
7. The data sharing method of claim 6, wherein the determining whether to send the updated first clipboard data to the second electronic device through the data sharing channel according to the data type comprises:
and when the data type is a text type, determining to send the updated first clipboard data to the second electronic equipment through the data sharing channel.
8. The data sharing method of claim 1, wherein before sending the updated first clipboard data to the second electronic device over the data sharing channel, the method further comprises:
acquiring the array length of the updated first clipboard data within preset times;
and if the probability of obtaining the array length within the preset times is zero, determining that the updated first clipboard data is not sent to the second electronic device through the data sharing channel.
9. The data sharing method of claim 1, wherein after detecting the first clipboard data of the first electronic device, the method further comprises:
when the first clipboard data is updated, determining the updated first clipboard data and the first clipboard data updated last time;
comparing the updated first clipboard data with the first clipboard data updated last time to obtain a comparison result;
and determining whether to send the updated first clipboard data according to the comparison result.
10. The data sharing method according to claim 9, wherein the determining whether to send the updated clipboard data according to the comparison result comprises:
if the updated first clipboard data is different from the first clipboard data updated last time, determining to send the updated first clipboard data;
and if the updated first clipboard data is the same as the first clipboard data updated last time, determining not to send the updated first clipboard data.
11. The data sharing method according to claim 1, wherein the establishing a data sharing channel between the first electronic device and the second electronic device based on the data connection comprises:
determining device information of the second electronic device;
and establishing a data sharing channel with the second electronic equipment according to the equipment information of the second electronic equipment.
12. The data sharing method of claim 1, wherein after the establishing the data connection with the second electronic device, the method further comprises:
establishing a screen projection channel between the first electronic device and the second electronic device based on the data connection;
and acquiring the display content of the second electronic equipment through the screen projection channel, or synchronizing the display content of the first electronic equipment to the second electronic equipment.
13. The data sharing method according to any one of claims 1 to 12, after sending the updated first clipboard data to the second electronic device via the data sharing channel, comprising:
and if the data connection between the first electronic equipment and the second electronic equipment is disconnected, changing the setting state of a first clipboard data sharing switch of the first electronic equipment into a default setting state.
14. A data sharing method is applied to a second electronic device, and is characterized by comprising the following steps:
establishing a data connection with a first electronic device, and establishing a data sharing channel between the first electronic device and a second electronic device based on the data connection;
receiving first clipboard data sent by the first electronic device through the data sharing channel;
and updating the first clipboard data to a clipboard of the second electronic device to obtain target second clipboard data.
15. The method of claim 14, wherein after the updating the first clipboard data into the clipboard of the second electronic device to obtain the target second clipboard data, the method further comprises:
and displaying a prompt message of the target second clipboard data based on a graphical user interface.
16. The data sharing method of claim 14, after establishing a data sharing channel between the first electronic device and the second electronic device based on the data connection, the method further comprising:
and when the second clipboard data of the second electronic equipment is updated, sending the updated second clipboard data to the first electronic equipment through the shared channel.
17. A data sharing apparatus applied to a first electronic device, comprising:
the first connection module is used for establishing data connection with second electronic equipment and establishing a data sharing channel between the first electronic equipment and the second electronic equipment based on the data connection;
the detection module is used for detecting first clipboard data of the first electronic equipment;
and the first sending module is used for sending the updated first clipboard data to the second electronic equipment through the data sharing channel when the first clipboard data is updated.
18. A data sharing apparatus applied to a second electronic device, comprising:
the second connection module is used for establishing data connection with first electronic equipment and establishing a data sharing channel between the first electronic equipment and the second electronic equipment based on the data connection;
the receiving module is used for receiving first clipboard data sent by the first electronic equipment through the data sharing channel;
and the updating module is used for updating the first clipboard data to the clipboard of the second electronic device so as to obtain target second clipboard data.
19. A storage medium having stored therein a computer program which, when run on a computer, causes the computer to execute the data sharing method of any one of claims 1 to 13 or 14 to 16.
20. An electronic device, comprising a processor and a memory, wherein the memory stores a computer program, and the processor is configured to execute the data sharing method according to any one of claims 1 to 13 or 14 to 16 by calling the computer program stored in the memory.
CN202211110687.5A 2022-09-13 2022-09-13 Data sharing method and device, electronic equipment and storage medium Pending CN115499945A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211110687.5A CN115499945A (en) 2022-09-13 2022-09-13 Data sharing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211110687.5A CN115499945A (en) 2022-09-13 2022-09-13 Data sharing method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN115499945A true CN115499945A (en) 2022-12-20

Family

ID=84469123

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211110687.5A Pending CN115499945A (en) 2022-09-13 2022-09-13 Data sharing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115499945A (en)

Similar Documents

Publication Publication Date Title
CN110597774B (en) File sharing method, system, device, computing equipment and terminal equipment
US9438697B2 (en) User interface content state synchronization across devices
JP6976410B2 (en) Communication methods, devices and systems on live relay channels
US10616295B2 (en) User interface content state synchronization across devices
WO2021115359A1 (en) Interface display method and electronic device
CN110012328B (en) Method and device for interacting with smart television
AU2016203398A1 (en) Communication Control System And Control Device
US7949708B2 (en) Using a remote handheld device as a local device
CN103491179A (en) Multi-screen interaction method and system based on Web
JP2017530564A (en) Connection state prompting method and apparatus
JP7403648B2 (en) Synchronization method and electronic equipment
CN112306325B (en) Interaction control method and device
WO2020207031A1 (en) Method and apparatus for dynamically configuring screen transmission timeout period, and wireless screen transmission device and receiving end
WO2021115220A1 (en) Information sharing method, electronic device and computer-readable storage medium
WO2023040845A1 (en) Message transmission method and apparatus, and electronic device
WO2021190353A1 (en) Interaction method and display device
CN112770078B (en) Video conference terminal fusion method and device and readable storage medium
CN113079588A (en) Control method, control device, control equipment and storage medium
WO2023030292A1 (en) Multimedia file playback method and apparatus
CN115499945A (en) Data sharing method and device, electronic equipment and storage medium
US20220321629A1 (en) User Interface Content State Synchronization Across Devices
CN115828845A (en) Multimedia data viewing method, device, medium and equipment
WO2021218730A1 (en) Information display method and electronic device
WO2013016949A1 (en) User interface content state synchronization across devices
CN114126083A (en) Cross-network-segment wireless screen projection method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination