CN114257631A - Data interaction method, device, equipment and storage medium - Google Patents

Data interaction method, device, equipment and storage medium Download PDF

Info

Publication number
CN114257631A
CN114257631A CN202111563419.4A CN202111563419A CN114257631A CN 114257631 A CN114257631 A CN 114257631A CN 202111563419 A CN202111563419 A CN 202111563419A CN 114257631 A CN114257631 A CN 114257631A
Authority
CN
China
Prior art keywords
data
equipment
connection
source
source device
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
CN202111563419.4A
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 CN202111563419.4A priority Critical patent/CN114257631A/en
Publication of CN114257631A publication Critical patent/CN114257631A/en
Priority to PCT/CN2022/133296 priority patent/WO2023116311A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/1066Session management
    • H04L65/1073Registration or de-registration
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks
    • H04L67/125Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks involving control of end-device applications over a network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/143Termination or inactivation of sessions, e.g. event-controlled end of session
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/146Markers for unambiguous identification of a particular session, e.g. session cookie or URL-encoding

Abstract

The application discloses a data interaction method, a data interaction device, data interaction equipment and a storage medium, and belongs to the technical field of computers. The method comprises the following steps: sending a source device registration request to the second device in response to the source device registration instruction; under the condition of receiving a connection request sent by second equipment, establishing connection with the second equipment; first data being processed by the first device is transmitted to the second device based on the connection, or control data transmitted by the second device is received based on the connection. The method provides a new data interaction mode, a user can register any one of a plurality of devices logging in the same account as a source device, once the source device receives a connection request sent by another device, the source device can establish connection with the another device and send data being processed to the another device, or receive control data sent by the another device for data processing, and the new data interaction mode meets diversified data interaction requirements of the user.

Description

Data interaction method, device, equipment and storage medium
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to a data interaction method, a data interaction device, data interaction equipment and a storage medium.
Background
In real life, data interaction between devices is often required, for example, data on one device is sent to another device so that the data can be processed by the other device. However, with the development of computer technology, users have more diversified requirements for data interaction modes between devices, and it is urgently needed to provide a new data interaction mode.
Disclosure of Invention
The embodiment of the application provides a data interaction method, a data interaction device, data interaction equipment and a storage medium, provides a new data interaction mode, and can meet diversified data interaction requirements of users. The technical scheme is as follows:
according to an aspect of the embodiments of the present application, there is provided a data interaction method, performed by a first device, the method including:
responding to a source device registration instruction, sending a source device registration request to a second device, wherein the second device is a device which logs in the same account with the first device, the source device registration request is used for requesting the second device to register the first device as a source device, and the source device is used for sharing data with a device which logs in the same account with the source device or is controlled by the device which logs in the same account with the source device;
under the condition of receiving a connection request sent by the second equipment, establishing connection with the second equipment;
and sending first data which is processed by the first equipment to the second equipment based on the connection, or receiving control data sent by the second equipment based on the connection, wherein the control data is used for controlling the first equipment to process the first data.
According to another aspect of the embodiments of the present application, there is provided a data interaction method, performed by a second device, the method including:
receiving a source device registration request sent by a first device, wherein the first device is a device which logs in the same account with a second device, the source device registration request is used for requesting the second device to register the first device as a source device, and the source device is used for sharing data with the device which logs in the same account with the source device or is controlled by the device which logs in the same account with the source device;
under the condition that the first equipment is registered as source equipment, sending a connection request to the first equipment, wherein the connection request is used for requesting to establish connection with the first equipment;
receiving first data being processed by the first device based on the connection, and presenting the first data, or sending control data to the first device based on the connection, wherein the control data is used for controlling the first device to process the first data.
According to another aspect of the embodiments of the present application, there is provided a data interaction apparatus configured to a first device, the apparatus including:
a request sending module, configured to send a source device registration request to a second device in response to a source device registration instruction, where the second device is a device that logs in a same account as the first device, the source device registration request is used to request the second device to register the first device as a source device, and the source device is used to share data with a device that logs in the same account as the source device or is controlled by a device that logs in the same account as the source device;
the connection establishing module is used for establishing connection with the second equipment under the condition of receiving a connection request sent by the second equipment;
and a data interaction module, configured to send, to the second device, first data being processed by the first device based on the connection, or receive, based on the connection, control data sent by the second device, where the control data is used to control the first device to process the first data.
According to another aspect of the embodiments of the present application, there is provided a data interaction apparatus configured to a second device, the apparatus including:
a request receiving module, configured to receive a source device registration request sent by a first device, where the first device is a device that logs in a same account as the second device, the source device registration request is used to request the second device to register the first device as a source device, and the source device is used to share data with a device that logs in the same account as the source device or is controlled by a device that logs in the same account as the source device;
a connection establishing module, configured to send a connection request to the first device when the first device is registered as a source device, where the connection request is used to request to establish a connection with the first device;
and the data interaction module is used for receiving first data which is processed by the first equipment based on the connection and presenting the first data, or sending control data to the first equipment based on the connection, wherein the control data is used for controlling the first equipment to process the first data.
According to another aspect of embodiments of the present application, there is provided a computer device comprising a processor and a memory; the memory stores at least one program code for execution by the processor to implement the data interaction method as described in the above aspect.
According to another aspect of the embodiments of the present application, there is provided a chip, which includes a programmable logic circuit and/or program instructions, and when the chip runs on a terminal, the chip is used to implement the data interaction method of the above aspect.
According to another aspect of embodiments of the present application, there is provided a computer-readable storage medium storing at least one program code for execution by a processor to implement the data interaction method according to the above aspect.
According to another aspect of embodiments of the present application, there is provided a computer program product storing at least one program code, which is loaded and executed by a processor to implement the data interaction method of the above aspect.
The embodiment of the application provides a new data interaction mode, a user can select any one of a plurality of devices which log in to the same account to register as a source device, after the device is registered as the source device, once the device receives a connection request sent by another device which logs in to the same account, the device can establish connection with the other device, and send data which is being processed to the other device based on the connection, or receive control data sent by the other device for data processing.
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 illustrates a schematic diagram of an implementation environment provided by an exemplary embodiment of the present application;
FIG. 2 illustrates a flow chart of a data interaction method provided by an exemplary embodiment of the present application;
FIG. 3 illustrates a flow chart of another method of data interaction provided by an exemplary embodiment of the present application;
FIG. 4 illustrates a flow chart of yet another method of data interaction provided by an exemplary embodiment of the present application;
FIG. 5 illustrates a flow chart of yet another method of data interaction provided by an exemplary embodiment of the present application;
FIG. 6 is a schematic diagram illustrating an operational detection flow provided by an exemplary embodiment of the present application;
FIG. 7 is a diagram illustrating a pick-up sub-process provided by an exemplary embodiment of the present application;
FIG. 8 is a diagram illustrating a revocation source device sub-flow provided by an exemplary embodiment of the present application;
FIG. 9 is a diagram illustrating a drop sub-flow provided by an exemplary embodiment of the present application;
FIG. 10 is a diagram illustrating a establish source device sub-flow provided by an exemplary embodiment of the present application;
fig. 11 illustrates a schematic structural diagram of a data sharing application according to an exemplary embodiment of the present application;
FIG. 12 illustrates a schematic diagram of a device state provided by an exemplary embodiment of the present application;
FIG. 13 illustrates a schematic diagram of another device state provided by an exemplary embodiment of the present application;
FIG. 14 is a schematic diagram illustrating yet another device state provided by an exemplary embodiment of the present application;
FIG. 15 illustrates a schematic diagram of yet another device state provided by an exemplary embodiment of the present application;
FIG. 16 illustrates a schematic diagram of yet another device state provided by an exemplary embodiment of the present application;
FIG. 17 is a block diagram illustrating a data interaction device according to an exemplary embodiment of the present application;
FIG. 18 is a block diagram illustrating an alternative data interaction device, according to an exemplary embodiment of the present application;
fig. 19 is a block diagram illustrating a structure of a terminal according to an exemplary embodiment of the present application.
Detailed Description
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
As used herein, the term "at least one" refers to one or more, and "a plurality" refers to two or more. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
It should be noted that the user information (including but not limited to user device information, user personal information, etc.) referred to in the present application is information authorized by the user or sufficiently authorized by each party.
Fig. 1 is a schematic diagram of an implementation environment provided by an embodiment of the present application. Referring to fig. 1, the implementation environment includes a first device 101 and a second device 102. The first device 101 and the second device 102 are connected via a wireless or wired network. Illustratively, the first device 101 and the second device 102 are notebook computers, mobile phones, tablet computers, or other devices. The first device 101 and the second device 102 are logged into the same account.
The first device 101 is configured to send a source device registration request to the second device 102 in response to a source device registration instruction, where the second device 102 is configured to register the first device 101 as a source device, and the source device is configured to share data with a device that logs in a same account as the source device or is controlled by the device that logs in the same account as the source device, and accordingly, after the second device 102 registers the first device 101 as the source device, the second device establishes a connection with the first device 101, and can control the first device 101 or receive data shared by the first device 101 based on the connection.
Illustratively, a data sharing application is installed on the first device 101 and the second device 102, and the first device 101 can register as a source device in the second device 102 through the data sharing application, establish a connection with the second device 102, and perform data interaction with the second device 102 based on the connection. The first device 101 and the second device 102 can also perform data presentation based on the data sharing application, for example, display a screen or play sound. Optionally, the data sharing application has other functions, for example, the first device 101 can also detect an operation on the first device through the data sharing application. Optionally, the data sharing application is an application in an operating system of the first device 101 and the second device 102, or an application provided by a third party. Optionally, the data sharing application is an Application (APP), or an applet (mini Program), or a Micro application (Micro APP), which is not limited in this embodiment of the application. The small program is a type of application form which is embedded in other applications and can be used without downloading and installing. The micro application is a distributed application, which can be divided into a plurality of services, the services run in the form of independent processes and can be independently and dynamically deployed, and the services communicate with each other in a uniform cross-program mode. The multiple services of the micro application are deployed on multiple devices, each device in the multiple devices is deployed with the script code of the micro application, and each device manages the communication and scheduling among the multiple services by running the script code, so that the distributed application is realized.
The method provided by the embodiment of the application can be applied to watching scenes of videos. For example, the first device is a tablet computer, the second device is a mobile phone, the user logs in own account numbers in both the tablet computer and the mobile phone, and when the user uses the tablet computer to play a video, if the user needs to go out, the user only needs to put down the tablet computer in hand, and the tablet computer can respond to the putting down operation and send a source device registration request to the mobile phone. Then, under the condition that the mobile phone receives the source equipment registration request, the tablet personal computer is registered as source equipment, connection with the tablet personal computer is requested to be established, and after the tablet personal computer is connected with the mobile phone, the tablet personal computer automatically sends the video which is being played to the mobile phone, so that the user can continuously watch the video through the mobile phone after going out. Or, taking the first device as a mobile phone and the second device as a smart phone as an example, the user logs in his account in both the mobile phone and the smart television, and when the user plays a video using the mobile phone, because the screen of the television is larger, the user may want to watch the video being played on the mobile phone through the television.
The method provided by the embodiment of the application can be applied to a scene of editing the document. For example, the first device is a mobile phone, the second device is a notebook computer, the user logs in his account in both the mobile phone and the notebook computer, and when the user browses a document using the mobile phone, if the document needs to be edited, in order to improve the document editing efficiency, the user may want to edit the document through the notebook computer. Then the notebook computer registers the mobile phone as the source equipment under the condition that the notebook computer receives the source equipment registration request, the connection between the mobile phone and the mobile phone is requested to be established, and after the connection between the mobile phone and the notebook computer is established, the mobile phone automatically sends the document to the notebook computer, so that a user can edit the document through the notebook computer.
The method provided by the embodiment of the application can be applied to the scene of playing the audio. For example, the first device is a tablet computer, the second device is a mobile phone, the user logs in own account numbers in both the tablet computer and the mobile phone, and when the user uses the tablet computer to play audio, if the user needs to go out, the user only needs to put down the tablet computer in hand, and the tablet computer can respond to the putting down operation and send a source device registration request to the mobile phone. Then, under the condition that the mobile phone receives the source equipment registration request, the tablet personal computer is registered as the source equipment, connection with the tablet personal computer is requested to be established, and after the tablet personal computer is connected with the mobile phone, the tablet personal computer automatically sends the audio which is being played to the mobile phone, so that the user can continue to play the video through the mobile phone after going out.
The method provided by the embodiment of the present application can also be applied to other scenarios, and the embodiment of the present application does not limit this.
Fig. 2 shows a flowchart of a data interaction method provided in an exemplary embodiment of the present application, and referring to fig. 2, the method is performed by a first device, and the method includes:
201. the method comprises the steps that a first device responds to a source device registration instruction, a source device registration request is sent to a second device, the second device is a device which logs in the same account number with the first device, the source device registration request is used for requesting the second device to register the first device as a source device, and the source device is used for sharing data with the device which logs in the same account number with the source device or is controlled by the device which logs in the same account number with the source device.
The account number is used for indicating the identity of the user and can distinguish different users. Different users correspond to different accounts, and therefore the fact that the second device and the first device log in the same account means that the second device and the first device belong to the same user. The source device registration instruction indicates that the first device is registered as the source device in the devices which log in the same account number with the first device.
Since there may be a plurality of devices that log in to the same account as the first device, the first device may send source device registration requests to the plurality of devices. In the embodiment of the present application, a description will be given taking an example in which a source device registration request is transmitted to a second device.
202. And the first equipment establishes connection with the second equipment under the condition of receiving the connection request sent by the second equipment.
The source device is used for sharing data with a device which logs in the same account with the source device or is controlled by the device which logs in the same account with the source device, so that after the first device requests to register the first device as the source device in the second device, the second device sends a connection request to the first device, the fact that the second device needs to receive the data shared by the first device is indicated, or the second device needs to control the first device is indicated, and therefore the first device establishes connection with the second device under the condition that the connection request sent by the second device is received, and data interaction is conducted with the second device based on the connection.
203. The first device sends first data which is being processed by the first device to the second device based on the connection, or receives control data sent by the second device based on the connection, wherein the control data is used for controlling the first device to process the first data.
Optionally, the first data is any data being processed by the first device, for example, the first data is data being displayed by the first device, or the first data is data being played by the first device, or the first data is data being processed by the first device in the background, which is not limited in this embodiment of the application. Optionally, after the first device sends the first data to the second device, the second device presents the first data, for example, in case the first data includes picture data, the second device displays the picture data, in case the first data includes audio data, the second device plays the audio data.
Optionally, after receiving the control data sent by the second device, the first device processes the first data being processed based on the control data to obtain second data, and then presents the second data.
The embodiment of the application provides a new data interaction mode, a user can select any one of a plurality of devices which log in to the same account to register as a source device, after the device is registered as the source device, once the device receives a connection request sent by another device which logs in to the same account, the device can establish connection with the other device, and send data which is being processed to the other device based on the connection, or receive control data sent by the other device for data processing.
Fig. 3 shows a flowchart of a data interaction method provided in an exemplary embodiment of the present application, and referring to fig. 3, the method is performed by a second device, and the method includes:
301. the method comprises the steps that a second device receives a source device registration request sent by a first device, the first device is a device which logs in the same account number with the second device, the source device registration request is used for requesting the second device to register the first device as a source device, and the source device is used for sharing data with the device which logs in the same account number with the source device or is controlled by the device which logs in the same account number with the source device.
The account number is used for indicating the identity of the user and can distinguish different users. Different users correspond to different accounts, and therefore the fact that the second device and the first device log in the same account means that the second device and the first device belong to the same user.
302. The second device sends a connection request to the first device under the condition that the first device is registered as the source device, wherein the connection request is used for requesting to establish connection with the first device.
Because the source device is configured to share data with a device that logs in the same account as the source device or is controlled by the device that logs in the same account as the source device, after the second device registers the first device as the source device, the second device can send a connection request to the first device to establish a connection with the first device, so that the data shared by the first device is received based on the connection, or the first device is controlled.
303. The second device receives the first data being processed by the first device based on the connection and presents the first data, or sends control data to the first device based on the connection, and the control data is used for controlling the first device to process the first data.
Optionally, the first data is any data being processed by the first device, for example, the first data is data being displayed by the first device, or the first data is data being played by the first device, or the first data is data being processed by the first device in the background, which is not limited in this embodiment of the application. Optionally, the second device presents the first data, comprising: the second device displays the picture data in a case where the first data includes the picture data, and plays the audio data in a case where the first data includes the audio data.
Optionally, after receiving the control data sent by the second device, the first device processes the first data being processed based on the control data to obtain second data, and then presents the second data.
The embodiment of the application provides a new data interaction mode, a user can select any one of a plurality of devices which log in to the same account to register as a source device, after the device is registered as the source device, once the device receives a connection request sent by another device which logs in to the same account, the device can establish connection with the other device, and send data which is being processed to the other device based on the connection, or receive control data sent by the other device for data processing.
Fig. 4 shows a flowchart of a data interaction method provided by an exemplary embodiment of the present application, and referring to fig. 4, the method is interactively performed by a first device and a second device, and describes a process in which a source device shares data with a device that logs in to a same account as the source device. The method comprises the following steps:
401. the method comprises the steps that a first device responds to a source device registration instruction, a source device registration request is sent to a second device, the second device is a device which logs in the same account number with the first device, the source device registration request is used for requesting the second device to register the first device as a source device, and the source device is used for sharing data with the device which logs in the same account number with the source device.
In one possible implementation manner, the first device generates the source device registration instruction in response to the first operation on the first device without detecting a touch operation on the first device. The method enables the user to control the first device to perform source device registration without performing touch operation on the first device, and the control mode of the electronic device is more flexible.
The first operation is any operation except for a touch operation, for example, a pick-up operation, a drop-down operation, a shaking operation, and the like, which is not limited in the embodiments of the present application. The source device registration is triggered by the pick-up operation or the drop-down operation, so that the registration efficiency of the source device can be greatly improved.
Optionally, the first device displays a source device registration control, and generates a source device registration instruction in response to a trigger operation on the source device registration control. The source device registration control is displayed on any page of the first device, which is not limited in the embodiment of the present application.
In one possible implementation manner, the first device acquires motion information of the first device; and determining that the first operation on the first equipment is detected under the condition that the motion information meets the motion condition corresponding to the first operation. The motion information is information detected by a sensor in the first device, optionally the sensor comprises a pressure sensor, a gyroscope sensor, a barometric pressure sensor, an acceleration sensor, a distance sensor, etc.
Whether the motion information of the first device meets the motion condition corresponding to the first operation can indicate whether the user performs the first operation on the first device, and if the motion information of the first device meets the motion condition corresponding to the first operation, the user performs the first operation on the first device. For example, whether the motion information of the first device satisfies the motion condition corresponding to the pick-up operation can indicate whether the user picks up the first device, and if the motion information of the first device satisfies the motion condition corresponding to the pick-up operation, it indicates that the user picks up the first device. For another example, whether the motion information of the first device meets the motion condition corresponding to the drop operation can indicate whether the user has dropped the first device, and if the motion information of the first device meets the motion condition corresponding to the drop operation, it indicates that the user has dropped the first device.
In the embodiment of the application, because the first operation is not a touch operation, when a user performs the first operation on the first device, corresponding motion information is generated, and the motion information can accurately reflect whether the first device performs the first operation, so that the first operation on the first device is detected based on the motion information of the first device, and the accuracy of the detection can be ensured.
In one possible implementation manner, sending, by a first device, a source device registration request to a second device, includes: the first device transmits a source device registration request to the second device when the source device is not connected.
In this embodiment of the application, in a case where the first device is connected to the source device, data processed by the first device is actually data that the source device shares with the first device, that is, the first device does not actually have data that needs to be shared with other devices, and in this case, the first device does not need to share data with other devices by registering itself as the source device.
In one possible implementation, the first device disconnects the connection with the source device in case of connecting the active device. The connection is used for receiving data shared by the source device, and therefore, the first device is disconnected from the source device, and the data is not received from the source device.
In the embodiment of the application, when the first device is connected with the source device, the first device may receive data shared by the source device, and when the first device is receiving the data shared by the source device, the user controls the first device to generate the source device registration instruction, which is probably because the user does not want to continue to receive the current data shared by the source device through the first device any more.
Optionally, an implementation manner of sending, by the first device, the source device registration request to the second device is as follows: the first device sends a source device registration request to the server, the server determines a second device which logs in to the same account number as the first device, and then sends the source device registration request to the second device.
Optionally, in addition to sending the source device registration request to the second device, the first device may further store a record of its own source device, for example, the first device may generate source device information "source device — identifier of the first device", and store the source device information, so that the subsequent first device can conveniently know which source device is among the multiple devices of the login account.
Optionally, the source device registration request carries an identifier of the first device, so that a subsequent second device can register the first device as the source device conveniently. Optionally, the source device registration request carries connection information of the first device, so that a subsequent second device can send a connection request to the first device based on the connection information.
402. The second device receives a source device registration request sent by the first device, and sends a connection request to the first device when registering the first device as the source device.
Optionally, the source device registration request carries an identifier of the first device, and the implementation manner of the second device registering the first device as the source device is as follows: the second device marks the identification of the first device as the source device. For example, the second device generates source device information "source device-identification of the first device" and stores the source device information.
Optionally, the source device registration request carries connection information of the first device, and the implementation manner of the second device registering the first device as the source device is as follows: the second device determines the connection information of the first device as source device information.
In a possible implementation manner, the source device registration request carries connection information of the first device, and correspondingly, the second device sends the connection request to the first device based on the connection information when registering the first device as the source device.
Optionally, the connection information of the first device indicates a manner of establishing a connection with the first device, for example, the connection information of the first device includes information such as an IP (Internet Protocol) address, an MAC (media Access Control) address, an identifier of the first device, and information of a local area network where the first device is located, and certainly, the connection information of the first device may also include other information used for establishing a connection with the first device, which is not limited in this embodiment of the present application. Optionally, the connection request carries an IP address and an MAC address of the second device, an identifier of the second device, and information of a local area network where the second device is located, which is not limited in this embodiment of the present application.
In the embodiment of the application, the connection information of the first device is carried in the source device registration request, so that the second device can conveniently establish connection with the first device directly based on the connection information request in the source device registration request under the condition that the first device is registered as the source device. In addition, since the connection information is used for establishing connection with the first device, and the second device only uses the connection information to establish connection with the first device when registering the first device as the source device, the first device sends a source device registration request to the second device, and the source device registration request carries the connection information of the first device, thereby avoiding sending the connection information to the second device when the second device does not need to use the connection information of the first device, and reducing the performance consumption of the device.
In this embodiment of the application, since the source device is configured to share data with other devices, the second device sends a connection request to the first device based on the connection information when registering the first device as the source device, so that the first device and the second device are connected, and the second device is ensured to be able to successfully receive the data shared by the first device.
Optionally, the first device sends the connection information of the first device to the second device before sending the source device registration request to the second device, and in response, the second device stores the connection information of the first device, in this case, after registering the first device as the source device, the second device queries the connection information of the first device, and sends the connection request to the first device based on the queried connection information. Optionally, once logging in the account, the first device sends its connection information to other devices logging in the account, and accordingly, the other devices store the connection information. For example, after a first device logs in an account, the first device sends its own connection information to the server, and the server determines another device that logs in the account and sends the connection information to the determined another device. By the method, each device stores the connection information of other devices logging in the same account with the device, so that when the source device is registered, the connection information does not need to be carried in the source device registration request.
In one possible implementation, the sending, by the second device, the connection request to the first device includes: the second device sends a connection request to the first device in response to a second operation on the second device without detecting a touch operation on the second device. Optionally, the second operation is any operation except for the touch operation, and the second operation is different from the first operation.
In this embodiment of the application, the second device sends the connection request to the first device in response to a second operation on the second device, so that the user can control an opportunity of data interaction between the second device and the first device through the second device, that is, the user can execute the second operation on the second device when the data shared by the first device needs to be received through the second device, so that the second device and the first device establish a connection, and thus the data shared by the first device is received based on the connection.
Optionally, the second operation is a pick-up operation or a drop-down operation, and the second operation is different from the first operation. Taking the first operation as a drop operation and the second operation as a pick-up operation, consider that while the first device is processing data, the user drops the first device, most likely because the user needs to synchronize the data being processed by the first device to the other device, and the second device is logged in the same account as the first device, and is most likely to belong to the user, and therefore, the first device is registered as the source device in the second device in response to the drop operation for the first device, and considering that the user picks up the second device, can indicate that the second device is a device that needs to receive data of the first device, under the condition, the second equipment requests to be connected with the first equipment, so that the first equipment can be instantly connected with the second equipment, the data being processed is synchronized to the second equipment, a user does not need to execute any touch operation in the whole process, and the data interaction efficiency is greatly improved.
In another possible implementation manner, the second device directly sends the connection request to the first device without responding to any operation when registering the first device as the source device. In this way, the user can control the opportunity of data interaction between the second device and the first device through the first device, that is, the user can register the first device as the source device in the second device when the data being processed by the first device needs to be shared with the second device, so that the connection request sent by the second device can be received, the connection can be established with the second device, and the data can be shared with the second device based on the connection.
In one possible implementation manner, the second device acquires motion information of the second device; and determining that the second operation on the second equipment is detected under the condition that the motion information meets the motion condition corresponding to the second operation. The implementation mode of the step and the first equipment acquire the motion information of the first equipment; and under the condition that the motion information meets the motion condition corresponding to the first operation, determining that the implementation mode of the first operation on the first device is detected is the same, and details are not repeated here.
403. The first device establishes connection with the second device when receiving a connection request sent by the second device, and sends first data processed by the first device to the second device based on the connection.
In a possible implementation manner, after the first device establishes a connection with the second device, acquiring first data being processed first includes: the method comprises the steps that a first device determines an application which is currently running; in the case where the application is a target application, first data being processed by the application is acquired.
Optionally, the first device includes a plurality of target applications therein. Optionally, the target application in the first device is a default application, or the target application is an application selected by a user. For example, the first device allows the user to select the target application by displaying the application list, that is, the first device displays the application list, where the application list includes at least one application, and the first device determines the application selected from the at least one application as the target application, so that the user can determine which application data can be shared with the device connected to the current device when the current device is the source device.
Optionally, the first data being processed by the running application includes picture data being displayed by the application, audio data being played by the application, background data being processed by the application, and the like, which is not limited in this embodiment of the application. For example, if the application is displaying a document editing interface, the document editing interface is the first data. For another example, if the application is playing a video, the picture data and the audio data of the video are the first data.
In this embodiment of the application, the first device obtains the first data being processed by the application only when the running application is the target application, so that the first device realizes selective data sharing.
Optionally, before sending the source device registration request to the second device, the first device starts the data sharing service, that is, the first device encapsulates the first data being processed to obtain a data packet corresponding to the first data. Correspondingly, the implementation manner of sending the first data to the second device by the first device is as follows: and the first equipment sends a data packet corresponding to the first data to the second equipment.
404. The second device receives the first data being processed by the first device based on the connection, and presents the first data.
Optionally, the second device presents the first data, comprising: the second device displays the picture data in a case where the first data includes the picture data, and plays the audio data in a case where the first data includes the audio data. For example, if the first data is a video, the second device displays a picture of the video and plays a sound of the video. And if the first data is the editing interface of the document, the second device displays the editing interface of the document.
405. The second device generates control data based on a control operation on the second device.
When the second device presents the first data, if a user wants to change the data presented by the second device, a control operation can be executed on the second device, and the control operation is mapped to the first device, so that the first device changes the data shared with the second device, and further changes the data presented by the second device.
Alternatively, the control operation may differ depending on the presented first data. For example, in the case where the first data is a video, the control operation may be switching of a next video, and accordingly, the control data indicates switching of the next video, and the control operation may also be pause playing, and accordingly, the control data indicates pausing playing of the video. For another example, in the case of an editing interface in which the first video is a document, the control operation may be an editing operation on the document, and accordingly, the control data indicates the editing operation, or the control data may be a closing operation on the document, and accordingly, the control data indicates closing the document.
406. The second device sends control data to the first device, the control data being used to process the first data.
Optionally, the second device sends the control data to the first device based on the connection with the first device.
407. And the first equipment receives the control data sent by the second equipment, and processes the first data based on the control data to obtain second data.
The control data indicates a control operation to be performed on the first device, and therefore, when the first device receives the control data and performs the control operation, the second device can perform processing based on the first data to obtain the second data.
For example, when the first data is a video being played by the first device, and the control operation indicated by the control data is to switch to a next video, the first device switches from the currently played video to the next video, and the obtained second data is the next video. For another example, the first data is an editing interface of the document, the control operation indicated by the control data is an editing operation on the document, the first device edits the document based on the editing operation, and the obtained second data is the edited document.
408. The first device sends second data to the second device based on the connection.
Optionally, the first device sends the second data to the second device based on a connection with the second device.
409. The second device receives the second data based on the connection, and presents the second data.
The implementation manner of presenting the second data by the second device is the same as the implementation manner of presenting the first data, and is not described herein again. Optionally, after presenting the second data, the second device can further continue to change the presented data based on the control operation on the second device, which is implemented in the same manner as 405 and 409. It should be noted that the steps 405 and 409 are optional steps, and are not executed in other embodiments.
Fig. 5 shows a flowchart of a data interaction method provided in an exemplary embodiment of the present application, and referring to fig. 5, the method is performed by a first device interacting with a second device, and the method describes a process in which a source device is controlled by a device that logs in to a same account as the source device. The method comprises the following steps:
501. the method comprises the steps that a first device responds to a source device registration instruction, a source device registration request is sent to a second device, the second device is a device which logs in the same account number with the first device, the source device registration request is used for requesting the second device to register the first device as a source device, and the source device is used for sharing data with the device which logs in the same account number with the source device or is controlled by the device which logs in the same account number with the source device.
502. The second device receives a source device registration request sent by the first device, and sends a connection request to the first device when registering the first device as the source device.
503. And the first equipment establishes connection with the second equipment under the condition of receiving the connection request sent by the second equipment.
Please refer to the above step 401 and 403 for the implementation manner of the step 501 and 503, which will not be described herein again.
504. The second device sends control data to the first device based on the connection, the control data being used to control the first device to process the first data.
In one possible implementation, the second device generates the control data based on a control operation on the second device before sending the control data to the first device based on the connection. Wherein the control data indicates a control operation to be performed on the first device.
For example, when the first data is a video being played by the first device, the control operation indicated by the control data is to switch to the next video. As another example, the control operation indicated by the control data is to pause playing of a video currently being played, and the like.
505. And the first equipment receives control data sent by the second equipment based on the connection, processes the first data based on the control data to obtain second data, and presents the second data.
Since the control data indicates the control operation to be performed on the first device, when the first device receives the control data and performs the control operation, the second device can perform processing based on the first data to obtain the second data.
For example, when the first data is a video being played by the first device, the control operation indicated by the control data is to switch to a next video, the first device switches from the currently played video to the next video, the obtained second data is the next video, and then the first device plays the next video. For another example, if the control operation indicated by the control data is to pause playing of a video currently being played, the first device pauses playing of the video currently being played, the obtained second data is a picture of the video when the pause operation is performed, and then the first device displays the picture.
The following describes a scheme for logging off a source device and controlling the stop of data interaction.
In a possible implementation manner, when the second device has registered the first device as the source device, the source device registered by the second device can also be logged off, for example, when the first device does not detect a touch operation on the first device, a source device logout request is sent to the second device in response to a second operation on the first device, and the source device logout request is used to request that the source device in the second device be logged off. Correspondingly, the second device logs out the source device when receiving the source device log-out request sent by the first device.
Optionally, an implementation manner of sending, by the first device, a source device logout request to the second device is: the first device sends a source device logout request to the server, the server determines a second device which logs in the same account with the first device, and then sends the source device logout request to the second device.
Optionally, the second device registers the first device as the source device is implemented in a manner that the second device marks the identifier of the first device as the source device. Correspondingly, the second device logs out the source device in the following manner: the second device deletes the source device label. Optionally, an implementation manner of the second device registering the first device as the source device is as follows: the second device determines the connection information of the first device as source device information. Correspondingly, the second device logs out the source device in the following manner: the second device deletes the source device information. Optionally, the first device also registers itself as the source device in the first device, and accordingly, the first device also needs to log off the source device.
In a possible implementation manner, the first device logs out the source device in response to the second operation on the first device under the condition that the touch operation on the first device is not detected by the first device, so that a user can control the first device to log out the source device without performing the touch operation on the first device, and the control manner of the electronic device is more flexible.
Optionally, before sending the source device registration request to the second device, the first device needs to start the data sharing service first, and correspondingly, after sending the source device logout request to the second device, the first device needs to close the data sharing service. Or, the first device may also close the data sharing service before sending the source device logout request to the second device, which is not limited in this embodiment of the present application.
In a possible implementation manner, during the data interaction between the first device and the second device, the data interaction may be stopped due to a state change of the first device. That is, the first device, in response to a second operation on the first device, sends a source device logout request to the second device and disconnects the connection between the first device and the second device, in a case where the touch operation on the first device is not detected.
In the embodiment of the application, when the first device is performing data interaction with the second device, the user performs the second operation on the first device to indicate that the user wants to stop the data interaction, and in this case, the connection between the first device and the second device is directly disconnected, so that the data interaction can be stopped, and the control efficiency of the first device is greatly improved. And the disconnection between the first device and the second device can also reduce power consumption for the first device and the second device.
In a possible implementation manner, during the data interaction between the first device and the second device, the data interaction may be stopped due to a state change of the second device. That is, the second device disconnects the connection between the second device and the first device in response to the first operation on the second device without detecting the touch operation on the second device.
In the embodiment of the application, when the first device is performing data interaction with the second device, the user performs the first operation on the second device to indicate that the user wants to stop the data interaction, and in this case, the connection between the first device and the second device is directly disconnected, so that the data interaction can be stopped, and the control efficiency of the second device is greatly improved. And the disconnection between the first device and the second device can also reduce power consumption for the first device and the second device.
It should be noted that, in this embodiment of the application, the number of the second devices may be multiple, and in a case that there are multiple second devices, the first device may perform data interaction with the multiple second devices simultaneously, for example, share data with the multiple second devices simultaneously, and the manner of sharing data with each second device by the first device is the same.
The embodiment of the application provides a new data interaction mode, a user can select any one of a plurality of devices which log in to the same account to register as a source device, after the device is registered as the source device, once the device receives a connection request sent by another device which logs in to the same account, the device can establish connection with the other device, and send data which is being processed to the other device based on the connection, or receive control data sent by the other device for data processing.
In the embodiment of the application, the first device generates the source device registration instruction in response to the first operation on the first device under the condition that the touch operation on the first device is not detected. The method enables the user to control the first device to perform source device registration without performing touch operation on the first device, and the control mode of the electronic device is more flexible.
In the embodiment of the application, because the first operation is not a touch operation, when a user performs the first operation on the first device, corresponding motion information is generated, and the motion information can accurately reflect whether the first device performs the first operation, so that the first operation on the first device is detected based on the motion information of the first device, and the accuracy of the detection can be ensured.
In the embodiment of the application, it is considered that when a first device is processing data, a user puts down the first device, which is probably because the user needs to synchronize the data being processed by the first device to other devices, and a second device and the first device log in the same account, which is probably most affiliated to the user, so that the first device is registered as a source device in the second device in response to the putting down operation of the first device, and it is considered that the user picks up the second device, which can indicate that the second device is a device that needs to receive the data of the first device, in this case, the second device requests to be connected with the first device, so that the first device can immediately establish connection with the second device, synchronize the data being processed to the second device, and the whole process does not need to perform any touch operation by the user, thereby greatly improving data interaction efficiency.
In this embodiment of the application, in a case where the first device is connected to the source device, data processed by the first device is actually data that the source device shares with the first device, that is, the first device does not actually have data that needs to be shared with other devices, and in this case, the first device does not need to share data with other devices by registering itself as the source device.
In the embodiment of the application, when the first device is connected with the source device, the first device may receive data shared by the source device, and when the first device is receiving the data shared by the source device, the user controls the first device to generate the source device registration instruction, which is probably because the user does not want to continue receiving the data shared by the source device any more, in this case, the connection with the source device is directly disconnected, so that power consumption of the first device can be saved.
In the embodiment of the application, the connection information of the first device is carried in the source device registration request, so that the second device can conveniently establish connection with the first device directly based on the connection information request in the source device registration request under the condition that the first device is registered as the source device. In addition, since the connection information is used for establishing connection with the first device, and the second device only uses the connection information to establish connection with the first device when registering the first device as the source device, the first device sends a source device registration request to the second device, and the source device registration request carries the connection information of the first device, thereby avoiding sending the connection information to the second device when the second device does not need to use the connection information of the first device, and reducing the performance consumption of the device.
In this embodiment of the application, since the source device is configured to share data with other devices, the second device sends a connection request to the first device based on the connection information when registering the first device as the source device, so that the first device and the second device are connected, and the second device is ensured to be able to successfully receive the data shared by the first device.
In this embodiment of the application, the second device sends the connection request to the first device in response to a second operation on the second device, so that the user can control an opportunity of data interaction between the second device and the first device through the second device, that is, the user can execute the second operation on the second device when the data shared by the first device needs to be received through the second device, so that the second device and the first device establish a connection, and thus the data shared by the first device is received based on the connection.
In this embodiment of the present application, the second device directly sends the connection request to the first device without any operation in response to the case where the first device is registered as the source device. In this way, the user can control the opportunity of data interaction between the second device and the first device through the first device, that is, the user can register the first device as the source device in the second device when the data being processed by the first device needs to be shared with the second device, so that the connection request sent by the second device can be received, the connection can be established with the second device, and the data can be shared with the second device based on the connection.
In this embodiment of the application, the first device obtains the first data being processed by the application only when the running application is the target application, so that the first device realizes selective data sharing.
The following describes a process of data sharing performed by a device, taking the first operation as a drop operation and the second operation as a pick-up operation as an example. The first operation is a put-down operation, so that a user executes the put-down operation on the device to trigger the device to share data, and the second operation is a pick-up operation, so that the user executes the pick-up operation on the device to trigger the device to acquire data shared by other devices.
Fig. 6 is a schematic diagram of an operation detection process according to an embodiment of the present application. Referring to FIG. 6, the device, when turned on, will detect if it is being picked up and, if so, perform the steps in the pick-up subroutine. If not, detecting whether the data is being put down, if so, executing the steps in the put-down sub-flow, and if not, ending.
Fig. 7 is a schematic diagram of a pick-up sub-process provided in the embodiments of the present application. Referring to fig. 7, the current device first detects whether itself is a source device, if so, performs a step in the subprocess of revoking the source device, if not, determines whether to store source device information, if so, establishes a connection with the source device based on connection information in the source device information, acquires data sent by the source device after the connection is successful, and presents the data through the presentation module if the connection is not disconnected, and if the connection is disconnected, closes the presentation module to stop presenting the data. Wherein, the display module is a module used for presenting data in the computer equipment. Fig. 8 is a schematic diagram of a sub-process of revoking a source device according to an embodiment of the present application. Referring to fig. 8, the current device determines whether to connect to another device, if so, disconnects from the other device, if not, determines whether the data sharing service is turned on, if so, turns off the data sharing service, and if not, logs off the source device.
Fig. 9 is a schematic diagram of a drop sub-process provided in an embodiment of the present application. Referring to fig. 9, the current device first detects whether it is connected to the source device, if so, stops presenting data received from the source device, and then disconnects the source device, if not, determines whether the current device has an application running, if so, indicates that the current device has data to be shared, and the current device executes the steps in the source device sub-flow establishment. If not, the process is ended. Fig. 10 is a schematic diagram of a subflow for establishing a source device according to an embodiment of the present application. Referring to fig. 10, the current device first determines whether an active device has been currently registered, and if so, ends. If not, the current equipment starts the data sharing service, and then the current equipment is registered as the source equipment.
Fig. 11 is a schematic structural diagram of a data sharing application according to an embodiment of the present disclosure. Referring to fig. 11, the data sharing application includes a data sharing module, an operation detection module, and a traffic control module. The data sharing module is used for providing a data sharing function and comprises a data sharing unit, a data presenting unit and an equipment connecting unit, wherein the data sharing unit is used for establishing a data sharing service by taking picture data, sound data or control data of current equipment as a data stream. The data presentation unit is used for presenting picture data or sound data shared by other equipment. The data presentation unit is further used for executing operation based on the control data sent by the other devices to obtain new data for sharing to the other devices. The device connection unit is used for establishing connection with other devices. The connection unit includes an account subunit, a device discovery subunit, and a connection subunit. The account subunit is used for registering an account, storing the account, logging in the account and the like. The device discovery subunit is configured to determine other devices that log in the same account as the current device and determine connection modes of the other devices. The connection subunit is configured to establish a connection with the other device according to the connection mode of the other device determined by the device discovery subunit. The operation detection module comprises an equipment taking-up detection unit, an equipment putting-down detection unit and an application detection unit. The equipment picking detection unit is used for detecting whether the current equipment is picked up or not. The device drop detection unit is used for detecting whether the current device is dropped or not, and the application detection unit is used for detecting whether the current device has running applications or not and acquiring data processed by the running applications. The service control module comprises an equipment information storage unit and a service scheduling unit. The device information storage unit is used for storing source device information. And the service scheduling unit is used for scheduling each module in the data sharing application to share data.
Fig. 12 is a schematic diagram of a device state provided in an embodiment of the present application. Referring to fig. 12, there are three devices logging in the same account, including device 1, device 2, and device 3, where device 1 is the device the user is using and is in the "picked up" state. Devices 2 and 3 are unused devices and are in a "dropped" state. Referring to fig. 13, the user "drops" device 1, registering device 1 as the source device, since device 1 is the device in use, i.e. has data being processed. Device 2 is unchanged from device 3. Referring to fig. 14, when the user "picks up" the device 2, the device 1 shares the data being processed, such as picture data, sound data, etc., to the device 2, and the device 2 presents the data shared by the device 1. The device 3 is unchanged. With continued reference to fig. 13, the user drops the device 2, and the device 2 stops presenting the data shared from the device 1 and stops receiving the data shared by the device 1, and then presents the data of the device 2 itself. Referring to fig. 15, when the user picks up the device 2 and the device 3, the device 1 shares the data being processed to the device 2 and the device 3 at the same time, and the device 2 and the device 3 simultaneously present the data shared by the device 1. With continued reference to fig. 12, the user drops device 2 and device 3 and picks up device 1, and device 1 logs off the source device. Referring to fig. 16, in the case where the device 1 is in the pick-up state, the user picks up the device 2 again, and the device 1 does not share data with the device 2.
The method provided by the embodiment of the application can be applied to scenes of controlling the television through a plurality of remote controls. For example, the television and the remote control 1 and the remote control 2 both log in the same account, and when the television is registered as a source device in the remote controls 1 and 2, the user picks up the remote control 1, the remote control 1 establishes connection with the television, and the user controls the television by controlling the remote control 1. The user sets down the remote control 1 and the remote control 1 is disconnected from the television. Similarly, when the user picks up the remote control 2, the remote control 2 is connected with the television, and the user controls the television through the control operation of the remote control 2. The user sets down the remote control 2 and the remote control 2 is disconnected from the television. Therefore, misoperation caused by mistaken touch of remote control can be avoided, and power consumption of remote control can be saved.
The method provided by the embodiment of the application can be applied to a scene of controlling the game equipment through a plurality of game pads. For example, the game device and the game pads 1 and 2 are both registered in the same account, and when the game device has been registered as a source device in the game pads 1 and 2, the user picks up the game pad 1, establishes connection between the game pad 1 and the game device, and controls the game device by the user through a control operation on the game pad 1. The user puts down the gamepad 1, and the gamepad 1 is disconnected with the game device. Similarly, when the user picks up the joystick 2, the joystick 2 is connected to the game device, and the user controls the game device by controlling the joystick 2. The user sets down the gamepad 2, and the gamepad 2 is disconnected from the game device. Therefore, misoperation caused by mistaken touch of the gamepad can be avoided, and power consumption of the gamepad can be saved.
The method provided by the embodiment of the application can also be applied to a multi-path screen projection scene. For example, the television, the screen projecting device 1 and the screen projecting device 2 log in the same account, when the user takes up the screen projecting device 1, the screen projecting device 1 registers as a source device in the television, establishes connection with the television based on a connection request sent by the television, shares data being presented to the television, and the television presents the data shared by the screen projecting device 1. When a user takes the screen projecting device 1 and the screen projecting device 2 at the same time, the screen projecting device 1 and the screen projecting device 2 are both registered as source devices in a television, connection is respectively established with the television based on a connection request sent by the television, the screen projecting device 1 shares data being presented to the television, the screen projecting device 2 also shares data being presented to the television, and the television simultaneously presents the data shared by the screen projecting device 1 and the data shared by the screen projecting device 2. For example, the television presents data shared by the screen projection device 1 and data shared by the screen projection device 2 in different areas.
The following are embodiments of the apparatus of the present application that may be used to perform embodiments of the method of the present application. For details which are not disclosed in the embodiments of the apparatus of the present application, reference is made to the embodiments of the method of the present application.
Referring to fig. 17, a block diagram of a data interaction device according to an exemplary embodiment of the present application is shown. The data interaction device is configured on the first equipment, and the data interaction device comprises:
a request sending module 1701, configured to send, in response to a source device registration instruction, a source device registration request to a second device, where the second device is a device that logs in the same account as the first device, the source device registration request is used to request the second device to register the first device as a source device, and the source device is used to share data with a device that logs in the same account as the source device or is controlled by a device that logs in the same account as the source device;
a connection establishing module 1702, configured to establish a connection with a second device when receiving a connection request sent by the second device;
a data interaction module 1703, configured to send, to the second device, first data being processed by the first device based on the connection, or receive, based on the connection, control data sent by the second device, where the control data is used to control the first device to process the first data.
The embodiment of the application provides a new data interaction mode, a user can select any one of a plurality of devices which log in to the same account to register as a source device, after the device is registered as the source device, once the device receives a connection request sent by another device which logs in to the same account, the device can establish connection with the other device, and send data which is being processed to the other device based on the connection, or receive control data sent by the other device for data processing.
In one possible implementation, the apparatus further includes:
the instruction generating module is used for responding to the first operation of the first equipment and generating a source equipment registration instruction under the condition that the touch operation of the first equipment is not detected.
In a possible implementation manner, the request sending module 1701 is further configured to, in a case that a touch operation on the first device is not detected, send, to the second device, a source device logout request in response to a second operation on the first device, where the source device logout request is used to request to logout a source device in the second device; wherein the second operation is different from the first operation.
In a possible implementation manner, the request sending module 1701 is configured to, in response to a second operation on the first device, send a source device logout request to the second device and disconnect the connection between the first device and the second device in a case where the touch operation on the first device is not detected.
In one possible implementation, the first operation is a pick-up operation or a drop-down operation and the second operation is a pick-up operation or a drop-down operation, the first operation being different from the second operation.
In one possible implementation, the apparatus further includes:
the operation detection module is used for acquiring motion information of the first equipment; and determining that the first operation on the first equipment is detected under the condition that the motion information meets the motion condition corresponding to the first operation.
In one possible implementation, the request sending module 1701 is configured to, in response to the source device registration instruction, send a source device registration request to the second device in a case where the first device is not connected to the source device.
In one possible implementation, the apparatus further includes:
and the connection disconnection module is used for responding to the source equipment registration instruction, and disconnecting the connection with the source equipment under the condition that the first equipment is connected with the source equipment.
In one possible implementation, the apparatus further includes:
the data acquisition module is used for determining the application which is currently running; in the case where the application is a target application, first data being processed by the application is acquired.
In a possible implementation manner, the data interaction module 1703 is further configured to receive control data sent by the second device; processing the first data based on the control data to obtain second data; and sending the second data to the second device.
In one possible implementation, the apparatus further includes:
the data presentation module is used for processing the first data based on the control data to obtain second data; the second data is presented.
In a possible implementation manner, the source device registration request carries connection information of the first device, and the second device is configured to send the connection request based on the connection information.
Referring to fig. 18, a block diagram of another data interaction device according to an exemplary embodiment of the present application is shown. The data interaction device is configured on the second device, and the data interaction device comprises:
a request receiving module 1801, configured to receive a source device registration request sent by a first device, where the first device is a device that logs in a same account as a second device, the source device registration request is used to request the second device to register the first device as a source device, and the source device is used to share data with a device that logs in the same account as the source device or is controlled by the device that logs in the same account as the source device;
a connection establishing module 1802, configured to send a connection request to a first device when the first device is registered as a source device, where the connection request is used to request to establish a connection with the first device;
a data interaction module 1803, configured to receive, based on the connection, first data being processed by the first device, and present the first data, or send, based on the connection, control data to the first device, where the control data is used to control the first device to process the first data.
The embodiment of the application provides a new data interaction mode, a user can select any one of a plurality of devices which log in to the same account to register as a source device, after the device is registered as the source device, once the device receives a connection request sent by another device which logs in to the same account, the device can establish connection with the other device, and send data which is being processed to the other device based on the connection, or receive control data sent by the other device for data processing.
In one possible implementation, the apparatus further includes:
and the source equipment logout module is used for logging out the source equipment under the condition of receiving a source equipment logout request sent by the first equipment.
In a possible implementation manner, the connection establishing module 1802 is configured to send, in response to a second operation on a second device, a connection request to the first device in a case where a touch operation on the second device is not detected.
In one possible implementation, the apparatus further includes:
the operation detection module is used for acquiring the motion information of the second equipment; and determining that the second operation on the second equipment is detected under the condition that the motion information meets the motion condition corresponding to the second operation.
In one possible implementation, the apparatus further includes:
the connection disconnection module is used for responding to the first operation of the second equipment and disconnecting the connection between the second equipment and the first equipment under the condition that the touch operation of the second equipment is not detected; wherein the first operation is different from the second operation.
In one possible implementation, the first operation is a pick-up operation or a drop-down operation and the second operation is a pick-up operation or a drop-down operation, the first operation being different from the second operation.
In a possible implementation manner, the data interaction module 1803 is further configured to generate control data based on a control operation on the second device; sending control data to the first device, the control data being used to process the first data; receiving second data obtained by the first equipment based on the control data processing; the second data is presented.
In one possible implementation, the apparatus further includes:
and the data generation module is used for generating control data based on the control operation of the second equipment.
In a possible implementation manner, the source device registration request carries connection information of the first device, and the connection establishing module 1802 is configured to send the connection request to the first device based on the connection information when the first device is registered as the source device.
It should be noted that, when the apparatus provided in the foregoing embodiment implements the functions thereof, only the division of the functional modules is illustrated, and in practical applications, the functions may be distributed by different functional modules according to needs, that is, the internal structure of the computer device may be divided into different functional modules to implement all or part of the functions described above. In addition, the apparatus and method embodiments provided by the above embodiments belong to the same concept, and specific implementation processes thereof are described in the method embodiments for details, which are not described herein again.
The embodiment of the application provides computer equipment, which comprises a processor and a memory; the memory stores at least one program code for execution by the processor to implement the data interaction method as provided by the various method embodiments described above.
In some embodiments, the computer device is a terminal, please refer to fig. 19, which shows a block diagram of a terminal according to an exemplary embodiment of the present application. In some embodiments, terminal 1900 is a smartphone, tablet, wearable device, or the like capable of accessing a wireless local area network as a wireless station. Terminal 1900 in the present application includes at least one or more of the following components: a processor 1910, a memory 1920, and at least two wireless links 1930.
In some embodiments, processor 1910 includes one or more processing cores. The processor 1910 connects various parts throughout the terminal 1900 using various interfaces and lines, and executes various functions of the terminal 1900 and processes data by executing or executing program codes stored in the memory 1920 and calling data stored in the memory 1920. In some embodiments, processor 1910 is implemented in hardware using at least one of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), Programmable Logic Array (PLA). Processor 1910 may integrate one or a combination of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a Neural-Network Processing Unit (NPU), a modem, and the like. Wherein, the CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing the content required to be displayed by the display screen; the NPU is used for realizing an Artificial Intelligence (AI) function; the modem is used to handle wireless communications. It is understood that the modem may not be integrated into the processor 1910, but may be implemented by a single chip.
In some embodiments, the processor 1910 is configured to control the operation of at least two Wireless links 1930, and accordingly, the processor 1910 is a processor integrated with a Wireless Fidelity (Wi-Fi) chip. Wherein, the Wi-Fi chip is a chip with double Wi-Fi processing capacity. For example, the Wi-Fi chip is a Dual Band Dual Current (DBDC) chip, a Dual Band Simultaneous (DBS) chip, or the like.
In some embodiments, Memory 1920 includes Random Access Memory (RAM), and in some embodiments, Memory 1920 includes Read-Only Memory (ROM). In some embodiments, the memory 1920 includes a non-transitory computer-readable medium. The memory 1920 may be used to store program code. The memory 1920 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing various method embodiments described below, and the like; the storage data area may store data (such as audio data, a phonebook) created according to the use of the terminal 1900, and the like.
In some embodiments, the memory 1920 has stored therein different reception schemes for receiving beacon frames for the wireless link 1930. And an identification of access nodes, wireless links 1930, etc. to which different wireless links 1930 connect.
The at least two wireless links 1930 are used to connect different Access Points (APs). And receiving downlink data issued by the AP. Wherein, the different access nodes are the access nodes in the same router or the access nodes in different routers.
In some embodiments, a display is also included in terminal 1900. A display screen is a display component for displaying a user interface. In some embodiments, the display screen is a display screen with a touch function, and a user can perform a touch operation on the display screen by using any suitable object such as a finger, a touch pen, and the like. In some embodiments, the display is generally disposed on a front panel of terminal 1900. In some embodiments, the display screen is designed as a full-face screen, curved screen, contoured screen, double-face screen, or folded screen. In some embodiments, the display screen is further designed to be a combination of a full-face screen and a curved-face screen, a combination of a special-shaped screen and a curved-face screen, and the like, which is not limited by the embodiment.
In addition, those skilled in the art will appreciate that the configuration of terminal 1900 as illustrated in the above-described figures is not intended to be limiting, as terminal 1900 may include more or fewer components than shown, or some components may be combined, or a different arrangement of components. For example, the terminal 1900 further includes a microphone, a speaker, an input unit, a sensor, an audio circuit, a module, a power supply, a bluetooth module, and other components, which are not described herein again.
The present application also provides a computer-readable storage medium storing at least one program code, which is loaded and executed by the processor to implement the data interaction method as shown in the above embodiments.
According to another aspect of the embodiments of the present application, there is provided a chip, which includes a programmable logic circuit and/or program instructions, and when the chip is run on a terminal, the chip is used for implementing the data interaction method as shown in the above embodiments.
The present application further provides a computer program product, which stores at least one program code, and the at least one program code is loaded and executed by the processor to implement the data interaction method as shown in the above embodiments.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
It will be understood by those skilled in the art that all or part of the steps in the data interaction method for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing associated hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk, an optical disk, or the like. The above description is only exemplary of the present application and should not be taken as limiting, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims (26)

1. A data interaction method, performed by a first device, the method comprising:
responding to a source device registration instruction, sending a source device registration request to a second device, wherein the second device is a device which logs in the same account with the first device, the source device registration request is used for requesting the second device to register the first device as a source device, and the source device is used for sharing data with a device which logs in the same account with the source device or is controlled by the device which logs in the same account with the source device;
under the condition of receiving a connection request sent by the second equipment, establishing connection with the second equipment;
and sending first data which is processed by the first equipment to the second equipment based on the connection, or receiving control data sent by the second equipment based on the connection, wherein the control data is used for controlling the first equipment to process the first data.
2. The method of claim 1, wherein prior to sending the source device registration request to the second device in response to the source device registration instruction, the method further comprises:
generating the source device registration instruction in response to a first operation on the first device in a case where a touch operation on the first device is not detected.
3. The method of claim 2, further comprising:
under the condition that the touch operation on the first equipment is not detected, responding to a second operation on the first equipment, and sending a source equipment logout request to the second equipment, wherein the source equipment logout request is used for requesting to logout the source equipment in the second equipment;
wherein the second operation is different from the first operation.
4. The method of claim 3, wherein sending a source device logout request to the second device in response to a second operation on the first device in a case where a touch operation on the first device is not detected comprises:
under the condition that the touch operation on the first equipment is not detected, responding to a second operation on the first equipment, sending the source equipment logout request to the second equipment, and disconnecting the connection between the first equipment and the second equipment.
5. The method of claim 3,
the first operation is a pick-up operation or a drop-down operation, the second operation is a pick-up operation or a drop-down operation, and the first operation is different from the second operation.
6. The method of claim 2, further comprising:
acquiring motion information of the first device;
determining that the first operation on the first device is detected when the motion information meets a motion condition corresponding to the first operation.
7. The method of claim 1, wherein sending a source device registration request to the second device in response to the source device registration instruction comprises:
in response to the source device registration instruction, sending the source device registration request to the second device if the first device is not connected to a source device.
8. The method of claim 7, further comprising:
and in response to the source device registration instruction, in the case that the first device is connected with an active device, disconnecting the first device from the source device.
9. The method of any of claims 1-8, wherein prior to sending the first data being processed by the first device to the second device based on the connection, the method further comprises:
determining an application currently running;
and acquiring first data processed by the application under the condition that the application is a target application.
10. The method of any of claims 1-8, wherein after sending the first data being processed by the first device to the second device based on the connection, the method further comprises:
receiving control data sent by the second equipment;
processing the first data based on the control data to obtain second data;
and sending the second data to the second device.
11. The method according to any of claims 1-8, wherein after receiving the control data sent by the second device based on the connection, the method further comprises:
processing the first data based on the control data to obtain second data;
presenting the second data.
12. The method according to any of claims 1-8, wherein the source device registration request carries connection information of the first device, and the second device is configured to send the connection request based on the connection information.
13. A data interaction method, performed by a second device, the method comprising:
receiving a source device registration request sent by a first device, wherein the first device is a device which logs in the same account with a second device, the source device registration request is used for requesting the second device to register the first device as a source device, and the source device is used for sharing data with the device which logs in the same account with the source device or is controlled by the device which logs in the same account with the source device;
under the condition that the first equipment is registered as source equipment, sending a connection request to the first equipment, wherein the connection request is used for requesting to establish connection with the first equipment;
receiving first data being processed by the first device based on the connection, and presenting the first data, or sending control data to the first device based on the connection, wherein the control data is used for controlling the first device to process the first data.
14. The method of claim 13, further comprising:
and under the condition of receiving a source equipment logout request sent by the first equipment, logging out the source equipment.
15. The method of claim 13, wherein sending a connection request to the first device comprises:
and under the condition that the touch operation on the second equipment is not detected, responding to a second operation on the second equipment, and sending the connection request to the first equipment.
16. The method of claim 15, further comprising:
acquiring motion information of the second device;
determining that the second operation on the second device is detected when the motion information satisfies a motion condition corresponding to the second operation.
17. The method of claim 15, further comprising:
under the condition that the touch operation on the second equipment is not detected, responding to the first operation on the second equipment, and disconnecting the second equipment from the first equipment;
wherein the first operation is different from the second operation.
18. The method of claim 17,
the first operation is a pick-up operation or a drop-down operation, the second operation is a pick-up operation or a drop-down operation, and the first operation is different from the second operation.
19. The method of any of claims 13-18, wherein after said presenting the first data, the method further comprises:
generating control data based on a control operation on the second device;
sending the control data to the first device, wherein the control data is used for processing the first data;
receiving second data processed by the first equipment based on the control data;
presenting the second data.
20. The method of any of claims 13-18, wherein prior to sending control data to the first device based on the connection, the method further comprises:
generating the control data based on a control operation on the second device.
21. The method according to any one of claims 13 to 18, wherein the source device registration request carries connection information of the first device, and the sending the connection request to the first device when the first device is registered as the source device comprises:
transmitting the connection request to the first device based on the connection information in a case where the first device is registered as a source device.
22. A data interaction apparatus, configured to be disposed in a first device, the apparatus comprising:
a request sending module, configured to send a source device registration request to a second device in response to a source device registration instruction, where the second device is a device that logs in a same account as the first device, the source device registration request is used to request the second device to register the first device as a source device, and the source device is used to share data with a device that logs in the same account as the source device or is controlled by a device that logs in the same account as the source device;
the connection establishing module is used for establishing connection with the second equipment under the condition of receiving a connection request sent by the second equipment;
and a data interaction module, configured to send, to the second device, first data being processed by the first device based on the connection, or receive, based on the connection, control data sent by the second device, where the control data is used to control the first device to process the first data.
23. A data interaction apparatus, configured to be disposed on a second device, the apparatus comprising:
a request receiving module, configured to receive a source device registration request sent by a first device, where the first device is a device that logs in a same account as the second device, the source device registration request is used to request the second device to register the first device as a source device, and the source device is used to share data with a device that logs in the same account as the source device or is controlled by a device that logs in the same account as the source device;
a connection establishing module, configured to send a connection request to the first device when the first device is registered as a source device, where the connection request is used to request to establish a connection with the first device;
and the data interaction module is used for receiving first data which is processed by the first equipment based on the connection and presenting the first data, or sending control data to the first equipment based on the connection, wherein the control data is used for controlling the first equipment to process the first data.
24. A computer device, wherein the computer device comprises a processor and a memory; the memory stores at least one program code for execution by the processor to implement the data interaction method of any of claims 1 to 21.
25. A computer-readable storage medium, characterized in that the storage medium stores at least one program code for execution by a processor to implement the data interaction method of any one of claims 1 to 21.
26. A chip comprising programmable logic circuits and/or program instructions for implementing a method of data interaction as claimed in any one of claims 1 to 21 when said chip is run on a terminal.
CN202111563419.4A 2021-12-20 2021-12-20 Data interaction method, device, equipment and storage medium Pending CN114257631A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202111563419.4A CN114257631A (en) 2021-12-20 2021-12-20 Data interaction method, device, equipment and storage medium
PCT/CN2022/133296 WO2023116311A1 (en) 2021-12-20 2022-11-21 Data interaction method and apparatus, and device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111563419.4A CN114257631A (en) 2021-12-20 2021-12-20 Data interaction method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114257631A true CN114257631A (en) 2022-03-29

Family

ID=80793190

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111563419.4A Pending CN114257631A (en) 2021-12-20 2021-12-20 Data interaction method, device, equipment and storage medium

Country Status (2)

Country Link
CN (1) CN114257631A (en)
WO (1) WO2023116311A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023116311A1 (en) * 2021-12-20 2023-06-29 Oppo广东移动通信有限公司 Data interaction method and apparatus, and device and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109375888A (en) * 2018-09-07 2019-02-22 北京奇艺世纪科技有限公司 A kind of throwing screen method and device
CN109617963A (en) * 2018-12-11 2019-04-12 Oppo广东移动通信有限公司 Apparatus control method, device and Internet of things system
CN113810542A (en) * 2020-05-27 2021-12-17 华为技术有限公司 Control method applied to electronic equipment and electronic equipment

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20140124304A (en) * 2013-04-16 2014-10-24 삼성전자주식회사 Controlling Method for Communication and Electronic Device supporting the same
CN112394895B (en) * 2020-11-16 2023-10-13 Oppo广东移动通信有限公司 Picture cross-device display method and device and electronic device
CN113225610B (en) * 2021-03-31 2023-08-11 北京达佳互联信息技术有限公司 Screen projection method, device, equipment and storage medium
CN114257631A (en) * 2021-12-20 2022-03-29 Oppo广东移动通信有限公司 Data interaction method, device, equipment and storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109375888A (en) * 2018-09-07 2019-02-22 北京奇艺世纪科技有限公司 A kind of throwing screen method and device
CN109617963A (en) * 2018-12-11 2019-04-12 Oppo广东移动通信有限公司 Apparatus control method, device and Internet of things system
CN113810542A (en) * 2020-05-27 2021-12-17 华为技术有限公司 Control method applied to electronic equipment and electronic equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023116311A1 (en) * 2021-12-20 2023-06-29 Oppo广东移动通信有限公司 Data interaction method and apparatus, and device and storage medium

Also Published As

Publication number Publication date
WO2023116311A1 (en) 2023-06-29

Similar Documents

Publication Publication Date Title
CN106412681B (en) Live bullet screen video broadcasting method and device
US11153609B2 (en) Method and apparatus for live streaming
CN107332976B (en) Karaoke method, device, equipment and system
JP7450734B2 (en) Audio output method and terminal device
CN109194972B (en) Live stream acquisition method and device, computer equipment and storage medium
CN109151212B (en) Equipment control method and device and electronic equipment
CN109413453B (en) Video playing method, device, terminal and storage medium
CN110300404A (en) A kind of network control method and mobile terminal
EP4013003A1 (en) Communication protocol switching method, apparatus and system
CN108377157B (en) Control method and device of Wi-Fi antenna
WO2021017894A1 (en) Method for using remote sim module, and electronic apparatus
EP4047471A1 (en) Audio data processing method, server, and storage medium
CN109410900B (en) Sound effect processing method and device and electronic equipment
CN111315038B (en) Data transmission method and device, electronic equipment and storage medium
CN107547932A (en) Sharing method and device, the terminal of data message
WO2023116311A1 (en) Data interaction method and apparatus, and device and storage medium
CN114245328A (en) Voice call transfer method and electronic equipment
WO2023173897A1 (en) Cross-device screenshot method and apparatus, device, and storage medium
CN116709226A (en) Communication relay method, electronic device, communication system, and storage medium
KR20200106317A (en) Appartus and method for controlling application relocation in edge computing environment
CN115396408A (en) Wireless audio/video device and wireless communication method
WO2021190397A1 (en) Registration method and electronic device
CN110324791B (en) Networking method and device, computer equipment and storage medium
CN108990039B (en) Data transmission method and related device
CN112245906A (en) Data synchronization 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