WO2023051204A1 - 跨设备连接方法、电子设备及存储介质 - Google Patents

跨设备连接方法、电子设备及存储介质 Download PDF

Info

Publication number
WO2023051204A1
WO2023051204A1 PCT/CN2022/117546 CN2022117546W WO2023051204A1 WO 2023051204 A1 WO2023051204 A1 WO 2023051204A1 CN 2022117546 W CN2022117546 W CN 2022117546W WO 2023051204 A1 WO2023051204 A1 WO 2023051204A1
Authority
WO
WIPO (PCT)
Prior art keywords
channel
information
connection
node
bluetooth
Prior art date
Application number
PCT/CN2022/117546
Other languages
English (en)
French (fr)
Inventor
梁乾灯
牟洋
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2023051204A1 publication Critical patent/WO2023051204A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/02Input arrangements using manually operated switches, e.g. using keyboards or dials
    • G06F3/023Arrangements for converting discrete items of information into a coded form, e.g. arrangements for interpreting keyboard generated codes as alphanumeric codes, operand codes or instruction codes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W28/00Network traffic management; Network resource management
    • H04W28/02Traffic management, e.g. flow control or congestion control
    • H04W28/10Flow control between communication endpoints
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/15Setup of multiple wireless link connections
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Definitions

  • the embodiments of the present application relate to the field of communication technologies, and in particular, to a cross-device connection method, an electronic device, and a storage medium.
  • a user might have two laptops at the same time, or a laptop and a tablet at the same time.
  • the user may hope that the wireless accessory device such as Bluetooth used by the user (for example, a mouse) can be shared and used among the above-mentioned multiple smart devices, so as to realize boundary pairing connection and fast switching.
  • the user also hopes to realize convenient information transmission and data sharing among the above-mentioned multiple smart devices by using the above-mentioned wireless accessory device.
  • the current wireless accessory devices need to rely on the cloud server when realizing fast switching or data sharing between the above-mentioned multiple smart devices.
  • the above-mentioned switching or data sharing causes inconvenience to users and reduces user experience. For example, when there is no Internet connection, wireless accessory devices and smart devices cannot communicate with cloud servers, which will cause wireless accessory devices in the above-mentioned Fast switching or data sharing between multiple smart devices is not possible.
  • the embodiment of the present application provides a cross-device connection method, an electronic device, and a storage medium, so as to provide a cross-device connection method, which can effectively complete the switching of a wireless accessory device between multiple smart devices, thereby enabling multiple data transfer between smart devices.
  • the embodiment of the present application provides a cross-device connection method, which is applied to the first device.
  • the first device has established the first connection with the second device; the first device and the second device have established the first channel and the second Two channels; the first channel is used to configure the device type of the second device; the second channel is used to send the device description information of the first device, and the device description information is used to create a driver device node; the first device has stored the device of the second device information, including:
  • the first device establishes a first connection with the third device; wherein, the first device may be a wireless accessory device, for example, a Bluetooth mouse.
  • the second device and the third device may be smart terminal devices, for example, a tablet, a computer, a TV, and the like.
  • the first connection may be a wireless connection or a wired connection.
  • the first device On the established first connection between the first device and the third device, the first device establishes a first channel with the third device; wherein, the first channel may be a communication protocol channel corresponding to the above-mentioned first connection, For example, the Bluetooth Generic Attribute Protocol channel,
  • the first device establishes a second channel with the third device; wherein, the second channel may be a human-computer interaction channel based on the first channel, for example, a human-computer interaction device channel carried on a general attribute protocol.
  • the first device sends the device description information of the first device to the third device; wherein, the device description information may include information related to enumerated drive devices in the first device.
  • the first device receives the device information sent by the third device, sends the device information sent by the third device to the second device, and sends the device information of the second device to the third device; wherein, the device information of the third device and the device information of the second device
  • the device information of the second device is used for data transmission between the third device and the second device.
  • the above-mentioned device information may include a device identifier of the device, for example, a device identifier of the second device and a device identifier of the third device.
  • the device identification may be MAC address and/or network IP information.
  • the first device establishes connections and channels with the second device and the third device respectively, and creates drive device nodes on the second device and the third device, so that the wireless accessory device can be connected to multiple smart devices. Switching between devices can complete data transmission between multiple smart devices.
  • the first connection is a Bluetooth pairing connection
  • the first channel is a Bluetooth general attribute protocol channel
  • the second channel is a human-computer interaction device channel carried on the general attribute protocol.
  • the first device sends a switching notification to the second device; wherein, the switching notification is used to disconnect the second channel between the first device and the second device.
  • the second channel between the first device and the second device can be effectively cut off, thereby preventing the second device from mistakenly receiving the operation information sent by the first device.
  • the first connection and the first channel are maintained between the first device and the second device.
  • the first device determines the third device as a main connection device; wherein the main connection device is configured to receive the operation information sent by the first device.
  • the identification of the main connected device is used to distinguish the device currently receiving the operation information, which can improve the identification efficiency and avoid misoperation, for example, sending the operation information to the wrong device.
  • the drive device node includes a standard device node and a multi-connection control device node; wherein, the standard device node is used to receive the operation information sent by the first device, and the multi-connection control device node is used to Data transmission with a third device.
  • the data transmission function between smart devices can be realized by enumerating multi-connection control device nodes on the smart device.
  • the multi-connection control device node includes one or more extended functions.
  • the user can arbitrarily select one or more extended functions from multiple extended functions, for example, file copying, application screen projection, and the like. In this way, the flexibility of function selection can be improved, thereby improving user experience.
  • One of the possible implementations also includes:
  • the first device In response to the detected first operation of the user, the first device obtains first operation information, and sends the first operation information to the third device; wherein the first operation information is used to enable the third device to obtain event information; wherein, the The first operation may be, for example, clicking on a copy function.
  • the event may be, for example, a file copy event, and the event information may include the source path and file name of the file to be copied.
  • the first device In response to the detected second operation of the user, the first device establishes a second channel with the second device, and disconnects the second channel with the third device; wherein, the second operation may be that the user connects the first device Get closer to the second device, and re-establish the second channel with the second device.
  • the first device acquires second operation information, and sends the second operation information to the second device; wherein the second operation information is used to make the second device send a message to the third device based on the event information request data.
  • the third operation can be to click on the paste function, so that the above-mentioned file to be copied can be pasted from the third device to the second device.
  • the embodiment of the present application provides a cross-device connection device, which is applied to the first device.
  • the first device and the second device have established a first connection; the first device and the second device have established a first channel and a second Channel; the first channel is used to configure the device type of the second device; the second channel is used to send the device description information of the first device, and the device description information is used to create a driver device node; the first device has stored the device information of the second device ,include:
  • a first establishing module configured to establish a first connection between the first device and the third device
  • a second establishing module configured to establish a first channel between the first device and the third device on the established first connection between the first device and the third device;
  • a third establishment module configured to establish a second channel between the first device and the third device
  • a sending module configured for the first device to send the device description information of the first device to the third device
  • the connection module is used for the first device to receive the device information sent by the third device, send the device information sent by the third device to the second device, and send the device information of the second device to the third device; wherein, the third device
  • the device information of the device and the device information of the second device are used for data transmission between the third device and the second device.
  • the first connection is a Bluetooth pairing connection
  • the first channel is a Bluetooth general attribute protocol channel
  • the second channel is a human-computer interaction device channel carried on the general attribute protocol.
  • the above cross-device connection device further includes:
  • the notification module is configured for the first device to send a switch notification to the second device; wherein the switch notification is used to disconnect the second channel between the first device and the second device.
  • the above cross-device connection device further includes:
  • the maintaining module is used for maintaining the first connection and the first channel between the first device and the second device.
  • the above cross-device connection device further includes:
  • the determining module is used for the first device to determine the third device as the main connection device; wherein the main connection device is used for receiving the operation information sent by the first device.
  • the drive device node includes a standard device node and a multi-connection control device node; wherein, the standard device node is used to receive the operation information sent by the first device, and the multi-connection control device node is used to Data transmission with a third device.
  • the multi-connection control device node includes one or more extended functions.
  • the above cross-device connection device further includes:
  • the data transmission module is configured to respond to the detected first operation of the user, the first device obtains the first operation information, and sends the first operation information to the third device; wherein the first operation information is used to enable the third device to obtain Event information: In response to the detected second operation of the user, the first device establishes a second channel with the second device, and disconnects the second channel with the third device; in response to the detected third operation of the user , the first device acquires the second operation information, and sends the second operation information to the second device; wherein the second operation information is used to make the second device request data from the third device based on the event information.
  • the embodiment of the present application provides a first device, including:
  • the above-mentioned memory is used to store computer program codes, and the above-mentioned computer program codes include instructions, the first connection has been established between the first device and the second device; the first channel and the second channel have been established between the first device and the second device; the first The channel is used to configure the device type of the second device; the second channel is used to send the device description information of the first device, and the device description information is used to create a driver device node; the first device has stored the device information of the second device, when the above-mentioned first device A device reads the above-mentioned instruction from the above-mentioned memory, so that the above-mentioned first device performs the following steps:
  • the first device establishes a first connection with the third device
  • the first device On the established first connection between the first device and the third device, the first device establishes a first channel with the third device;
  • the first device sends the device description information of the first device to the third device;
  • the first device receives the device information sent by the third device, sends the device information sent by the third device to the second device, and sends the device information of the second device to the third device; wherein, the device information of the third device and the device information of the second device
  • the device information of the second device is used for data transmission between the third device and the second device.
  • the first connection is a Bluetooth pairing connection
  • the first channel is a Bluetooth general attribute protocol channel
  • the second channel is a human-computer interaction device channel carried on the general attribute protocol.
  • the above-mentioned electronic device when executed by the above-mentioned electronic device, the above-mentioned electronic device further performs the following steps after executing the step of establishing the first channel between the first device and the third device:
  • the first device sends a switching notification to the second device; wherein, the switching notification is used to disconnect the second channel between the first device and the second device.
  • the above-mentioned electronic device when executed by the above-mentioned electronic device, the above-mentioned electronic device further performs the following steps after executing the step of establishing the first channel between the first device and the third device:
  • the first connection and the first channel are maintained between the first device and the second device.
  • the above-mentioned electronic device when executed by the above-mentioned electronic device, the above-mentioned electronic device further performs the following steps after executing the step of establishing the first channel between the first device and the third device:
  • the first device determines the third device as a main connection device; wherein the main connection device is configured to receive the operation information sent by the first device.
  • the drive device node includes a standard device node and a multi-connection control device node; wherein, the standard device node is used to receive the operation information sent by the first device, and the multi-connection control device node is used to Data transmission with a third device.
  • the multi-connection control device node includes one or more extended functions.
  • the above-mentioned electronic device when executed by the above-mentioned electronic device, the above-mentioned electronic device also performs the following steps:
  • the first device In response to the detected first operation of the user, the first device obtains first operation information, and sends the first operation information to the third device; wherein the first operation information is used to enable the third device to obtain event information;
  • the first device In response to the detected second operation of the user, the first device establishes a second channel with the second device, and disconnects the second channel with the third device;
  • the first device acquires second operation information, and sends the second operation information to the second device; wherein the second operation information is used to make the second device send a message to the third device based on the event information request data.
  • an embodiment of the present application provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when it is run on a computer, the computer executes the method described in the first aspect.
  • an embodiment of the present application provides a computer program, which is used to execute the method described in the first aspect when the above computer program is executed by a computer.
  • all or part of the program in the fifth aspect may be stored in a storage medium packaged with the processor, or stored in part or all in a memory not packaged with the processor
  • FIG. 1 is a schematic diagram of an application scenario provided by an embodiment of the present application
  • FIG. 2 is a schematic diagram of the software structure of the electronic device provided by the embodiment of the present application.
  • FIG. 3 is a schematic diagram of a hardware structure of an electronic device provided in an embodiment of the present application.
  • FIG. 4 is a schematic flowchart of an embodiment of a cross-device connection method provided by the present application.
  • FIG. 5 is a schematic diagram of an extended function selection interface provided by the embodiment of the present application.
  • FIG. 6 is a schematic structural diagram of an embodiment of an inter-device connection device provided by the present application.
  • first and second are used for descriptive purposes only, and cannot be understood as indicating or implying relative importance or implicitly specifying the quantity of indicated technical features. Thus, a feature defined as “first” and “second” may explicitly or implicitly include one or more of these features. In the description of the embodiments of the present application, unless otherwise specified, "plurality” means two or more.
  • a user might have two laptops at the same time, or a laptop and a tablet at the same time.
  • the user may hope that the wireless accessory device such as Bluetooth used by the user (for example, a mouse) can be shared and used among the above-mentioned multiple smart devices, so as to realize boundary pairing connection and fast switching.
  • the user also hopes to realize convenient information transmission and data sharing among the above-mentioned multiple smart devices by using the above-mentioned wireless accessory device.
  • the current wireless accessory devices need to rely on the cloud server when realizing fast switching or data sharing between the above-mentioned multiple smart devices.
  • the above-mentioned switching or data sharing causes inconvenience to users and reduces user experience. For example, when there is no Internet connection, wireless accessory devices and smart devices cannot communicate with cloud servers, which will cause wireless accessory devices in the above-mentioned Fast switching or data sharing between multiple smart devices is not possible.
  • an embodiment of the present application proposes a cross-device connection method, and the above cross-device connection method is applied to the first device 10 .
  • the first device 10 may be a wireless accessory device, for example, a mouse, a keyboard, a stylus, an earphone, a game controller, a remote controller, an interactive sensing glove, a speaker, and other devices supporting multiple connections. It can be understood that the above examples do not constitute a limitation to the embodiment of the present application, and in some embodiments, the above-mentioned first device 10 may also be other types of wireless accessory devices.
  • FIG. 1 is an application scenario of the above cross-device connection method.
  • the above application scenario includes a first device 10 , a second device 20 and a third device 30 .
  • the second device 20 and the third device 30 may be smart devices, for example, mobile phone (mobile phone), tablet computer (Pad), computer with transceiver function, notebook computer, virtual reality (virtual reality, VR) terminal equipment, Augmented reality (augmented reality, AR) terminal equipment, wireless terminals in industrial control, wireless terminals in self driving, wireless terminals in remote medical, smart grid ), wireless terminals in transportation safety, wireless terminals in smart city, wireless terminals in smart home, wearable devices, vehicle-mounted devices, etc.
  • the smart devices mentioned above can be smart devices using software OS platforms such as windows OS, linux, Apple iOS/MacOS, and Android.
  • the first device 10 may be wired or wirelessly connected to the second device 20 and the third device 30 .
  • the wired connection may include connection methods such as USB
  • the wireless connection may include connection methods such as Bluetooth, WIFI, UWB, and NFC.
  • the second device 20 includes a physical layer 21 , a data link layer 22 , a device driver layer 23 and an application layer 24 .
  • the second device 20 includes a physical layer 21 , a data link layer 22 , a device driver layer 23 and an application layer 24 .
  • the physical layer 21 is used to provide different types of communication interfaces, the communication interface may be an interface between an external device (for example, the first device 10) and a smart device (for example, the second device 20 or the third device 30), the communication
  • the interface can be wired (eg, USB) or wireless (eg, WIFI, Bluetooth, etc.).
  • the data link layer 22 may include drivers of standard protocols or private protocols, wherein the above-mentioned standard protocols may include driver protocols such as human-computer interaction devices (Human Interface Device, HID), and the above-mentioned private protocols may include mobile broadband and home device management ( Driver protocols such as Mobile Broadband&Home, Huawei IoT device management, etc., can also be other forms of standard protocols or proprietary protocols. This application does not make special restrictions on the drivers of the above-mentioned standard protocols or proprietary protocols.
  • driver protocols such as human-computer interaction devices (Human Interface Device, HID)
  • the above-mentioned private protocols may include mobile broadband and home device management
  • Driver protocols such as Mobile Broadband&Home, Huawei IoT device management, etc.
  • This application does not make special restrictions on the drivers of the above-mentioned standard protocols or proprietary protocols.
  • the device driver layer 23 can enumerate various driver devices of the external device (eg, the first device 10 ).
  • the driving device may be a device driving interface based on a driving protocol (for example, HID protocol or MBB protocol, etc.) in the above-mentioned data link layer 22 .
  • the drive device may include multiple drive devices such as a mouse, a keyboard, and a multi-connection control device.
  • the device driver interface may include multiple types such as mouse driver, keyboard driver, and multi-connection control device driver.
  • the above-mentioned device driver interface can correspond to the above-mentioned drive devices one by one, that is to say, the above-mentioned mouse driver is used to control the operation of the mouse, the above-mentioned keyboard driver is used to control the operation of the keyboard, and the above-mentioned multi-connection control device driver is used to control external devices and smart devices. Information interaction between devices, and switching of external devices between smart devices.
  • the mouse can obtain two device driver interface types, the mouse driver and the multi-connection control device driver, in the device driver layer 23 .
  • the mouse driver may be a standard device driver corresponding to the above-mentioned standard protocol (such as the HID protocol), and the multi-connection control device driver may be an extended device driver corresponding to the above-mentioned proprietary protocol (such as the MBB protocol).
  • the device driver layer 23 can enumerate the standard mouse corresponding to the standard device driver and the extended mouse corresponding to the extended device driver, wherein the standard mouse can be a standard device based on the above-mentioned HID protocol, through which the mouse can be implemented. Standard functions, such as clicking, sliding, dragging and other kinetic energy on the cursor.
  • the extended mouse may be an extended device based on the aforementioned MBB protocol, through which information interaction between the mouse and the smart device can be realized, for example, a file in one smart device can be copied to another smart device through the extended mouse. That is to say, when the mouse device enumerates the driving device, the device driver layer 23 may include a standard mouse of a standard device type and a multi-connection control mouse of an extended device type.
  • the application layer 24 can be used to provide various applications, and the above-mentioned applications can be common functional applications or customized functional applications.
  • the above-mentioned commonly used functional applications may include applications such as file copying and NFC touch.
  • the above-mentioned customized function applications may include applications such as device discovery, data transmission between multiple devices, mouse traversal, and application projection.
  • the files in the smart device A can be copied to the smart device B through the file copy application. It can be understood that the applications in the above-mentioned commonly used function applications and custom function applications are only illustrative descriptions, and do not constitute limitations on the embodiments of the present application. In some embodiments, other applications may also be included.
  • FIG. 3 shows a schematic structural diagram of an electronic device 100 , which may be the above-mentioned first device 10 .
  • the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, and an antenna 2 , mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, earphone jack 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194, and A subscriber identification module (subscriber identification module, SIM) card interface 195 and the like.
  • SIM subscriber identification module
  • the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, bone conduction sensor 180M, etc.
  • the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100 .
  • the electronic device 100 may include more or fewer components than shown in the figure, or combine certain components, or separate certain components, or arrange different components.
  • the illustrated components can be realized in hardware, software or a combination of software and hardware.
  • the processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processing unit (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural network processor (neural-network processing unit, NPU), etc. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
  • application processor application processor, AP
  • modem processor graphics processing unit
  • GPU graphics processing unit
  • image signal processor image signal processor
  • ISP image signal processor
  • controller video codec
  • digital signal processor digital signal processor
  • baseband processor baseband processor
  • neural network processor neural-network processing unit
  • the controller can generate operation control signals according to instruction opcodes and timing signals, and complete the control of fetching and executing instructions.
  • a memory may also be provided in the processor 110 for storing instructions and data.
  • the memory in processor 110 is a cache memory.
  • the memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can be called directly from the memory. Repeated access is avoided, and the waiting time of the processor 110 is reduced, thereby improving the efficiency of the system.
  • processor 110 may include one or more interfaces.
  • the interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous transmitter (universal asynchronous receiver/transmitter, UART) interface, mobile industry processor interface (mobile industry processor interface, MIPI), general-purpose input and output (general-purpose input/output, GPIO) interface, subscriber identity module (subscriber identity module, SIM) interface, and /or universal serial bus (universal serial bus, USB) interface, etc.
  • I2C integrated circuit
  • I2S integrated circuit built-in audio
  • PCM pulse code modulation
  • PCM pulse code modulation
  • UART universal asynchronous transmitter
  • MIPI mobile industry processor interface
  • GPIO general-purpose input and output
  • subscriber identity module subscriber identity module
  • SIM subscriber identity module
  • USB universal serial bus
  • the USB interface 130 is an interface conforming to the USB standard specification, specifically, it can be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like.
  • the USB interface 130 can be used to connect a charger to charge the electronic device 100 , and can also be used to transmit data between the electronic device 100 and peripheral devices. It can also be used to connect headphones and play audio through them. This interface can also be used to connect other electronic devices, such as AR devices.
  • the interface connection relationship between the modules shown in the embodiment of the present invention is only a schematic illustration, and does not constitute a structural limitation of the electronic device 100 .
  • the electronic device 100 may also adopt different interface connection manners in the foregoing embodiments, or a combination of multiple interface connection manners.
  • the charging management module 140 is configured to receive a charging input from a charger.
  • the charger may be a wireless charger or a wired charger.
  • the charging management module 140 can receive charging input from the wired charger through the USB interface 130 .
  • the charging management module 140 may receive a wireless charging input through a wireless charging coil of the electronic device 100 . While the charging management module 140 is charging the battery 142 , it can also provide power for electronic devices through the power management module 141 .
  • the power management module 141 is used for connecting the battery 142 , the charging management module 140 and the processor 110 .
  • the power management module 141 receives the input from the battery 142 and/or the charging management module 140 to provide power for the processor 110 , the internal memory 121 , the display screen 194 , the camera 193 , and the wireless communication module 160 .
  • the power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle times, and battery health status (leakage, impedance).
  • the power management module 141 may also be disposed in the processor 110 .
  • the power management module 141 and the charging management module 140 may also be set in the same device.
  • the wireless communication function of the electronic device 100 can be realized by the antenna 1 , the antenna 2 , the mobile communication module 150 , the wireless communication module 160 , a modem processor, a baseband processor, and the like.
  • Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in electronic device 100 may be used to cover single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization of the antennas.
  • Antenna 1 can be multiplexed as a diversity antenna of a wireless local area network.
  • the antenna may be used in conjunction with a tuning switch.
  • the mobile communication module 150 can provide wireless communication solutions including 2G/3G/4G/5G applied on the electronic device 100 .
  • the mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA) and the like.
  • the mobile communication module 150 can receive electromagnetic waves through the antenna 1, filter and amplify the received electromagnetic waves, and send them to the modem processor for demodulation.
  • the mobile communication module 150 can also amplify the signals modulated by the modem processor, and convert them into electromagnetic waves through the antenna 1 for radiation.
  • at least part of the functional modules of the mobile communication module 150 may be set in the processor 110 .
  • at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be set in the same device.
  • a modem processor may include a modulator and a demodulator.
  • the modulator is used for modulating the low-frequency baseband signal to be transmitted into a medium-high frequency signal.
  • the demodulator is used to demodulate the received electromagnetic wave signal into a low frequency baseband signal. Then the demodulator sends the demodulated low-frequency baseband signal to the baseband processor for processing.
  • the low-frequency baseband signal is passed to the application processor after being processed by the baseband processor.
  • the application processor outputs sound signals through audio equipment (not limited to speaker 170A, receiver 170B, etc.), or displays images or videos through display screen 194 .
  • the modem processor may be a stand-alone device.
  • the modem processor may be independent from the processor 110, and be set in the same device as the mobile communication module 150 or other functional modules.
  • the wireless communication module 160 can provide wireless local area networks (wireless local area networks, WLAN) (such as wireless fidelity (Wireless Fidelity, Wi-Fi) network), bluetooth (bluetooth, BT), global navigation satellite, etc. applied on the electronic device 100.
  • System global navigation satellite system, GNSS
  • frequency modulation frequency modulation, FM
  • near field communication technology near field communication, NFC
  • infrared technology infrared, IR
  • the wireless communication module 160 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 160 receives electromagnetic waves via the antenna 2 , frequency-modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110 .
  • the wireless communication module 160 can also receive the signal to be sent from the processor 110 , frequency-modulate it, amplify it, and convert it into electromagnetic waves through the antenna 2 for radiation.
  • the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology.
  • the wireless communication technology may include global system for mobile communications (GSM), general packet radio service (general packet radio service, GPRS), code division multiple access (code division multiple access, CDMA), broadband Code division multiple access (wideband code division multiple access, WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (long term evolution, LTE), BT, GNSS, WLAN, NFC , FM, and/or IR techniques, etc.
  • GSM global system for mobile communications
  • GPRS general packet radio service
  • code division multiple access code division multiple access
  • CDMA broadband Code division multiple access
  • WCDMA wideband code division multiple access
  • time division code division multiple access time-division code division multiple access
  • TD-SCDMA time-division code division multiple access
  • the GNSS may include a global positioning system (global positioning system, GPS), a global navigation satellite system (global navigation satellite system, GLONASS), a Beidou navigation satellite system (beidou navigation satellite system, BDS), a quasi-zenith satellite system (quasi -zenith satellite system (QZSS) and/or satellite based augmentation systems (SBAS).
  • GPS global positioning system
  • GLONASS global navigation satellite system
  • Beidou navigation satellite system beidou navigation satellite system
  • BDS Beidou navigation satellite system
  • QZSS quasi-zenith satellite system
  • SBAS satellite based augmentation systems
  • the electronic device 100 realizes the display function through the GPU, the display screen 194 , and the application processor.
  • the GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering.
  • Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
  • the display screen 194 is used to display images, videos and the like.
  • the display screen 194 includes a display panel.
  • the display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active matrix organic light emitting diode or an active matrix organic light emitting diode (active-matrix organic light emitting diode, AMOLED), flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light emitting diodes (quantum dot light emitting diodes, QLED), etc.
  • the electronic device 100 may include 1 or N display screens 194 , where N is a positive integer greater than 1.
  • the electronic device 100 can realize the shooting function through the ISP, the camera 193 , the video codec, the GPU, the display screen 194 and the application processor.
  • the ISP is used for processing the data fed back by the camera 193 .
  • the light is transmitted to the photosensitive element of the camera through the lens, and the light signal is converted into an electrical signal, and the photosensitive element of the camera transmits the electrical signal to the ISP for processing, and converts it into an image visible to the naked eye.
  • ISP can also perform algorithm optimization on image noise, brightness, and skin color.
  • ISP can also optimize the exposure, color temperature and other parameters of the shooting scene.
  • the ISP may be located in the camera 193 .
  • Camera 193 is used to capture still images or video.
  • the object generates an optical image through the lens and projects it to the photosensitive element.
  • the photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
  • CMOS complementary metal-oxide-semiconductor
  • the photosensitive element converts the light signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal.
  • the ISP outputs the digital image signal to the DSP for processing.
  • DSP converts digital image signals into standard RGB, YUV and other image signals.
  • the electronic device 100 may include 1 or N cameras 193 , where N is a positive integer greater than 1.
  • Digital signal processors are used to process digital signals. In addition to digital image signals, they can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the energy of the frequency point.
  • Video codecs are used to compress or decompress digital video.
  • the electronic device 100 may support one or more video codecs.
  • the electronic device 100 can play or record videos in various encoding formats, for example: moving picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4 and so on.
  • MPEG moving picture experts group
  • the NPU is a neural-network (NN) computing processor.
  • NN neural-network
  • Applications such as intelligent cognition of the electronic device 100 can be realized through the NPU, such as image recognition, face recognition, speech recognition, text understanding, and the like.
  • the external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, so as to expand the storage capacity of the electronic device 100.
  • the external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. Such as saving music, video and other files in the external memory card.
  • the internal memory 121 may be used to store computer-executable program codes including instructions.
  • the internal memory 121 may include an area for storing programs and an area for storing data.
  • the stored program area can store an operating system, at least one application program required by a function (such as a sound playing function, an image playing function, etc.) and the like.
  • the storage data area can store data created during the use of the electronic device 100 (such as audio data, phonebook, etc.) and the like.
  • the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (universal flash storage, UFS) and the like.
  • the processor 110 executes various functional applications and data processing of the electronic device 100 by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
  • the electronic device 100 can implement audio functions through the audio module 170 , the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor. Such as music playback, recording, etc.
  • the audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signal.
  • the audio module 170 may also be used to encode and decode audio signals.
  • the audio module 170 may be set in the processor 110 , or some functional modules of the audio module 170 may be set in the processor 110 .
  • Speaker 170A also referred to as a "horn" is used to convert audio electrical signals into sound signals.
  • Electronic device 100 can listen to music through speaker 170A, or listen to hands-free calls.
  • Receiver 170B also called “earpiece” is used to convert audio electrical signals into sound signals.
  • the receiver 170B can be placed close to the human ear to receive the voice.
  • the microphone 170C also called “microphone” or “microphone” is used to convert sound signals into electrical signals. When making a phone call or sending a voice message, the user can put his mouth close to the microphone 170C to make a sound, and input the sound signal to the microphone 170C.
  • the electronic device 100 may be provided with at least one microphone 170C. In some other embodiments, the electronic device 100 may be provided with two microphones 170C, which may also implement a noise reduction function in addition to collecting sound signals. In some other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and realize directional recording functions, etc.
  • the earphone interface 170D is used for connecting wired earphones.
  • the earphone interface 170D can be a USB interface 130, or a 3.5mm open mobile terminal platform (OMTP) standard interface, or a cellular telecommunications industry association of the USA (CTIA) standard interface.
  • OMTP open mobile terminal platform
  • CTIA cellular telecommunications industry association of the USA
  • the keys 190 include a power key, a volume key and the like.
  • the key 190 may be a mechanical key. It can also be a touch button.
  • the electronic device 100 can receive key input and generate key signal input related to user settings and function control of the electronic device 100 .
  • the motor 191 can generate a vibrating reminder.
  • the motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback.
  • touch operations applied to different applications may correspond to different vibration feedback effects.
  • the motor 191 may also correspond to different vibration feedback effects for touch operations acting on different areas of the display screen 194 .
  • Different application scenarios for example: time reminder, receiving information, alarm clock, games, etc.
  • the touch vibration feedback effect can also support customization.
  • the indicator 192 can be an indicator light, and can be used to indicate charging status, power change, and can also be used to indicate messages, missed calls, notifications, and the like.
  • the SIM card interface 195 is used for connecting a SIM card.
  • the SIM card can be connected and separated from the electronic device 100 by inserting it into the SIM card interface 195 or pulling it out from the SIM card interface 195 .
  • the electronic device 100 may support 1 or N SIM card interfaces, where N is a positive integer greater than 1.
  • SIM card interface 195 can support Nano SIM card, Micro SIM card, SIM card etc. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards may be the same or different.
  • the SIM card interface 195 is also compatible with different types of SIM cards.
  • the SIM card interface 195 is also compatible with external memory cards.
  • the electronic device 100 interacts with the network through the SIM card to implement functions such as calling and data communication.
  • the electronic device 100 adopts an eSIM, that is, an embedded SIM card.
  • the eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100 .
  • FIG. 4 is a schematic flow diagram of an embodiment of a cross-device connection method provided by an embodiment of the present application, including:
  • Step 401 the first device 10 is connected with the second device 20 .
  • the first device 10 may be connected with the second device 20 in a wireless manner.
  • the above-mentioned wireless method may include Bluetooth (BT), so that the Bluetooth pairing connection between the first device 10 and the second device 20 may be realized.
  • BT Bluetooth
  • the first device 10 can perform Bluetooth pairing with the second device 20 in the following two ways.
  • the first device 10 can be close to the second device 20 , and can let the second device 20 discover the first device 10 through a Bluetooth broadcast message in the first device 10 . After the second device 20 discovers the first device 10 , it can initiate Bluetooth pairing with the first device 10 , thereby establishing a Bluetooth pairing connection between the first device 10 and the second device 20 .
  • the first device 10 can touch the NFC tag on the second device 20, wherein the NFC tag on the second device 20 includes the Bluetooth MAC address of the second device 20, so that the first device 10 can pass the Bluetooth MAC address
  • the second device 20 is discovered, and Bluetooth pairing with the second device 20 can be further performed.
  • the first device 10 can actively discover the Bluetooth MAC address of the second device 20 through proximity sensing.
  • the first device 10 can be configured with NFC/UWB
  • the second device 20 may be configured with an NFC tag/UWB radio frequency card.
  • the second device 20 may also touch the NFC tag on the first device 10, wherein the NFC tag on the first device 10 includes the Bluetooth MAC address of the first device 10, thereby making the second device 20
  • the first device 10 is discovered, and Bluetooth pairing with the first device 10 can be further performed.
  • the first device 10 can make the second device 20 actively discover the Bluetooth MAC address of the first device 10 through proximity sensing, for example, the first device 10 10 may be configured with an NFC tag/UWB radio frequency card, and the second device 20 may be configured with an NFC/UWB reader.
  • the embodiment of the present application does not specifically limit the manner of establishing the Bluetooth pairing connection between the above-mentioned first device 10 and the second device 20 .
  • first device 10 and the second device 20 establish a Bluetooth pairing connection
  • operations such as authentication/key exchange and authentication between the first device 10 and the second device 20 can also be completed.
  • Reference may be made to the bluetooth protocol of the relevant standards organization, which will not be repeated here.
  • Step 402 the first device 10 establishes a Bluetooth GATT channel with the second device 20 .
  • the first device 10 can also establish a Bluetooth generic attribute protocol (Generic Attributes Profile, GATT) with the second device 20 on top of the Bluetooth pairing connection. )aisle.
  • GATT Bluetooth Attributes Profile
  • the Bluetooth GATT channel can be used for information exchange between Bluetooth low energy devices.
  • the device type of the second device 20 can be configured through the Bluetooth GATT channel.
  • the device type may include a main connection type and a non-main connection type.
  • a device corresponding to a main connection type may be a main connection device, and a device corresponding to a non-main connection type may be a non-main connection device.
  • the main connection device may be a device that has established a HID (HID Over Gatt Profile, HOGP) connection channel carried on the GATT protocol with the first device 10
  • the non-main connection device may be a device that has not established a HOGP channel with the first device 10 equipment.
  • HID HID Over Gatt Profile, HOGP
  • operation information such as click, scroll, and drag of the first device 10 can be received, and operations corresponding to the operation information can be performed.
  • the HOGP channel is described in detail below, and will not be repeated here.
  • the first device 10 After the first device 10 establishes a Bluetooth GATT channel with the second device 20, the first device 10 can set the second device 20 as a master connection device.
  • the above-mentioned Bluetooth GATT is a configuration management protocol for short messages in the Bluetooth protocol. If different wireless protocols are used, the protocol name of the above-mentioned Bluetooth GATT may be different, but it does not constitute a limitation to the embodiment of the present application. .
  • Step 403 the first device 10 establishes a HOGP channel with the second device 20 .
  • the first device 10 and the second device 20 may also establish a HOGP channel with the second device 20 .
  • the HOGP channel can be used to send the device description information of the first device 10 , so that a corresponding driver device node can be created on the second device 20 .
  • the above device description information may be information related to enumerated drive devices in the first device 10 .
  • the first device 10 may enumerate multiple drive devices, and the drive devices may include standard devices and extended devices (for example, multi-connection control devices).
  • the first device 10 may send the above device description information to the second device 20, so that the second device 20 may create a corresponding drive device node based on the relevant information of the above drive device.
  • the first device 10 may send the description information of its driving device to the second device 20 .
  • the second device 20 receives the description information of the driving device sent by the first device 10, it can create the driving device node of the first device 10 based on the device description information of the first device 10, that is, the standard of the first device 10 Device nodes and extended device nodes.
  • the above-mentioned standard device node may be a logical device for receiving operation information of the first device 10 such as clicking, scrolling, and dragging.
  • the standard device node may be based on a standard protocol such as HID, and the standard device node may be Use a standard driver interface (for example, mouse driver, keyboard driver, etc.).
  • the above-mentioned extended device may be a logical device for information exchange with the first device 10 to realize information sharing between the second device 20 and the third device 30.
  • the extended device node may be based on a proprietary protocol such as MBB, which Extended device nodes may use an extended driver interface (eg, a multi-connection control driver).
  • Step 404 the second device 20 sends device information to the first device 10 .
  • the second device 20 can send the second device 20 to the first device 10 device information.
  • the second device 20 may send the device information of the second device 20 to the first device 10 through the above-mentioned extended driver interface.
  • the first device 10 may store the device information of the second device 20.
  • the above-mentioned device information of the second device 20 may include a device identifier of the second device 20 (for example, the device identifier may be a MAC address) and/or network port IP information.
  • Step 405 the first device 10 establishes a connection with the third device 30 .
  • the above-mentioned first device 10 may initiate a connection request to the third device 30 for establishing a connection with the third device 30 .
  • the first device 10 may establish a Bluetooth pairing connection with the third device 30 in a Bluetooth pairing manner.
  • the third device 30 may set an NFC tag, and the NFC tag may include the Bluetooth MAC address of the third device 30 , and the Bluetooth MAC address may be used to discover the third device 30 .
  • the first device 10 can read the Bluetooth MAC address in the NFC tag of the third device 30 through NFC sensing, thus enabling the first device 10 to communicate with the third device 30.
  • the third device 30 establishes a Bluetooth pairing connection.
  • the NFC tag of the third device 30 may further include related information such as a device serial number (SN) and a device model of the third device 30 .
  • SN device serial number
  • the NFC tag of the third device 30 may further include related information such as a device serial number (SN) and a device model of the third device 30 .
  • Step 406 the first device 10 establishes a Bluetooth GATT channel with the third device 30 .
  • the first device 10 can also establish a Bluetooth GATT channel with the third device 30 .
  • the first device 10 can set the third device 30 as the main connection device.
  • the first device 10 can also send a switching notification to the second device 20, the switching notification is used to notify the second device 20 to switch from the main connected device to a non-main connected device, and can disconnect the first device 10 from the second device. 20 through the HOGP connection channel, so that the second device 20 cannot receive the operation information of the first device 10 .
  • the third device 30 can receive the operation information reported by the first device 10, and can perform corresponding operations according to the above operation information.
  • the operation information reported by the first device 10 may be information such as button clicks and wheel scrolling.
  • the second device 20 when the second device 20 receives the switching notification sent by the first device 10, it changes to a non-main connection device, and can cut off the HOGP connection channel with the first device 10, but can maintain the connection with the second device 10.
  • the Bluetooth pairing connection and the GATT channel between the devices 10 are used for subsequent switching of the first device 10 back to the second device 20 without Bluetooth pairing and GATT channel establishment again, thereby improving switching efficiency.
  • Step 407 the first device 10 establishes a HOGP channel with the third device 30 .
  • the first device 10 and the third device 30 may also establish a HOGP channel.
  • the third device 30, as the main connection device can receive the operation information of the first device 10, so that the third device 30 can perform corresponding operations according to the received operation information.
  • Step 408 the first device 10 obtains device description information, and sends the device description information to the third device 30 .
  • the first device 10 may obtain device description information, where the device description information may include information about drive devices enumerated by the first device 10 (for example, enumerated drive device types).
  • the type of the driving device may include a standard device type and an extended device type (for example, a multi-connection control device type).
  • the relevant information of the standard device can be used to create a corresponding standard device node in the third device 30 , so that the third device 30 can receive the operation information reported by the first device 10 through the standard device node.
  • the relevant information of the extended device can be used to create a corresponding multi-connection control device node, so that data transmission can be realized between the third device 30 and the second device 20 through information interaction with the first device 10 .
  • the first device 10 may send the above device description information to the third device 30 .
  • Step 409 the third device 30 receives the device description information sent by the first device 10, and creates a driving device node according to the device description information.
  • the third device 30 may create a corresponding drive device node according to the device description information.
  • the third device 30 may create a corresponding standard device node, and may load a corresponding driver (for example, a standard device driver) for the standard device node. , at this time, the third device 30 may receive the operation information sent by the first device 10 through the standard device node.
  • a corresponding driver for example, a standard device driver
  • the third device 30 After the third device 30 receives the related information of the extended device sent by the first device 10, it can create a corresponding extended device node (for example, a multi-connection control device node), and can load the corresponding driver for the extended device node, or It is an extended device driver (for example, a multi-connection control device driver).
  • a corresponding extended device node for example, a multi-connection control device node
  • It is an extended device driver for example, a multi-connection control device driver
  • the third device 30 when the third device 30 creates the above-mentioned extended device node, it can also set corresponding extended functions for the extended device node to be created.
  • a function authorization window may pop up on the display interface of the third device 30 .
  • the function authorization window may include one or more extended function options. The user can check any of the above-mentioned extended function options to determine the extended function of the extended device node, that is, to enable the selected extended function to take effect. After the user selects the corresponding extended function option, an extended device node is created in the third device 30, and the extended device node may have the above-mentioned extended function selected by the user.
  • the interface 500 is a display interface including a function authorization window 501 and a standard device node 502
  • the function authorization window 501 includes an information sharing function option 5011 and an application projection function option 5012 .
  • an extended device node 503 can be created, thereby obtaining an interface 510 including a standard device node 502 and an extended device node 503, wherein the extended device node 503 can have an information sharing function.
  • the standard device node and the extended device node may also be the same device node, and the embodiment of the present application does not specifically limit the number of device nodes created by the third device 30 .
  • Step 410 the third device 30 sends the device information of the third device 30 to the first device 10 .
  • the device information of the third device 30 may be sent to the first device 10 through the extended device node.
  • the device information of the third device 30 may include information such as a MAC address and/or network port IP of the third device 30 .
  • Step 411 the first device 10 receives the device information of the third device 30 sent by the third device 30 , and forwards the device information of the third device 30 to the second device 20 .
  • the main connection device connected to the first device 10 has changed, for example, the main connection device is changed from the second device 20 to the third device 30 .
  • the first device 10 may send the device information of the changed primary connected device (for example, the third device 30) to the pre-changed primary connected device (for example, the second device 20), thereby enabling the third device 30 interacts with the second device 20 based on the device information of the other party.
  • Step 412 the first device 10 sends the device information of the second device 20 to the third device 30 .
  • the first device 10 may send the device information of the second device 20 pre-stored in step 404 to the third device 30, so that the third device 30 and the second device 20 may conduct an exchange based on the other party's device information. interact.
  • step 412 may be executed simultaneously with step 411, may be executed before step 411, or may be executed after step 411, that is to say, the execution order of step 412 and step 411 may be in no particular order.
  • Step 413 the third device 30 receives the device information of the second device 20 sent by the first device 10 , and performs data transmission with the second device 20 .
  • data transmission can be understood that the third device and the second device perform data interaction through the network, for example, the second device sends information to the third device, and the third device sends information to the second device; where the network can be a Bluetooth network , WIFI network (such as P2P network or a network via a third terminal) and other device interaction forms that can perform data transmission, which is not limited in this application.
  • the network can be a Bluetooth network , WIFI network (such as P2P network or a network via a third terminal) and other device interaction forms that can perform data transmission, which is not limited in this application.
  • the third device 30 after the third device 30 receives the device information of the second device 20 sent by the first device 10, it can perform data transmission with the second device 20, wherein the data transmission can be based on a local area network (Local Area Network, LAN ) data transmission, or data transmission based on a wide area network, and the embodiment of the present application does not specifically limit the manner of data transmission between the above-mentioned devices.
  • the third device 30 may adopt a preset interaction rule.
  • the above preset interaction rule may be: the device with a smaller MAC address among the two devices may serve as the server, and the device with a larger MAC address may serve as the server. as a client.
  • the third device 30 can create a Socket server, and can monitor the corresponding transport layer (for example, TCP or UDP layer) port, using To establish a data transmission relationship with the second device 20 .
  • the protocol corresponding to the Socket connection may be a standard protocol such as DLNA, or may be a proprietary protocol such as Huawei Cast+, which is not limited in this embodiment of the present application.
  • the third device 30 can act as a client and initiate data transmission with the second device 20 .
  • the third device 30 (that is, the client) may try to use the IP address in the device information of the second device 20 to connect to the second device 20 (that is, the server).
  • the device information includes the network port IP information
  • the above IP address can be obtained through the above network port IP information; if the device information only contains the MAC address, the above IP address can also be obtained through the MAC address in the device information
  • the address resolution protocol (Address Resolution Protocol, ARP) table is queried locally, and the embodiment of the present application does not specifically limit the above-mentioned method of obtaining the IP address.
  • ARP Address Resolution Protocol
  • the third device 30 fails to connect to the second device 20 for the first time, it may try to connect multiple times until the connection is successful. If the connection between the third device 30 and the second device 20 is successful, it means that the data transmission relationship between the second device 20 and the third device 30 is successful. At this time, further information can be sent between the second device 20 and the third device 30 interaction or data sharing.
  • Step 414 the second device 20 receives the device information of the third device 30 sent by the first device 10 , and performs data transmission with the third device 30 .
  • the second device 20 can perform data transmission with the third device 30 .
  • the third device 30 is a Socket server
  • the second device 20 can be a client.
  • the second device 20 may attempt to use the IP address in the device information of the third device 30 to connect to the third device 30 .
  • the third device 30 is a client
  • the second device 20 can serve as a server.
  • the second device 20 can create a Socket server, and can monitor a corresponding transport layer (for example, TCP or UDP layer) port, so as to establish a data transmission relationship with the third device 30 .
  • transport layer for example, TCP or UDP layer
  • connection If the connection is successful, it means that the data transmission between the second device 20 and the third device 30 is successful. At this time, information exchange or data sharing can be further performed between the second device 20 and the third device 30 .
  • Step 415 in response to the user's first operation, the third device 30 acquires event information.
  • the user may perform operations on the first device 10 , for example, the user may perform operations such as clicking and sliding on the first device 10 .
  • the first device 10 obtains operation information, and may report the operation information to the third device 30 .
  • the third device 30 may perform an operation corresponding to the operation information.
  • the user may use the first device 10 to click a copy function option on any file in the third device 30 for file copying.
  • the file copy application in the application layer of the third device 30 listens to the user's copy operation, and obtains event information corresponding to the above copy operation (for example, the source path and file name of the file to be copied).
  • Step 416 the third device 30 sends the event information to the second device 20 .
  • the third device 30 may synchronize the above event information to the second device 20 .
  • the third device 30 may send the above event information to the second device 20 .
  • the above event information may include the source path and file name of the file to be copied.
  • Step 417 in response to the user's second operation, the first device 10 switches the primary connection device from the third device 30 to the second device 20 .
  • the user can bring the first device 10 close to the second device 20 to switch the main connection device from the third device 30 to the second device 20, thereby enabling The user is allowed to operate on the third device 30 through the first device 10, and then can complete the file copying task.
  • the user can touch the first device 10 to the NFC tag of the second device 20 , thereby reading the Bluetooth MAC address in the NFC tag of the second device 20 .
  • the first device 10 can further establish a HOGP channel with the second device 20, thereby making the second device 20
  • a device 10 switches the main connection device from the third device 30 to the second device 20 , that is, the first device 10 can disconnect the HOGP channel with the third device 30 and establish a HOGP channel with the second device 20 .
  • Step 418 in response to the third operation of the user, the second device 20 requests the third device 30 to transmit data.
  • the user can further perform operations on the first device 10 .
  • the user can right-click any folder directory in the second device 20 to pop up the menu bar, and click the paste function option in the menu bar to perform the paste operation, and the file copy application of the second device 20 monitors the above user
  • the pasting operation obtains the event information sent by the third device 30 to the second device 20 in step 416, and may request the third device 30 to transmit the above-mentioned file to be copied to the folder directory in the second device 20 according to the above-mentioned event information.
  • the second device 20 may send a file transfer request to the third device 30 through the data transfer channel established in step 413 and step 414 above, and the file transfer request is used to request the transfer of the file to be copied.
  • the file transfer request may include a target path, and the target path may be used to identify the storage path (for example, folder directory) of the above-mentioned file to be copied in the second device 20.
  • the above-mentioned file transfer request may also include event information.
  • the third device 30 may transmit the file to be copied to the third device 30 through the data transmission channel.
  • step 401-step 418 are all optional steps, this application only provides a feasible embodiment, and may also include more or fewer steps than step 401-step 418, this application Applications are not limited to this.
  • connection between the first device 10, the second device 20 and the third device 30 is realized by a wireless method such as Bluetooth, but is not limited to the above-mentioned wireless method such as Bluetooth.
  • the connection between the first device 10 and the second device 20 and the third device 30 may also be established through wired means such as USB.
  • the data transmission between the first device 10, the second device 20 and the third device 30 can adopt a preset encryption and decryption mechanism, but it is not limited to whether to use the encryption and decryption mechanism, nor It is limited to which encryption and decryption mechanism is used. That is to say, whether or not to use an encryption and decryption mechanism or which encryption and decryption mechanism to use may be based on the security capabilities supported by the physical interface standards in the above-mentioned devices.
  • the file copying scenario is exemplarily described below by taking the first device 10 as a bluetooth mouse, the second device 20 as a tablet computer (eg, PAD), and the third device 30 as a notebook computer (eg, PC) as an example.
  • the Bluetooth mouse can be equipped with an NFC reader, and the notebook computer and tablet computer can be equipped with an NFC tag.
  • the Bluetooth mouse can be paired with the tablet computer via Bluetooth, and after establishing a Bluetooth connection with the tablet computer, further establish a Bluetooth GATT channel and a HOGP channel with the tablet computer.
  • the tablet computer is the main connection device of the Bluetooth mouse.
  • the tablet computer can also deliver the device information of the tablet computer to the Bluetooth mouse, so that the Bluetooth mouse can store the device information of the tablet computer.
  • the bluetooth mouse can be close to the notebook computer, so that the NFC reader of the bluetooth mouse can read the bluetooth MAC address in the NFC label on the notebook computer, thus can initiate the bluetooth pairing with the notebook computer based on the above bluetooth MAC address.
  • a GATT channel can be further established with the notebook computer, and the notebook computer can be set as the main connection device.
  • the Bluetooth mouse can set the tablet computer as a non-main connection device, and can disconnect the HOGP channel with the tablet computer, but can still maintain the GATT channel with the tablet computer.
  • the Bluetooth mouse can further establish a HOGP channel with the laptop.
  • multiple logical device nodes of the Bluetooth mouse can be generated on the laptop.
  • the above-mentioned logical device node can be a standard device node and a multi-connection control device node, and the above-mentioned standard device node and multi-connection control device node can be obtained through the driver device type enumerated by the Bluetooth mouse, for example, the Bluetooth mouse can enumerate the Bluetooth mouse type and multi-connection control mouse type, these two drive device types, among them, the Bluetooth mouse type can be used to generate a standard device node on the notebook computer, and the notebook computer can be used to receive the operation information reported by the Bluetooth mouse through the standard device node;
  • the connection control mouse type can be used to generate a multi-connection control device node on a laptop, through which the multi-connection control device node can realize the information interaction between the Bluetooth mouse and the laptop, and then complete the information exchange between the laptop and the tablet shared.
  • an authorization request window may pop up on the laptop, and the authorization request window may include multiple extended function options, for example, whether information is shared or not. Users can check the above-mentioned multiple extended function options to confirm that the above-mentioned extended functions take effect. After the user confirms the above-mentioned extended functions, the corresponding multi-connection control device node can be generated in the notebook computer, and the corresponding driver can be mounted. At this time, the multi-connection control device node has the above-mentioned extended functions selected by the user.
  • the notebook computer After the notebook computer generates the above-mentioned multi-connection control device node, it can also send the equipment information of the notebook computer to the Bluetooth mouse, thereby enabling the Bluetooth mouse to forward the equipment information of the notebook computer to the tablet computer, and further enabling the Bluetooth mouse to The stored device information of the tablet is sent to the laptop.
  • the notebook computer After the notebook computer receives the device information of the tablet computer, it can perform data transmission processing with the tablet computer.
  • the notebook computer can create a Socket server and monitor the corresponding transport layer port, thereby completing the data transmission with the tablet.
  • the tablet computer After the tablet computer receives the device information of the notebook computer, it can perform interactive processing with the notebook computer. It can be understood that if the notebook computer is the server, the tablet computer is the client; if the notebook computer is the client, the tablet computer is the server. Take a tablet computer as an example. At this time, the tablet computer can obtain the IP address in the device information of the notebook computer, and can try to connect to the notebook computer according to the above IP address, thereby establishing a data connection between the notebook computer and the tablet computer. transmission.
  • the user can copy a file in the notebook computer through the bluetooth mouse. Then, the user can touch the Bluetooth mouse to the NFC tag of the tablet computer, thereby enabling the Bluetooth mouse to establish a HOGP channel with the tablet computer.
  • the main connection device of the Bluetooth mouse is switched from the notebook computer to the tablet computer, that is to say, the notebook computer is the non-main connection device, and the tablet computer is the main connection device.
  • the Bluetooth mouse can disconnect the HOGP channel with the notebook computer, and the tablet computer can receive the operation information of the Bluetooth mouse.
  • the user can execute the paste operation through the Bluetooth mouse on the tablet computer, for example, the user can execute the paste function under any folder directory on the tablet computer, so that the files copied on the laptop computer can be pasted into the tablet computer , to complete data sharing between devices.
  • Figure 6 is a schematic structural diagram of an embodiment of the cross-device connection device of the present application.
  • the above-mentioned cross-device connection device 60 is applied to the first device, and the first device and the second device have established a first connection;
  • the first channel and the second channel have been established with the second device;
  • the first channel is used to configure the device type of the second device;
  • the second channel is used to send the device description information of the first device, and the device description information is used to create a driver device node
  • the first device has stored the device information of the second device, which may include: a first establishment module 61, a second establishment module 62, a third establishment module 63, a sending module 64 and a connection module 65; wherein,
  • a first establishing module 61 configured to establish a first connection between the first device and the third device
  • the second establishing module 62 is configured to establish a first channel between the first device and the third device on the established first connection between the first device and the third device;
  • a third establishing module 63 configured to establish a second channel between the first device and the third device
  • a sending module 64 configured for the first device to send the device description information of the first device to the third device;
  • the connection module 65 is used for the first device to receive the device information sent by the third device, send the device information sent by the third device to the second device, and send the device information of the second device to the third device; wherein, the third device The device information of the device and the device information of the second device are used for data transmission between the third device and the second device.
  • the first connection is a Bluetooth pairing connection
  • the first channel is a Bluetooth general attribute protocol channel
  • the second channel is a human-computer interaction device channel carried on the general attribute protocol.
  • the cross-device connection device 60 further includes: a notification module 66; wherein,
  • the notification module 66 is configured for the first device to send a switching notification to the second device; wherein, the switching notification is used to disconnect the second channel between the first device and the second device.
  • the cross-device connection device 60 further includes: a holding module 67; wherein,
  • the maintaining module 67 is configured to maintain the first connection and the first channel between the first device and the second device.
  • the cross-device connection device 60 further includes: a determining module 68; wherein,
  • the determining module 68 is configured for the first device to determine the third device as a master connection device; wherein the master connection device is configured to receive the operation information sent by the first device.
  • the drive device node includes a standard device node and a multi-connection control device node; wherein, the standard device node is used to receive the operation information sent by the first device, and the multi-connection control device node is used to Data transmission with a third device.
  • the multi-connection control device node includes one or more extended functions.
  • the cross-device connection device 60 further includes: a data transmission module 69; wherein,
  • the data transmission module 69 is configured to respond to the detected first operation of the user, the first device acquires the first operation information, and sends the first operation information to the third device; wherein, the first operation information is used to make the third device Obtain event information; in response to the detected second operation of the user, the first device establishes a second channel with the second device, and disconnects the second channel with the third device; in response to the detected user's third Operation, the first device acquires the second operation information, and sends the second operation information to the second device; wherein the second operation information is used to make the second device request data from the third device based on the event information.
  • the cross-device connection device 60 provided by the embodiment shown in FIG. 6 can be used to implement the technical solutions of the method embodiments shown in FIGS. 1-5 of this application. For its realization principles and technical effects, please refer to the relevant descriptions in the method embodiments.
  • each step of the above method or each module above can be completed by an integrated logic circuit of hardware in the processor element or an instruction in the form of software.
  • the above modules may be one or more integrated circuits configured to implement the above method, for example: one or more specific integrated circuits (Application Specific Integrated Circuit; hereinafter referred to as: ASIC), or, one or more microprocessors A Digital Signal Processor (hereinafter referred to as: DSP), or, one or more field programmable gate arrays (Field Programmable Gate Array; hereinafter referred to as: FPGA), etc.
  • ASIC Application Specific Integrated Circuit
  • DSP Digital Signal Processor
  • FPGA Field Programmable Gate Array
  • these modules can be integrated together and implemented in the form of a System-On-a-Chip (hereinafter referred to as SOC).
  • SOC System-On-a-Chip
  • the interface connection relationship between the modules shown in the embodiment of the present application is only a schematic illustration, and does not constitute a structural limitation of the electronic device 100 .
  • the electronic device 100 may also adopt different interface connection manners in the foregoing embodiments, or a combination of multiple interface connection manners.
  • the above-mentioned electronic devices include corresponding hardware structures and/or software modules for performing each function.
  • the embodiments of the present application can be implemented in the form of hardware or a combination of hardware and computer software in combination with the example units and algorithm steps described in the embodiments disclosed herein. Whether a certain function is executed by hardware or computer software drives hardware depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be regarded as exceeding the scope of the embodiments of the present application.
  • the embodiment of the present application may divide the above-mentioned electronic equipment into functional modules according to the above-mentioned method examples.
  • each functional module may be divided corresponding to each function, or two or more functions may be integrated into one processing module.
  • the above-mentioned integrated modules can be implemented in the form of hardware or in the form of software function modules. It should be noted that the division of modules in the embodiment of the present application is schematic, and is only a logical function division, and there may be other division methods in actual implementation.
  • Each functional unit in each embodiment of the embodiment of the present application may be integrated into one processing unit, or each unit may physically exist separately, or two or more units may be integrated into one unit.
  • the above-mentioned integrated units can be implemented in the form of hardware or in the form of software functional units.
  • the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a computer-readable storage medium.
  • the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage
  • the medium includes several instructions to enable a computer device (which may be a personal computer, server, or network device, etc.) or a processor to execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage medium includes: flash memory, mobile hard disk, read-only memory, random access memory, magnetic disk or optical disk, and other various media capable of storing program codes.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本申请实施例提供一种跨设备连接方法、电子设备及存储介质,涉及通信技术领域,该方法包括:第一设备与第三设备建立第一连接;在已建立的第一设备与第三设备之间的第一连接上,第一设备与第三设备建立第一通道;第一设备与第三设备建立第二通道;第一设备将第一设备的设备描述信息发送给第三设备;第一设备接收第三设备发送的设备信息,将第三设备发送的设备信息发送给第二设备,并将第二设备的设备信息发送给第三设备;其中,第三设备的设备信息及第二设备的设备信息用于第三设备与第二设备进行数据传输。本申请实施例提供的方法,能够有效完成无线配件设备在多个智能设备之间的切换,由此可以完成多个智能设备之间的数据传输。

Description

跨设备连接方法、电子设备及存储介质
本申请要求于2021年09月29日提交中国专利局、申请号为202111148202.7、申请名称为“跨设备连接方法、电子设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请实施例涉及通信技术领域,尤其涉及一种跨设备连接方法、电子设备及存储介质。
背景技术
随着电子技术与通信技术的发展,用户现在可以使用的智能设备越来越多。例如,用户可能同时拥有两台笔记本电脑,或同时拥有一台笔记本电脑和一台平板电脑。在上述场景下,用户可能希望自己使用的蓝牙等无线配件设备(例如,鼠标)可以在上述多个智能设备之间共享使用,实现边界配对连接以及快速切换。进一步地,用户还希望可以利用上述无线配件设备在上述多个智能设备之间实现便捷的信息传递和数据共享。
然而,目前的无线配件设备在上述多个智能设备之间实现快速切换或数据共享时,需要依赖云服务器,也就是说,需要无线配件设备及智能设备与云服务器进行信息交互后,才可以实现上述切换或数据共享,由此对用户造成了不便,降低了用户的体验,例如,在没有互联网连接的时候,无线配件设备及智能设备无法与云服务器通信,由此会导致无线配件设备在上述多个智能设备之间无法实现快速切换或数据共享。
发明内容
本申请实施例提供了一种跨设备连接方法、电子设备及存储介质,以提供一种跨设备连接的方式,可以有效完成无线配件设备在多个智能设备之间的切换,由此可以完成多个智能设备之间的数据传输。
第一方面,本申请实施例提供了一种跨设备连接方法,应用于第一设备,第一设备与第二设备已建立第一连接;第一设备与第二设备已建立第一通道及第二通道;第一通道用于配置第二设备的设备类型;第二通道用于发送第一设备的设备描述信息,设备描述信息用于创建驱动设备节点;第一设备已存储第二设备的设备信息,包括:
第一设备与第三设备建立第一连接;其中,该第一设备可以是无线配件设备,例如,蓝牙鼠标。该第二设备和第三设备可以是智能终端设备,例如,平板、电脑、电视等。该第一连接可以是无线连接或有线连接。
在已建立的第一设备与第三设备之间的第一连接上,第一设备与第三设备建立第一通道;其中,该第一通道可以是对上述第一连接对应的通信协议通道,例如,蓝牙通用属性协议通道,
第一设备与第三设备建立第二通道;其中,该第二通道可以是基于上述第一通道的人机交互通道,例如,承载在通用属性协议上的人机交互设备通道。
第一设备将第一设备的设备描述信息发送给第三设备;其中,设备描述信息可以包括第一设备中与枚举的驱动设备相关的信息。
第一设备接收第三设备发送的设备信息,将第三设备发送的设备信息发送给第二设备,并将第二设备的设备信息发送给第三设备;其中,第三设备的设备信息及第二设备的设备信息用于第三设备与第二设备进行数据传输。其中,上述设备信息可以包括设备的设备标识,例如,第二设备的设备标识、第三设备的设备标识。该设备标识可以是MAC地址和/或网络IP信息。
本申请实施例中,第一设备通过分别与第二设备及第三设备建立连接和通道,并在第二设备及第三设备上创建驱动设备节点,由此可以实现无线配件设备在多个智能设备之间的切换,进而可以完成多个智能设备之间的数据传输。
其中一种可能的实现方式中,第一连接为蓝牙配对连接,第一通道为蓝牙通用属性协议通道,第二通道为承载在通用属性协议上的人机交互设备通道。
其中一种可能的实现方式中,第一设备与第三设备建立第一通道之后,还包括:
第一设备向第二设备发送切换通知;其中,切换通知用于断开第一设备与第二设备之间的第二通道。
本申请实施例中,通过发送切换通知,可以有效切断第一设备与第二设备之间的第二通道,由此可以避免第二设备误接收第一设备发送的操作信息。
其中一种可能的实现方式中,第一设备与第三设备建立第一通道之后,还包括:
第一设备与第二设备之间保持第一连接及第一通道。
本申请实施例中,通过保持第一设备与第二设备之间的第一连接及第一通道,可以保证第一设备从与第三设备的交互切换回第二设备时,无需在此建立第一连接和第一通道,由此可以提高任务处理效率。
其中一种可能的实现方式中,第一设备与第三设备建立第一通道之后,还包括:
第一设备将第三设备确定为主连接设备;其中,主连接设备用于接收第一设备发送的操作信息。
本申请实施例中,通过主连接设备标识,用于区分当前接收操作信息的设备,可以提高识别效率,避免误操作,例如,将操作信息发送到错误的设备。
其中一种可能的实现方式中,驱动设备节点包括标准设备节点及多连接控制设备节点;其中,标准设备节点用于接收第一设备发送的操作信息,多连接控制设备节点用于在第二设备与第三设备之间进行数据传输。
本申请实施例中,通过在智能设备上枚举多连接控制设备节点,可以实现智能设备之间的数据传输功能。
其中一种可能的实现方式中,多连接控制设备节点包括一个或多个扩展功能。
本申请实施例中,用户可以在多个扩展功能中任意选取一个或多个扩展功能,例如,文件复制、应用投屏等。由此可以提高功能选取的灵活性,进而可以提高用户体验。
其中一种可能的实现方式中,还包括:
响应于检测到的用户的第一操作,第一设备获取第一操作信息,将第一操作信息发送给第三设备;其中,第一操作信息用于使得第三设备获取事件信息;其中,该第 一操作例如可以是点击复制功能。该事件例如可以是文件复制事件,则该事件信息可以包括待复制文件的源路径和文件名。
响应于检测到的用户的第二操作,第一设备与第二设备建立第二通道,并断开与第三设备之间的第二通道;其中,该第二操作可以是用户将第一设备靠近第二设备,与第二设备重新建立第二通道。
响应于检测到的用户的第三操作,第一设备获取第二操作信息,将第二操作信息发送给第二设备;其中,第二操作信息用于使得第二设备基于事件信息向第三设备请求数据。其中,第三操作可以点击粘贴功能,由此可以使得上述待复制文件可以从第三设备粘贴到第二设备中。
第二方面,本申请实施例提供一种跨设备连接装置,应用于第一设备,第一设备与第二设备已建立第一连接;第一设备与第二设备已建立第一通道及第二通道;第一通道用于配置第二设备的设备类型;第二通道用于发送第一设备的设备描述信息,设备描述信息用于创建驱动设备节点;第一设备已存储第二设备的设备信息,包括:
第一建立模块,用于第一设备与第三设备建立第一连接;
第二建立模块,用于在已建立的第一设备与第三设备之间的第一连接上,第一设备与第三设备建立第一通道;
第三建立模块,用于第一设备与第三设备建立第二通道;
发送模块,用于第一设备将第一设备的设备描述信息发送给第三设备;
连接模块,用于第一设备接收第三设备发送的设备信息,将第三设备发送的设备信息发送给第二设备,并将第二设备的设备信息发送给第三设备;其中,第三设备的设备信息及第二设备的设备信息用于第三设备与第二设备进行数据传输。
其中一种可能的实现方式中,第一连接为蓝牙配对连接,第一通道为蓝牙通用属性协议通道,第二通道为承载在通用属性协议上的人机交互设备通道。
其中一种可能的实现方式中,上述跨设备连接装置还包括:
通知模块,用于第一设备向第二设备发送切换通知;其中,切换通知用于断开第一设备与第二设备之间的第二通道。
其中一种可能的实现方式中,上述跨设备连接装置还包括:
保持模块,用于第一设备与第二设备之间保持第一连接及第一通道。
其中一种可能的实现方式中,上述跨设备连接装置还包括:
确定模块,用于第一设备将第三设备确定为主连接设备;其中,主连接设备用于接收第一设备发送的操作信息。
其中一种可能的实现方式中,驱动设备节点包括标准设备节点及多连接控制设备节点;其中,标准设备节点用于接收第一设备发送的操作信息,多连接控制设备节点用于在第二设备与第三设备之间进行数据传输。
其中一种可能的实现方式中,多连接控制设备节点包括一个或多个扩展功能。
其中一种可能的实现方式中,上述跨设备连接装置还包括:
数据传输模块,用于响应于检测到的用户的第一操作,第一设备获取第一操作信息,将第一操作信息发送给第三设备;其中,第一操作信息用于使得第三设备获取事件信息;响应于检测到的用户的第二操作,第一设备与第二设备建立第二通道,并断 开与第三设备之间的第二通道;响应于检测到的用户的第三操作,第一设备获取第二操作信息,将第二操作信息发送给第二设备;其中,第二操作信息用于使得第二设备基于事件信息向第三设备请求数据。
第三方面,本申请实施例提供一种第一设备,包括:
存储器,上述存储器用于存储计算机程序代码,上述计算机程序代码包括指令,第一设备与第二设备已建立第一连接;第一设备与第二设备已建立第一通道及第二通道;第一通道用于配置第二设备的设备类型;第二通道用于发送第一设备的设备描述信息,设备描述信息用于创建驱动设备节点;第一设备已存储第二设备的设备信息,当上述第一设备从上述存储器中读取上述指令,以使得上述第一设备执行以下步骤:
第一设备与第三设备建立第一连接;
在已建立的第一设备与第三设备之间的第一连接上,第一设备与第三设备建立第一通道;
第一设备与第三设备建立第二通道;
第一设备将第一设备的设备描述信息发送给第三设备;
第一设备接收第三设备发送的设备信息,将第三设备发送的设备信息发送给第二设备,并将第二设备的设备信息发送给第三设备;其中,第三设备的设备信息及第二设备的设备信息用于第三设备与第二设备进行数据传输。
其中一种可能的实现方式中,第一连接为蓝牙配对连接,第一通道为蓝牙通用属性协议通道,第二通道为承载在通用属性协议上的人机交互设备通道。
其中一种可能的实现方式中,上述指令被上述电子设备执行时,使得上述电子设备执行第一设备与第三设备建立第一通道的步骤之后,还执行以下步骤:
第一设备向第二设备发送切换通知;其中,切换通知用于断开第一设备与第二设备之间的第二通道。
其中一种可能的实现方式中,上述指令被上述电子设备执行时,使得上述电子设备执行第一设备与第三设备建立第一通道的步骤之后,还执行以下步骤:
第一设备与第二设备之间保持第一连接及第一通道。
其中一种可能的实现方式中,上述指令被上述电子设备执行时,使得上述电子设备执行第一设备与第三设备建立第一通道的步骤之后,还执行以下步骤:
第一设备将第三设备确定为主连接设备;其中,主连接设备用于接收第一设备发送的操作信息。
其中一种可能的实现方式中,驱动设备节点包括标准设备节点及多连接控制设备节点;其中,标准设备节点用于接收第一设备发送的操作信息,多连接控制设备节点用于在第二设备与第三设备之间进行数据传输。
其中一种可能的实现方式中,多连接控制设备节点包括一个或多个扩展功能。
其中一种可能的实现方式中,上述指令被上述电子设备执行时,使得上述电子设备还执行以下步骤:
响应于检测到的用户的第一操作,第一设备获取第一操作信息,将第一操作信息发送给第三设备;其中,第一操作信息用于使得第三设备获取事件信息;
响应于检测到的用户的第二操作,第一设备与第二设备建立第二通道,并断开与 第三设备之间的第二通道;
响应于检测到的用户的第三操作,第一设备获取第二操作信息,将第二操作信息发送给第二设备;其中,第二操作信息用于使得第二设备基于事件信息向第三设备请求数据。
第四方面,本申请实施例提供一种计算机可读存储介质,该计算机可读存储介质中存储有计算机程序,当其在计算机上运行时,使得计算机执行如第一方面所述的方法。
第五方面,本申请实施例提供一种计算机程序,当上述计算机程序被计算机执行时,用于执行第一方面所述的方法。
在一种可能的设计中,第五方面中的程序可以全部或者部分存储在与处理器封装在一起的存储介质上,也可以部分或者全部存储在不与处理器封装在一起的存储器上
附图说明
图1为本申请实施例提供的应用场景示意图;
图2为本申请实施例提供的电子设备的软件结构示意图;
图3为本申请实施例提供的电子设备的硬件结构示意图;
图4为本申请提供的跨设备连接方法一个实施例的流程示意图;
图5为本申请实施例提供的扩展功能选取界面示意图;
图6为本申请提供的跨设备连接装置一个实施例的结构示意图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述。其中,在本申请实施例的描述中,除非另有说明,“/”表示或的意思,例如,A/B可以表示A或B;本文中的“和/或”仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。
以下,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征。在本申请实施例的描述中,除非另有说明,“多个”的含义是两个或两个以上。
随着电子技术与通信技术的发展,用户现在可以使用的智能设备越来越多。例如,用户可能同时拥有两台笔记本电脑,或同时拥有一台笔记本电脑和一台平板电脑。在上述场景下,用户可能希望自己使用的蓝牙等无线配件设备(例如,鼠标)可以在上述多个智能设备之间共享使用,实现边界配对连接以及快速切换。进一步地,用户还希望可以利用上述无线配件设备在上述多个智能设备之间实现便捷的信息传递和数据共享。
然而,目前的无线配件设备在上述多个智能设备之间实现快速切换或数据共享时,需要依赖云服务器,也就是说,需要无线配件设备及智能设备与云服务器进行信息交互后,才可以实现上述切换或数据共享,由此对用户造成了不便,降低了用户的体验,例如,在没有互联网连接的时候,无线配件设备及智能设备无法与云服务器通信,由此会导致无线配件设备在上述多个智能设备之间无法实现快速切换或数据共享。
为了解决上述问题,本申请实施例提出了一种跨设备连接方法,上述跨设备连接方法应用于第一设备10。其中,第一设备10可以是无线配件设备,例如,鼠标、键盘、手写笔、耳机、游戏手柄、遥控器、互动感应手套及音箱等支持多连接的设备。可以理解的是,上述示例并不构成对本申请实施例的限定,在一些实施例中,上述第一设备10还可以是其他类型的无线配件设备。
图1为上述跨设备连接方法的应用场景,如图1所示,上述应用场景包括第一设备10、第二设备20及第三设备30。其中,第二设备20及第三设备30可以是智能设备,例如,手机(mobile phone)、平板电脑(Pad)、带收发功能的电脑、笔记本电脑、虚拟现实(virtual reality,VR)终端设备、增强现实(augmented reality,AR)终端设备、工业控制(industrial control)中的无线终端、无人驾驶(self driving)中的无线终端、远程医疗(remote medical)中的无线终端、智能电网(smart grid)中的无线终端、运输安全(transportation safety)中的无线终端、智慧城市(smart city)中的无线终端、智慧家庭(smart home)中的无线终端、可穿戴设备、车载设备等。此外,上述智能设备可以是使用windows OS、linux、苹果iOS/MacOS、安卓等软件OS平台的智能设备。
第一设备10与第二设备20及第三设备30之间可以是有线或无线连接。其中,有线连接可以包括例如USB等连接方式,无线连接可以包括例如蓝牙、WIFI、UWB、NFC等连接方式。
接着,结合图2对上述第二设备20及第三设备30的系统框架进行说明。以第二设备20为例,如图2所示,第二设备20包括物理层21、数据链路层22、设备驱动层23及应用层24。其中,
物理层21用于提供不同类型的通信接口,该通信接口可以是外接设备(例如,第一设备10)与智能设备(例如,第二设备20或第三设备30)之间的接口,该通信接口可以是有线(例如,USB)或无线(例如,WIFI、蓝牙等)。
数据链路层22可以包括标准协议或私有协议的驱动,其中,上述标准协议可以包括例如人机交互设备(Human Interface Device,HID)等驱动协议,上述私有协议可以包括移动宽带及家庭设备管理(Mobile Broadband&Home,华为IoT设备管理)等驱动协议,也可以是其他形式的标准协议或私有协议,本申请对上述标准协议或私有协议的驱动不作特殊限定。
设备驱动层23可以枚举外接设备(例如,第一设备10)的多种驱动设备。该驱动设备可以是基于上述数据链路层22中的驱动协议(例如,HID协议或MBB协议等)的设备驱动接口。示例性的,该驱动设备可以包括鼠标、键盘及多连接控制设备等多种驱动设备。其中,该设备驱动接口可以包括鼠标驱动、键盘驱动及多连接控制设备驱动等多种类型。上述设备驱动接口可以去上述驱动设备一一对应,也就是说,上述鼠标驱动用于控制鼠标的操作,上述键盘驱动用于控制键盘的操作,上述多连接控制设备驱动用于控制外接设备与智能设备之间的信息交互,以及外接设备在智能设备之间的切换。
示例性的,当一个外接设备在上述设备驱动层23中枚举其驱动设备时,可以获取与该外接设备对应的多个设备驱动接口的类型,其中,该设备驱动接口的类型至少包 括上述多连接控制设备驱动类型。以该外接设备为一个鼠标为例,该鼠标在上述设备驱动层23中可以获取鼠标驱动及多连接控制设备驱动这两个设备驱动接口类型。其中,鼠标驱动可以是与上述标准协议(例如HID协议)对应的标准设备驱动,而多连接控制设备驱动可以是与上述私有协议(例如MBB协议)对应的扩展设备驱动。接着,设备驱动层23可以枚举出与标准设备驱动对应的标准鼠标以及与扩展设备驱动对应的扩展鼠标,其中,该标准鼠标可以是基于上述HID协议的标准设备,通过该标准设备可以实现鼠标的标准功能,例如,对光标进行点击、滑动、拖拽等动能。该扩展鼠标可以是基于上述MBB协议的扩展设备,通过该扩展设备可以实现鼠标与智能设备之间的信息交互,例如,通过该扩展鼠标将一个智能设备中的文件复制到另一个智能设备中。也就是说,当鼠标设备进行驱动设备的枚举时,设备驱动层23可以包含标准设备类型的标准鼠标,以及扩展设备类型的多连接控制鼠标。
应用层24可以用于提供多种应用,上述应用可以是常用的功能应用,也可以是定制的功能应用。其中,上述常用功能应用可以包括文件复制、NFC碰一碰等应用。上述定制功能应用可以包括设备发现、多设备间数据传输、鼠标穿越、应用投屏等应用。示例性的,通过文件复制应用,可以将智能设备A中的文件复制到智能设备B中。可以理解的是,上述常用功能应用及定制功能应用中的应用仅是示例性说明,并不构成对本申请实施例的限定,在一些实施例中,还可以包括其他应用。
下面结合图3首先介绍本申请以下实施例中提供的示例性电子设备。图3示出了电子设备100的结构示意图,该电子设备100可以是上述第一设备10。
电子设备100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块150,无线通信模块160,音频模块170,扬声器170A,受话器170B,麦克风170C,耳机接口170D,传感器模块180,按键190,马达191,指示器192,摄像头193,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,陀螺仪传感器180B,气压传感器180C,磁传感器180D,加速度传感器180E,距离传感器180F,接近光传感器180G,指纹传感器180H,温度传感器180J,触摸传感器180K,环境光传感器180L,骨传导传感器180M等。
可以理解的是,本发明实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。
控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行 指令的控制。
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。
在一些实施例中,处理器110可以包括一个或多个接口。接口可以包括集成电路(inter-integrated circuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。
USB接口130是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口130可以用于连接充电器为电子设备100充电,也可以用于电子设备100与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他电子设备,例如AR设备等。
可以理解的是,本发明实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备100的结构限定。在本申请另一些实施例中,电子设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。
充电管理模块140用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块140可以通过USB接口130接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块140可以通过电子设备100的无线充电线圈接收无线充电输入。充电管理模块140为电池142充电的同时,还可以通过电源管理模块141为电子设备供电。
电源管理模块141用于连接电池142,充电管理模块140与处理器110。电源管理模块141接收电池142和/或充电管理模块140的输入,为处理器110,内部存储器121,显示屏194,摄像头193,和无线通信模块160等供电。电源管理模块141还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块141也可以设置于处理器110中。在另一些实施例中,电源管理模块141和充电管理模块140也可以设置于同一个器件中。
电子设备100的无线通信功能可以通过天线1,天线2,移动通信模块150,无线通信模块160,调制解调处理器以及基带处理器等实现。
天线1和天线2用于发射和接收电磁波信号。电子设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。
移动通信模块150可以提供应用在电子设备100上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块150可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块150可以由天线1接收电磁波, 并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块150还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块150的至少部分功能模块可以被设置于处理器110中。在一些实施例中,移动通信模块150的至少部分功能模块可以与处理器110的至少部分模块被设置在同一个器件中。
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器170A,受话器170B等)输出声音信号,或通过显示屏194显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器110,与移动通信模块150或其他功能模块设置在同一个器件中。
无线通信模块160可以提供应用在电子设备100上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块160可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块160经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器110。无线通信模块160还可以从处理器110接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。
在一些实施例中,电子设备100的天线1和移动通信模块150耦合,天线2和无线通信模块160耦合,使得电子设备100可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(code division multiple access,CDMA),宽带码分多址(wideband code division multiple access,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。所述GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidou navigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellite system,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。
电子设备100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED), Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,电子设备100可以包括1个或N个显示屏194,N为大于1的正整数。
电子设备100可以通过ISP,摄像头193,视频编解码器,GPU,显示屏194以及应用处理器等实现拍摄功能。
ISP用于处理摄像头193反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头193中。
摄像头193用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,电子设备100可以包括1个或N个摄像头193,N为大于1的正整数。
数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当电子设备100在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。
视频编解码器用于对数字视频压缩或解压缩。电子设备100可以支持一种或多种视频编解码器。这样,电子设备100可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。
NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现电子设备100的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。
外部存储器接口120可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备100的存储能力。外部存储卡通过外部存储器接口120与处理器110通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备100使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。处理器110通过运行存储在内部存储器121的指令,和/或存储在设置于处理器中的存储器的指令,执行电子设备100的各种功能应用以及数据处理。
电子设备100可以通过音频模块170,扬声器170A,受话器170B,麦克风170C, 耳机接口170D,以及应用处理器等实现音频功能。例如音乐播放,录音等。
音频模块170用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块170还可以用于对音频信号编码和解码。在一些实施例中,音频模块170可以设置于处理器110中,或将音频模块170的部分功能模块设置于处理器110中。
扬声器170A,也称“喇叭”,用于将音频电信号转换为声音信号。电子设备100可以通过扬声器170A收听音乐,或收听免提通话。
受话器170B,也称“听筒”,用于将音频电信号转换成声音信号。当电子设备100接听电话或语音信息时,可以通过将受话器170B靠近人耳接听语音。
麦克风170C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风170C发声,将声音信号输入到麦克风170C。电子设备100可以设置至少一个麦克风170C。在另一些实施例中,电子设备100可以设置两个麦克风170C,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,电子设备100还可以设置三个,四个或更多麦克风170C,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。
耳机接口170D用于连接有线耳机。耳机接口170D可以是USB接口130,也可以是3.5mm的开放移动电子设备平台(open mobile terminal platform,OMTP)标准接口,美国蜂窝电信工业协会(cellular telecommunications industry association of the USA,CTIA)标准接口。
按键190包括开机键,音量键等。按键190可以是机械按键。也可以是触摸式按键。电子设备100可以接收按键输入,产生与电子设备100的用户设置以及功能控制有关的键信号输入。
马达191可以产生振动提示。马达191可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏194不同区域的触摸操作,马达191也可对应不同的振动反馈效果。不同的应用场景(例如:时间提醒,接收信息,闹钟,游戏等)也可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。
指示器192可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。
SIM卡接口195用于连接SIM卡。SIM卡可以通过插入SIM卡接口195,或从SIM卡接口195拔出,实现和电子设备100的接触和分离。电子设备100可以支持1个或N个SIM卡接口,N为大于1的正整数。SIM卡接口195可以支持Nano SIM卡,Micro SIM卡,SIM卡等。同一个SIM卡接口195可以同时插入多张卡。所述多张卡的类型可以相同,也可以不同。SIM卡接口195也可以兼容不同类型的SIM卡。SIM卡接口195也可以兼容外部存储卡。电子设备100通过SIM卡和网络交互,实现通话以及数据通信等功能。在一些实施例中,电子设备100采用eSIM,即:嵌入式SIM卡。eSIM卡可以嵌在电子设备100中,不能和电子设备100分离。
图4为本申请实施例提供的跨设备连接方法一个实施例的流程示意图,包括:
步骤401,第一设备10与第二设备20进行连接。
具体地,第一设备10可以通过无线方式与第二设备20进行连接。其中,上述无线方式可以包括蓝牙(BT),由此可以实现第一设备10与第二设备20之间的蓝牙配对连接。在具体实现时,当第一设备10通过蓝牙方式与第二设备20进行配对连接时,第一设备10可以通过如下两种方式与第二设备20进行蓝牙配对。
方式一
第一设备10可以靠近第二设备20,并可以通过第一设备10中的蓝牙广播消息让第二设备20发现第一设备10。当第二设备20发现第一设备10后,可以与第一设备10发起蓝牙配对,由此可以在第一设备10与第二设备20之间建立蓝牙配对连接。
方式二
第一设备10可以触碰第二设备20上的NFC标签,其中,第二设备20上的NFC标签中包括第二设备20的蓝牙MAC地址,由此可以使得第一设备10通过上述蓝牙MAC地址发现第二设备20,并可以进一步地与第二设备20进行蓝牙配对。在具体实现时,当通过上述NFC碰一碰的方式进行蓝牙配对连接时,第一设备10可以通过靠近感应主动发现第二设备20的蓝牙MAC地址,例如,第一设备10可以配置NFC/UWB阅读器,第二设备20可以配置NFC标签/UWB射频卡。
可选地,第二设备20也可以触碰第一设备10上的NFC标签,其中,第一设备10上的NFC标签中包括第一设备10的蓝牙MAC地址,由此可以使得第二设备20发现第一设备10,并可以进一步地与第一设备10进行蓝牙配对。在具体实现时,当通过上述NFC碰一碰的方式进行蓝牙配对连接时,第一设备10可以通过靠近感应,使得第二设备20主动发现第一设备10的蓝牙MAC地址,例如,第一设备10可以配置NFC标签/UWB射频卡,第二设备20可以配置NFC/UWB阅读器。本申请实施例对上述第一设备10与第二设备20之间建立蓝牙配对连接的方式不作特殊限定。
此外,需要说明的是,在第一设备10与第二设备20建立蓝牙配对连接时,还可以完成第一设备10与第二设备20之间的认证/交换密钥、鉴权等操作,具体可以参考相关标准组织的蓝牙协议,在此不再赘述。
步骤402,第一设备10与第二设备20建立蓝牙GATT通道。
具体地,当第一设备10与第二设备20建立蓝牙配对连接后,该第一设备10还可以在上述蓝牙配对连接之上,与第二设备20建立蓝牙通用属性协议(Generic Attributes Profile,GATT)通道。该蓝牙GATT通道可以用于在低功耗蓝牙设备之间进行信息的交互,例如,通过该蓝牙GATT通道,可以配置第二设备20的设备类型。其中,该设备类型可以包括主连接类型及非主连接类型。与主连接类型对应的设备可以是主连接设备,与非主连接类型对应的设备可以是非主连接设备。该主连接设备可以是与第一设备10已建立承载在GATT协议上的HID(HID Over Gatt Profile,HOGP)连接通道的设备,该非主连接设备可以是未与第一设备10建立HOGP通道的设备。可以理解的是,在主连接设备上,可以接收第一设备10的例如点击、滚动及拖拽等操作信息,并可以执行与该操作信息对应的操作。其中,HOGP通道在下文中进行详细描述,在此不再赘述。
当第一设备10与第二设备20建立蓝牙GATT通道后,第一设备10可以将该第二设备20设置为主连接设备。可以理解的是,上述蓝牙GATT为蓝牙协议中的一种 短信令的配置管理协议,如果使用不同的无线协议,上述蓝牙GATT的协议名称可能有所不同,但并不构成对本申请实施例的限定。
步骤403,第一设备10与第二设备20建立HOGP通道。
具体地,当第一设备10与第二设备20成功建立蓝牙GATT通道后,还可以与第二设备20建立HOGP通道。其中,该HOGP通道可以用于发送第一设备10的设备描述信息,由此可以使得在第二设备20上创建对应的驱动设备节点。上述设备描述信息可以是与第一设备10中与枚举的驱动设备相关的信息。示例性的,第一设备10可以枚举多个驱动设备,该驱动设备可以包括标准设备及扩展设备(例如,多连接控制设备)。接着,第一设备10可以将上述设备描述信息发送给第二设备20,由此可以使得第二设备20基于上述驱动设备的相关信息创建对应的驱动设备节点。也就是说,第一设备10与第二设备20建立HOGP通道后,第一设备10可以将其驱动设备的描述信息发送给第二设备20。当第二设备20接收到第一设备10发送的驱动设备的描述信息后,可以基于该第一设备10的设备描述信息创建该第一设备10的驱动设备节点,也就是第一设备10的标准设备节点及扩展设备节点。
可以理解的是,上述标准设备节点可以是用于接收第一设备10的例如点击、滚动及拖拽等操作信息的逻辑设备,该标准设备节点可以是基于HID等标准协议,该标准设备节点可以使用标准驱动接口(例如,鼠标驱动、键盘驱动等)。上述扩展设备可以是与第一设备10之间进行信息交互,用于实现第二设备20与第三设备30之间的信息共享的逻辑设备,该扩展设备节点可以是基于MBB等私有协议,该扩展设备节点可以使用扩展驱动接口(例如,多连接控制驱动)。
步骤404,第二设备20向第一设备10发送设备信息。
具体地,当第一设备10与第二设备20建立上述HOGP通道,且第二设备20已创建第一设备10的驱动设备节点后,第二设备20可以向第一设备10发送第二设备20的设备信息。在具体实现时,第二设备20可以通过上述扩展驱动接口向第一设备10发送第二设备20的设备信息。第一设备10接收到上述第二设备20发送的设备信息之后,可以将上述第二设备20的设备信息进行存储。其中,上述第二设备20的设备信息可以包括第二设备20的设备标识(例如,该设备标识可以是MAC地址)和/或网口IP信息。
步骤405,第一设备10与第三设备30建立连接。
具体地,上述第一设备10可以向第三设备30发起连接请求,用于与第三设备30建立连接。在具体实现时,第一设备10可以与第三设备30通过蓝牙配对方式建立蓝牙配对连接。示例性的,第三设备30可以设置NFC标签,该NFC标签可以包括第三设备30的蓝牙MAC地址,该蓝牙MAC地址可以用于发现第三设备30。当用户手持第一设备10靠近第三设备30的NFC标签时,第一设备10可以通过NFC感应方式读取第三设备30的NFC标签中的蓝牙MAC地址,由此可以使得第一设备10与第三设备30建立蓝牙配对连接。
可选地,上述第三设备30的NFC标签中还可以包括第三设备30的设备序列号(SN)及设备型号等相关信息。
步骤406,第一设备10与第三设备30建立蓝牙GATT通道。
具体地,当第一设备10与第三设备30建立蓝牙配对连接后,该第一设备10还可以与第三设备30建立蓝牙GATT通道。当上述蓝牙GATT通道成功建立后,第一设备10可以将上述第三设备30设置为主连接设备。此时,第一设备10还可以向第二设备20发送切换通知,该切换通知用于通知第二设备20由主连接设备切换为非主连接设备,并可以切断第一设备10与第二设备20之间的HOGP连接通道,由此可以使得第二设备20无法接收到第一设备10的操作信息。也就是说,此时,仅第三设备30可以接收第一设备10上报的操作信息,并可以根据上述操作信息执行相应的操作。以第一设备10为鼠标为例,第一设备10上报的操作信息可以是按键点击及滚轮滚动等信息。
可以理解的是,当第二设备20接收到上述第一设备10发送的切换通知后,变更为非主连接设备,并可以切断与第一设备10之间的HOGP连接通道,但是可以保持与第一设备10之间的蓝牙配对连接及GATT通道,用于后续第一设备10切换回第二设备20时,无需再次进行蓝牙配对及建立GATT通道,进而可以提高切换效率。
步骤407,第一设备10与第三设备30建立HOGP通道。
具体地,当第一设备10与第三设备30成功建立GATT通道后,第一设备10与第三设备30还可以建立HOGP通道。此时,该第三设备30作为主连接设备,可以接收第一设备10的操作信息,由此可以使得第三设备30可以根据接收到的操作信息执行相应的操作。
步骤408,第一设备10获取设备描述信息,并将设备描述信息发送给第三设备30。
具体地,第一设备10可以获取设备描述信息,其中,该设备描述信息可以包括第一设备10枚举的驱动设备的相关信息(例如,枚举的驱动设备类型)。其中,该驱动设备的类型可以包括标准设备类型及扩展设备类型(例如,多连接控制设备类型)。该标准设备的相关信息可以用于在第三设备30中创建对应的标准设备节点,由此可以使得第三设备30通过该标准设备节点接收第一设备10上报的操作信息。该扩展设备的相关信息可以用于创建对应的多连接控制设备节点,由此可以通过与第一设备10之间的信息交互,使得第三设备30与第二设备20之间实现数据传输。
接着,第一设备10可以将上述设备描述信息发送给第三设备30。
步骤409,第三设备30接收第一设备10发送的设备描述信息,根据设备描述信息创建驱动设备节点。
具体地,第三设备30接收到第一设备10发送的设备描述信息后,可以根据设备描述信息创建对应的驱动设备节点。示例性的,当第三设备30接收到第一设备10发送的标准设备的相关信息后,可以创建对应的标准设备节点,并可以为该标准设备节点加载对应的驱动(例如,标准设备驱动),此时,第三设备30可以通过该标准设备节点接收第一设备10发送的操作信息。
当第三设备30接收到第一设备10发送的扩展设备的相关信息后,可以创建对应的扩展设备节点(例如,多连接控制设备节点),并可以为该扩展设备节点加载对应的驱动,也就是扩展设备驱动(例如,多连接控制设备驱动)。
进一步地,当第三设备30创建上述扩展设备节点时,还可以为待创建的扩展设备 节点设置相应的扩展功能。示例性的,当第三设备30收到第一设备10发送的扩展设备的相关信息(例如,扩展设备类型)后,可以在第三设备30的显示界面弹出功能授权窗口。其中,该功能授权窗口可以包括一个或多个扩展功能选项。用户可以在上述扩展功能选项中任意勾选,用于确定该扩展设备节点的扩展功能,也就是使得选取的扩展功能生效。当用户选取相应的扩展功能选项后,扩展设备节点在第三设备30中创建完成,该扩展设备节点可以具有用户选取的上述扩展功能。
现结合图5进行示例性说明,如图5所示,界面500为包含功能授权窗口501及标准设备节点502的显示界面,功能授权窗口501包含信息共享功能选项5011及应用投屏功能选项5012。当用户勾选信息共享功能选项5011后,可以创建扩展设备节点503,由此可以得到包含标准设备节点502及扩展设备节点503的界面510,其中,扩展设备节点503可以具有信息共享功能。
需要说明的是,在一些实施例中,上述标准设备节点与扩展设备节点也可以是同一个设备节点,本申请实施例对第三设备30创建的设备节点数不作特殊限定。
步骤410,第三设备30将第三设备30的设备信息发送给第一设备10。
具体地,当第三设备30成功创建上述扩展设备节点后,可以通过该扩展设备节点将第三设备30的设备信息发送给第一设备10。其中,第三设备30的设备信息可以包括第三设备30的MAC地址和/或网口IP等信息。
步骤411,第一设备10接收第三设备30发送的第三设备30的设备信息,将第三设备30的设备信息转发给第二设备20。
具体地,由于与第一设备10连接的主连接设备发生了变更,例如,主连接设备由第二设备20变更为第三设备30。此时,第一设备10可以将变更后的主连接设备(例如,第三设备30)的设备信息发送给变更前的主连接设备(例如,第二设备20),由此可以使得第三设备30与第二设备20之间基于对方的设备信息进行交互。
步骤412,第一设备10将第二设备20的设备信息发送给第三设备30。
具体地,第一设备10可以将步骤404中预先存储的第二设备20的设备信息发送给第三设备30,由此可以使得第三设备30与第二设备20之间基于对方的设备信息进行交互。
可以理解的是,本步骤412可以和步骤411同时执行,可以在步骤411之前执行,也可以在步骤411之后执行,也就是说,本步骤412与步骤411的执行顺序可以不分先后。
步骤413,第三设备30接收第一设备10发送的第二设备20的设备信息,与第二设备20进行数据传输。
在一些实施例中,数据传输可以理解第三设备与第二设备通过网络进行数据交互,例如第二设备发送信息给第三设备,第三设备发送信息给第二设备;其中网络可以为蓝牙网络、WIFI网络(例如P2P网络或经由第三终端的网络)等可以进行数据传输的设备交互形式,本申请对此不做限定。
具体地,当第三设备30接收到第一设备10发送的第二设备20的设备信息后,可以与第二设备20进行数据传输,其中,该数据传输可以是基于局域网(Local Area Network,LAN)的数据传输,也可以是基于广域网的数据传输,本申请实施例对上述 设备间数据传输的方式不作特殊限定。在具体实现时,第三设备30可以采用预设的交互规则,例如,上述预设的交互规则可以是:两个设备中MAC地址较小的设备可以作为服务端,MAC地址较大的设备可以作为客户端。此时,若第三设备30的MAC地址比第二设备20的MAC地址小,则第三设备30可以创建Socket服务端,并可以监听对应的传输层(例如,TCP或UDP层)端口,用于与第二设备20建立数据传输关系。其中,Socket连接对应的协议可以是例如DLNA等标准协议,也可以是例如华为Cast+等私有协议,本申请实施例对此不作限定。
可选地,若第三设备30的MAC地址比第二设备20的MAC地址大,则第三设备30可以作为客户端,并可以发起与第二设备20的数据传输。此时,第三设备30(也就是客户端)可以尝试使用第二设备20的设备信息中的IP地址,连接第二设备20(也就是服务端)。可以理解的是,若设备信息中包含网口IP信息,则上述IP地址可以通过上述网口IP信息获得,若设备信息中仅包含MAC地址,则上述IP地址还可以通过设备信息中的MAC地址在本地查询地址解析协议(Address Resolution Protocol,ARP)表获得,本申请实施例对上述获取IP地址的方式不作特殊限定。可以理解的是,若第三设备30首次尝试连接第二设备20失败,则可以尝试连接多次,直到连接成功为止。若第三设备30与第二设备20连接成功,则说明第二设备20与第三设备30之间的数据传输关系成功,此时,第二设备20与第三设备30之间可以进一步进行信息交互或数据共享。
步骤414,第二设备20接收第一设备10发送的第三设备30的设备信息,与第三设备30进行数据传输。
具体地,当第二设备20接收到第一设备10发送的第三设备30的设备信息后,可以与第三设备30进行数据传输。在具体实现时,以步骤413中预设的交互规则为例,若第三设备30为Socket服务端,则第二设备20可以作为客户端。此时,第二设备20可以尝试使用第三设备30的设备信息中的IP地址,连接第三设备30。若第三设备30为客户端,则第二设备20可以作为服务端。此时,第二设备20可以创建Socket服务端,并可以监听对应的传输层(例如,TCP或UDP层)端口,用于与第三设备30建立数据传输关系。
若连接成功,则说明第二设备20与第三设备30之间的数据传输成功,此时,第二设备20与第三设备30之间可以进一步进行信息交互或数据共享。
步骤415,响应于用户的第一操作,第三设备30获取事件信息。
具体地,用户可以在第一设备10上进行操作,例如,用户可以在第一设备10上进行点击、滑动等操作。响应于检测到的用户操作,第一设备10获取操作信息,并可以将该操作信息上报给第三设备30。当第三设备30接收到第一设备10上报的操作信息后,可以执行与该操作信息对应的操作。示例性的,以文件复制为例,用户可以使用第一设备10对第三设备30中的任一文件点击复制功能选项,用于进行文件复制。响应于用户的复制操作,第三设备30的应用层中的文件复制应用监听到上述用户的复制操作,获取与上述复制操作对应的事件信息(例如,待复制文件的源路径和文件名)。
步骤416,第三设备30将事件信息发送给第二设备20。
具体地,当第三设备30获取上述事件信息后,可以将上述事件信息同步给第二设 备20。示例性的,第三设备30可以将上述事件信息发送给第二设备20。以文件复制为例,上述事件信息可以包括待复制文件的源路径和文件名。
步骤417,响应于用户的第二操作,第一设备10将主连接设备从第三设备30切换至第二设备20。
具体地,当用户在第三设备30上完成复制操作后,用户可以将第一设备10靠近第二设备20,用于将主连接设备由第三设备30切换至第二设备20,由此可以使得用户通过第一设备10在第三设备30上进行操作,进而可以完成文件复制任务。例如,用户可以将第一设备10触碰第二设备20的NFC标签,由此可以读取到第二设备20的NFC标签中的蓝牙MAC地址。响应于用户的第二操作,由于第一设备10与第二设备20已建立蓝牙配对连接及GATT通道,此时,第一设备10可以进一步与第二设备20建立HOGP通道,由此可以使得第一设备10将主连接设备由第三设备30切换至第二设备20,也就是说,第一设备10可以断开与第三设备30的HOGP通道,并和第二设备20建立HOGP通道。
步骤418,响应于用户的第三操作,第二设备20向第三设备30请求传输数据。
具体地,当第一设备10与第二设备20建立HOGP通道,并将第二设备20设为主连接设备后,用户可以进一步在第一设备10上进行操作。例如,用户可以在第二设备20中的任一文件夹目录下右键弹出菜单栏,并在菜单栏中点击粘贴功能选项,用于执行粘贴操作,第二设备20的文件复制应用监听到上述用户的粘贴操作,获取步骤416中第三设备30发送给第二设备20的事件信息,并可以请求第三设备30按照上述事件信息传输上述待复制文件到第二设备20中的文件夹目录下。响应于用户的第三操作,第二设备20可以通过上述步骤413和步骤414建立的数据传输通道向第三设备30发送文件传输请求,该文件传输请求用于请求传输上述待复制文件。其中,该文件传输请求可以包括目标路径,该目标路径可以用于标识上述待复制文件在第二设备20中的存储路径(例如,文件夹目录),可选地,上述文件传输请求还可以包括事件信息。当第三设备30接收到第二设备20发送的文件传输请求后,可以将上述待复制文件通过上述数据传输通道传输给第三设备30。
可以理解的是,上面实施例中,步骤401-步骤418均为可选步骤,本申请只提供一种可行的实施例,还可以包括比步骤401-步骤418更多或更少的步骤,本申请对此不做限定。
需要说明的是,上述实施例仅示例性的示出了以蓝牙等无线方式实现第一设备10与第二设备20及第三设备30之间的连接,但并不限于上述蓝牙等无线方式,在一些实施例中,还可以通过USB等有线方式建立第一设备10与第二设备20及第三设备30之间的连接。
此外,为了保证数据传输的安全性,第一设备10与第二设备20及第三设备30之间的数据传输可以采用预设的加解密机制,但并不限于是否使用加解密机制,也不限于使用何种加解密机制。也就是说,具体是否加解密机制或使用何种加解密机制可以根据上述设备中物理接口标准支持的安全能力为准。
下文以第一设备10为蓝牙鼠标,第二设备20为平板电脑(例如,PAD),第三设备30为笔记本电脑(例如,PC)为例对文件复制场景进行示例性说明。其中,蓝 牙鼠标可以配置NFC阅读器,笔记本电脑和平板电脑可以配置NFC标签。
首先,蓝牙鼠标可以通过蓝牙和平板电脑进行配对连接,并在与平板电脑建立蓝牙连接后,进一步与平板电脑建立蓝牙GATT通道和HOGP通道,此时,平板电脑是蓝牙鼠标的主连接设备。此外,平板电脑还可以向蓝牙鼠标下发平板电脑的设备信息,由此可以使得蓝牙鼠标可以存储平板电脑的设备信息。
接着,蓝牙鼠标可以靠近笔记本电脑,以使得蓝牙鼠标的NFC阅读器可以读取笔记本电脑上的NFC标签中的蓝牙MAC地址,由此可以基于上述蓝牙MAC地址发起与笔记本电脑的蓝牙配对。
当蓝牙鼠标与笔记本电脑建立蓝牙配对连接后,可以进一步与笔记本电脑建立GATT通道,并可以将笔记本电脑设置为主连接设备。此时,蓝牙鼠标可以将平板电脑设置为非主连接设备,并可以断开与平板电脑的HOGP通道,但仍可以与平板电脑保持GATT通道。
接着,蓝牙鼠标可以进一步与笔记本电脑建立HOGP通道。此时,笔记本电脑上可以生成蓝牙鼠标的多个逻辑设备节点。其中,上述逻辑设备节点可以是标准设备节点和多连接控制设备节点,上述标准设备节点和多连接控制设备节点可以通过蓝牙鼠标枚举的驱动设备类型获得,例如,该蓝牙鼠标可以枚举蓝牙鼠标类型及多连接控制鼠标类型这两个驱动设备类型,其中,蓝牙鼠标类型可以用于在笔记本电脑上生成标准设备节点,通过该标准设备节点笔记本电脑可以用于接收蓝牙鼠标上报的操作信息;多连接控制鼠标类型可以用于在笔记本电脑上生成多连接控制设备节点,通过该多连接控制设备节点可以实现蓝牙鼠标与笔记本电脑之间的信息交互,进而可以完成笔记本电脑与平板电脑之间的信息共享。
可选地,当蓝牙鼠标枚举上述多连接控制设备节点时,笔记本电脑上可以弹出授权请求窗口,该授权请求窗口可以包括多个扩展功能选项,例如,信息是否共享的功能选项等。用户可以在上述多个扩展功能选项中进行勾选,以确认上述扩展功能生效。当用户确认上述扩展功能后,笔记本电脑中可以生成对应的多连接控制设备节点,并可以挂载相应的驱动,此时,该多连接控制设备节点具有上述用户选取的扩展功能。
当笔记本电脑生成上述多连接控制设备节点之后,还可以将笔记本电脑的设备信息下发给蓝牙鼠标,由此可以使得蓝牙鼠标将笔记本电脑的设备信息转发给平板电脑,并可以进一步使得蓝牙鼠标将存储的平板电脑的设备信息发送给笔记本电脑。
当笔记本电脑收到平板电脑的设备信息之后,可以进行与平板电脑的数据传输处理。以笔记本电脑为服务端为例,笔记本电脑可以创建Socket服务端,监听对应的传输层端口,由此可以完成与平板电脑之间的数据传输。
当平板电脑收到笔记本电脑的设备信息之后,可以进行与笔记本电脑的交互处理。可以理解的是,若笔记本电脑为服务端,则平板电脑为客户端;若笔记本电脑为客户端,则平板电脑为服务端。以平板电脑为客户端为例,此时,平板电脑可以获取笔记本电脑的设备信息中的IP地址,并可以根据上述IP地址尝试连接笔记本电脑,由此可以建立笔记本电脑与平板电脑之间的数据传输。
进一步地,用户可以在笔记本电脑中通过蓝牙鼠标复制一个文件。接着,用户可以将蓝牙鼠标触碰平板电脑的NFC标签,由此可以使得蓝牙鼠标与平板电脑建立 HOGP通道。此时,蓝牙鼠标的主连接设备由笔记本电脑切换至平板电脑,也就是说,笔记本电脑为非主连接设备,平板电脑为主连接设备。蓝牙鼠标可以断开与笔记本电脑的HOGP通道,平板电脑可以接收蓝牙鼠标的操作信息。然后,用户可以在平板电脑上通过蓝牙鼠标执行粘贴操作,例如,用户可以在平板电脑上的任一文件夹目录下执行粘贴功能,由此可以将在笔记本电脑上复制的文件粘贴到平板电脑中,以完成设备间的数据共享。
可以理解的是,上述示例仅示例性的示出了文件复制的场景,并不构成对本申请实施例的限定,在一些实施例中,还可以适用于其他数据共享的场景。
图6为本申请跨设备连接装置一个实施例的结构示意图,如图6所示,上述跨设备连接装置60应用于第一设备,第一设备与第二设备已建立第一连接;第一设备与第二设备已建立第一通道及第二通道;第一通道用于配置第二设备的设备类型;第二通道用于发送第一设备的设备描述信息,设备描述信息用于创建驱动设备节点;第一设备已存储第二设备的设备信息,可以包括:第一建立模块61、第二建立模块62、第三建立模块63、发送模块64及连接模块65;其中,
第一建立模块61,用于第一设备与第三设备建立第一连接;
第二建立模块62,用于在已建立的第一设备与第三设备之间的第一连接上,第一设备与第三设备建立第一通道;
第三建立模块63,用于第一设备与第三设备建立第二通道;
发送模块64,用于第一设备将第一设备的设备描述信息发送给第三设备;
连接模块65,用于第一设备接收第三设备发送的设备信息,将第三设备发送的设备信息发送给第二设备,并将第二设备的设备信息发送给第三设备;其中,第三设备的设备信息及第二设备的设备信息用于第三设备与第二设备进行数据传输。
其中一种可能的实现方式中,第一连接为蓝牙配对连接,第一通道为蓝牙通用属性协议通道,第二通道为承载在通用属性协议上的人机交互设备通道。
其中一种可能的实现方式中,上述跨设备连接装置60还包括:通知模块66;其中,
通知模块66,用于第一设备向第二设备发送切换通知;其中,切换通知用于断开第一设备与第二设备之间的第二通道。
其中一种可能的实现方式中,上述跨设备连接装置60还包括:保持模块67;其中,
保持模块67,用于第一设备与第二设备之间保持第一连接及第一通道。
其中一种可能的实现方式中,上述跨设备连接装置60还包括:确定模块68;其中,
确定模块68,用于第一设备将第三设备确定为主连接设备;其中,主连接设备用于接收第一设备发送的操作信息。
其中一种可能的实现方式中,驱动设备节点包括标准设备节点及多连接控制设备节点;其中,标准设备节点用于接收第一设备发送的操作信息,多连接控制设备节点用于在第二设备与第三设备之间进行数据传输。
其中一种可能的实现方式中,多连接控制设备节点包括一个或多个扩展功能。
其中一种可能的实现方式中,上述跨设备连接装置60还包括:数据传输模块69;其中,
数据传输模块69,用于响应于检测到的用户的第一操作,第一设备获取第一操作信息,将第一操作信息发送给第三设备;其中,第一操作信息用于使得第三设备获取事件信息;响应于检测到的用户的第二操作,第一设备与第二设备建立第二通道,并断开与第三设备之间的第二通道;响应于检测到的用户的第三操作,第一设备获取第二操作信息,将第二操作信息发送给第二设备;其中,第二操作信息用于使得第二设备基于事件信息向第三设备请求数据。
图6所示实施例提供的跨设备连接装置60可用于执行本申请图1-图5所示方法实施例的技术方案,其实现原理和技术效果可以进一步参考方法实施例中的相关描述。
应理解以上图6所示的跨设备连接装置60的各个模块的划分仅仅是一种逻辑功能的划分,实际实现时可以全部或部分集成到一个物理实体上,也可以物理上分开。且这些模块可以全部以软件通过处理元件调用的形式实现;也可以全部以硬件的形式实现;还可以部分模块以软件通过处理元件调用的形式实现,部分模块通过硬件的形式实现。例如,检测模块可以为单独设立的处理元件,也可以集成在电子设备的某一个芯片中实现。其它模块的实现与之类似。此外这些模块全部或部分可以集成在一起,也可以独立实现。在实现过程中,上述方法的各步骤或以上各个模块可以通过处理器元件中的硬件的集成逻辑电路或者软件形式的指令完成。
例如,以上这些模块可以是被配置成实施以上方法的一个或多个集成电路,例如:一个或多个特定集成电路(Application Specific Integrated Circuit;以下简称:ASIC),或,一个或多个微处理器(Digital Signal Processor;以下简称:DSP),或,一个或者多个现场可编程门阵列(Field Programmable Gate Array;以下简称:FPGA)等。再如,这些模块可以集成在一起,以片上系统(System-On-a-Chip;以下简称:SOC)的形式实现。
可以理解的是,本申请实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备100的结构限定。在本申请另一些实施例中,电子设备100也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。
可以理解的是,上述电子设备等为了实现上述功能,其包含了执行各个功能相应的硬件结构和/或软件模块。本领域技术人员应该很容易意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,本申请实施例能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请实施例的范围。
本申请实施例可以根据上述方法示例对上述电子设备等进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。需要说明的是,本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请实施例各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:快闪存储器、移动硬盘、只读存储器、随机存取存储器、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何在本申请揭露的技术范围内的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。

Claims (10)

  1. 一种跨设备连接方法,应用于第一设备,其特征在于,所述第一设备与第二设备已建立第一连接;所述第一设备与所述第二设备已建立第一通道及第二通道;所述第一通道用于配置所述第二设备的设备类型;所述第二通道用于发送所述第一设备的设备描述信息,所述设备描述信息用于创建驱动设备节点;所述第一设备已存储所述第二设备的设备信息,所述方法包括:
    所述第一设备与第三设备建立所述第一连接;
    在已建立的所述第一设备与所述第三设备之间的所述第一连接上,所述第一设备与所述第三设备建立所述第一通道;
    所述第一设备与所述第三设备建立所述第二通道;
    所述第一设备将所述第一设备的设备描述信息发送给所述第三设备;
    所述第一设备接收所述第三设备发送的设备信息,将所述第三设备发送的设备信息发送给所述第二设备,并将所述第二设备的设备信息发送给所述第三设备;其中,所述第三设备的设备信息及所述第二设备的设备信息用于所述第三设备与所述第二设备进行数据传输。
  2. 根据权利要求1所述的方法,其特征在于,所述第一连接为蓝牙配对连接,所述第一通道为蓝牙通用属性协议通道,所述第二通道为承载在通用属性协议上的人机交互设备通道。
  3. 根据权利要求1或2所述的方法,其特征在于,所述第一设备与所述第三设备建立所述第一通道之后,所述方法还包括:
    所述第一设备向所述第二设备发送切换通知;其中,所述切换通知用于断开所述第一设备与所述第二设备之间的所述第二通道。
  4. 根据权利要求1-3中任一项所述的方法,其特征在于,所述第一设备与所述第三设备建立所述第一通道之后,所述方法还包括:
    所述第一设备与所述第二设备之间保持所述第一连接及所述第一通道。
  5. 根据权利要求1-4中任一项所述的方法,其特征在于,所述第一设备与所述第三设备建立所述第一通道之后,所述方法还包括:
    所述第一设备将所述第三设备确定为主连接设备;其中,所述主连接设备用于接收所述第一设备发送的操作信息。
  6. 根据权利要求1-5中任一项所述的方法,其特征在于,所述驱动设备节点包括标准设备节点及多连接控制设备节点;其中,所述标准设备节点用于接收所述第一设备发送的操作信息,所述多连接控制设备节点用于在所述第二设备与所述第三设备之间进行数据传输。
  7. 根据权利要求6所述的方法,其特征在于,所述多连接控制设备节点包括一个或多个扩展功能。
  8. 根据权利要求1-7中任一项所述的方法,其特征在于,所述方法还包括:
    响应于检测到的用户的第一操作,所述第一设备获取第一操作信息,将所述第一操作信息发送给所述第三设备;其中,所述第一操作信息用于使得所述第三设备获取事件信息;
    响应于检测到的用户的第二操作,所述第一设备与所述第二设备建立所述第二通道,并断开与所述第三设备之间的所述第二通道;
    响应于检测到的用户的第三操作,所述第一设备获取第二操作信息,将所述第二操作信息发送给所述第二设备;其中,所述第二操作信息用于使得所述第二设备基于所述事件信息向所述第三设备请求数据。
  9. 一种第一设备,其特征在于,包括:存储器,所述存储器用于存储计算机程序代码,所述计算机程序代码包括指令,当所述第一设备从所述存储器中读取所述指令,以使得所述第一设备执行如权利要求1-8中任一项所述的方法。
  10. 一种计算机可读存储介质,其特征在于,包括计算机指令,当所述计算机指令在所述第一设备上运行时,使得所述第一设备执行如权利要求1-8中任一项所述的方法。
PCT/CN2022/117546 2021-09-29 2022-09-07 跨设备连接方法、电子设备及存储介质 WO2023051204A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111148202.7A CN115884140A (zh) 2021-09-29 2021-09-29 跨设备连接方法、电子设备及存储介质
CN202111148202.7 2021-09-29

Publications (1)

Publication Number Publication Date
WO2023051204A1 true WO2023051204A1 (zh) 2023-04-06

Family

ID=85755930

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/117546 WO2023051204A1 (zh) 2021-09-29 2022-09-07 跨设备连接方法、电子设备及存储介质

Country Status (2)

Country Link
CN (1) CN115884140A (zh)
WO (1) WO2023051204A1 (zh)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102135810A (zh) * 2010-01-22 2011-07-27 瀚邦科技股份有限公司 资源共享装置
US20160285952A1 (en) * 2015-03-25 2016-09-29 Qualcomm Incorporated Conveying data between devices in wireless personal area network
CN107463267A (zh) * 2016-06-03 2017-12-12 罗技欧洲公司 多主机启用流动的系统中的自动应用启动
CN113115294A (zh) * 2021-04-22 2021-07-13 荣耀终端有限公司 一种手写笔连接方法及蓝牙系统
CN113377272A (zh) * 2021-06-02 2021-09-10 Tcl通讯(宁波)有限公司 一种多设备间共享鼠标方法、装置、终端设备及存储介质

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102135810A (zh) * 2010-01-22 2011-07-27 瀚邦科技股份有限公司 资源共享装置
US20160285952A1 (en) * 2015-03-25 2016-09-29 Qualcomm Incorporated Conveying data between devices in wireless personal area network
CN107463267A (zh) * 2016-06-03 2017-12-12 罗技欧洲公司 多主机启用流动的系统中的自动应用启动
CN113115294A (zh) * 2021-04-22 2021-07-13 荣耀终端有限公司 一种手写笔连接方法及蓝牙系统
CN113377272A (zh) * 2021-06-02 2021-09-10 Tcl通讯(宁波)有限公司 一种多设备间共享鼠标方法、装置、终端设备及存储介质

Also Published As

Publication number Publication date
CN115884140A (zh) 2023-03-31

Similar Documents

Publication Publication Date Title
JP7378576B2 (ja) リモコン装置を用いたワンタッチスクリーンプロジェクションを実施するための端末装置、方法及びシステム
WO2021051989A1 (zh) 一种视频通话的方法及电子设备
WO2021036835A1 (zh) 一种蓝牙搜索方法、系统及相关装置
US11825539B2 (en) Bluetooth connection method and electronic device
WO2020107485A1 (zh) 一种蓝牙连接方法及设备
WO2021052178A1 (zh) 一种Wi-Fi连接方法及设备
WO2021082829A1 (zh) 蓝牙连接方法及相关装置
US20220304094A1 (en) Bluetooth Reconnection Method and Related Apparatus
JP7239257B2 (ja) データ転送方法および電子デバイス
WO2020077512A1 (zh) 语音通话方法、电子设备及系统
WO2021017894A1 (zh) 一种使用远程sim模块的方法及电子设备
EP4213512A1 (en) Screen projection method and system, and electronic device
WO2022068513A1 (zh) 无线通信方法和终端设备
WO2021104114A1 (zh) 一种提供无线保真WiFi网络接入服务的方法及电子设备
EP4250075A1 (en) Content sharing method, electronic device, and storage medium
WO2021218544A1 (zh) 一种提供无线上网的系统、方法及电子设备
WO2021027623A1 (zh) 一种设备能力发现方法及p2p设备
CN113038627B (zh) 一种文件分享方法、移动设备、计算机存储介质
EP4102927B1 (en) Dual wifi connection
US20240008107A1 (en) Communication connection establishment method and system, electronic device, and storage medium
WO2021197071A1 (zh) 无线通信系统及方法
WO2023051204A1 (zh) 跨设备连接方法、电子设备及存储介质
CN116367123A (zh) 基于Wi-Fi P2P的数据传输方法及电子设备
WO2022057521A1 (zh) 配置设备的方法及设备
WO2022267917A1 (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: 22874593

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 22874593

Country of ref document: EP

Kind code of ref document: A1