WO2023116311A1 - 数据交互方法、装置、设备及存储介质 - Google Patents

数据交互方法、装置、设备及存储介质 Download PDF

Info

Publication number
WO2023116311A1
WO2023116311A1 PCT/CN2022/133296 CN2022133296W WO2023116311A1 WO 2023116311 A1 WO2023116311 A1 WO 2023116311A1 CN 2022133296 W CN2022133296 W CN 2022133296W WO 2023116311 A1 WO2023116311 A1 WO 2023116311A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
connection
source device
source
request
Prior art date
Application number
PCT/CN2022/133296
Other languages
English (en)
French (fr)
Inventor
杨俊拯
何�轩
Original Assignee
Oppo广东移动通信有限公司
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 Oppo广东移动通信有限公司 filed Critical Oppo广东移动通信有限公司
Publication of WO2023116311A1 publication Critical patent/WO2023116311A1/zh

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

Definitions

  • the embodiments of the present application relate to the field of computer technology, and in particular to a data interaction method, device, device, and storage medium.
  • Embodiments of the present application provide a data interaction method, device, device, and storage medium, provide a new data interaction mode, and can meet users' diverse data interaction requirements.
  • the technical scheme is as follows:
  • a data interaction method executed by a first device comprising:
  • the source device registration instruction In response to the source device registration instruction, send a source device registration request to a second device, the second device is a device logged in with the same account as the first device, and the source device registration request is used to request the second device to register
  • the first device is registered as a source device, and the source device is used to share data with a device logged into the same account as the source device or be controlled by a device logged into the same account as the source device;
  • a data interaction method executed by a second device comprising:
  • a data interaction device which is configured in the first device, and the device includes:
  • a request sending module configured to send a source device registration request to a second device in response to the source device registration instruction, the second device is a device logged in with the same account as the first device, and the source device registration request is used to request The second device registers the first device as a source device, and the source device is used to share data with a device logged into the same account as the source device or be controlled by a device logged into the same account as the source device;
  • a first connection establishment module configured to establish a connection with the second device when a connection request sent by the second device is received
  • the first data interaction module is configured to send the first data being processed by the first device to the second device based on the connection, or receive the control data sent by the second device based on the connection, the The control data is used to control the first device to process the first data.
  • a data interaction device which is configured in the second device, and the device includes:
  • a request receiving module configured to receive a source device registration request sent by a first device, where the first device is a device logged into the same account as the second device, and the source device registration request is used to request the second device to register The first device is registered as a source device, and the source device is used to share data with a device logged into the same account as the source device or be controlled by a device logged into the same account as the source device;
  • a second 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;
  • a second data interaction module configured to receive first data being processed by the first device based on the connection, present the first data, or send control data to the first device based on the connection, the The control data is used to control the first device to process the first data.
  • a computer device includes a processor and a memory; the memory stores at least one program code, and the at least one program code is used to be used by the processor Execute to realize the data interaction method as described in the above aspects.
  • a chip is provided, the chip includes a programmable logic circuit and/or program instructions, and when the chip is run on a terminal, it is used to realize the data interaction described in the above aspect method.
  • a computer-readable storage medium stores at least one program code, and the at least one program code is used to be executed by a processor to implement the above-mentioned aspects. data interaction method.
  • a computer program product stores at least one program code, and the at least one program code is loaded and executed by a processor to realize the data interaction described in the above aspects method.
  • FIG. 1 shows a schematic diagram of an implementation environment provided by an exemplary embodiment of the present application
  • FIG. 2 shows a flowchart of a data interaction method provided by an exemplary embodiment of the present application
  • FIG. 3 shows a flowchart of another data interaction method provided by an exemplary embodiment of the present application
  • FIG. 4 shows a flowchart of another data interaction method provided by an exemplary embodiment of the present application.
  • Fig. 5 shows a flowchart of another data interaction method provided by an exemplary embodiment of the present application
  • Fig. 6 shows a schematic diagram of an operation detection process provided by an exemplary embodiment of the present application
  • FIG. 7 shows a schematic diagram of a pick-up sub-process provided by an exemplary embodiment of the present application.
  • Fig. 8 shows a schematic diagram of a sub-process of revoking a source device provided by an exemplary embodiment of the present application
  • Fig. 9 shows a schematic diagram of a sub-process of laying down provided by an exemplary embodiment of the present application.
  • Fig. 10 shows a schematic diagram of a sub-process of establishing a source device provided by an exemplary embodiment of the present application
  • Fig. 11 shows a schematic structural diagram of a data sharing application provided by an exemplary embodiment of the present application
  • Fig. 12 shows a schematic diagram of a device state provided by an exemplary embodiment of the present application.
  • Fig. 13 shows a schematic diagram of another device state provided by an exemplary embodiment of the present application.
  • Fig. 14 shows a schematic diagram of another device state provided by an exemplary embodiment of the present application.
  • Fig. 15 shows a schematic diagram of another device state provided by an exemplary embodiment of the present application.
  • Fig. 16 shows a schematic diagram of another device state provided by an exemplary embodiment of the present application.
  • Fig. 17 shows a structural block diagram of a data interaction device provided by an exemplary embodiment of the present application.
  • Fig. 18 shows a structural block diagram of another data interaction device provided by an exemplary embodiment of the present application.
  • Fig. 19 shows a structural block diagram of a terminal provided by an exemplary embodiment of the present application.
  • the "at least one” mentioned herein means one or more, and the “multiple” means two or more.
  • “And/or” describes the association relationship of associated objects, indicating that there may be three types of relationships, for example, A and/or B may indicate: A exists alone, A and B exist simultaneously, and B exists independently.
  • the character “/” generally indicates that the contextual objects are an "or” relationship.
  • user information involved in this application is information authorized by the user or fully authorized by all parties.
  • FIG. 1 is a schematic diagram of an implementation environment provided by an embodiment of the present application.
  • the implementation environment includes a first device 101 and a second device 102 .
  • the first device 101 and the second device 102 are connected through a wireless or wired network.
  • 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 have logged in the same account.
  • the first device 101 is used to send a source device registration request to the second device 102 in response to the source device registration instruction
  • the second device 102 is used to register the first device 101 as a source device
  • the source device is used to send a request to the source device Devices that log in to the same account share data or are controlled by devices that log in to the same account as the source device.
  • the second device 102 registers the first device 101 as the source device, it establishes a connection with the first device 101, and based on this connection Control the first device 101 or receive data shared by the first device 101 .
  • a data sharing application is installed on the first device 101 and the second device 102, the first device 101 can register as a source device in the second device 102 through the data sharing application, and 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, displaying images or playing sounds.
  • the data sharing application also has other functions, for example, the first device 101 can also detect operations on the first device through the data sharing application.
  • the data sharing application is an application in the operating systems of the first device 101 and the second device 102, or an application provided by a third party.
  • the data sharing application is an application program (application, APP), or a mini program (mini Program), or a micro application (Micro APP), which is not limited in this embodiment of the present application.
  • the applet is a type of application form embedded in other applications and can be used without downloading and installing.
  • a micro-application is a distributed application that can be divided into multiple services. The services run in the form of independent processes and can be independently and dynamically deployed. The services communicate in a unified cross-process manner. Multiple services of the micro-application are deployed on multiple devices, and each device in the multiple devices is deployed with the script code of the micro-application. Each device manages the communication and scheduling between multiple services by running the script code. Thus realizing a distributed application.
  • the first device is a tablet computer and the second device is a mobile phone.
  • the user has logged in his account on both the tablet computer and the mobile phone.
  • the tablet computer will send a source device registration request to the mobile phone in response to the put down operation.
  • the mobile phone receives the source device registration request, it registers the tablet computer as the source device, and requests to establish a connection with the tablet computer. After the connection between the tablet computer and the mobile phone is established, the tablet computer automatically sends the video being played to the mobile phone.
  • the user can continue to watch the video through the mobile phone after going out.
  • the user has logged in his account on both the mobile phone and the smart TV.
  • Want to watch the video currently playing on the mobile phone through the TV the user only needs to put down the mobile phone, and the mobile phone will respond to the putting down operation and send a source device registration request to the TV, and then the TV receives the source device registration request.
  • the mobile phone In the case of a request, register the mobile phone as the source device, and request to establish a connection with the mobile phone. After the connection between the mobile phone and the TV is established, the video being played will be automatically sent to the TV, so that the user can watch the video through the TV.
  • the method provided by the embodiment of the present application can be applied to the scene of editing a document.
  • the first device is a mobile phone
  • the second device is a notebook computer.
  • the user has logged in his account on both the mobile phone and the notebook computer.
  • the user uses the mobile phone to browse a document
  • the document needs to be edited, in order to For efficiency, the user may want to edit the document through the laptop.
  • the user only needs to put down the mobile phone, and the mobile phone will send a source device registration request to the laptop in response to the putting down operation.
  • the laptop computer receives the source device registration request, it registers the mobile phone as the source device, and requests to establish a connection with the mobile phone.
  • the document can be edited from a laptop.
  • the first device is a tablet computer and the second device is a mobile phone.
  • the user has logged in his account on both the tablet computer and the mobile phone.
  • the tablet computer will send a source device registration request to the mobile phone in response to the put down operation.
  • the mobile phone receives the source device registration request, it registers the tablet computer as the source device and requests to establish a connection with the tablet computer.
  • the tablet computer automatically sends the audio being played to the mobile phone. , so that the user can continue to play the video through the mobile phone after going out.
  • Fig. 2 shows a flowchart of a data interaction method provided by an exemplary embodiment of the present application. Referring to Fig. 2, the method is executed by the first device, and the method includes:
  • the first device sends a source device registration request to the second device in response to the source device registration instruction.
  • the second device is a device logged in with the same account as the first device.
  • the source device registration request is used to request the second device to register the first device Registered as a source device, the source device is used to share data with the device logged in with the same account as the source device or be controlled by the device logged in with the same account as the source device.
  • the account number is used to indicate the identity of the user and can distinguish different users. Different users correspond to different accounts, so the second device and the first device log in with the same account, indicating that the second device and the first device belong to the same user.
  • the source device registration instruction instructs to register the first device as a source device among the devices logged in with the same account as the first device.
  • the first device Since there may be multiple devices logged into the same account as the first device, the first device will send a source device registration request to the multiple devices.
  • the sending of the source device registration request to the second device is taken as an example for description.
  • the first device establishes a connection with the second device when receiving the connection request sent by the second device.
  • the source device Since the source device is used to share data with a device logged in with the same account as the source device or is controlled by a device logged in with the same account as the source device, after the first device requests to register the first device as the source device in the second device, the second The second device sends a connection request to the first device, which means that the second device needs to receive the data shared by the first device, or the second device needs to control the first device, so the first device receives the connection request sent by the second device In the case of , a connection is established with the second device, so as to perform data interaction with the second device based on the connection.
  • the first device sends the first data 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, where the control data is used to control the first device to process the first data.
  • the first data is any data being processed by the first device, for example, the first data is the data being displayed by the first device, or the first data is the data being played by the first device, or the first data is The data that the first device is processing in the background is not limited in this embodiment of the present application.
  • the second device presents the first data. For example, if the first data includes screen data, the second device displays the screen data. Where the data includes audio data, the second device plays the audio data.
  • the first device processes the first data being processed based on the control data to obtain the second data, and then presents the second data.
  • the embodiment of this application provides a new data interaction method.
  • the user can choose to register any device among the multiple devices logged into the same account as the source device. After the device is registered as the source device, once the device receives the A connection request sent by another device logged into the same account can establish a connection with the other device, based on the connection, send the data being processed to the other device, or receive control data sent by the other device for data processing , this new data interaction method meets the diverse data interaction needs of users.
  • the method before sending a source device registration request to the second device in response to the source device registration instruction, the method further includes:
  • a source device registration instruction is generated in response to the first operation on the first device.
  • the method before sending a source device registration request to the second device in response to the source device registration instruction, the method further includes:
  • a source device logout request is sent to the second device, where the source device logout request is used to request that the Source device logout;
  • the second operation is different from the first operation.
  • sending the source device logout request to the second device including:
  • the first operation is a pick-up operation or a put-down operation
  • the second operation is a pick-up operation or a put-down operation
  • the first operation is different from the second operation.
  • the method before sending a source device registration request to the second device in response to the source device registration instruction, the method further includes:
  • the motion information satisfies the motion condition corresponding to the first operation, it is determined that the first operation on the first device is detected.
  • sending a source device registration request to the second device including:
  • a source device registration request is sent to the second device.
  • sending the source device registration request to the second device further includes:
  • the method before sending the first data being processed by the first device to the second device based on the connection, the method further includes:
  • the application is the target application
  • the first data being processed by the application is obtained.
  • the method further includes:
  • the first data is processed to obtain the second data
  • the method further includes:
  • the first data is processed to obtain the second data
  • the source device registration request carries the connection information of the first device, and the second device is used to send the connection request based on the connection information.
  • Fig. 3 shows a flow chart of a data interaction method provided by an exemplary embodiment of the present application. Referring to Fig. 3, the method is executed by the second device, and the method includes:
  • the second device receives a source device registration request sent by the first device.
  • the first device is a device logged in with the 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.
  • the device is used to share data with the device logged in with the same account as the source device or be controlled by the device logged in with the same account as the source device.
  • the account number is used to indicate the identity of the user and can distinguish different users. Different users correspond to different accounts, so the second device and the first device log in with the same account, indicating that the second device and the first device belong to the same user.
  • the second device When registering the first device as the source device, the second device sends a connection request to the first device, where the connection request is used to request to establish a connection with the first device.
  • the source device Since the source device is used to share data with the device logged in with the same account as the source device or is controlled by the device logged in with the same account as the source device, after the second device registers the first device as the source device, it can send a connection to the first device request to establish a connection with the first device, so as to receive data shared by the first device based on the connection, or to control the first device.
  • the second device receives the first data being processed by the first device based on the connection, presents the first data, or sends control data to the first device based on the connection, and the control data is used to control the first device to process the first data .
  • the first data is any data being processed by the first device, for example, the first data is the data being displayed by the first device, or the first data is the data being played by the first device, or the first data is The data that the first device is processing in the background is not limited in this embodiment of the present application.
  • presenting the first data by the second device includes: the second device displaying the picture data if the first data includes picture data, and playing the audio data if the first data includes audio data.
  • the first device processes the first data being processed based on the control data to obtain the second data, and then presents the second data.
  • the embodiment of this application provides a new data interaction method.
  • the user can choose to register any device among the multiple devices logged into the same account as the source device. After the device is registered as the source device, once the device receives the A connection request sent by another device logged into the same account can establish a connection with the other device, based on the connection, send the data being processed to the other device, or receive control data sent by the other device for data processing , this new data interaction method meets the diverse data interaction needs of users.
  • the method also includes:
  • the second device logs out the source device.
  • sending a connection request to the first device includes:
  • a connection request is sent to the first device in response to the second operation on the second device.
  • sending the connection request to the first device also includes:
  • sending the connection request to the first device also includes:
  • the first operation is different from the second operation.
  • the first operation is a pick-up operation or a put-down operation
  • the second operation is a pick-up operation or a put-down operation
  • the first operation is different from the second operation.
  • the method further includes:
  • control data to the first device, where the control data is used to process the first data
  • the method before sending the control data to the first device based on the connection, the method further includes:
  • control data is generated.
  • the source device registration request carries the connection information of the first device, and when the first device is registered as the source device, the connection request is sent to the first device, including:
  • a connection request is sent to the first device based on the connection information.
  • Fig. 4 shows a flow chart of a data interaction method provided by an exemplary embodiment of the present application.
  • the method is executed interactively by the first device and the second device, and the method describes how the source device communicates with the source device The process of sharing data between devices logged into the same account.
  • the method includes:
  • the first device sends a source device registration request to the second device in response to the source device registration instruction.
  • the second device is a device logged in with the same account as the first device.
  • the source device registration request is used to request the second device to register the first device Register as a source device, and the source device is used to share data with devices that log in to the same account as the source device.
  • the first device generates a source device registration instruction in response to the first operation on the first device when no touch operation on the first device is detected. This method enables the user to control the first device to perform source device registration without performing a touch operation on the first device, and the control mode of the electronic device is more flexible.
  • the first operation is any operation except touch operation, for example, pick up operation, put down operation, shake operation, etc., which is not limited in this embodiment of the present application.
  • the pick-up operation and the put-down operation are extremely simple, the source device registration is triggered by the pick-up operation or the put-down operation, which can greatly improve the registration efficiency of the source device.
  • 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 this embodiment of the present application.
  • the first device acquires motion information of the first device; if the motion information satisfies a motion condition corresponding to the first operation, determine that the first operation on the first device is detected.
  • the motion information is information detected by a sensor in the first device.
  • the sensor includes a pressure sensor, a gyroscope sensor, an air pressure sensor, an acceleration sensor, a distance sensor, and the like.
  • whether the motion information of the first device satisfies the motion condition corresponding to the first operation can indicate whether the user has performed the first operation on the first device, and if the motion information of the first device satisfies the motion condition corresponding to the first operation, it indicates that the user has The first device performs a first operation. 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 has picked up the first device; if the motion information of the first device meets the motion condition corresponding to the pick-up operation, it indicates that the user has picked up the first device a device.
  • whether the motion information of the first device satisfies the motion condition corresponding to the put down operation can indicate whether the user has put down the first device, and if the motion information of the first device satisfies the motion condition corresponding to the put down operation, it indicates that the user has put down the first device.
  • the first operation is not a touch operation
  • corresponding movement information will be generated, and the operation information can accurately reflect whether the first device has been executed the first operation. Therefore, detecting the first operation on the first device based on the motion information of the first device can ensure detection accuracy.
  • the first device sending the source device registration request to the second device includes: sending the source device registration request to the second device when the first device is not connected to the source device.
  • the data processed by the first device is actually the data shared by the source device to the first device, that is to say, the first device does not actually need Data shared with other devices.
  • the first device does not need to register itself as a source device to share data with other devices. Therefore, the first device only sends data to the second device when the source device is not connected. Sending the source device registration request can avoid sending unnecessary source device registration requests and reduce the performance consumption of the device.
  • the first device disconnects from the source device when the active device is connected.
  • the connection is used to receive data shared by the source device, therefore, the first device disconnects from the source device, and no longer receives data from the source device.
  • the first device when the first device is connected to the source device, the first device will receive the data shared by the source device.
  • the user controls the first device to generate the source device
  • the registration command is most likely because the user does not want to continue to receive the data shared by the current source device through the first device. In this case, disconnecting the connection with the source device directly can save power consumption of the first device.
  • the way that the first device sends the source device registration request to the second device may be that the first device sends the source device registration request to the server, and the server determines the second device that is logged in with the same account as the first device, and then sends the second device The device sends the source device registration request.
  • the first device in addition to sending a source device registration request to the second device, the first device will also store a record of itself as a source device, for example, the first device will generate source device information "source device-identity of the first device", and The information of the source device is stored, so that it is convenient for the subsequent first device to know which is the source device among the multiple devices that log in to the account.
  • the source device registration request carries the identifier of the first device, which facilitates subsequent registration of the first device as the source device by the second device.
  • the source device registration request carries the connection information of the first device, so that the subsequent second device can send a connection request to the first device based on the connection information.
  • the second device receives the source device registration request sent by the first device, and sends a connection request to the first device when the first device is registered as the source device.
  • the source device registration request carries the identifier of the first device
  • the second device may register the first device as the source device by marking the identifier of the first device as the source device.
  • the second device generates source device information "source device-identification of the first device", and stores the source device information.
  • the source device registration request carries the connection information of the first device
  • the second device may register the first device as the source device in an implementation manner that the second device determines the connection information of the first device as the source device information.
  • the source device registration request carries the connection information of the first device, and correspondingly, when the second device registers the first device as the source device, it sends a connection information to the first device based on the connection information. ask.
  • the connection information of the first device indicates the way to establish a connection with the first device.
  • the connection information of the first device includes the IP (Internet Protocol, Internet Protocol) address, MAC (Medium Access Control, media access control) address of the first device. access control) address, the identifier of the first device, information about the local area network where the first device is located, and of course, the connection information of the first device can also include other information for establishing a connection with the first device.
  • the connection request carries the IP address, the MAC address, the identifier of the second device, the local area network information of the second device, etc., which are not limited in this embodiment of the present application.
  • the connection information of the first device is carried in the source device registration request, so that when the second device registers the first device as the source device, it can be directly based on the connection information request in the source device registration request and The first device establishes a connection. Moreover, since the connection information is used to establish a connection with the first device, and the second device will use the connection information to establish a connection with the first device when the first device is registered as the source device, the first device sends the first device The second device sends a source device registration request, carrying the connection information of the first device in the source device registration request, which avoids sending connection information to the second device when the second device does not need to use the connection information of the first device, reducing the The performance consumption of the device.
  • the source device since the source device is used to share data with other devices, when the second device registers the first device as the source device, it sends a connection request to the first device based on the connection information, so that the first device The device establishes a connection with the second device to ensure that the second device can successfully receive the data shared by the first device.
  • the connection information of the first device has been sent to the second device, and correspondingly, the connection information of the first device is stored in the second device.
  • the second device inquires about the connection information of the first device, and sends a connection request to the first device based on the inquired connection information.
  • the first device logs in to the account, it sends its own connection information to other devices that log in to the account, and the other devices store the connection information accordingly.
  • the server determines other devices that log into the account, and sends the connection information to the determined other devices.
  • each device stores the connection information of other devices that log into the same account as the device, so that when registering the source device, the connection information does not need to be carried in the source device registration request.
  • the second device sending the connection request to the first device includes: the second device responds to the second The operation is to send a connection request to the first device.
  • the second operation is any operation except the touch operation, and the second operation is different from the first operation.
  • the second device sends a connection request to the first device in response to the second operation on the second device, so that the user can control the process of data interaction between the second device and the first device through the second device.
  • Timing that is, when the user needs to receive data shared by the first device through the second device, the user can perform a second operation on the second device, so that the second device can establish a connection with the first device, so that based on this Connect to receive data shared by the first device.
  • the second operation is a pick-up operation or a put-down operation, and the second operation is different from the first operation.
  • the first operation as putting down and the second operation as picking up as an example, considering that when the first device is processing data, the user puts down the first device, most likely because the user needs to transfer the data being processed by the first device Synchronize to other devices, and the second device is logged into the same account as the first device, the second device most likely belongs to the user, therefore, in response to the drop operation on the first device, register the first device as the source in the second device device, and considering that the user picks up the second device, it can indicate that the second device is a device that needs to receive data from the first device.
  • the second device requests to connect with the first device, so that the first device can instantly communicate with the
  • the second device establishes a connection and synchronizes the data being processed to the second device.
  • the whole process does not require the user to perform any touch operation, which greatly improves the efficiency of data interaction.
  • the second device when the second device registers the first device as the source device, the second device directly sends the connection request to the first device without responding to any operation.
  • This method enables the user to control the timing of data interaction between the second device and the first device through the first device, that is, the user can share the data being processed by the first device with the second device, Register the first device as the source device in the second device, so that it can receive the connection request sent by the second device, establish a connection with the second device, and share data with the second device based on the connection.
  • the second device acquires motion information of the second device; if the motion information satisfies a motion condition corresponding to the second operation, it is determined that the second operation on the second device is detected.
  • the implementation of this step is the same as the implementation of the first device acquiring the motion information of the first device; when the motion information meets the motion condition corresponding to the first operation, determining that the first operation on the first device is detected, here I won't repeat them here.
  • the first device When receiving the connection request sent by the second device, the first device establishes a connection with the second device, and sends the first data being processed by the first device to the second device based on the connection.
  • the first device after the first device establishes a connection with the second device, it first needs to obtain the first data being processed, including: the first device determines the currently running application; when the application is the target application Next, get the first data that the app is processing.
  • the first device includes multiple target applications.
  • the target application in the first device is a default application, or the target application is an application selected by the user.
  • the first device allows the user to select a target application by displaying an application list, that is, the first device displays an application list, and the application list includes at least one application, and the first device determines the selected application from the at least one application.
  • the user can decide which application data can be shared with the device connected to the current device when the current device is the source device.
  • the first data being processed by the running application includes screen data being displayed by the application, audio data being played by the application, background data being processed by the application, etc., which is not limited in this embodiment of the present application.
  • the application is displaying a document editing interface
  • the document editing interface is the first data.
  • the picture data and audio data of the video are the first data.
  • the first device will obtain 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 first device starts the data sharing service before sending the source device registration request to the second device, that is, the first device encapsulates the first data being processed to obtain a data packet corresponding to the first data .
  • an implementation manner in which the first device sends the first data to the second device may be that the first device sends a data packet corresponding to the first data to the second device.
  • the second device receives the first data being processed by the first device based on the connection, and presents the first data.
  • presenting the first data by the second device includes: the second device displaying the picture data if the first data includes picture data, and playing the audio data if the first data includes audio data.
  • the second device displays the picture of the video and plays the sound of the video.
  • the first data is an editing interface of a document
  • the second device displays the editing interface of the document.
  • the second device generates control data based on the control operation on the second device.
  • the second device presents the first data
  • the user wants to change the data presented by the second device, he can perform a control operation on the second device, and the control operation will be mapped to the first device, so that the first device changes and shares it with the second device.
  • the data of the second device and then change the data presented by the second device.
  • the control operation may be different.
  • the control operation may be to switch to the next video, and correspondingly, the control data indicates to switch to the next video, and the control operation can also be to pause playback, and correspondingly, the control data indicates to temporarily Play video.
  • the control operation may be an editing operation on the document, and correspondingly, the control data indicates the editing operation, or the control data is a closing operation on the document, correspondingly, Control data instructs to close the document.
  • the second device sends control data to the first device, where the control data is used to process the first data.
  • the second device sends the control data to the first device based on the connection with the first device.
  • the first device receives the control data sent by the second device, and processes the first data based on the control data to obtain second data.
  • control data indicates the control operation to be performed on the first device. Therefore, after the first device receives the control data and executes the control operation, it can process based on the first data to obtain the second data.
  • the first data is the video being played by the first device, and the control operation indicated by the control data is to switch to the next video, then the first device switches from the currently playing video to the next video, and the obtained second data is the next video.
  • the first data is an editing interface of a 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
  • the obtained second data is the edited document.
  • the first device sends second data to the second device based on the connection.
  • the first device sends the second data to the second device based on the connection with the second device.
  • the second device receives the second data based on the connection, and presents the second data.
  • the implementation manner for the second device to present the second data is the same as the implementation manner for presenting the first data, and will not be repeated here.
  • the second device can continue to change the presented data based on the control operation on the second device, and the implementation manner is the same as 405-409. It should be noted that the above steps 405-409 are optional steps and are not executed in other embodiments.
  • Fig. 5 shows a flow chart of a data interaction method provided by an exemplary embodiment of the present application.
  • the method is executed interactively by the first device and the second device, and the method describes that the source device is interacted with the source device The process of logging in to the device control of the same account.
  • the method includes:
  • the first device sends a source device registration request to the second device in response to the source device registration instruction.
  • the second device is a device logged in with the same account as the first device.
  • the source device registration request is used to request the second device to register the first device Registered as a source device, the source device is used to share data with the device logged in with the same account as the source device or be controlled by the device logged in with the same account as the source device.
  • the second device receives the source device registration request sent by the first device, and sends a connection request to the first device when the first device is registered as the source device.
  • the first device establishes a connection with the second device when receiving the connection request sent by the second device.
  • steps 501-503 please refer to the above-mentioned steps 401-403, which will not be repeated here.
  • the second device sends control data to the first device based on the connection, where the control data is used to control the first device to process the first data.
  • the second device before the second device sends the control data to the first device based on the connection, it generates the control data based on a control operation on the second device.
  • the control data indicates the control operation to be performed on the first device.
  • the control operation indicated by the control data is switching to the next video.
  • the control operation indicated by the control data is pausing the currently playing video and so on.
  • the first device receives the control data sent by the second device based on the connection, processes the first data based on the control data, obtains the second data, and presents the second data.
  • control data indicates the control operation to be performed on the first device
  • the first device After the first device receives the control data and executes the control operation, it can process based on the first data to obtain the second data.
  • the first data is the video being played by the first device, and the control operation indicated by the control data is to switch to the next video
  • the first device switches from the currently playing video to the next video
  • the obtained second data is the next video
  • the first device plays that next video.
  • the control operation indicated by the control data is to pause the currently playing video
  • the first device pauses playing the currently playing video
  • the obtained second data is the picture of the video when the pause operation is performed, and then the first device displays the screen.
  • the second device when the second device has registered the first device as the source device, it can also unregister the source device registered by the second device.
  • a source device logout request is sent to the second device, where the source device logout request is used to request logout of the source device in the second device.
  • the second device logs out the source device when receiving the source device logout request sent by the first device.
  • the way that the first device sends the source device logout request to the second device may be that the first device sends the source device logout request to the server, and the server determines that the second device is logged in with the same account as the first device, and then sends the source device logout request to the second device.
  • the device sends a source device logoff request.
  • an implementation manner in which the second device registers the first device as the source device is that the second device marks the identifier of the first device as the source device.
  • the implementation manner for the second device to log out the source device may be that the second device deletes the source device mark.
  • an implementation manner in which the second device registers the first device as the source device may be that the second device determines the connection information of the first device as the source device information.
  • the implementation manner for the second device to log out the source device may be that the second device deletes the source device information.
  • the first device also registers itself as the source device in the first device, and correspondingly, the first device also needs to log out of the source device.
  • the first device logs out the source device in response to the second operation on the first device, so that the user does not need to perform an operation on the first device.
  • the touch operation of the device can control the first device to log off the source device, and the control mode of the electronic device is more flexible.
  • the first device must enable the data sharing service before sending the source device registration request to the second device, and correspondingly, the first device must disable the data sharing service after sending the source device logout request to the second device.
  • the first device can 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.
  • the data interaction may be stopped due to a state change of the first device. That is, the first device sends a source device logout request to the second device in response to the second operation on the first device when no touch operation on the first device is detected, and disconnects the first device. connection to a second device.
  • the user when the first device is exchanging data with the second device, the user performs a second operation on the first device, indicating that the user wants to stop the data interaction. In this case, directly disconnect the first device
  • the connection with the second device can stop data interaction, which greatly improves the control efficiency of the first device. And disconnecting the connection between the first device and the second device can also reduce the power consumption of 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 when no touch operation on the second device is detected.
  • the user when the first device is exchanging data with the second device, the user performs the first operation on the second device, indicating that the user wants to stop the data interaction. In this case, directly disconnect the first device
  • the connection with the second device can stop data interaction, which greatly improves the control efficiency of the second device. And disconnecting the connection between the first device and the second device can also reduce the power consumption of the first device and the second device.
  • the number of second devices in the embodiment of the present application can be multiple.
  • the first device can perform data interaction with the multiple second devices at the same time, for example Simultaneously share data with the multiple second devices, and the method of sharing data with each second device by the first device is the same.
  • the embodiment of this application provides a new data interaction method.
  • the user can choose to register any device among the multiple devices logged into the same account as the source device. After the device is registered as the source device, once the device receives the A connection request sent by another device logged into the same account can establish a connection with the other device, based on the connection, send the data being processed to the other device, or receive control data sent by the other device for data processing , this new data interaction method meets the diverse data interaction needs of users.
  • the first device generates a source device registration instruction in response to the first operation on the first device when no touch operation on the first device is detected. This method enables the user to control the first device to perform source device registration without performing a touch operation on the first device, and the control mode of the electronic device is more flexible.
  • the first operation is not a touch operation
  • corresponding movement information will be generated, and the operation information can accurately reflect whether the first device has been executed the first operation. Therefore, detecting the first operation on the first device based on the motion information of the first device can ensure detection accuracy.
  • the user puts down the first device, most likely because the user needs to synchronize the data being processed by the first device to other devices, and the second device and the first device If one device logs into the same account, the second device most likely belongs to the user. Therefore, in response to the drop operation on the first device, the first device is registered as the source device in the second device, and considering that the user picks up the second device , which can indicate that the second device is a device that needs to receive data from the first device.
  • the second device requests to connect with the first device, so that the first device can immediately establish a connection with the second device, and transfer the data being processed Synchronizing to the second device, the whole process does not require the user to perform any touch operation, which greatly improves the efficiency of data interaction.
  • the first device since the data processed by the first device is actually the data shared by the source device to the first device when the first device is connected to the source device, that is to say, the first device does not actually need Data shared with other devices. In this case, the first device does not need to register itself as a source device to share data with other devices. Therefore, the first device only sends data to the second device when the source device is not connected. Sending the source device registration request can avoid sending unnecessary source device registration requests and reduce the performance consumption of the device.
  • the first device when the first device is connected to the source device, the first device will receive the data shared by the source device.
  • the user controls the first device to generate the source device
  • the registration command is most likely because the user does not want to continue to receive the data shared by the source device. In this case, directly disconnecting the source device can save power consumption of the first device.
  • the connection information of the first device is carried in the source device registration request, so that when the second device registers the first device as the source device, it can be directly based on the connection information request in the source device registration request and The first device establishes a connection. Moreover, since the connection information is used to establish a connection with the first device, and the second device will use the connection information to establish a connection with the first device when the first device is registered as the source device, the first device sends the first device The second device sends a source device registration request, carrying the connection information of the first device in the source device registration request, which avoids sending connection information to the second device when the second device does not need to use the connection information of the first device, reducing the The performance consumption of the device.
  • the source device since the source device is used to share data with other devices, when the second device registers the first device as the source device, it sends a connection request to the first device based on the connection information, so that the first device The device establishes a connection with the second device to ensure that the second device can successfully receive the data shared by the first device.
  • the second device sends a connection request to the first device in response to the second operation on the second device, so that the user can control the process of data interaction between the second device and the first device through the second device.
  • Timing that is, when the user needs to receive data shared by the first device through the second device, the user can perform a second operation on the second device, so that the second device can establish a connection with the first device, so that based on this Connect to receive data shared by the first device.
  • the second device when the second device registers the first device as the source device, it directly sends a connection request to the first device without responding to any operation.
  • This method enables the user to control the timing of data interaction between the second device and the first device through the first device, that is, the user can share the data being processed by the first device with the second device, Register the first device as the source device in the second device, so that it can receive the connection request sent by the second device, establish a connection with the second device, and share data with the second device based on the connection.
  • the first device will obtain 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 takes the first operation as a put down operation and the second operation as a pick up operation as an example to illustrate the process of device data sharing.
  • the first operation is a drop operation, and the user performs a drop operation on the device to trigger the device to share data.
  • the second operation is a pick-up operation, and the user performs a pick-up operation on the device to trigger the device to obtain data shared by other devices.
  • FIG. 6 is a schematic diagram of an operation detection process provided by an embodiment of the present application. Referring to FIG. 6 , when the device is turned on, it will detect whether it is being picked up, and if so, execute the steps in the picking up sub-flow. If not, check whether it is being dropped, if yes, execute the steps in the drop sub-process, if not, end.
  • Fig. 7 is a schematic diagram of a pick-up sub-flow provided by the embodiment of the application.
  • the current device first checks whether it is a source device, if yes, executes the steps in the sub-flow of revoking the source device, if not, determines whether the source device information is stored, and if so, based on the source device information
  • Connection information Establish a connection with the source device. After the connection is successful, the data sent by the source device will be obtained. If the connection is not broken, the data will be presented through the display module. If the connection is disconnected, the display module will be closed to stop presenting the data. . Wherein, the display module is a module used to present data in the computer device. Fig.
  • FIG. 8 is a schematic diagram of a sub-process of revoking a source device provided by an embodiment of the present application.
  • the current device determines whether it is connected to other devices, if yes, disconnects the connection with other devices, if not, determines whether the data sharing service is enabled, if yes, then closes the data sharing service, if not, then logs out source device.
  • FIG. 9 is a schematic diagram of a drop sub-process provided by an embodiment of the present application.
  • the current device first detects whether it is connected to a source device, if yes, stops presenting the data received from the source device, and then disconnects from the source device, if not, then determines whether the current device is running If yes, it means that the current device has data that needs to be shared, and the current device executes the steps in the sub-process of establishing the source device. If not, end.
  • FIG. 10 is a schematic diagram of a sub-flow of establishing a source device provided by an embodiment of the present application. Referring to FIG. 10 , the current device first determines whether an active device is currently registered, and if so, ends. If not, the current device starts the data sharing service, and then registers the current device as the source device.
  • FIG. 11 is a schematic structural diagram of a data sharing application provided by an embodiment of the present application.
  • the data sharing application includes a data sharing module, an operation detection module and a service control module.
  • the data sharing module is used to provide data sharing function
  • the data sharing module includes a data sharing unit, a data presentation unit and a device connection unit, wherein the data sharing unit is used to use the screen data, sound data or control data of the current device as a data stream Create a data sharing service.
  • the data presentation unit is used for presenting image data or sound data shared by other devices.
  • the data presentation unit is also used to perform operations based on the control data sent by other devices, so as to obtain new data for sharing with other devices.
  • the device connection unit is used to establish connections 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 account, storing account, logging in account and so on.
  • the device discovery subunit is used to determine other devices logged in with the same account as the current device and determine the connection mode of other devices.
  • the connection subunit is used to establish a connection with other devices according to the connection mode of other devices determined by the device discovery subunit.
  • the operation detecting module includes a device picking up detecting unit, a device putting down detecting unit and an application detecting unit. Wherein, the device pick-up detection unit is used to detect whether the current device is picked up.
  • the device put down detection unit is used to detect whether the current device is put down, and the application detection unit is used to detect whether the current device has a running application, and obtain the data being processed by the running application.
  • the service control module includes a device information storage unit and a service scheduling unit. Wherein, the device information storage unit is used for storing source device information.
  • the business scheduling unit is used to schedule each module in the data sharing application for data sharing.
  • Fig. 12 is a schematic diagram of a device state provided by an embodiment of the present application.
  • device 1 is the device being used by the user and is in the "picked up” state; device 2 and device 3 are unused devices and are in the "put down” state.
  • FIG. 13 the user "puts down" device 1, and since device 1 is the device in use, ie has data being processed, device 1 is registered as the source device. Device 2 and Device 3 are unchanged.
  • FIG. 12 is the device being used by the user and is in the "picked up" state
  • device 2 and device 3 are unused devices and are in the "put down” state.
  • FIG. 13 the user "puts down” device 1, and since device 1 is the device in use, ie has data being processed, device 1 is registered as the source device.
  • Device 2 and Device 3 are unchanged. Referring to FIG.
  • the user "picks up" device 2, then device 1 will share the data being processed, such as image data, sound data, etc., to device 2, and at this time, device 2 will present the data shared by device 1.
  • Device 3 is unchanged.
  • the user puts down the device 2, then the device 2 will stop presenting the data shared from the device 1, stop receiving the data shared by the device 1, and then present the data of the device 2 itself.
  • the user picks up device 2 and device 3, then device 1 will share the data being processed to device 2 and device 3 at the same time, at this time, device 2 and device 3 present the data shared by device 1 at the same time.
  • FIG. 13 if the user puts down the device 2, then the device 2 will stop presenting the data shared from the device 1, stop receiving the data shared by the device 1, and then present the data of the device 2 itself.
  • the user picks up device 2 and device 3, then device 1 will share the data being processed to device 2 and device 3 at the same time, at this time, device 2 and device 3 present the data shared by device 1 at the same time.
  • the user puts down device 2 and device 3 and picks up device 1 , then device 1 will log off the source device.
  • device 1 will not share data with the device 2 .
  • the method provided in the embodiment of the present application can be applied to a scene where multiple remote control devices are used to control a TV.
  • the TV, remote control device 1 and remote control device 2 are all logged into the same account, and when the TV has been registered as the source device in remote control device 1 and remote control device 2, the user picks up remote control device 1, then remote control device 1 and TV establish connected, the user controls the TV through the control operation on the remote control device 1 .
  • the user puts down the remote control device 1, and the remote control device 1 is disconnected from the TV.
  • the remote control device 2 establishes a connection with the TV, and the user controls the TV by controlling the remote control device 2 .
  • the user puts down the remote control device 2, and the remote control device 2 is disconnected from the TV. In this way, it is not only possible to avoid misoperation due to accidental touch of the remote control, but also to save power consumption of the remote control device.
  • the method provided by the embodiment of the present application can be applied to a scene where a game device is controlled by multiple game controllers.
  • the game device and gamepad 1 and gamepad 2 are both logged into the same account, and if the game device has been registered as the source device in gamepad 1 and gamepad 2, the user picks up gamepad 1, and based on the pick-up operation , the gamepad 1 establishes a connection with the game device, and the user controls the game device by controlling the gamepad 1 .
  • the user puts down the gamepad 1, and the gamepad 1 is disconnected from the game device.
  • the gamepad 2 establishes a connection with the game device, and the user controls the game device by controlling the gamepad 2.
  • the user puts down the gamepad 2, and the gamepad 2 is disconnected from the game device. In this way, it can not only avoid misoperation due to accidental touch of the gamepad, but also save power consumption of the gamepad.
  • the method provided in the embodiment of the present application can also be applied in the scenario of multi-channel screen projection.
  • the TV and screen projection device 1 and screen projection device 2 log in with the same account, and the user picks up screen projection device 1.
  • screen projection device 1 is registered as the source device in the TV, and based on the connection request sent by the TV and the The TV establishes a connection, and shares the data being presented to the TV, and the TV presents the data shared by the projection device 1 .
  • the screen projection device 1 and the screen projection device 2 are both registered in the TV as the source device.
  • the data being presented is shared with the TV, and the screen projection device 2 also shares the data being presented with the TV, and the TV presents the data shared by the screen projection device 1 and the data shared by the screen projection device 2 at the same time.
  • the TV presents the data shared by the screen projection device 1 and the data shared by the screen projection device 2 in different areas.
  • FIG. 17 shows a structural block diagram of a data interaction device provided by an exemplary embodiment of the present application.
  • the data interaction device is configured on the first device, and the data interaction device includes:
  • the request sending module 1701 is configured to send a source device registration request to a second device in response to the source device registration instruction, the second device is a device logged in with the same account as the first device, and the source device registration request is used to request the second device to register the first device A device is registered as a source device, and the source device is used to share data with a device logged in with the same account as the source device or be controlled by a device logged in with the same account as the source device;
  • the first connection establishment module 1702 is configured to establish a connection with the second device when receiving a connection request sent by the second device;
  • the first data interaction module 1703 is configured to send the first data being processed by the first device to the second device based on the connection, or to receive the control data sent by the second device based on the connection, and the control data is used to control the first device to interact with the first device.
  • the data is processed.
  • the embodiment of this application provides a new data interaction method.
  • the user can choose to register any device among the multiple devices logged into the same account as the source device. After the device is registered as the source device, once the device receives the A connection request sent by another device logged into the same account can establish a connection with the other device, based on the connection, send the data being processed to the other device, or receive control data sent by the other device for data processing , this new data interaction method meets the diverse data interaction needs of users.
  • the device further includes:
  • the instruction generation module is configured to generate a source device registration instruction in response to the first operation on the first device when no touch operation on the first device is detected.
  • the request sending module 1701 is further configured to send the source information to the second device in response to the second operation on the first device when no touch operation on the first device is detected.
  • the device logout request, the source device logout request is used to request to log out of the source device in the second device; wherein, the second operation is different from the first operation.
  • the request sending module 1701 is configured to send the source device information to the second device in response to the second operation on the first device when no touch operation on the first device is detected.
  • the first operation is a pick-up operation or a put-down operation
  • the second operation is a pick-up operation or a put-down operation
  • the first operation is different from the second operation.
  • the device further includes:
  • the operation detection module is configured to acquire motion information of the first device; if the motion information satisfies a motion condition corresponding to the first operation, determine that the first operation on the first device is detected.
  • 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 when the first device is not connected to the source device.
  • the device further includes:
  • a disconnection module configured to disconnect the source device when the first device is connected to the source device in response to the source device registration instruction.
  • the device further includes:
  • the data acquisition module is configured to determine the currently running application; if the application is a target application, acquire the first data being processed by the application.
  • the first data interaction module 1703 is further configured to receive control data sent by the second device; process the first data based on the control data to obtain second data; send the second data to the second device Second data.
  • the device further includes:
  • the data presentation module is configured to process the first data based on the control data to obtain the second data; and present the second data.
  • 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.
  • FIG. 18 shows a structural block diagram of another data interaction device provided by an exemplary embodiment of the present application.
  • the data interaction device is configured on the second device, and the data interaction device includes:
  • the request receiving module 1801 is configured to receive a source device registration request sent by a first device, where the first device is a device logged into the same account as the second device, and the source device registration request is used to request the second device to register the first device as a source device , the source device is used to share data with the device logged in with the same account as the source device or be controlled by the device logged in with the same account as the source device;
  • the second connection establishing module 1802 is configured to send a connection request to the first device when the first device is registered as the source device, where the connection request is used to request to establish a connection with the first device;
  • the second data interaction module 1803 is configured to receive the first data being processed by the first device based on the connection, present the first data, or send control data to the first device based on the connection, and the control data is used to control the first device to interact with the first device.
  • the data is processed.
  • the embodiment of this application provides a new data interaction method.
  • the user can choose to register any device among the multiple devices logged into the same account as the source device. After the device is registered as the source device, once the device receives the A connection request sent by another device logged into the same account can establish a connection with the other device, based on the connection, send the data being processed to the other device, or receive control data sent by the other device for data processing , this new data interaction method meets the diverse data interaction needs of users.
  • the device further includes:
  • a source device logout module configured to log out the source device when receiving a source device logout request sent by the first device.
  • the second connection establishment module 1802 is configured to, in response to the second operation on the second device, send to the first device a Connection request.
  • the device further includes:
  • the operation detection module is configured to acquire motion information of the second device; if the motion information satisfies a motion condition corresponding to the second operation, determine that the second operation on the second device is detected.
  • the device further includes:
  • a disconnection module configured to disconnect the connection between the second device and the first device in response to the first operation on the second device when no touch operation on the second device is detected; wherein, The first operation is different from the second operation.
  • the first operation is a pick-up operation or a put-down operation
  • the second operation is a pick-up operation or a put-down operation
  • the first operation is different from the second operation.
  • the second data interaction module 1803 is further configured to generate control data based on the control operation on the second device; send the control data to the first device, and the control data is used to process the first data ; receiving second data obtained through processing by the first device based on the control data; and presenting the second data.
  • the device further includes:
  • a data generation module configured to generate control data based on the control operation on the second device.
  • the source device registration request carries the connection information of the first device
  • the second connection establishment module 1802 is configured to, when the first device is registered as the source device, send the connection information to the first device based on the connection information. Send a connection request.
  • An embodiment of the present application provides a computer device, the computer device includes a processor and a memory; the memory stores at least one program code, and the at least one program code is used to be executed by the processor to implement the methods provided by the above-mentioned various method embodiments Data interaction method.
  • the computer device is a terminal.
  • FIG. 19 shows a structural block diagram of a terminal provided by an exemplary embodiment of the present application.
  • the terminal 1900 is a terminal capable of accessing a wireless local area network as a wireless station, such as a smart phone, a tablet computer, and a wearable device.
  • the terminal 1900 in this application includes at least one or more of the following components: a processor 1910 , a memory 1920 and at least two wireless links 1930 .
  • processor 1910 includes one or more processing cores.
  • the processor 1910 uses various interfaces and lines to connect various parts of the entire terminal 1900, and executes various functions and processes of the terminal 1900 by running or executing program codes stored in the memory 1920 and calling data stored in the memory 1920 data.
  • the processor 1910 adopts at least one of Digital Signal Processing (Digital Signal Processing, DSP), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA), and Programmable Logic Array (Programmable Logic Array, PLA). A form of hardware to achieve.
  • DSP Digital Signal Processing
  • FPGA Field-Programmable Gate Array
  • PLA Programmable Logic Array
  • the processor 1910 can integrate one or more of a central processing unit (Central Processing Unit, CPU), an image processor (Graphics Processing Unit, GPU), a neural network processor (Neural-network Processing Unit, NPU) and a modem, etc.
  • a central processing unit Central Processing Unit, CPU
  • an image processor Graphics Processing Unit, GPU
  • a neural network processor Neural-network Processing Unit, NPU
  • the CPU mainly handles the operating system, user interface and application programs, etc.
  • the GPU is used to render and draw the content that needs to be displayed on the display screen
  • the NPU is used to realize artificial intelligence (Artificial Intelligence, AI) functions
  • the modem is used to process wireless communication. It can be understood that, the above-mentioned modem can also not be integrated into the processor 1910, but can be realized by a single chip.
  • the processor 1910 is used to control the working conditions of at least two wireless links 1930, and correspondingly, the processor 1910 is a processor integrated with a wireless fidelity (Wireless Fidelity, Wi-Fi) chip.
  • Wi-Fi chip is a chip with dual Wi-Fi processing capabilities.
  • the Wi-Fi chip is a Dual Band Dual Concurrent (DBDC) chip, or a Dual Band Simultaneous (DBS) chip.
  • DBDC Dual Band Dual Concurrent
  • DBS Dual Band Simultaneous
  • the memory 1920 includes a random access memory (Random Access Memory, RAM), and in some embodiments, the memory 1920 includes a read-only memory (Read-Only Memory, ROM). In some embodiments, the memory 1920 includes a non-transitory computer-readable storage medium.
  • the memory 1920 can be used to store program codes.
  • the memory 1920 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), Instructions and the like for implementing the following method embodiments; the storage data area can store data created according to the use of the terminal 1900 (such as audio data, phonebook) and the like.
  • different wireless link 1930 reception schemes for receiving beacon frames are stored in memory 1920 . And, the identifier of the access node connected to the different wireless link 1930, the identifier of the wireless link 1930, and the like.
  • the at least two wireless links 1930 are used to connect different access nodes (Access Point, AP). Receive downlink data sent by the AP.
  • the different access nodes are access nodes in the same router or access nodes in different routers.
  • the terminal 1900 further includes a display screen.
  • a display is a display component for displaying a user interface.
  • the display screen is a display screen with a touch function, and through the touch function, the user can use any suitable object such as a finger or a touch pen to perform a touch operation on the display screen.
  • the display screen is generally set on the front panel of the terminal 1900 .
  • the display screen is designed as a full screen, a curved screen, a special-shaped screen, a double-sided screen or a folding screen.
  • the display screen is also designed as a combination of a full screen and a curved screen, a combination of a special-shaped screen and a curved screen, etc., which are not limited in this embodiment.
  • the structure of the terminal 1900 shown in the above drawings does not constitute a limitation on the terminal 1900, and the terminal 1900 includes more or less components than those shown in the figure, or combines some components, or different component arrangements.
  • the terminal 1900 also includes components such as a microphone, a loudspeaker, an input unit, a sensor, an audio circuit, a module, a power supply, and a Bluetooth module, which will not be repeated here.
  • the present application also provides a computer-readable storage medium, the storage medium 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 shown in the above embodiments.
  • a chip is provided, the chip includes a programmable logic circuit and/or program instructions, and when the chip is run on a terminal, it is used to implement the data interaction method shown in the above embodiments .
  • the present application also provides a computer program product, the computer program product 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 shown in the above embodiments.

Abstract

本申请公开了一种数据交互方法、装置、设备及存储介质,属于计算机技术领域。该方法包括:响应于源设备注册指令,向第二设备发送源设备注册请求(201);在接收到第二设备发送的连接请求的情况下,与第二设备建立连接(202);基于连接向第二设备发送第一设备正在处理的第一数据,或基于连接接收第二设备发送的控制数据(203)。该方法提供了一种新的数据交互方式,用户可以将登录同一账号的多个设备中的任一设备注册为源设备,一旦源设备接收到另一设备发送的连接请求,可与该另一设备建立连接并向该另一设备发送正在处理的数据,或者接收该另一设备发送的控制数据,这种新的数据交互方式满足了用户多样化的数据交互需求。

Description

数据交互方法、装置、设备及存储介质
本申请要求于2021年12月20日提交的申请号为202111563419.4、发明名称为“数据交互方法、装置、设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请实施例涉及计算机技术领域,特别涉及一种数据交互方法、装置、设备及存储介质。
背景技术
现实生活中,设备之间常常需要进行数据交互,例如,将一台设备上的数据发送到另一台设备,以便于另一台设备对该数据进行处理。然而,随着计算机技术的发展,用户对设备间的数据交互方式有了更加多样化的需求,亟需提供新的数据交互方式。
发明内容
本申请实施例提供了一种数据交互方法、装置、设备及存储介质,提供了新的数据交互方式,能够满足用户多样化的数据交互需求。技术方案如下:
根据本申请实施例的一方面,提供了一种数据交互方法,由第一设备执行,所述方法包括:
响应于源设备注册指令,向第二设备发送源设备注册请求,所述第二设备为与所述第一设备登录同一账号的设备,所述源设备注册请求用于请求所述第二设备将所述第一设备注册为源设备,所述源设备用于向与所述源设备登录同一账号的设备分享数据或者被与所述源设备登录同一账号的设备控制;
在接收到所述第二设备发送的连接请求的情况下,与所述第二设备建立连接;
基于所述连接向所述第二设备发送所述第一设备正在处理的第一数据,或者,基于所述连接接收所述第二设备发送的控制数据,所述控制数据用于控制所述第一设备对所述第一数据进行处理。
根据本申请实施例的另一方面,提供了一种数据交互方法,由第二设备执行,所述方法包括:
接收第一设备发送的源设备注册请求,所述第一设备为与所述第二设备登录同一账号的设备,所述源设备注册请求用于请求所述第二设备将所述第一设备注册为源设备,所述源设备用于向与所述源设备登录同一账号的设备分享数据或者被与所述源设备登录同一账号的设备控制;
在将所述第一设备注册为源设备的情况下,向所述第一设备发送连接请求,所述连接请求用于请求与所述第一设备建立连接;
基于所述连接接收所述第一设备正在处理的第一数据,呈现所述第一数据,或者,基于所述连接向所述第一设备发送控制数据,所述控制数据用于控制所述第一设备对所述第一数据进行处理。
根据本申请实施例的另一方面,提供了一种数据交互装置,配置于第一设备,所述装置包括:
请求发送模块,用于响应于源设备注册指令,向第二设备发送源设备注册请求,所述第二设备为与所述第一设备登录同一账号的设备,所述源设备注册请求用于请求所述第二设备将所述第一设备注册为源设备,所述源设备用于向与所述源设备登录同一账号的设备分享数据或者被与所述源设备登录同一账号的设备控制;
第一连接建立模块,用于在接收到所述第二设备发送的连接请求的情况下,与所述第二设备建立连接;
第一数据交互模块,用于基于所述连接向所述第二设备发送所述第一设备正在处理的第一数据,或者,基于所述连接接收所述第二设备发送的控制数据,所述控制数据用于控制所述第一设备对所述第一数据进行处理。
根据本申请实施例的另一方面,提供了一种数据交互装置,配置于第二设备,所述装置包括:
请求接收模块,用于接收第一设备发送的源设备注册请求,所述第一设备为与所述第二设备登录同一账号的设备,所述源设备注册请求用于请求所述第二设备将所述第一设备注册为源设备,所述源设备用于向与所述源设备登录同一账号的设备分享数据或者被与所述源设备登录同一账号的设备控制;
第二连接建立模块,用于在将所述第一设备注册为源设备的情况下,向所述第一设备发送连接请求,所述连接请求用于请求与所述第一设备建立连接;
第二数据交互模块,用于基于所述连接接收所述第一设备正在处理的第一数据,呈现所述第一数据, 或者,基于所述连接向所述第一设备发送控制数据,所述控制数据用于控制所述第一设备对所述第一数据进行处理。
根据本申请实施例的另一方面,提供了一种计算机设备,所述计算机设备包括处理器和存储器;所述存储器存储有至少一条程序代码,所述至少一条程序代码用于被所述处理器执行以实现如上述方面所述的数据交互方法。
根据本申请实施例的另一方面,提供了一种芯片,所述芯片包括可编程逻辑电路和/或程序指令,当所述芯片在终端上运行时,用于实现上述方面所述的数据交互方法。
根据本申请实施例的另一方面,提供了一种计算机可读存储介质,所述存储介质存储有至少一条程序代码,所述至少一条程序代码用于被处理器执行以实现如上述方面所述的数据交互方法。
根据本申请实施例的另一方面,提供了一种计算机程序产品,该计算机程序产品存储有至少一条程序代码,所述至少一条程序代码由处理器加载并执行以实现上述方面所述的数据交互方法。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1示出了本申请一个示例性实施例提供的一种实施环境的示意图;
图2示出了本申请一个示例性实施例提供的一种数据交互方法的流程图;
图3示出了本申请一个示例性实施例提供的另一种数据交互方法的流程图;
图4示出了本申请一个示例性实施例提供的又一种数据交互方法的流程图;
图5示出了本申请一个示例性实施例提供的再一种数据交互方法的流程图;
图6示出了本申请一个示例性实施例提供的一种操作检测流程的示意图;
图7示出了本申请一个示例性实施例提供的一种拿起子流程的示意图;
图8示出了本申请一个示例性实施例提供的一种撤销源设备子流程的示意图;
图9示出了本申请一个示例性实施例提供的一种放下子流程的示意图;
图10示出了本申请一个示例性实施例提供的一种建立源设备子流程的示意图;
图11示出了本申请一个示例性实施例提供的一种数据分享应用的结构示意图;
图12示出了本申请一个示例性实施例提供的一种设备状态的示意图;
图13示出了本申请一个示例性实施例提供的另一种设备状态的示意图;
图14示出了本申请一个示例性实施例提供的又一种设备状态的示意图;
图15示出了本申请一个示例性实施例提供的再一种设备状态的示意图;
图16示出了本申请一个示例性实施例提供的再一种设备状态的示意图;
图17示出了本申请一个示例性实施例提供的一种数据交互装置的结构框图;
图18示出了本申请一个示例性实施例提供的另一种数据交互装置的结构框图;
图19示出了本申请一个示例性实施例提供的一种终端的结构方框图。
具体实施方式
为使本申请的目的、技术方案和优点更加清楚,下面将结合附图对本申请实施方式作进一步地详细描述。
在本文中提及的“至少一个”是指一个或多个,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。字符“/”一般表示前后关联对象是一种“或”的关系。
需要说明的是,本申请所涉及的用户信息(包括但不限于用户设备信息、用户个人信息等)为经用户授权或者经过各方充分授权的信息。
图1是本申请实施例提供的一种实施环境的示意图。参见图1,该实施环境包括第一设备101和第二设备102。第一设备101和第二设备102之间通过无线或者有线网络连接。示例性的,第一设备101和第二设备102为笔记本电脑、手机、平板电脑或者其他设备。第一设备101和第二设备102登录了同一账号。
其中,第一设备101用于响应于源设备注册指令,向第二设备102发送源设备注册请求,第二设备102 用于将第一设备101注册为源设备,源设备用于向与源设备登录同一账号的设备分享数据或者被与源设备登录同一账号的设备控制,相应的,第二设备102将第一设备101注册为源设备之后,与第一设备101建立连接,便可基于该连接控制第一设备101或者接收第一设备101分享的数据。
示例性的,第一设备101和第二设备102上安装有数据分享应用,第一设备101能够通过该数据分享应用在第二设备102中注册为源设备,以及与第二设备102建立连接,以及基于该连接与第二设备102进行数据交互。第一设备101和第二设备102还能够基于该数据分享应用进行数据呈现,例如,显示画面或者播放声音等。可选地,该数据分享应用还具有其他功能,例如,第一设备101还能够通过该数据分享应用检测对第一设备的操作。可选地,数据分享应用为第一设备101和第二设备102的操作系统中的应用,或者为第三方提供的应用。可选地,数据分享应用为应用程序(application,APP),或者为小程序(mini Program),或者为微应用(Micro APP),本申请实施例对此不做限制。其中,小程序是一类嵌入于其他应用之中、不需要下载安装即可使用的应用形态。微应用是一种分布式应用,其可以分割为多个服务,服务以独立进程的形式运行,并可以独立动态部署,服务之间以统一的跨进程式的方式进行通信。微应用的多个服务部署在多个设备上,这多个设备中的各个设备都部署有该微应用的脚本代码,各个设备通过运行脚本代码将多个服务之间的通信、调度管理起来,从而实现一种分布式应用。
本申请实施例提供的方法能够应用于观看视频的场景。例如,第一设备为平板电脑、第二设备为手机,用户在平板电脑和手机中均登录了自己的账号,当用户在使用平板电脑播放视频时,用户如果需要出门,用户只需放下手中的平板电脑,平板电脑便会响应于该放下操作,向手机发送源设备注册请求。然后手机在接收到该源设备注册请求的情况下,将平板电脑注册为源设备,并且请求与平板电脑建立连接,平板电脑与手机建立连接之后,平板电脑则自动将正在播放的视频发送至手机,使得用户出门后能够通过手机继续观看该视频。或者,以第一设备为手机,第二设备为智能电视为例,用户在手机和智能电视中均登录了自己的账号,当用户在使用手机播放视频时,由于电视的屏幕更大,用户可能想要通过电视来观看手机上正在播放的视频,这种情况下,用户只需放下手机,手机便会响应于该放下操作,向电视发送源设备注册请求,然后电视在接收到该源设备注册请求的情况下,将手机注册为源设备,并且请求与手机建立连接,手机与电视建立连接之后,则自动将正在播放的视频发送至电视,使得用户能够通过电视来观看该视频。
本申请实施例提供的方法能够应用于编辑文档的场景。例如,第一设备为手机,第二设备为笔记本电脑,用户在手机和笔记本电脑中均登录了自己的账号,当用户使用手机浏览一个文档时,如果需要对文档进行编辑,为了提高文档的编辑效率,用户可能想要通过笔记本电脑来编辑该文档,这种情况下,用户只需放下手中的手机,手机便会响应于该放下操作,向笔记本电脑发送源设备注册请求。然后笔记本电脑在接收到该源设备注册请求的情况下,将手机注册为源设备,并且请求与手机建立连接,手机与笔记本电脑建立连接之后,手机则自动将该文档发送至笔记本电脑,使得用户能够通过笔记本电脑来编辑该文档。
本申请实施例提供的方法能够应用于播放音频的场景。例如,第一设备为平板电脑,第二设备为手机,用户在平板电脑和手机中均登录了自己的账号,当用户在使用平板电脑播放音频时,用户如果需要出门,用户只需放下手中的平板电脑,平板电脑便会响应于该放下操作,向手机发送源设备注册请求。然后手机在接收到该源设备注册请求的情况下,将平板电脑注册为源设备,并且请求与平板电脑建立连接,平板电脑与手机建立连接之后,平板电脑则自动将正在播放的音频发送至手机,使得用户能够出门后能够通过手机继续播放视频。
本申请实施例提供的方法还能够应用于其他场景,本申请实施例对此不做限制。
图2示出了本申请一个示例性实施例提供的一种数据交互方法的流程图,参见图2,该方法由第一设备执行,该方法包括:
201、第一设备响应于源设备注册指令,向第二设备发送源设备注册请求,第二设备为与第一设备登录同一账号的设备,源设备注册请求用于请求第二设备将第一设备注册为源设备,源设备用于向与源设备登录同一账号的设备分享数据或者被与源设备登录同一账号的设备控制。
其中,账号用于表明用户身份,能够将不同用户区分开。不同用户对应不同账号,因此第二设备与第一设备登录同一账号表示第二设备与第一设备属于同一用户。源设备注册指令指示在与第一设备登录同一账号的设备中,将第一设备注册为源设备。
由于与第一设备登录同一账号的设备可能有多个,因此,第一设备会向该多个设备发送源设备注册请求。在本申请实施例中,以向第二设备发送源设备注册请求为例进行说明。
202、第一设备在接收到第二设备发送的连接请求的情况下,与第二设备建立连接。
由于源设备用于向与源设备登录同一账号的设备分享数据或者被与源设备登录同一账号的设备控制,因此,第一设备请求在第二设备中将第一设备注册为源设备之后,第二设备向第一设备发送连接请求,则表示第二设备需要接收第一设备分享的数据,或者,第二设备需要控制第一设备,于是,第一设备在接收 到第二设备发送的连接请求的情况下,与第二设备建立连接,以便于基于该连接与第二设备进行数据交互。
203、第一设备基于连接向第二设备发送第一设备正在处理的第一数据,或者,基于连接接收第二设备发送的控制数据,控制数据用于控制第一设备对第一数据进行处理。
可选地,第一数据为第一设备正在处理的任意数据,例如第一数据为第一设备正在显示的数据,或者,第一数据为第一设备正在播放的数据,或者,第一数据为第一设备正在后台处理的数据,本申请实施例对此不做限制。可选地,第一设备向第二设备发送第一数据之后,第二设备呈现该第一数据,例如,在第一数据包括画面数据的情况下,第二设备显示该画面数据,在第一数据包括音频数据的情况下,第二设备播放该音频数据。
可选地,第一设备接收第二设备发送的控制数据之后,基于该控制数据对正在处理的第一数据进行处理,得到第二数据,然后呈现该第二数据。
本申请实施例提供了一种新的数据交互方式,用户可以选择将登录同一账号的多个设备中的任一设备注册为源设备,将该设备注册为源设备之后,一旦该设备接收到与其登录同一账号的另一设备发送的连接请求,便可与该另一设备建立连接,基于该连接向该另一设备发送正在处理的数据,或者接收该另一设备发送的控制数据以进行数据处理,这种新的数据交互方式满足了用户多样化的数据交互需求。
可选的,在响应于源设备注册指令,向第二设备发送源设备注册请求之前,方法还包括:
在未检测到对第一设备的触控操作的情况下,响应于对第一设备的第一操作,生成源设备注册指令。
可选的,在响应于源设备注册指令,向第二设备发送源设备注册请求之前,方法还包括:
在未检测到对第一设备的触控操作的情况下,响应于对第一设备的第二操作,向第二设备发送源设备注销请求,源设备注销请求用于请求将第二设备中的源设备注销;
其中,第二操作与第一操作不同。
可选的,在未检测到对第一设备的触控操作的情况下,响应于对第一设备的第二操作,向第二设备发送源设备注销请求,包括:
在未检测到对第一设备的触控操作的情况下,响应于对第一设备的第二操作,向第二设备发送源设备注销请求,以及断开第一设备与第二设备之间的连接。
可选的,第一操作为拿起操作或放下操作,第二操作为拿起操作或放下操作,第一操作与第二操作不同。
可选的,在响应于源设备注册指令,向第二设备发送源设备注册请求之前,方法还包括:
获取第一设备的运动信息;
在运动信息满足第一操作对应的运动条件的情况下,确定检测到对第一设备的第一操作。
可选的,响应于源设备注册指令,向第二设备发送源设备注册请求,包括:
响应于源设备注册指令,在第一设备未连接源设备的情况下,向第二设备发送源设备注册请求。
可选的,响应于源设备注册指令,向第二设备发送源设备注册请求,还包括:
响应于源设备注册指令,在第一设备连接有源设备的情况下,断开与源设备之间的连接。
可选的,基于连接向第二设备发送第一设备正在处理的第一数据之前,方法还包括:
确定当前正在运行的应用;
在应用为目标应用的情况下,获取应用正在处理的第一数据。
可选的,基于连接向第二设备发送第一设备正在处理的第一数据之后,方法还包括:
接收第二设备发送的控制数据;
基于控制数据,对第一数据进行处理,得到第二数据;
向第二设备发送第二数据。
可选的,基于连接接收第二设备发送的控制数据之后,方法还包括:
基于控制数据,对第一数据进行处理,得到第二数据;
呈现第二数据。
可选的,源设备注册请求携带第一设备的连接信息,第二设备用于基于连接信息发送连接请求。
图3示出了本申请一个示例性实施例提供的一种数据交互方法的流程图,参见图3,该方法由第二设备执行,该方法包括:
301、第二设备接收第一设备发送的源设备注册请求,第一设备为与第二设备登录同一账号的设备,源设备注册请求用于请求第二设备将第一设备注册为源设备,源设备用于向与源设备登录同一账号的设备分享数据或者被与源设备登录同一账号的设备控制。
其中,账号用于表明用户身份,能够将不同用户区分开。不同用户对应不同账号,因此第二设备与第一设备登录同一账号表示第二设备与第一设备属于同一用户。
302、第二设备在将第一设备注册为源设备的情况下,向第一设备发送连接请求,连接请求用于请求与第一设备建立连接。
由于源设备用于向与源设备登录同一账号的设备分享数据或者被与源设备登录同一账号的设备控制,因此,第二设备将第一设备注册为源设备之后,能够向第一设备发送连接请求,以与第一设备建立连接,从而基于该连接接收第一设备分享的数据,或者控制第一设备。
303、第二设备基于该连接接收第一设备正在处理的第一数据,呈现第一数据,或者,基于连接向第一设备发送控制数据,控制数据用于控制第一设备对第一数据进行处理。
可选地,第一数据为第一设备正在处理的任意数据,例如第一数据为第一设备正在显示的数据,或者,第一数据为第一设备正在播放的数据,或者,第一数据为第一设备正在后台处理的数据,本申请实施例对此不做限制。可选地,第二设备呈现第一数据,包括:第二设备在第一数据包括画面数据的情况下,显示该画面数据,在第一数据包括音频数据的情况下,播放该音频数据。
可选地,第一设备接收第二设备发送的控制数据之后,基于该控制数据对正在处理的第一数据进行处理,得到第二数据,然后呈现该第二数据。
本申请实施例提供了一种新的数据交互方式,用户可以选择将登录同一账号的多个设备中的任一设备注册为源设备,将该设备注册为源设备之后,一旦该设备接收到与其登录同一账号的另一设备发送的连接请求,便可与该另一设备建立连接,基于该连接向该另一设备发送正在处理的数据,或者接收该另一设备发送的控制数据以进行数据处理,这种新的数据交互方式满足了用户多样化的数据交互需求。
可选的,方法还包括:
在接收到第一设备发送的源设备注销请求的情况下,第二设备将源设备注销。
可选的,向第一设备发送连接请求,包括:
在未检测到对第二设备的触控操作的情况下,响应于对第二设备的第二操作,向第一设备发送连接请求。
可选的,向第一设备发送连接请求,还包括:
获取第二设备的运动信息;
在运动信息满足第二操作对应的运动条件的情况下,确定检测到对第二设备的第二操作。
可选的,向第一设备发送连接请求,还包括:
在未检测到对第二设备的触控操作的情况下,响应于对第二设备的第一操作,断开第二设备与第一设备之间的连接;
其中,第一操作与第二操作不同。
可选的,第一操作为拿起操作或放下操作,第二操作为拿起操作或放下操作,第一操作与第二操作不同。
可选的,呈现第一数据之后,方法还包括:
基于对第二设备的控制操作,生成控制数据;
向第一设备发送控制数据,控制数据用于对第一数据进行处理;
接收第一设备基于控制数据处理得到的第二数据;
呈现第二数据。
可选的,基于连接向第一设备发送控制数据之前,方法还包括:
基于对第二设备的控制操作,生成控制数据。
可选的,源设备注册请求携带第一设备的连接信息,在将第一设备注册为源设备的情况下,向第一设备发送连接请求,包括:
在将第一设备注册为源设备的情况下,基于连接信息向第一设备发送连接请求。
图4示出了本申请一个示例性实施例提供的一种数据交互方法的流程图,参见图4,该方法由第一设备和第二设备交互执行,该方法描述源设备向与该源设备登录同一账号的设备分享数据的过程。该方法包括:
401、第一设备响应于源设备注册指令,向第二设备发送源设备注册请求,第二设备为与第一设备登录同一账号的设备,源设备注册请求用于请求第二设备将第一设备注册为源设备,源设备用于向与源设备登录同一账号的设备分享数据。
在一种可能的实现方式中,第一设备在未检测到对第一设备的触控操作的情况下,响应于对第一设备的第一操作,生成源设备注册指令。这种方法使得用户无需执行对第一设备的触控操作便可控制第一设备进行源设备注册,对电子设备的控制方式更加灵活。
其中,第一操作是除了触控操作外的任意操作,例如,拿起操作、放下操作、摇晃操作等,本申请实 施例对此不做限制。其中,由于拿起操作和放下操作极为简单,因此通过拿起操作或者放下操作来触发源设备注册,能够极大提高源设备的注册效率。
可选地,第一设备显示源设备注册控件,响应于对该源设备注册控件的触发操作,生成源设备注册指令。其中,源设备注册控件显示在第一设备的任意页面,本申请实施例对此不做限制。
在一种可能的实现方式中,第一设备获取第一设备的运动信息;在运动信息满足第一操作对应的运动条件的情况下,确定检测到对第一设备的第一操作。可选的,该运动信息为第一设备中的传感器检测到的信息,示意性的,该传感器包括压力传感器、陀螺仪传感器、气压传感器、加速度传感器、距离传感器等。
其中,第一设备的运动信息是否满足第一操作对应的运动条件能够表明用户是否对第一设备执行了第一操作,如果第一设备的运动信息满足第一操作对应的运动条件,表明用户对第一设备执行了第一操作。例如,第一设备的运动信息是否满足拿起操作对应的运动条件能够表明用户是否拿起了第一设备,如果第一设备的运动信息满足拿起操作对应的运动条件,表明用户拿起了第一设备。又如,第一设备的运动信息是否满足放下操作对应的运动条件能够表明用户是否放下了第一设备,如果第一设备的运动信息满足放下操作对应的运动条件,表明用户放下了第一设备。
在本申请实施例中,由于第一操作不是触控操作,用户在对第一设备执行第一操作时,会产生对应的运动信息,该运行信息能够准确反映第一设备是否被执行了第一操作,因此,基于第一设备的运动信息检测对第一设备的第一操作,能够保证检测的准确率。
在一种可能的实现方式中,第一设备向第二设备发送源设备注册请求,包括:第一设备在未连接源设备的情况下,向第二设备发送源设备注册请求。
在本申请实施例中,由于第一设备在连接源设备的情况下,第一设备处理的数据实际上是源设备分享给第一设备的数据,也就是说,第一设备实际上不存在需要分享给其他设备的数据,这种情况下,第一设备无需通过将自己注册为源设备的方式向其他设备分享数据,因此,第一设备只在未连接源设备的情况下,向第二设备发送源设备注册请求,能够避免发送不必要的源设备注册请求,降低对设备的性能消耗。
在一种可能的实现方式中,第一设备在连接有源设备的情况下,断开与源设备之间的连接。该连接用于接收源设备分享的数据,因此,第一设备断开与源设备之间的连接,则不再从源设备接收数据。
在本申请实施例中,第一设备在连接源设备的情况下,第一设备会接收源设备分享的数据,在第一设备正在接收源设备分享的数据时,用户控制第一设备生成源设备注册指令,极大可能是因为用户不想再继续通过第一设备接收当前的源设备分享的数据,这种情况下,直接断开与源设备之间的连接,能够节省第一设备的耗电。
可选地,第一设备向第二设备发送源设备注册请求的实现方式可以是第一设备向服务器发送源设备注册请求,服务器确定与第一设备登录同一账号的第二设备,然后向第二设备发送该源设备注册请求。
可选地,除了向第二设备发送源设备注册请求,第一设备还会存储自己作为源设备的记录,例如,第一设备会生成源设备信息“源设备-第一设备的标识”,并且存储源设备信息,这样方便后续第一设备获知登录账号的多个设备中的源设备是哪个。
可选地,源设备注册请求携带有第一设备的标识,这样方便后续第二设备将第一设备注册为源设备。可选地,源设备注册请求携带第一设备的连接信息,这样后续第二设备能够基于该连接信息向第一设备发送连接请求。
402、第二设备接收第一设备发送的源设备注册请求,在将第一设备注册为源设备的情况下,向第一设备发送连接请求。
可选地,源设备注册请求携带第一设备的标识,第二设备将第一设备注册为源设备的实现方式可以是第二设备将第一设备的标识标记为源设备。例如,第二设备生成源设备信息“源设备-第一设备的标识”,并且存储源设备信息。
可选地,源设备注册请求携带第一设备的连接信息,第二设备将第一设备注册为源设备的实现方式可以是第二设备将第一设备的连接信息确定为源设备信息。
在一种可能的实现方式中,源设备注册请求携带第一设备的连接信息,相应的,第二设备在将第一设备注册为源设备的情况下,基于该连接信息向第一设备发送连接请求。
可选地,第一设备的连接信息指示与第一设备建立连接的方式,例如,第一设备的连接信息包括第一设备的IP(Internet Protocol,互联网协议)地址、MAC(Medium Access Control,媒体接入控制)地址,第一设备的标识、第一设备所处的局域网信息等信息,当然,第一设备的连接信息还能够包括其他用于与第一设备建立连接的信息,本申请实施例对此不做限制。可选地,连接请求中携带有第二设备的IP地址、MAC地址、第二设备的标识、第二设备所处的局域网信息等,本申请实施例对此不做限制。
在本申请实施例中,在源设备注册请求中携带第一设备的连接信息,方便第二设备在将第一设备注册为源设备的情况下,直接基于源设备注册请求中的连接信息请求与第一设备建立连接。并且,由于连接信 息用于与第一设备建立连接,而第二设备在将第一设备注册为源设备的情况下,才会使用连接信息与第一设备建立连接,因此,第一设备向第二设备发送源设备注册请求,在源设备注册请求中携带第一设备的连接信息,避免了在第二设备不需要使用第一设备的连接信息的情况下,向第二设备发送连接信息,降低对设备的性能消耗。
在本申请实施例中,由于源设备用于向其他设备分享数据,因此,第二设备在将第一设备注册为源设备的情况下,基于连接信息向第一设备发送连接请求,使第一设备与第二设备建立连接,保证了第二设备能够成功接收到第一设备分享的数据。
可选地,第一设备在向第二设备发送源设备注册请求之前,已将第一设备的连接信息发送至第二设备,相应的,第二设备中存储有第一设备的连接信息,这种情况下,第二设备在将第一设备注册为源设备之后,查询第一设备的连接信息,基于查询到的连接信息向第一设备发送连接请求。可选地,第一设备一旦登录账号,就将自己的连接信息发送给登录该账号的其他设备,相应的,其他设备存储该连接信息。例如,第一设备登录账号后,向服务器发送自己的连接信息,服务器确定登录该账号的其他设备,向确定出的其他设备发送该连接信息。通过这种方式,使得每个设备中都存储有与该设备登录同一账号的其他设备的连接信息,这样在注册源设备时,则无需在源设备注册请求中携带连接信息。
在一种可能的实现方式中,第二设备向第一设备发送连接请求,包括:第二设备在未检测到对第二设备的触控操作的情况下,响应于对第二设备的第二操作,向第一设备发送连接请求。可选地,第二操作为除了触控操作以外的任意操作,且第二操作与第一操作不同。
在本申请实施例中,第二设备通过响应于对第二设备的第二操作,向第一设备发送连接请求,使得用户能够通过第二设备来控制第二设备与第一设备进行数据交互的时机,也就是说,用户能够在需要通过第二设备接收第一设备分享的数据的情况下,执行对第二设备的第二操作,以使第二设备与第一设备建立连接,从而基于该连接接收第一设备分享的数据。
可选地,第二操作为拿起操作或放下操作,且第二操作与第一操作不同。以第一操作为放下操作,第二操作为拿起操作为例,考虑到当第一设备正在处理数据时,用户放下第一设备,极大可能是因为用户需要将第一设备正在处理的数据同步到其他设备,而第二设备与第一设备登录同一账号,第二设备极大可能属于该用户,因此,响应于对第一设备的放下操作在第二设备中将第一设备注册为源设备,并且考虑到用户拿起第二设备,能够表明第二设备为需要接收第一设备的数据的设备,这种情况下,第二设备请求与第一设备连接,使得第一设备能够即时与第二设备建立连接,将正在处理的数据同步至第二设备,整个过程无需用户执行任意触控操作,极大地提高了数据交互效率。
在另一种可能的实现方式中,第二设备在将第一设备注册为源设备的情况下,无需响应任意操作,直接向第一设备发送连接请求。这种方式使得用户能够通过第一设备来控制第二设备与第一设备进行数据交互的时机,也就是说,用户能够在需要将第一设备正在处理的数据分享给第二设备的情况下,将第一设备注册为第二设备中的源设备,这样便可接收到第二设备发送的连接请求,与第二设备建立连接,从而基于该连接向第二设备分享数据。
在一种可能的实现方式中,第二设备获取第二设备的运动信息;在运动信息满足第二操作对应的运动条件的情况下,确定检测到对第二设备的第二操作。该步骤的实现方式与第一设备获取第一设备的运动信息;在运动信息满足第一操作对应的运动条件的情况下,确定检测到对第一设备的第一操作的实现方式同理,此处不再赘述。
403、第一设备在接收到第二设备发送的连接请求的情况下,与第二设备建立连接,基于该连接向第二设备发送第一设备正在处理的第一数据。
在一种可能的实现方式中,第一设备与第二设备建立连接后,要先获取正在处理的第一数据,包括:第一设备确定当前正在运行的应用;在该应用为目标应用的情况下,获取该应用正在处理的第一数据。
可选地,第一设备中包括多个目标应用。可选地,第一设备中的目标应用为默认的应用,或者目标应用为用户选取的应用。例如,第一设备通过显示应用列表的方式让用户选取目标应用,也即是,第一设备显示应用列表,应用列表中包括至少一个应用,第一设备将从该至少一个应用中选中的应用确定为目标应用,这样能够由用户自己决定在当前设备为源设备的情况下,哪些应用的数据能够分享给与当前设备连接的设备。
可选地,正在运行的应用正在处理的第一数据包括该应用正在显示的画面数据、该应用正在播放的音频数据、该应用正在处理的后台数据等,本申请实施例对此不做限制。例如,该应用正在显示文档编辑界面,则该文档编辑界面即为第一数据。又如,该应用正在播放视频,则该视频的画面数据和音频数据即为第一数据。
在本申请实施例中,第一设备在正在运行的应用为目标应用的情况下,才会获取该应用正在处理的第一数据,使得第一设备实现了选择性的数据分享。
可选地,第一设备在向第二设备发送源设备注册请求之前,先开启数据分享服务,也即是,第一设备将正在处理的第一数据进行封装,得到第一数据对应的数据包。相应的,第一设备向第二设备发送第一数据的实现方式可以是第一设备向第二设备发送第一数据对应的数据包。
404、第二设备基于该连接接收第一设备正在处理的第一数据,呈现第一数据。
可选地,第二设备呈现第一数据,包括:第二设备在第一数据包括画面数据的情况下,显示该画面数据,在第一数据包括音频数据的情况下,播放该音频数据。例如,第一数据为视频,则第二设备显示该视频的画面并且播放该视频的声音。又如,第一数据为文档的编辑界面,则第二设备显示文档的编辑界面。
405、第二设备基于对第二设备的控制操作,生成控制数据。
在第二设备呈现第一数据时,如果用户想要改变第二设备呈现的数据,可以对第二设备执行控制操作,则该控制操作会映射到第一设备,使得第一设备改变分享给第二设备的数据,进而改变第二设备呈现的数据。
可选地,根据呈现的第一数据的不同,控制操作可能会有差异。例如,在第一数据为视频的情况下,控制操作可能是切换下一个视频,相应的,控制数据则指示切换下一个视频,控制操作还能够是暂停播放,相应的,控制数据则指示暂定播放视频。又如,在第一视频为文档的编辑界面的情况下,控制操作可能是对文档的编辑操作,相应的,控制数据指示该编辑操作,或者,控制数据是对文档的关闭操作,相应的,控制数据指示关闭文档。
406、第二设备向第一设备发送控制数据,控制数据用于对第一数据进行处理。
可选地,第二设备基于与第一设备之间的连接,向第一设备发送该控制数据。
407、第一设备接收第二设备发送的控制数据,基于控制数据,对第一数据进行处理,得到第二数据。
其中,控制数据指示了对第一设备所需执行的控制操作,因此,第一设备接收到该控制数据后,执行该控制操作,则能够基于第一数据进行处理,得到第二数据。
例如,在第一数据为第一设备正在播放的视频,控制数据指示的控制操作为切换下一个视频,则第一设备从当前播放的视频切换至下一个视频,得到的第二数据即为该下一个视频。又如,第一数据为文档的编辑界面,控制数据指示的控制操作为对文档的编辑操作,则第一设备基于该编辑操作对文档进行编辑,得到的第二数据即为编辑后的文档。
408、第一设备基于该连接向第二设备发送第二数据。
可选地,第一设备基于与第二设备之间的连接,向第二设备发送该第二数据。
409、第二设备基于该连接接收该第二数据,呈现第二数据。
第二设备呈现第二数据的实现方式与呈现第一数据的实现方式同理,此处不再赘述。可选地,第二设备在呈现第二数据之后,还能够基于对第二设备的控制操作继续改变呈现的数据,实现方式与405-409同理。需要说明的一点是,上述步骤405-409为可选步骤,在其他实施例中不执行。
图5示出了本申请一个示例性实施例提供的一种数据交互方法的流程图,参见图5,该方法由第一设备与第二设备交互执行,该方法描述源设备被与该源设备登录同一账号的设备控制的过程。该方法包括:
501、第一设备响应于源设备注册指令,向第二设备发送源设备注册请求,第二设备为与第一设备登录同一账号的设备,源设备注册请求用于请求第二设备将第一设备注册为源设备,源设备用于向与源设备登录同一账号的设备分享数据或者被与源设备登录同一账号的设备控制。
502、第二设备接收第一设备发送的源设备注册请求,在将第一设备注册为源设备的情况下,向第一设备发送连接请求。
503、第一设备在接收到第二设备发送的连接请求的情况下,与第二设备建立连接。
步骤501-503的实现方式请参考上述步骤401-403,此处不再赘述。
504、第二设备基于连接向第一设备发送控制数据,控制数据用于控制第一设备对第一数据进行处理。
在一种可能的实现方式中,第二设备基于该连接向第一设备发送控制数据之前,基于对第二设备的控制操作,生成控制数据。其中,控制数据指示了对第一设备所需执行的控制操作。
例如,在第一数据为第一设备正在播放的视频,控制数据指示的控制操作为切换下一个视频。又如,控制数据指示的控制操作为暂停播放当前正在播放的视频等。
505、第一设备基于连接接收第二设备发送的控制数据,基于控制数据,对第一数据进行处理,得到第二数据,呈现第二数据。
由于控制数据指示了对第一设备所需执行的控制操作,因此,第一设备接收到该控制数据后,执行该控制操作,则能够基于第一数据进行处理,得到第二数据。
例如,在第一数据为第一设备正在播放的视频,控制数据指示的控制操作为切换下一个视频,则第一设备从当前播放的视频切换至下一个视频,得到的第二数据即为该下一个视频,然后第一设备播放该下一 个视频。又如,控制数据指示的控制操作为暂停播放当前正在播放的视频,则第一设备暂停播放当前正在播放的视频,得到的第二数据为执行暂停操作时该视频的画面,然后第一设备显示该画面。
以下介绍注销源设备以及控制数据交互停止的方案。
在一种可能的实现方式中,第二设备已将第一设备注册为源设备的情况下,还能够将第二设备注册的源设备进行注销,例如,第一设备在未检测到对第一设备的触控操作的情况下,响应于对第一设备的第二操作,向第二设备发送源设备注销请求,源设备注销请求用于请求将第二设备中的源设备注销。相应的,第二在接收到第一设备发送的源设备注销请求的情况下,将源设备注销。
可选地,第一设备向第二设备发送源设备注销请求的实现方式可以是第一设备向服务器发送源设备注销请求,服务器确定与第一设备登录同一账号的第二设备,然后向第二设备发送源设备注销请求。
可选地,第二设备将第一设备注册为源设备的实现方式为第二设备将第一设备的标识标记为源设备。相应的,第二设备将源设备注销的实现方式可以是第二设备删除源设备标记。可选地,第二设备将第一设备注册为源设备的实现方式可以是第二设备将第一设备的连接信息确定为源设备信息。相应的,第二设备将源设备注销的实现方式可以是第二设备删除源设备信息。可选地,第一设备也在第一设备中将自己注册为了源设备,相应的,第一设备也需要注销源设备。
在一种可能的实现方式中,第一设备在未检测到对第一设备的触控操作的情况下,响应于对第一设备的第二操作,注销源设备,使得用户无需执行对第一设备的触控操作便可控制第一设备进行源设备注销,对电子设备的控制方式更加灵活。
可选地,第一设备在向第二设备发送源设备注册请求之前,要先开启数据分享服务,相应的,第一设备在向第二设备发送源设备注销请求之后,要关闭数据分享服务。或者,第一设备也能够在向第二设备发送源设备注销请求之前,关闭数据分享服务,本申请实施例对此不做限制。
在一种可能的实现方式中,在第一设备与第二设备进行数据交互的过程中,可能由于第一设备的状态变化,导致数据交互停止。也即是,第一设备在未检测到对第一设备的触控操作的情况下,响应于对第一设备的第二操作,向第二设备发送源设备注销请求,并且断开第一设备与第二设备之间的连接。
在本申请实施例中,在第一设备正在与第二设备进行数据交互时,用户对第一设备执行第二操作,表示用户想要停止数据交互,这种情况下,直接断开第一设备与第二设备之间的连接,则能够停止数据交互,极大提高了对第一设备的控制效率。并且断开第一设备与第二设备之间的连接,还能够降低对第一设备和第二设备的电力消耗。
在一种可能的实现方式中,在第一设备与第二设备进行数据交互的过程中,可能由于第二设备的状态变化,导致数据交互停止。也即是,第二设备在未检测到对第二设备的触控操作的情况下,响应于对第二设备的第一操作,断开第二设备与第一设备之间的连接。
在本申请实施例中,在第一设备正在与第二设备进行数据交互时,用户对第二设备执行第一操作,表示用户想要停止数据交互,这种情况下,直接断开第一设备与第二设备之间的连接,则能够停止数据交互,极大提高了对第二设备的控制效率。并且断开第一设备与第二设备之间的连接,还能够降低对第一设备和第二设备的电力消耗。
需要说明的一点是,本申请实施例中的第二设备的数量能够为多个,在存在多个第二设备的情况下,第一设备能够与该多个第二设备同时进行数据交互,例如同时向该多个第二设备分享数据,第一设备向每个第二设备分享数据的方式同理。
本申请实施例提供了一种新的数据交互方式,用户可以选择将登录同一账号的多个设备中的任一设备注册为源设备,将该设备注册为源设备之后,一旦该设备接收到与其登录同一账号的另一设备发送的连接请求,便可与该另一设备建立连接,基于该连接向该另一设备发送正在处理的数据,或者接收该另一设备发送的控制数据以进行数据处理,这种新的数据交互方式满足了用户多样化的数据交互需求。
在本申请实施例中,第一设备在未检测到对第一设备的触控操作的情况下,响应于对第一设备的第一操作,生成源设备注册指令。这种方法使得用户无需执行对第一设备的触控操作便可控制第一设备进行源设备注册,对电子设备的控制方式更加灵活。
在本申请实施例中,由于第一操作不是触控操作,用户在对第一设备执行第一操作时,会产生对应的运动信息,该运行信息能够准确反映第一设备是否被执行了第一操作,因此,基于第一设备的运动信息检测对第一设备的第一操作,能够保证检测的准确率。
在本申请实施例中,考虑到当第一设备正在处理数据时,用户放下第一设备,极大可能是因为用户需要将第一设备正在处理的数据同步到其他设备,而第二设备与第一设备登录同一账号,第二设备极大可能属于该用户,因此,响应于对第一设备的放下操作在第二设备中将第一设备注册为源设备,并且考虑到用户拿起第二设备,能够表明第二设备为需要接收第一设备的数据的设备,这种情况下,第二设备请求与第 一设备连接,使得第一设备能够即时与第二设备建立连接,将正在处理的数据同步至第二设备,整个过程无需用户执行任意触控操作,极大地提高了数据交互效率。
在本申请实施例中,由于在第一设备连接源设备的情况下,第一设备处理的数据实际上是源设备分享给第一设备的数据,也就是说,第一设备实际上不存在需要分享给其他设备的数据,这种情况下,第一设备无需通过将自己注册为源设备的方式向其他设备分享数据,因此,第一设备只在未连接源设备的情况下,向第二设备发送源设备注册请求,能够避免发送不必要的源设备注册请求,降低对设备的性能消耗。
在本申请实施例中,在第一设备连接源设备的情况下,第一设备会接收源设备分享的数据,在第一设备正在接收源设备分享的数据时,用户控制第一设备生成源设备注册指令,极大可能是因为用户不想再继续接收源设备分享的数据,这种情况下,直接断开与源设备之间的连接,能够节省第一设备的耗电。
在本申请实施例中,在源设备注册请求中携带第一设备的连接信息,方便第二设备在将第一设备注册为源设备的情况下,直接基于源设备注册请求中的连接信息请求与第一设备建立连接。并且,由于连接信息用于与第一设备建立连接,而第二设备在将第一设备注册为源设备的情况下,才会使用连接信息与第一设备建立连接,因此,第一设备向第二设备发送源设备注册请求,在源设备注册请求中携带第一设备的连接信息,避免了在第二设备不需要使用第一设备的连接信息的情况下,向第二设备发送连接信息,降低对设备的性能消耗。
在本申请实施例中,由于源设备用于向其他设备分享数据,因此,第二设备在将第一设备注册为源设备的情况下,基于连接信息向第一设备发送连接请求,使第一设备与第二设备建立连接,保证了第二设备能够成功接收到第一设备分享的数据。
在本申请实施例中,第二设备通过响应于对第二设备的第二操作,向第一设备发送连接请求,使得用户能够通过第二设备来控制第二设备与第一设备进行数据交互的时机,也就是说,用户能够在需要通过第二设备接收第一设备分享的数据的情况下,执行对第二设备的第二操作,以使第二设备与第一设备建立连接,从而基于该连接接收第一设备分享的数据。
在本申请实施例中,第二设备在将第一设备注册为源设备的情况下,无需响应任意操作,直接向第一设备发送连接请求。这种方式使得用户能够通过第一设备来控制第二设备与第一设备进行数据交互的时机,也就是说,用户能够在需要将第一设备正在处理的数据分享给第二设备的情况下,将第一设备注册为第二设备中的源设备,这样便可接收到第二设备发送的连接请求,与第二设备建立连接,从而基于该连接向第二设备分享数据。
在本申请实施例中,第一设备在正在运行的应用为目标应用的情况下,才会获取该应用正在处理的第一数据,使得第一设备实现了选择性的数据分享。
下面以第一操作为放下操作,第二操作为拿起操作为例,说明设备进行数据分享的过程。第一操作为放下操作,那么用户对设备执行放下操作能够触发设备进行数据分享,第二操作为拿起操作,那么用户对设备执行拿起操作能够触发设备获取其他设备分享的数据。
图6为本申请实施例提供的一种操作检测流程的示意图。参考图6,设备在开启的状态下,会检测是否正在被拿起,如果是,则执行拿起子流程中的步骤。如果否,则检测是否正在被放下,如果是则执行放下子流程中的步骤,如果否,则结束。
图7是申请实施例提供的一种拿起子流程的示意图。参考图7,当前设备首先检测自己是否是源设备,如果是,则执行撤销源设备子流程中的步骤,如果不是,则确定是否存储有源设备信息,如果是,则基于源设备信息中的连接信息与源设备建立连接,连接成功后则获取源设备发送的数据,在连接未断开的情况下,通过展示模块呈现该数据,如果连接断开,则关闭展示模块,以停止呈现该数据。其中,展示模块是计算机设备中用于呈现数据的模块。图8是本申请实施例提供的一种撤销源设备子流程的示意图。参考图8,当前设备确定是否连接上其他设备,如果是,则断开与其他设备的连接,如果否,则确定数据分享服务是否开启,如果是,则关闭数据分享服务,如果否,则注销源设备。
图9是本申请实施例提供的一种放下子流程的示意图。参考图9,当前设备首先检测自己是否连接有源设备,如果是,则停止呈现从源设备接收的数据,然后断开与源设备之间的连接,如果否,则确定当前设备是否有正在运行的应用,如果是,表示当前设备存在需要分享的数据,当前设备执行建立源设备子流程中的步骤。如果否,则结束。图10是本申请实施例提供的一种建立源设备子流程的示意图。参考图10,当前设备首先确定当前是否已经注册有源设备,如果是,则结束。如果否,当前设备则开启数据分享服务,然后将当前设备注册为源设备。
图11是本申请实施例提供的一种数据分享应用的结构示意图。参考图11,该数据分享应用包括数据分享模块、操作检测模块和业务控制模块。其中,数据分享模块用于提供数据分享功能,数据分享模块包括数据分享单元、数据呈现单元和设备连接单元,其中,数据分享单元用于将当前设备的画面数据、声音 数据或控制数据作为数据流建立数据分享服务。数据呈现单元用于将其他设备分享的画面数据或声音数据呈现出来。数据呈现单元还用于基于其他设备发送的控制数据执行操作,以得到新的用于向其他设备分享的数据。设备连接单元用于与其他设备建立连接。连接单元包括账号子单元、设备发现子单元和连接子单元。其中,账号子单元用于注册账号、存储账号及登录账号等。设备发现子单元用于确定与当前设备登录同一账号的其他设备以及确定其他设备的连接方式。连接子单元用于按照设备发现子单元确定的其他设备的连接方式,与其他设备建立连接。操作检测模块包括设备拿起检测单元、设备放下检测单元和应用检测单元。其中,设备拿起检测单元用于检测当前设备是否被拿起。设备放下检测单元用于检测当前设备是否被放下,应用检测单元用于检测当前设备是否有正在运行的应用,以及获取正在运行的应用正在处理的数据。业务控制模块包括设备信息存储单元和业务调度单元。其中,设备信息存储单元用于存储源设备信息。业务调度单元用于调度数据分享应用中的各个模块进行数据分享。
图12是本申请实施例提供的一种设备状态的示意图。参考图12,登录同一账号的设备有三个,包括设备1、设备2和设备3。其中,设备1是用户正在使用的设备,并且处于“已拿起”状态;设备2与设备3是未使用的设备,并且处于“已放下”状态。参考图13,用户“放下”设备1,由于设备1是正在使用的设备,即具有正在处理的数据,因此将设备1注册为源设备。设备2与设备3未改变。参考图14,用户“拿起”设备2,那么设备1会将正在处理的数据,例如,画面数据、声音数据等分享至设备2,此时,设备2会呈现设备1分享的数据。设备3未改变。继续参考图13,用户放下设备2,那么设备2会停止呈现从设备1分享的数据,并且停止接收设备1分享的数据,然后呈现设备2本身的数据。参考图15,用户拿起设备2和设备3,那么设备1会将正在处理的数据,同时分享至设备2和设备3,此时,设备2和设备3同时呈现设备1分享的数据。继续参考图12,用户放下设备2和设备3并且拿起设备1,那么设备1会注销源设备。参考图16,在设备1处于拿起状态的情况下,用户再拿起设备2,设备1则不会向设备2分享数据。
本申请实施例提供的方法能够应用于通过多个遥控设备控制电视的场景。例如,电视和遥控设备1和遥控设备2均登录同一账号,在电视已经在遥控设备1和遥控设备2中注册为源设备的情况下,用户拿起遥控设备1,则遥控设备1与电视建立连接,用户通过对遥控设备1的控制操作来控制电视。用户放下遥控设备1,遥控设备1则与电视断开连接。同理,用户拿起遥控设备2,则遥控设备2与电视建立连接,用户通过对遥控设备2的控制操作来控制电视。用户放下遥控设备2,遥控设备2则与电视断开连接。这样不仅能够避免由于遥控的误碰,导致误操作,还能够节省遥控设备的电力消耗。
本申请实施例提供的方法能够应用于通过多个游戏手柄控制游戏设备的场景。例如,游戏设备和游戏手柄1和游戏手柄2均登录同一账号,在游戏设备已经在游戏手柄1和游戏手柄2中注册为源设备的情况下,用户拿起游戏手柄1,基于该拿起操作,游戏手柄1与游戏设备建立连接,用户通过对游戏手柄1的控制操作来控制游戏设备。用户放下游戏手柄1,游戏手柄1则与游戏设备断开连接。同理,用户拿起游戏手柄2,则游戏手柄2与游戏设备建立连接,用户通过对游戏手柄2的控制操作来控制游戏设备。用户放下游戏手柄2,游戏手柄2则与游戏设备断开连接。这样不仅能够避免由于游戏手柄的误碰,导致误操作,还能够节省游戏手柄的电力消耗。
本申请实施例提供的方法还能够应用在多路投屏的场景下。例如,电视和投屏设备1和投屏设备2登录同一账号,用户拿起投屏设备1,基于该拿起操作,投屏设备1在电视中注册为源设备,基于电视发送的连接请求与电视建立连接,将正在呈现的数据分享至电视,电视呈现投屏设备1分享的数据。当用户同时拿起投屏设备1和投屏设备2,则投屏设备1和投屏设备2均在电视中注册为源设备,基于电视发送的连接请求分别与电视建立连接,投屏设备1将正在呈现的数据分享至电视,投屏设备2也将正在呈现的数据分享至电视,电视同时呈现投屏设备1分享的数据和投屏设备2分享的数据。例如,电视在不同的区域呈现投屏设备1分享的数据和投屏设备2分享的数据。
下述为本申请装置实施例,可以用于执行本申请方法实施例。对于本申请装置实施例中未披露的细节,请参照本申请方法实施例。
请参考图17,其示出了本申请一个示例性实施例提供的数据交互装置的结构框图。该数据交互装置配置于第一设备,该数据交互装置包括:
请求发送模块1701,用于响应于源设备注册指令,向第二设备发送源设备注册请求,第二设备为与第一设备登录同一账号的设备,源设备注册请求用于请求第二设备将第一设备注册为源设备,源设备用于向与源设备登录同一账号的设备分享数据或者被与源设备登录同一账号的设备控制;
第一连接建立模块1702,用于在接收到第二设备发送的连接请求的情况下,与第二设备建立连接;
第一数据交互模块1703,用于基于连接向第二设备发送第一设备正在处理的第一数据,或者,基于连接接收第二设备发送的控制数据,控制数据用于控制第一设备对第一数据进行处理。
本申请实施例提供了一种新的数据交互方式,用户可以选择将登录同一账号的多个设备中的任一设备注册为源设备,将该设备注册为源设备之后,一旦该设备接收到与其登录同一账号的另一设备发送的连接请求,便可与该另一设备建立连接,基于该连接向该另一设备发送正在处理的数据,或者接收该另一设备发送的控制数据以进行数据处理,这种新的数据交互方式满足了用户多样化的数据交互需求。
在一种可能的实现方式中,装置还包括:
指令生成模块,用于在未检测到对第一设备的触控操作的情况下,响应于对第一设备的第一操作,生成源设备注册指令。
在一种可能的实现方式中,请求发送模块1701,还用于在未检测到对第一设备的触控操作的情况下,响应于对第一设备的第二操作,向第二设备发送源设备注销请求,源设备注销请求用于请求将第二设备中的源设备注销;其中,第二操作与第一操作不同。
在一种可能的实现方式中,请求发送模块1701,用于在未检测到对第一设备的触控操作的情况下,响应于对第一设备的第二操作,向第二设备发送源设备注销请求,以及断开第一设备与第二设备之间的连接。
在一种可能的实现方式中,第一操作为拿起操作或放下操作,第二操作为拿起操作或放下操作,第一操作与第二操作不同。
在一种可能的实现方式中,装置还包括:
操作检测模块,用于获取第一设备的运动信息;在运动信息满足第一操作对应的运动条件的情况下,确定检测到对第一设备的第一操作。
在一种可能的实现方式中,请求发送模块1701,用于响应于源设备注册指令,在第一设备未连接源设备的情况下,向第二设备发送源设备注册请求。
在一种可能的实现方式中,装置还包括:
连接断开模块,用于响应于源设备注册指令,在第一设备连接有源设备的情况下,断开与源设备之间的连接。
在一种可能的实现方式中,装置还包括:
数据获取模块,用于确定当前正在运行的应用;在应用为目标应用的情况下,获取应用正在处理的第一数据。
在一种可能的实现方式中,第一数据交互模块1703,还用于接收第二设备发送的控制数据;基于控制数据,对第一数据进行处理,得到第二数据;向第二设备发送第二数据。
在一种可能的实现方式中,装置还包括:
数据呈现模块,用于基于控制数据,对第一数据进行处理,得到第二数据;呈现第二数据。
在一种可能的实现方式中,源设备注册请求携带第一设备的连接信息,第二设备用于基于连接信息发送连接请求。
请参考图18,其示出了本申请一个示例性实施例提供的另一种数据交互装置的结构框图。该数据交互装置配置于第二设备,该数据交互装置包括:
请求接收模块1801,用于接收第一设备发送的源设备注册请求,第一设备为与第二设备登录同一账号的设备,源设备注册请求用于请求第二设备将第一设备注册为源设备,源设备用于向与源设备登录同一账号的设备分享数据或者被与源设备登录同一账号的设备控制;
第二连接建立模块1802,用于在将第一设备注册为源设备的情况下,向第一设备发送连接请求,连接请求用于请求与第一设备建立连接;
第二数据交互模块1803,用于基于连接接收第一设备正在处理的第一数据,呈现第一数据,或者,基于连接向第一设备发送控制数据,控制数据用于控制第一设备对第一数据进行处理。
本申请实施例提供了一种新的数据交互方式,用户可以选择将登录同一账号的多个设备中的任一设备注册为源设备,将该设备注册为源设备之后,一旦该设备接收到与其登录同一账号的另一设备发送的连接请求,便可与该另一设备建立连接,基于该连接向该另一设备发送正在处理的数据,或者接收该另一设备发送的控制数据以进行数据处理,这种新的数据交互方式满足了用户多样化的数据交互需求。
在一种可能的实现方式中,装置还包括:
源设备注销模块,用于在接收到第一设备发送的源设备注销请求的情况下,将源设备注销。
在一种可能的实现方式中,第二连接建立模块1802,用于在未检测到对第二设备的触控操作的情况下,响应于对第二设备的第二操作,向第一设备发送连接请求。
在一种可能的实现方式中,装置还包括:
操作检测模块,用于获取第二设备的运动信息;在运动信息满足第二操作对应的运动条件的情况下,确定检测到对第二设备的第二操作。
在一种可能的实现方式中,装置还包括:
连接断开模块,用于在未检测到对第二设备的触控操作的情况下,响应于对第二设备的第一操作,断开第二设备与第一设备之间的连接;其中,第一操作与第二操作不同。
在一种可能的实现方式中,第一操作为拿起操作或放下操作,第二操作为拿起操作或放下操作,第一操作与第二操作不同。
在一种可能的实现方式中,第二数据交互模块1803,还用于基于对第二设备的控制操作,生成控制数据;向第一设备发送控制数据,控制数据用于对第一数据进行处理;接收第一设备基于控制数据处理得到的第二数据;呈现第二数据。
在一种可能的实现方式中,装置还包括:
数据生成模块,用于基于对第二设备的控制操作,生成控制数据。
在一种可能的实现方式中,源设备注册请求携带第一设备的连接信息,第二连接建立模块1802,用于在将第一设备注册为源设备的情况下,基于连接信息向第一设备发送连接请求。
需要说明的是,上述实施例提供的装置,在实现其功能时,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将计算机设备的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。另外,上述实施例提供的装置与方法实施例属于同一构思,其具体实现过程详见方法实施例,这里不再赘述。
本申请实施例提供了一种计算机设备,该计算机设备包括处理器和存储器;该存储器存储有至少一条程序代码,该至少一条程序代码用于被处理器执行以实现如上述各个方法实施例提供的数据交互方法。
在一些实施例中,该计算机设备为终端,请参考图19,其示出了本申请一个示例性实施例提供的终端的结构方框图。在一些实施例中,终端1900是智能手机、平板电脑、可穿戴设备等能够作为无线站点接入无线局域网的终端。本申请中的终端1900至少包括一个或多个以下部件:处理器1910、存储器1920和至少两个无线链路1930。
在一些实施例中,处理器1910包括一个或者多个处理核心。处理器1910利用各种接口和线路连接整个终端1900内的各个部分,通过运行或执行存储在存储器1920内的程序代码,以及调用存储在存储器1920内的数据,执行终端1900的各种功能和处理数据。在一些实施例中,处理器1910采用数字信号处理(Digital Signal Processing,DSP)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、可编程逻辑阵列(Programmable Logic Array,PLA)中的至少一种硬件形式来实现。处理器1910能集成中央处理器(Central Processing Unit,CPU)、图像处理器(Graphics Processing Unit,GPU)、神经网络处理器(Neural-network Processing Unit,NPU)和调制解调器等中的一种或几种的组合。其中,CPU主要处理操作系统、用户界面和应用程序等;GPU用于负责显示屏所需要显示的内容的渲染和绘制;NPU用于实现人工智能(Artificial Intelligence,AI)功能;调制解调器用于处理无线通信。能够理解的是,上述调制解调器也能不集成到处理器1910中,单独通过一块芯片进行实现。
在一些实施例中,该处理器1910用于控制至少两个无线链路1930的工作状况,相应的,该处理器1910为集成了无线保真(Wireless Fidelity,Wi-Fi)芯片的处理器。其中,该Wi-Fi芯片为具有双Wi-Fi处理能力的芯片。例如,该Wi-Fi芯片为双频双发(Dual Band Dual Concurrent,DBDC)芯片,或者,双频同步(Dual Band Simultaneous,DBS)芯片等。
在一些实施例中,存储器1920包括随机存储器(Random Access Memory,RAM),在一些实施例中,存储器1920包括只读存储器(Read-Only Memory,ROM)。在一些实施例中,该存储器1920包括非瞬时性计算机可读介质(non-transitory computer-readable storage medium)。存储器1920可用于存储程序代码。存储器1920可包括存储程序区和存储数据区,其中,存储程序区可存储用于实现操作系统的指令、用于至少一个功能的指令(比如触控功能、声音播放功能、图像播放功能等)、用于实现下述各个方法实施例的指令等;存储数据区可存储根据终端1900的使用所创建的数据(比如音频数据、电话本)等。
在一些实施例中,存储器1920中存储有不同的无线链路1930的接收信标帧的接收方案。以及,不同的无线链路1930连接的接入节点的标识、无线链路1930的标识等。
该至少两个无线链路1930用于连接不同的接入节点(Access Point,AP)。接收AP下发的下行数据。其中,该不同的接入节点为同一路由器中的接入节点或者不同路由器中的接入节点。
在一些实施例中,终端1900中还包括显示屏。显示屏是用于显示用户界面的显示组件。在一些实施例中,该显示屏为具有触控功能的显示屏,通过触控功能,用户可以使用手指、触摸笔等任何适合的物体在显示屏上进行触控操作。在一些实施例中,显示屏通常设置在终端1900的前面板。在一些实施例中,显示屏被设计成为全面屏、曲面屏、异型屏、双面屏或折叠屏。在一些实施例中,显示屏还被设计成为全面屏 与曲面屏的结合,异型屏与曲面屏的结合等,本实施例对此不加以限定。
除此之外,本领域技术人员能够理解,上述附图所示出的终端1900的结构并不构成对终端1900的限定,终端1900包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。比如,终端1900中还包括麦克风、扬声器、输入单元、传感器、音频电路、模块、电源、蓝牙模块等部件,在此不再赘述。
本申请还提供一种计算机可读存储介质,该存储介质存储有至少一条程序代码,该至少一条程序代码由该处理器加载并执行以实现如上各个实施例示出的数据交互方法。
根据本申请实施例的另一方面,提供了一种芯片,该芯片包括可编程逻辑电路和/或程序指令,当该芯片在终端上运行时,用于实现如上各个实施例示出的数据交互方法。
本申请还提供了一种计算机程序产品,该计算机程序产品存储有至少一条程序代码,该至少一条程序代码由该处理器加载并执行以实现如上各个实施例示出的数据交互方法。
上述本申请实施例序号仅仅为了描述,不代表实施例的优劣。
本领域普通技术人员可以理解实现上述实施例的数据交互方法中全部或部分步骤可以通过硬件来完成,也可以通过程序来指令相关的硬件完成,所述的程序可以存储于一种计算机可读存储介质中,上述提到的存储介质可以是只读存储器,磁盘或光盘等。以上所述仅为本申请的可选实施例,并不用以限制本申请,凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。

Claims (26)

  1. 一种数据交互方法,由第一设备执行,所述方法包括:
    响应于源设备注册指令,向第二设备发送源设备注册请求,所述第二设备为与所述第一设备登录同一账号的设备,所述源设备注册请求用于请求所述第二设备将所述第一设备注册为源设备,所述源设备用于向与所述源设备登录同一账号的设备分享数据或者被与所述源设备登录同一账号的设备控制;
    在接收到所述第二设备发送的连接请求的情况下,与所述第二设备建立连接;
    基于所述连接向所述第二设备发送所述第一设备正在处理的第一数据,或者,基于所述连接接收所述第二设备发送的控制数据,所述控制数据用于控制所述第一设备对所述第一数据进行处理。
  2. 根据权利要求1所述的方法,其中,所述响应于源设备注册指令,向第二设备发送源设备注册请求之前,所述方法还包括:
    在未检测到对所述第一设备的触控操作的情况下,响应于对所述第一设备的第一操作,生成所述源设备注册指令。
  3. 根据权利要求2所述的方法,其中,所述方法还包括:
    在未检测到对所述第一设备的触控操作的情况下,响应于对所述第一设备的第二操作,向所述第二设备发送源设备注销请求,所述源设备注销请求用于请求将所述第二设备中的所述源设备注销;
    其中,所述第二操作与所述第一操作不同。
  4. 根据权利要求3所述的方法,其中,所述在未检测到对所述第一设备的触控操作的情况下,响应于对所述第一设备的第二操作,向所述第二设备发送源设备注销请求,包括:
    在未检测到对所述第一设备的触控操作的情况下,响应于对所述第一设备的第二操作,向所述第二设备发送所述源设备注销请求,以及断开所述第一设备与所述第二设备之间的连接。
  5. 根据权利要求3所述的方法,其中,所述第一操作为拿起操作或放下操作,所述第二操作为拿起操作或放下操作,所述第一操作与所述第二操作不同。
  6. 根据权利要求2所述的方法,其中,所述方法还包括:
    获取所述第一设备的运动信息;
    在所述运动信息满足所述第一操作对应的运动条件的情况下,确定检测到对所述第一设备的所述第一操作。
  7. 根据权利要求1所述的方法,其中,所述响应于源设备注册指令,向第二设备发送源设备注册请求,包括:
    响应于所述源设备注册指令,在所述第一设备未连接源设备的情况下,向所述第二设备发送所述源设备注册请求。
  8. 根据权利要求7所述的方法,其中,所述方法还包括:
    响应于所述源设备注册指令,在所述第一设备连接有源设备的情况下,断开与所述源设备之间的连接。
  9. 根据权利要求1-8任一项所述的方法,其中,所述基于所述连接向所述第二设备发送所述第一设备正在处理的第一数据之前,所述方法还包括:
    确定当前正在运行的应用;
    在所述应用为目标应用的情况下,获取所述应用正在处理的第一数据。
  10. 根据权利要求1-8任一项所述的方法,其中,所述基于所述连接向所述第二设备发送所述第一设备正在处理的第一数据之后,所述方法还包括:
    接收所述第二设备发送的控制数据;
    基于所述控制数据,对所述第一数据进行处理,得到第二数据;
    向所述第二设备发送所述第二数据。
  11. 根据权利要求1-8任一项所述的方法,其中,所述基于所述连接接收所述第二设备发送的控制数据之后,所述方法还包括:
    基于所述控制数据,对所述第一数据进行处理,得到第二数据;
    呈现所述第二数据。
  12. 根据权利要求1-8任一项所述的方法,其中,所述源设备注册请求携带所述第一设备的连接信息,所述第二设备用于基于所述连接信息发送所述连接请求。
  13. 一种数据交互方法,由第二设备执行,所述方法包括:
    接收第一设备发送的源设备注册请求,所述第一设备为与所述第二设备登录同一账号的设备,所述源设备注册请求用于请求所述第二设备将所述第一设备注册为源设备,所述源设备用于向与所述源设备登录同一账号的设备分享数据或者被与所述源设备登录同一账号的设备控制;
    在将所述第一设备注册为源设备的情况下,向所述第一设备发送连接请求,所述连接请求用于请求与所述第一设备建立连接;
    基于所述连接接收所述第一设备正在处理的第一数据,呈现所述第一数据,或者,基于所述连接向所述第一设备发送控制数据,所述控制数据用于控制所述第一设备对所述第一数据进行处理。
  14. 根据权利要求13所述的方法,其中,所述方法还包括:
    在接收到所述第一设备发送的源设备注销请求的情况下,将所述源设备注销。
  15. 根据权利要求13所述的方法,其中,所述向所述第一设备发送连接请求,包括:
    在未检测到对所述第二设备的触控操作的情况下,响应于对所述第二设备的第二操作,向所述第一设备发送所述连接请求。
  16. 根据权利要求15所述的方法,其中,所述方法还包括:
    获取所述第二设备的运动信息;
    在所述运动信息满足所述第二操作对应的运动条件的情况下,确定检测到对所述第二设备的所述第二操作。
  17. 根据权利要求15所述的方法,其中,所述方法还包括:
    在未检测到对所述第二设备的触控操作的情况下,响应于对所述第二设备的第一操作,断开所述第二设备与所述第一设备之间的连接;
    其中,所述第一操作与所述第二操作不同。
  18. 根据权利要求17所述的方法,其中,所述第一操作为拿起操作或放下操作,所述第二操作为拿起操作或放下操作,所述第一操作与所述第二操作不同。
  19. 根据权利要求13-18任一项所述的方法,其中,所述呈现所述第一数据之后,所述方法还包括:
    基于对所述第二设备的控制操作,生成控制数据;
    向所述第一设备发送所述控制数据,所述控制数据用于对所述第一数据进行处理;
    接收所述第一设备基于所述控制数据处理得到的第二数据;
    呈现所述第二数据。
  20. 根据权利要求13-18任一项所述的方法,其中,所述基于所述连接向所述第一设备发送控制数据之前,所述方法还包括:
    基于对所述第二设备的控制操作,生成所述控制数据。
  21. 根据权利要求13-18任一项所述的方法,其中,所述源设备注册请求携带所述第一设备的连接信息,所述在将所述第一设备注册为源设备的情况下,向所述第一设备发送连接请求,包括:
    在将所述第一设备注册为源设备的情况下,基于所述连接信息向所述第一设备发送所述连接请求。
  22. 一种数据交互装置,配置于第一设备,所述装置包括:
    请求发送模块,用于响应于源设备注册指令,向第二设备发送源设备注册请求,所述第二设备为与所 述第一设备登录同一账号的设备,所述源设备注册请求用于请求所述第二设备将所述第一设备注册为源设备,所述源设备用于向与所述源设备登录同一账号的设备分享数据或者被与所述源设备登录同一账号的设备控制;
    第一连接建立模块,用于在接收到所述第二设备发送的连接请求的情况下,与所述第二设备建立连接;
    第一数据交互模块,用于基于所述连接向所述第二设备发送所述第一设备正在处理的第一数据,或者,基于所述连接接收所述第二设备发送的控制数据,所述控制数据用于控制所述第一设备对所述第一数据进行处理。
  23. 一种数据交互装置,配置于第二设备,所述装置包括:
    请求接收模块,用于接收第一设备发送的源设备注册请求,所述第一设备为与所述第二设备登录同一账号的设备,所述源设备注册请求用于请求所述第二设备将所述第一设备注册为源设备,所述源设备用于向与所述源设备登录同一账号的设备分享数据或者被与所述源设备登录同一账号的设备控制;
    第二连接建立模块,用于在将所述第一设备注册为源设备的情况下,向所述第一设备发送连接请求,所述连接请求用于请求与所述第一设备建立连接;
    第二数据交互模块,用于基于所述连接接收所述第一设备正在处理的第一数据,呈现所述第一数据,或者,基于所述连接向所述第一设备发送控制数据,所述控制数据用于控制所述第一设备对所述第一数据进行处理。
  24. 一种计算机设备,所述计算机设备包括处理器和存储器;所述存储器存储有至少一条程序代码,所述至少一条程序代码用于被所述处理器执行以实现如权利要求1至21任一所述的数据交互方法。
  25. 一种计算机可读存储介质,所述存储介质存储有至少一条程序代码,所述至少一条程序代码用于被处理器执行以实现如权利要求1至21任一所述的数据交互方法。
  26. 一种芯片,所述芯片包括可编程逻辑电路和/或程序指令,当所述芯片在终端上运行时,用于实现如权利要求1至21任一所述的数据交互方法。
PCT/CN2022/133296 2021-12-20 2022-11-21 数据交互方法、装置、设备及存储介质 WO2023116311A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111563419.4 2021-12-20
CN202111563419.4A CN114257631A (zh) 2021-12-20 2021-12-20 数据交互方法、装置、设备及存储介质

Publications (1)

Publication Number Publication Date
WO2023116311A1 true WO2023116311A1 (zh) 2023-06-29

Family

ID=80793190

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/133296 WO2023116311A1 (zh) 2021-12-20 2022-11-21 数据交互方法、装置、设备及存储介质

Country Status (2)

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

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114257631A (zh) * 2021-12-20 2022-03-29 Oppo广东移动通信有限公司 数据交互方法、装置、设备及存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140308898A1 (en) * 2013-04-16 2014-10-16 Samsung Electronics Co., Ltd. Communication control method and electronic device implementing the same
CN109375888A (zh) * 2018-09-07 2019-02-22 北京奇艺世纪科技有限公司 一种投屏方法及装置
CN112394895A (zh) * 2020-11-16 2021-02-23 Oppo广东移动通信有限公司 画面跨设备显示方法与装置、电子设备
CN113225610A (zh) * 2021-03-31 2021-08-06 北京达佳互联信息技术有限公司 投屏方法、装置、设备及存储介质
CN114257631A (zh) * 2021-12-20 2022-03-29 Oppo广东移动通信有限公司 数据交互方法、装置、设备及存储介质

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109617963B (zh) * 2018-12-11 2021-08-17 Oppo广东移动通信有限公司 设备控制方法、装置以及物联网系统
CN113810542B (zh) * 2020-05-27 2022-10-28 华为技术有限公司 一种应用于电子设备的控制方法、电子设备及计算机存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140308898A1 (en) * 2013-04-16 2014-10-16 Samsung Electronics Co., Ltd. Communication control method and electronic device implementing the same
CN109375888A (zh) * 2018-09-07 2019-02-22 北京奇艺世纪科技有限公司 一种投屏方法及装置
CN112394895A (zh) * 2020-11-16 2021-02-23 Oppo广东移动通信有限公司 画面跨设备显示方法与装置、电子设备
CN113225610A (zh) * 2021-03-31 2021-08-06 北京达佳互联信息技术有限公司 投屏方法、装置、设备及存储介质
CN114257631A (zh) * 2021-12-20 2022-03-29 Oppo广东移动通信有限公司 数据交互方法、装置、设备及存储介质

Also Published As

Publication number Publication date
CN114257631A (zh) 2022-03-29

Similar Documents

Publication Publication Date Title
KR102578623B1 (ko) 통신 접속 방법 및 장치, 컴퓨터 디바이스, 및 저장 매체
US11936921B2 (en) Method for managing network live streaming data and related apparatus, and device and storage medium
WO2017202348A1 (zh) 一种视频播放方法、装置及计算机存储介质
EP4013003A1 (en) Communication protocol switching method, apparatus and system
CN107332976B (zh) K歌方法、装置、设备及系统
CN106358319A (zh) 一种无线投影装置、系统及方法
WO2022017007A1 (zh) 音频数据处理方法、服务器及存储介质
JP2017521899A (ja) インタラクティブ情報を獲得するための方法、端末、サーバ、およびシステム
KR102043641B1 (ko) 통신 기능 처리 방법 및 이를 지원하는 전자 장치
BR112016018783B1 (pt) Método, aparelho, dispositivo e sistema de intercomunicação
WO2014092372A1 (en) Method and apparatus for cloud based power management of local network devices
KR102491006B1 (ko) 데이터 송신 방법 및 전자 기기
CN106507072A (zh) 一种无线投影装置、系统及方法
CN108965413A (zh) 信息交互方法、装置及存储介质
WO2023116311A1 (zh) 数据交互方法、装置、设备及存储介质
CN111315038B (zh) 数据传输方法、装置、电子设备及存储介质
JP2021508989A (ja) サービス処理方法及び移動通信端末
WO2021190609A1 (zh) 数据传输方法及电子设备
CN108854061A (zh) 游戏数据通信方法、通信处理设备、终端及可读存储介质
CN112383472A (zh) 网络传输方法、装置、存储介质及电子设备
WO2023173897A1 (zh) 跨设备截图方法、装置、设备及存储介质
CN113727289A (zh) 电子设备及通话方法
CN115396408A (zh) 一种无线音频/视频装置和无线通信方法
WO2021190397A1 (zh) 注册方法及电子设备
WO2021164761A1 (zh) 通信方法及相关设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22909627

Country of ref document: EP

Kind code of ref document: A1