Cross-device connection method, electronic device, and storage medium
By establishing direct connections and channels between wireless accessory devices and multiple smart devices, the problem of wireless accessory devices relying on cloud servers is solved, and fast switching and data sharing of wireless accessory devices between multiple smart devices are achieved, improving user experience and device recognition efficiency.
Patent Information
- Application Number
- CN202111148202.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-29
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2041-09-29
AI Technical Summary
Existing wireless accessory devices need to rely on cloud servers when switching between multiple smart devices or sharing data, resulting in the inability to quickly switch or share data when there is no Internet connection, reducing the user experience.
By establishing direct connections and channels between wireless accessory devices and multiple smart devices, device description information and data are directly transmitted, avoiding dependence on cloud servers and achieving fast switching and data transmission between devices.
Wireless accessory devices can be quickly switched and data shared between multiple smart devices without an Internet connection, improving user experience and device recognition efficiency and avoiding misoperation.
Smart Images

Figure CN115884140B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of communication technology, and in particular to a cross-device connection method, an electronic device, and a storage medium. Background Art
[0002] With the development of electronic technology and communication technology, users can now use more and more smart devices. For example, a user may own two laptops at the same time, or a laptop and a tablet computer at the same time. In the above scenario, the user may hope that the wireless accessory devices such as Bluetooth (for example, a mouse) that he uses can be shared among the above multiple smart devices to achieve boundary pairing connection and fast switching. Furthermore, the user also hopes to use the above wireless accessory devices to achieve convenient information transmission and data sharing among the above multiple smart devices.
[0003] However, current wireless accessory devices need to rely on cloud servers when achieving fast switching or data sharing between the above-mentioned multiple smart devices. That is to say, the wireless accessory devices and smart devices need to interact with the cloud server for information before the above-mentioned switching or data sharing can be achieved, which causes inconvenience to users and reduces the user experience. For example, when there is no Internet connection, the wireless accessory devices and smart devices cannot communicate with the cloud server, which will result in the wireless accessory devices being unable to achieve fast switching or data sharing between the above-mentioned multiple smart devices. Summary of the Invention
[0004] The embodiments of the present application provide a cross-device connection method, an electronic device, and a storage medium to provide a cross-device connection method that can effectively complete the switching of wireless accessory devices between multiple smart devices, thereby completing data transmission between multiple smart devices.
[0005] In a first aspect, an embodiment of the present application provides a cross-device connection method, which is applied to a first device, wherein 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 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 device information of the second device, including:
[0006] A first device establishes a first connection with a third device. The first device may be a wireless accessory device, such as a Bluetooth mouse. The second and third devices may be smart terminal devices, such as tablets, computers, and televisions. The first connection may be a wireless connection or a wired connection.
[0007] On the first connection established 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 first connection, for example, a Bluetooth general attribute protocol channel,
[0008] 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.
[0009] The first device sends device description information of the first device to the third device; wherein the device description information may include information related to the enumerated driver device in the first device.
[0010] The first device receives 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. The device information of the third device and the device information of the second device are used for data transmission between the third device and the second device. The device information may include a device identifier of the device, such as the device identifier of the second device and the device identifier of the third device. The device identifier may be a MAC address and / or network IP information.
[0011] In an embodiment of the present application, the first device establishes connections and channels with the second device and the third device respectively, and creates driver device nodes on the second device and the third device, thereby enabling the switching of wireless accessory devices between multiple smart devices, and further completing data transmission between multiple smart devices.
[0012] In one possible implementation, the first connection is a Bluetooth pairing connection, the first channel is a Bluetooth universal attribute protocol channel, and the second channel is a human-computer interaction device channel carried on the universal attribute protocol.
[0013] In one possible implementation, after the first device establishes the first channel with the third device, the process further includes:
[0014] 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.
[0015] In an embodiment of the present application, by sending a switching notification, 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.
[0016] In one possible implementation, after the first device establishes the first channel with the third device, the process further includes:
[0017] The first device and the second device maintain a first connection and a first channel.
[0018] In an embodiment of the present application, by maintaining the first connection and the first channel between the first device and the second device, it can be ensured that when the first device switches back to the second device from interacting with the third device, there is no need to establish the first connection and the first channel, thereby improving task processing efficiency.
[0019] In one possible implementation, after the first device establishes the first channel with the third device, the process further includes:
[0020] The first device determines the third device as a primary connection device; wherein the primary connection device is used to receive operation information sent by the first device.
[0021] In an embodiment of the present application, the main connection device identifier is used to distinguish the device currently receiving operation information, which can improve recognition efficiency and avoid erroneous operations, such as sending operation information to the wrong device.
[0022] In one possible implementation, the driving device node includes a standard device node and a multi-connection control device node; wherein the standard device node is used to receive operation information sent by the first device, and the multi-connection control device node is used to transmit data between the second device and the third device.
[0023] In the embodiment of the present application, the data transmission function between smart devices can be realized by enumerating multi-connection control device nodes on the smart device.
[0024] In one possible implementation manner, the multi-connection control device node includes one or more extended functions.
[0025] In the embodiment of the present application, the user can arbitrarily select one or more extended functions from multiple extended functions, such as file copying, application screen projection, etc. This can improve the flexibility of function selection and thus improve the user experience.
[0026] One possible implementation method also includes:
[0027] In response to a detected first user operation, the first device obtains first operation information and sends the first operation information to a third device. The first operation information is used to cause the third device to obtain event information. The first operation may be, for example, a click-to-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.
[0028] In response to a 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 moves the first device close to the second device to re-establish the second channel with the second device.
[0029] In response to detecting a third user operation, the first device obtains second operation information and sends the second operation information to the second device; wherein the second operation information is used to cause the second device to request data from the third device based on the event information. The third operation can be clicking a paste function, thereby allowing the to-be-copied file to be pasted from the third device to the second device.
[0030] In a second aspect, an embodiment of the present application provides a cross-device connection apparatus, which is applied to a first device, wherein 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 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 device information of the second device, including:
[0031] A first establishing module, configured to establish a first connection between the first device and the third device;
[0032] a second establishing module, configured to establish a first channel between the first device and the third device on the first connection established between the first device and the third device;
[0033] A third establishing module, configured to establish a second channel between the first device and the third device;
[0034] A sending module, configured for the first device to send the device description information of the first device to the third device;
[0035] The connection module is used for the first device to receive 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 device information of the third device and the device information of the second device are used for data transmission between the third device and the second device.
[0036] In one possible implementation, the first connection is a Bluetooth pairing connection, the first channel is a Bluetooth universal attribute protocol channel, and the second channel is a human-computer interaction device channel carried on the universal attribute protocol.
[0037] In one possible implementation, the cross-device connection apparatus further includes:
[0038] The notification module is used 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.
[0039] In one possible implementation, the cross-device connection apparatus further includes:
[0040] The maintaining module is used to maintain the first connection and the first channel between the first device and the second device.
[0041] In one possible implementation, the cross-device connection apparatus further includes:
[0042] The determination module is used for the first device to determine the third device as the main connection device; wherein the main connection device is used to receive the operation information sent by the first device.
[0043] In one possible implementation, the driving device node includes a standard device node and a multi-connection control device node; wherein the standard device node is used to receive operation information sent by the first device, and the multi-connection control device node is used to transmit data between the second device and the third device.
[0044] In one possible implementation manner, the multi-connection control device node includes one or more extended functions.
[0045] In one possible implementation, the cross-device connection apparatus further includes:
[0046] A data transmission module is used to respond to a detected first operation of the user, so that the first device obtains first operation information and sends the first operation information to a third device; wherein the first operation information is used to enable the third device to obtain event information; in response to a detected second operation of the user, so that the first device establishes a second channel with the second device and disconnects the second channel with the third device; in response to a detected third operation of the user, so that the first device obtains second operation information and sends the second operation information to the second device; wherein the second operation information is used to enable the second device to request data from the third device based on the event information.
[0047] In a third aspect, an embodiment of the present application provides a first device, including:
[0048] A memory, wherein the memory is used to store computer program code, wherein the computer program code includes instructions, wherein a first connection has been established between a first device and a second device; a first channel and a second channel have been established between the first device and the second device; the first channel is used to configure a device type of the second device; the second channel is used to send 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 device information of the second device, and when the first device reads the instructions from the memory, the first device performs the following steps:
[0049] The first device establishes a first connection with the third device;
[0050] On the established first connection between the first device and the third device, the first device establishes a first channel with the third device;
[0051] The first device establishes a second channel with the third device;
[0052] The first device sends the device description information of the first device to the third device;
[0053] The first device receives 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 are used for data transmission between the third device and the second device.
[0054] In one possible implementation, the first connection is a Bluetooth pairing connection, the first channel is a Bluetooth universal attribute protocol channel, and the second channel is a human-computer interaction device channel carried on the universal attribute protocol.
[0055] In one possible implementation, when the instruction is executed by the electronic device, the electronic device executes the following steps after executing the step of establishing the first channel between the first device and the third device:
[0056] 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.
[0057] In one possible implementation, when the instruction is executed by the electronic device, the electronic device executes the following steps after executing the step of establishing the first channel between the first device and the third device:
[0058] The first device and the second device maintain a first connection and a first channel.
[0059] In one possible implementation, when the instruction is executed by the electronic device, the electronic device executes the following steps after executing the step of establishing the first channel between the first device and the third device:
[0060] The first device determines the third device as a primary connection device; wherein the primary connection device is used to receive operation information sent by the first device.
[0061] In one possible implementation, the driving device node includes a standard device node and a multi-connection control device node; wherein the standard device node is used to receive operation information sent by the first device, and the multi-connection control device node is used to transmit data between the second device and the third device.
[0062] In one possible implementation manner, the multi-connection control device node includes one or more extended functions.
[0063] In one possible implementation, when the instruction is executed by the electronic device, the electronic device further performs the following steps:
[0064] In response to a 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;
[0065] 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;
[0066] In response to the detected third operation of the user, the first device obtains second operation information and sends the second operation information to the second device; wherein the second operation information is used to enable the second device to request data from the third device based on the event information.
[0067] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer-readable storage medium is run on a computer, the computer executes the method described in the first aspect.
[0068] In a fifth aspect, an embodiment of the present application provides a computer program, which, when executed by a computer, is used to execute the method described in the first aspect.
[0069] In one possible design, the program in the fifth aspect may be stored in whole or in part on a storage medium packaged with the processor, or may be stored in whole or in part on a memory not packaged with the processor. BRIEF DESCRIPTION OF THE DRAWINGS
[0070] Figure 1 Schematic diagram of application scenarios provided by embodiments of the present application;
[0071] Figure 2 A schematic diagram of the software structure of the electronic device provided in an embodiment of the present application;
[0072] Figure 3 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application;
[0073] Figure 4 A flowchart of an embodiment of the cross-device connection method provided by this application;
[0074] Figure 5 A schematic diagram of an extended function selection interface provided in an embodiment of the present application;
[0075] Figure 6 This is a structural diagram of an embodiment of the cross-device connection apparatus provided in this application. DETAILED DESCRIPTION
[0076] The following describes the technical solutions in the embodiments of the present application in conjunction with the accompanying drawings. In the description of the embodiments of the present application, unless otherwise specified, " / " represents "or." For example, A / B can represent A or B. "And / or" in this document is merely a description of the association relationship between associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, or B exists alone.
[0077] In the following, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of this application, unless otherwise specified, "plurality" means two or more.
[0078] With the development of electronic technology and communication technology, users can now use more and more smart devices. For example, a user may own two laptops at the same time, or a laptop and a tablet computer at the same time. In the above scenario, the user may hope that the wireless accessory devices such as Bluetooth (for example, a mouse) that he uses can be shared among the above multiple smart devices to achieve boundary pairing connection and fast switching. Furthermore, the user also hopes to use the above wireless accessory devices to achieve convenient information transmission and data sharing among the above multiple smart devices.
[0079] However, current wireless accessory devices need to rely on cloud servers when achieving fast switching or data sharing between the above-mentioned multiple smart devices. That is to say, the wireless accessory devices and smart devices need to interact with the cloud server for information before the above-mentioned switching or data sharing can be achieved, which causes inconvenience to users and reduces the user experience. For example, when there is no Internet connection, the wireless accessory devices and smart devices cannot communicate with the cloud server, which will result in the wireless accessory devices being unable to achieve fast switching or data sharing between the above-mentioned multiple smart devices.
[0080] To address the above issues, embodiments of the present application provide a cross-device connection method, which is applied to a first device 10. The first device 10 may be a wireless accessory device, such as a mouse, keyboard, stylus, headset, game controller, remote control, interactive sensing gloves, speakers, or other multi-connection-capable devices. It should be understood that the above examples do not limit the embodiments of the present application. In some embodiments, the first device 10 may also be other types of wireless accessory devices.
[0081] Figure 1For the application scenario of the above cross-device connection method, such as Figure 1 As shown, 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 can be smart devices, such as mobile phones, tablet computers, computers with transceiver functions, laptop computers, virtual reality (VR) terminal devices, augmented reality (AR) terminal devices, wireless terminals in industrial control, wireless terminals in self-driving, wireless terminals in remote medical, wireless terminals in smart grids, wireless terminals in transportation safety, wireless terminals in smart cities, wireless terminals in smart homes, wearable devices, vehicle-mounted devices, etc. In addition, the above smart devices can be smart devices using software OS platforms such as Windows OS, Linux, Apple iOS / MacOS, and Android.
[0082] The first device 10 may be connected to the second device 20 and the third device 30 via a wired or wireless connection. The wired connection may include, for example, a USB connection, and the wireless connection may include, for example, Bluetooth, WIFI, UWB, NFC, and the like.
[0083] Next, combine Figure 2 The system framework of the second device 20 and the third device 30 is described. Taking the second device 20 as an example, Figure 2 As shown, the second device 20 includes a physical layer 21, a data link layer 22, a device driver layer 23 and an application layer 24.
[0084] The physical layer 21 is used to provide different types of communication interfaces, which can be an interface between an external device (e.g., the first device 10) and a smart device (e.g., the second device 20 or the third device 30). The communication interface can be wired (e.g., USB) or wireless (e.g., WIFI, Bluetooth, etc.).
[0085] The data link layer 22 may include drivers for standard protocols or private protocols, wherein the above-mentioned standard protocols may include, for example, driver protocols such as human-computer interaction devices (Human Interface Device, HID), and the above-mentioned private protocols may include driver protocols such as mobile broadband and home device management (Mobile Broadband&Home, Huawei IoT device management), or other forms of standard protocols or private protocols. This application does not specifically limit the drivers of the above-mentioned standard protocols or private protocols.
[0086] The device driver layer 23 can enumerate multiple driver devices of the external device (for example, the first device 10). The driver device can be a device driver interface based on the driver protocol in the data link layer 22 (for example, the HID protocol or the MBB protocol, etc.). Exemplarily, the driver device may include multiple driver devices such as a mouse, a keyboard, and a multi-connection control device. Among them, the device driver interface may include multiple types such as a mouse driver, a keyboard driver, and a multi-connection control device driver. The above-mentioned device driver interface can correspond one-to-one to the above-mentioned driver devices, that is, 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 the information interaction between the external device and the smart device, as well as the switching of the external device between the smart devices.
[0087] Exemplarily, when an external device enumerates its driver device in the device driver layer 23, multiple device driver interface types corresponding to the external device may be obtained, where the device driver interface types include at least the multi-connection control device driver type. For example, if the external device is a mouse, the mouse may obtain two device driver interface types: a mouse driver and a multi-connection control device driver. The mouse driver may be a standard device driver corresponding to the standard protocol (e.g., the HID protocol), while the multi-connection control device driver may be an extended device driver corresponding to the proprietary protocol (e.g., the MBB protocol). The device driver layer 23 may then enumerate a standard mouse corresponding to the standard device driver and an extended mouse corresponding to the extended device driver. The standard mouse may be a standard device based on the HID protocol, enabling standard mouse functions such as clicking, sliding, and dragging the cursor. The extended mouse may be an extended device based on the MBB protocol, enabling information exchange between the mouse and a smart device, for example, copying a file from one smart device to another. That is, when the mouse device performs driver device enumeration, 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.
[0088] The application layer 24 can be used to provide a variety of applications, which can be commonly used functional applications or customized functional applications. Among them, the commonly used functional applications can include file copying, NFC touch and other applications. The customized functional applications can include device discovery, data transmission between multiple devices, mouse crossing, application projection and other applications. For example, through the file copy application, files in smart device A can be copied to smart device B. It can be understood that the applications in the commonly used functional applications and customized functional applications are only exemplary descriptions and do not constitute a limitation on the embodiments of the present application. In some embodiments, other applications may also be included.
[0089] The following combination Figure 3 First, an exemplary electronic device provided in the following embodiments of the present application is introduced. Figure 3 A structural diagram of an electronic device 100 is shown, and the electronic device 100 may be the first device 10 mentioned above.
[0090] The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. 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, a bone conduction sensor 180M, etc.
[0091] It should be understood that the structure illustrated in the embodiments of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0092] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors.
[0093] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.
[0094] Processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 110. If processor 110 needs to use the same instruction or data again, it can directly access the memory. This avoids duplicate accesses, reduces processor 110 latency, and thus improves system efficiency.
[0095] In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface.
[0096] The USB interface 130 is an interface that complies with USB standards and may be a Mini USB interface, a Micro USB interface, a USB Type-C interface, or the like. The USB interface 130 can be used to connect a charger to charge the electronic device 100, or to transfer data between the electronic device 100 and peripheral devices. It can also be used to connect headphones to play audio. This interface can also be used to connect other electronic devices, such as augmented reality devices.
[0097] It is understood that the interface connection relationship between the modules illustrated in the embodiment of the present invention is merely an illustrative illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods from the above embodiments, or a combination of multiple interface connection methods.
[0098] The charging management module 140 is configured to receive charging input from a charger. The charger can be either a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 can receive charging input from the wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 can receive wireless charging input via the wireless charging coil of the electronic device 100. While charging the battery 142, the charging management module 140 can also provide power to the electronic device via the power management module 141.
[0099] The power management module 141 is used to connect the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and provides power to the processor 110, the internal memory 121, the display 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 count, and battery health status (leakage, impedance). In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.
[0100] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
[0101] Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In other embodiments, the antennas can be used in conjunction with a tuning switch.
[0102] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.
[0103] The modem processor may include a modulator and a demodulator. The modulator is used to modulate 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. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After being processed by the baseband processor, the low-frequency baseband signal is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.) or displays an image or video through the display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.
[0104] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can 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 for radiation through the antenna 2.
[0105] In some embodiments, 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 (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, and / or IR technology. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).
[0106] Electronic device 100 implements display functionality through a GPU, display screen 194, and an application processor. A GPU is a microprocessor for image processing that connects display screen 194 and the application processor. The GPU is 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 modify display information.
[0107] Display screen 194 is used to display images, videos, and the like. 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 (AMOLED), a flexible light-emitting diode (FLED), a MiniLED, a MicroLED, a Micro-oLed, or a quantum dot light-emitting diode (QLED). In some embodiments, electronic device 100 may include one or N display screens 194, where N is a positive integer greater than one.
[0108] The electronic device 100 can implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor.
[0109] The ISP processes data fed back by camera 193. For example, when taking a photo, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, which is then passed to the ISP for processing and converted into a visible image. The ISP can also perform algorithmic optimization on image noise, brightness, and skin tone. It can also optimize parameters such as exposure and color temperature of the captured scene. In some embodiments, the ISP can be located within camera 193.
[0110] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, and then passes the electrical signal to the ISP for conversion into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.
[0111] The digital signal processor is used to process digital signals. In addition to processing digital image signals, it 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 frequency point energy.
[0112] Video codecs are used to compress or decompress digital video. Electronic device 100 may support one or more video codecs. This allows electronic device 100 to play or record videos in various encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, and MPEG4.
[0113] The NPU is a neural network (NN) computing processor. Drawing on the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it rapidly processes input information and can continuously self-learn. The NPU can enable intelligent cognitive applications in electronic device 100, such as image recognition, face recognition, speech recognition, and text comprehension.
[0114] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 via the external memory interface 120 to implement data storage functions. For example, files such as music and videos can be stored on the external memory card.
[0115] The internal memory 121 can be used to store computer executable program codes, which include instructions. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, 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 disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 110 executes various functional applications and data processing of the electronic device 100 by running instructions stored in the internal memory 121 and / or instructions stored in a memory provided in the processor.
[0116] The electronic device 100 can implement audio functions such as music playback and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
[0117] 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 signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be provided in the processor 110, or some functional modules of the audio module 170 can be provided in the processor 110.
[0118] The speaker 170A, also called a "speaker", is used to convert audio electrical signals into sound signals. The electronic device 100 can listen to music or listen to hands-free calls through the speaker 170A.
[0119] The receiver 170B, also called a "handset", is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or a voice message, the user can place the receiver 170B close to the ear to hear the voice.
[0120] Microphone 170C, also known as "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to the microphone 170C to input the sound signal into the microphone 170C. The electronic device 100 can be provided with at least one microphone 170C. In other embodiments, the electronic device 100 can be provided with two microphones 170C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify the source of sound, realize directional recording function, etc.
[0121] The headphone jack 170D is used to connect a wired headphone and can be the 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.
[0122] The buttons 190 include a power button, a volume button, and the like. The buttons 190 may be mechanical buttons or touch buttons. The electronic device 100 may receive key inputs and generate key signal inputs related to user settings and function control of the electronic device 100.
[0123] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 194, motor 191 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.
[0124] The indicator 192 may be an indicator light, which may be used to indicate the charging status, power level changes, messages, missed calls, notifications, etc.
[0125] The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to or disconnected from the electronic device 100 by inserting it into or removing it from the SIM card interface 195. The electronic device 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, and the like. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards can be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as calls and data communications. In some embodiments, the electronic device 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
[0126] Figure 4 A flowchart of an embodiment of a cross-device connection method provided in an embodiment of the present application includes:
[0127] Step 401: The first device 10 is connected to the second device 20.
[0128] Specifically, the first device 10 can be connected to the second device 20 via a wireless method. The wireless method may include Bluetooth (BT), thereby achieving Bluetooth pairing connection between the first device 10 and the second device 20. In a specific implementation, when the first device 10 is paired with the second device 20 via Bluetooth, the first device 10 can perform Bluetooth pairing with the second device 20 in the following two ways.
[0129] Method 1
[0130] The first device 10 can be close to the second device 20 and can allow the second device 20 to discover the first device 10 through a Bluetooth broadcast message in the first device 10. When 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.
[0131] Method 2
[0132] 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. As a result, the first device 10 can discover the second device 20 through the Bluetooth MAC address and further perform Bluetooth pairing with the second device 20. In a specific implementation, when performing Bluetooth pairing and connection through the above-mentioned NFC touch method, the first device 10 can actively discover the Bluetooth MAC address of the second device 20 through proximity sensing. For example, the first device 10 can be configured with an NFC / UWB reader, and the second device 20 can be configured with an NFC tag / UWB radio frequency card.
[0133] Optionally, 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 enabling the second device 20 to discover the first device 10 and further perform Bluetooth pairing with the first device 10. In a specific implementation, when performing Bluetooth pairing connection through the above-mentioned NFC touch method, the first device 10 may use proximity sensing to enable the second device 20 to actively discover the Bluetooth MAC address of the first device 10. For example, the first device 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 method for establishing a Bluetooth pairing connection between the above-mentioned first device 10 and the second device 20.
[0134] In addition, it should be noted that when the first device 10 and the second device 20 establish a Bluetooth pairing connection, authentication / key exchange, authentication and other operations can also be completed between the first device 10 and the second device 20. For details, please refer to the Bluetooth protocol of the relevant standard organization, which will not be repeated here.
[0135] In step 402 , the first device 10 establishes a Bluetooth GATT channel with the second device 20 .
[0136] Specifically, after the first device 10 establishes a Bluetooth pairing connection with the second device 20, the first device 10 may also establish a Bluetooth Generic Attributes Profile (GATT) channel with the second device 20 based on the Bluetooth pairing connection. The Bluetooth GATT channel can be used to exchange information between low-power Bluetooth devices. For example, the device type of the second device 20 can be configured through the Bluetooth GATT channel. The device type may include a primary connection type and a non-primary connection type. The device corresponding to the primary connection type may be a primary connection device, and the device corresponding to the non-primary connection type may be a non-primary connection device. The primary connection device may be a device that has established a HID Over Gatt Profile (HOGP) connection channel carried on the GATT protocol with the first device 10, and the non-primary connection device may be a device that has not established a HOGP channel with the first device 10. It will be understood that the primary connection device can receive operation information such as clicks, scrolling, and dragging of the first device 10 and can perform operations corresponding to the operation information. The HOGP channel is described in detail below and will not be repeated here.
[0137] 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 the primary connection device. It is understood that the Bluetooth GATT is a short message configuration management protocol in the Bluetooth protocol. If a different wireless protocol is used, the protocol name of the Bluetooth GATT may be different, but this does not constitute a limitation of the embodiments of the present application.
[0138] Step 403 : The first device 10 establishes an HOGP channel with the second device 20 .
[0139] Specifically, after the first device 10 successfully establishes a Bluetooth GATT channel with the second device 20, it can 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, thereby creating a corresponding driver device node on the second device 20. The above-mentioned device description information can be information related to the enumerated driver devices in the first device 10. Exemplarily, the first device 10 can enumerate multiple driver devices, which can include standard devices and extended devices (for example, multi-connection control devices). Then, the first device 10 can send the above-mentioned device description information to the second device 20, thereby allowing the second device 20 to create a corresponding driver device node based on the relevant information of the above-mentioned driver devices. That is, after the first device 10 establishes the HOGP channel with the second device 20, the first device 10 can send the description information of its driver device to the second device 20. When the second device 20 receives the description information of the driver device sent by the first device 10, it can create the driver device node of the first device 10 based on the device description information of the first device 10, that is, the standard device node and extended device node of the first device 10.
[0140] It is understood that the above-mentioned standard device node can be a logical device for receiving operation information such as click, scroll, and drag from the first device 10. The standard device node can be based on a standard protocol such as HID, and the standard device node can use a standard driver interface (for example, a mouse driver, a keyboard driver, etc.). The above-mentioned extension device can be a logical device for exchanging information with the first device 10 and for implementing information sharing between the second device 20 and the third device 30. The extension device node can be based on a private protocol such as MBB, and the extension device node can use an extension driver interface (for example, a multi-connection control driver).
[0141] Step 404 : The second device 20 sends device information to the first device 10 .
[0142] Specifically, when the first device 10 and the second device 20 establish the above-mentioned HOGP channel and the second device 20 has created the driver device node of the first device 10, the second device 20 can send the device information of the second device 20 to the first device 10. In a specific implementation, the second device 20 can send the device information of the second device 20 to the first device 10 through the above-mentioned extended driver interface. After the first device 10 receives the device information sent by the second device 20, it can store the device information of the second device 20. The device information of the second device 20 may include the device identifier of the second device 20 (for example, the device identifier may be a MAC address) and / or network port IP information.
[0143] Step 405 : The first device 10 establishes a connection with the third device 30 .
[0144] Specifically, the first device 10 may initiate a connection request to the third device 30 to establish a connection with the third device 30. In a specific implementation, the first device 10 may establish a Bluetooth pairing connection with the third device 30 through Bluetooth pairing. For example, the third device 30 may be provided with an NFC tag, which 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. When the user holds the first device 10 close to the NFC tag of the third device 30, the first device 10 may read the Bluetooth MAC address in the NFC tag of the third device 30 through NFC induction, thereby enabling the first device 10 to establish a Bluetooth pairing connection with the third device 30.
[0145] Optionally, the NFC tag of the third device 30 may also include relevant information such as the device serial number (SN) and device model of the third device 30 .
[0146] Step 406 : The first device 10 establishes a Bluetooth GATT channel with the third device 30 .
[0147] Specifically, after the first device 10 establishes a Bluetooth pairing connection with the third device 30, the first device 10 can also establish a Bluetooth GATT channel with the third device 30. When the above-mentioned Bluetooth GATT channel is successfully established, the first device 10 can set the above-mentioned third device 30 as the main connection device. At this time, 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 connection device to the non-main connection device, and can cut off the HOGP connection channel between the first device 10 and the second device 20, thereby preventing the second device 20 from receiving the operation information of the first device 10. That is, at this time, only the third device 30 can receive the operation information reported by the first device 10, and can perform corresponding operations based on the above-mentioned operation information. Taking the first device 10 as a mouse as an example, the operation information reported by the first device 10 can be information such as button clicks and wheel scrolling.
[0148] It can be understood that when the second device 20 receives the switching notification sent by the above-mentioned first device 10, it changes to a non-main connection device and can cut off the HOGP connection channel between the second device 20 and the first device 10, but can maintain the Bluetooth pairing connection and GATT channel between the first device 10, so that when the first device 10 switches back to the second device 20 later, there is no need to perform Bluetooth pairing and establish a GATT channel again, thereby improving the switching efficiency.
[0149] Step 407 : The first device 10 establishes a HOGP channel with the third device 30 .
[0150] Specifically, after the first device 10 and the third device 30 successfully establish a GATT channel, the first device 10 and the third device 30 can also establish an HOGP channel. At this time, the third device 30, as the primary connection device, can receive operation information from the first device 10, thereby enabling the third device 30 to perform corresponding operations based on the received operation information.
[0151] In step 408 , the first device 10 obtains device description information and sends the device description information to the third device 30 .
[0152] Specifically, the first device 10 can obtain device description information, wherein the device description information may include relevant information of the driver device enumerated by the first device 10 (for example, the enumerated driver device type). The type of the driver 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, thereby enabling the third device 30 to 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, thereby enabling data transmission between the third device 30 and the second device 20 through information interaction with the first device 10.
[0153] Next, the first device 10 may send the device description information to the third device 30 .
[0154] In step 409 , the third device 30 receives the device description information sent by the first device 10 and creates a driver device node according to the device description information.
[0155] Specifically, after the third device 30 receives the device description information sent by the first device 10, it can create a corresponding driver device node based on the device description information. For example, when the third device 30 receives the relevant information of the standard device sent by the first device 10, it can create a corresponding standard device node and load a corresponding driver (for example, a standard device driver) for the standard device node. At this time, the third device 30 can receive the operation information sent by the first device 10 through the standard device node.
[0156] When the third device 30 receives the relevant information of the expansion device sent by the first device 10, it can create a corresponding expansion device node (for example, a multi-connection control device node) and load the corresponding driver for the expansion device node, that is, the expansion device driver (for example, a multi-connection control device driver).
[0157] Furthermore, when the third device 30 creates the above-mentioned extended device node, it can also set the corresponding extended function for the extended device node to be created. Exemplarily, when the third device 30 receives the relevant information of the extended device sent by the first device 10 (for example, the extended device type), a function authorization window can pop up on the display interface of the third device 30. Among them, 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 make the selected extended function take effect. After the user selects the corresponding extended function option, the extended device node is created in the third device 30, and the extended device node can have the above-mentioned extended function selected by the user.
[0158] Now combined Figure 5 For example, Figure 5 As shown, interface 500 is a display interface including a function authorization window 501 and a standard device node 502. Function authorization window 501 includes an information sharing function option 5011 and an application screen projection function option 5012. When the user checks the information sharing function option 5011, an extended device node 503 can be created, thereby obtaining an interface 510 including the standard device node 502 and the extended device node 503, wherein the extended device node 503 can have an information sharing function.
[0159] It should be noted that, in some embodiments, the above-mentioned standard device node and the extended device node may also be the same device node, and the embodiment of the present application does not impose any special limitation on the number of device nodes created by the third device 30.
[0160] In step 410 , the third device 30 sends device information of the third device 30 to the first device 10 .
[0161] Specifically, after the third device 30 successfully creates the above-mentioned extended device node, it can send the device information of the third device 30 to the first device 10 through the extended device node. The device information of the third device 30 may include information such as the MAC address and / or network port IP of the third device 30.
[0162] In 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 .
[0163] Specifically, since the primary connection device connected to the first device 10 has changed, for example, the primary connection device has changed from the second device 20 to the third device 30. At this time, the first device 10 can send the device information of the changed primary connection device (for example, the third device 30) to the primary connection device before the change (for example, the second device 20), thereby enabling the third device 30 and the second device 20 to interact based on each other's device information.
[0164] In step 412 , the first device 10 sends the device information of the second device 20 to the third device 30 .
[0165] Specifically, the first device 10 may send the device information of the second device 20 pre-stored in step 404 to the third device 30 , thereby enabling the third device 30 and the second device 20 to interact based on each other's device information.
[0166] It is understandable that this step 412 can be executed simultaneously with step 411, can be executed before step 411, and can also be executed after step 411. That is, the execution order of this step 412 and step 411 can be in no particular order.
[0167] In 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 .
[0168] In some embodiments, data transmission can be understood as data interaction between a third device and a second device through a network, for example, the second device sends information to the third device, and the third device sends information to the second device; the network can be a Bluetooth network, a WIFI network (such as a P2P network or a network via a third terminal), etc., which can be a device interaction form that can perform data transmission. This application does not limit this.
[0169] Specifically, 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 data transmission based on a local area network (LAN) or data transmission based on a wide area network. The embodiment of the present application does not specifically limit the method of data transmission between the above-mentioned devices. In specific implementation, the third device 30 can adopt a preset interaction rule. For example, the above-mentioned preset interaction rule can be: the device with the smaller MAC address of the two devices can serve as the server, and the device with the larger MAC address can serve as the client. At this time, if the MAC address of the third device 30 is smaller than the MAC address of the second device 20, the third device 30 can create a Socket server and can monitor the corresponding transport layer (for example, TCP or UDP layer) port to establish a data transmission relationship with the second device 20. The protocol corresponding to the Socket connection can be a standard protocol such as DLNA, or a private protocol such as Huawei Cast+, and the embodiment of the present application does not limit this.
[0170] Optionally, if the MAC address of the third device 30 is larger than the MAC address of the second device 20, the third device 30 can act as a client and can initiate data transmission with the second device 20. At this time, the third device 30 (that is, the client) can 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). It is understandable that if the device information contains network port IP information, the above-mentioned IP address can be obtained through the above-mentioned network port IP information. If the device information only contains a MAC address, the above-mentioned IP address can also be obtained by querying the Address Resolution Protocol (ARP) table locally through the MAC address in the device information. The embodiment of the present application does not specifically limit the above-mentioned method of obtaining the IP address. It is understandable that if the third device 30 fails to connect to the second device 20 for the first time, it can try to connect multiple times until the connection is successful. If the third device 30 is successfully connected to the second device 20, it means that the data transmission relationship between the second device 20 and the third device 30 is successful. At this time, the second device 20 and the third device 30 can further exchange information or share data.
[0171] In 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 .
[0172] Specifically, after the second device 20 receives the device information of the third device 30 sent by the first device 10, it can transmit data with the third device 30. In the specific implementation, taking the interaction rules preset in step 413 as an example, if the third device 30 is a Socket server, the second device 20 can act as a client. At this time, the second device 20 can try to use the IP address in the device information of the third device 30 to connect to the third device 30. If the third device 30 is a client, the second device 20 can act as a server. At this time, the second device 20 can create a Socket server and can listen to the corresponding transport layer (for example, TCP or UDP layer) port to establish a data transmission relationship with the third device 30.
[0173] 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, the second device 20 and the third device 30 can further perform information exchange or data sharing.
[0174] Step 415: In response to the user's first operation, the third device 30 obtains event information.
[0175] Specifically, the user can perform operations on the first device 10, for example, the user can click, slide, and perform other operations on the first device 10. In response to the detected user operation, the first device 10 obtains operation information and can report the operation information to the third device 30. After the third device 30 receives the operation information reported by the first device 10, it can perform an operation corresponding to the operation information. For example, taking file copying as an example, the user can use the first device 10 to click the copy function option on any file in the third device 30 to copy the file. In response to the user's copy operation, the file copy application in the application layer of the third device 30 listens to the above-mentioned user's copy operation and obtains event information corresponding to the above-mentioned copy operation (for example, the source path and file name of the file to be copied).
[0176] In step 416 , the third device 30 sends the event information to the second device 20 .
[0177] Specifically, after the third device 30 obtains the event information, it can synchronize the event information to the second device 20. For example, the third device 30 can send the event information to the second device 20. Taking file copying as an example, the event information can include the source path and file name of the file to be copied.
[0178] Step 417 : In response to the second operation of the user, the first device 10 switches the primary connection device from the third device 30 to the second device 20 .
[0179] Specifically, after the user completes the copy operation on the third device 30, the user can move 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 allowing the user to operate on the third device 30 through the first device 10, and thus complete the file copy task. For example, 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. In response to the user's second operation, since the first device 10 and the second device 20 have established a Bluetooth pairing connection and a GATT channel, at this time, the first device 10 can further establish an HOGP channel with the second device 20, thereby allowing the first device 10 to switch 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.
[0180] Step 418 : In response to the user's third operation, the second device 20 requests the third device 30 to transmit data.
[0181] Specifically, after the first device 10 establishes an HOGP channel with the second device 20 and sets the second device 20 as the primary connected device, the user can further perform operations on the first device 10. For example, the user can right-click in any folder directory on the second device 20 to pop up a menu bar and click the Paste function option in the menu bar to perform a paste operation. The file copy application of the second device 20 monitors the user's paste operation, obtains the event information sent by the third device 30 to the second device 20 in step 416, and can request the third device 30 to transfer the file to be copied to the folder directory on the second device 20 according to the event information. In response to the user's third operation, the second device 20 can send a file transfer request to the third device 30 via the data transmission channel established in steps 413 and 414. 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, which can be used to identify the storage path (e.g., a folder directory) of the file to be copied in the second device 20. Optionally, the file transfer request may also include event information. When the third device 30 receives the file transfer request sent by the second device 20, the file to be copied may be transferred to the third device 30 through the data transmission channel.
[0182] It can be understood that in the above embodiment, steps 401 to 418 are all optional steps. This application only provides a feasible embodiment, which may also include more or fewer steps than steps 401 to 418. This application does not limit this.
[0183] It should be noted that the above embodiment only exemplifies the connection between the first device 10 and the second device 20 and the third device 30 by wireless means such as Bluetooth, but is not limited to the above wireless means such as Bluetooth. In some embodiments, the connection between the first device 10 and the second device 20 and the third device 30 can also be established by wired means such as USB.
[0184] Furthermore, to ensure data transmission security, data transmission between the first device 10 and the second device 20 and the third device 30 may utilize a preset encryption and decryption mechanism. However, this is not limited to whether or not an encryption and decryption mechanism is used, nor is it limited to which encryption and decryption mechanism is used. In other words, whether or not an encryption and decryption mechanism is used, or which encryption and decryption mechanism is used, may be determined based on the security capabilities supported by the physical interface standards of the aforementioned devices.
[0185] The following describes a file copy scenario using the example of a first device 10 being a Bluetooth mouse, a second device 20 being a tablet (e.g., a PAD), and a third device 30 being a laptop (e.g., a PC). The Bluetooth mouse can be configured with an NFC reader, and the laptop and tablet can be configured with NFC tags.
[0186] First, the Bluetooth mouse can be paired with the tablet via Bluetooth. After establishing a Bluetooth connection with the tablet, a Bluetooth GATT channel and a HOGP channel are further established with the tablet. At this point, the tablet is the primary connection device of the Bluetooth mouse. In addition, the tablet can also send the tablet's device information to the Bluetooth mouse, so that the Bluetooth mouse can store the tablet's device information.
[0187] Next, the Bluetooth mouse can be brought close to the laptop computer so that the NFC reader of the Bluetooth mouse can read the Bluetooth MAC address in the NFC tag on the laptop computer, thereby initiating Bluetooth pairing with the laptop computer based on the Bluetooth MAC address.
[0188] After the Bluetooth mouse establishes a Bluetooth pairing connection with the laptop, it can further establish a GATT channel with the laptop and set the laptop as the primary device. At this point, the Bluetooth mouse can set the tablet as a non-primary device and disconnect the HOGP channel with the tablet, but it can still maintain a GATT channel with the tablet.
[0189] Then, the Bluetooth mouse can further establish a HOGP channel with the laptop. At this point, multiple logical device nodes of the Bluetooth mouse can be generated on the laptop. Among them, the above-mentioned logical device nodes can be standard device nodes and multi-connection control device nodes. The above-mentioned standard device nodes and multi-connection control device nodes can be obtained through the driver device types enumerated by the Bluetooth mouse. For example, the Bluetooth mouse can enumerate two driver device types, Bluetooth mouse type and multi-connection control mouse type. Among them, the Bluetooth mouse type can be used to generate a standard device node on the laptop, through which the laptop can be used to receive the operation information reported by the Bluetooth mouse; the multi-connection control mouse type can be used to generate a multi-connection control device node on the laptop, through which the information interaction between the Bluetooth mouse and the laptop can be realized, and then the information sharing between the laptop and the tablet can be completed.
[0190] Optionally, when the Bluetooth mouse enumerates the multi-connection control device node, an authorization request window may pop up on the laptop. This authorization request window may include multiple extended function options, such as whether information sharing is permitted. The user can select one of these extended function options to confirm that the extended function is enabled. Once the user confirms the extended function, the laptop generates a corresponding multi-connection control device node and mounts the corresponding driver. At this point, the multi-connection control device node has the extended function selected by the user.
[0191] After the laptop generates the above-mentioned multi-connection control device node, it can also send the laptop's device information to the Bluetooth mouse, thereby allowing the Bluetooth mouse to forward the laptop's device information to the tablet computer, and further allowing the Bluetooth mouse to send the stored tablet computer device information to the laptop.
[0192] After the laptop receives the device information of the tablet, it can perform data transmission with the tablet. Taking the laptop as the server as an example, the laptop can create a Socket server and listen to the corresponding transport layer port, thereby completing the data transmission between the laptop and the tablet.
[0193] After receiving the laptop's device information, the tablet can interact with the laptop. It's understandable that if the laptop is the server, the tablet is the client; if the laptop is the client, the tablet is the server. For example, if the tablet is the client, the tablet can obtain the IP address in the laptop's device information and attempt to connect to the laptop based on that IP address, thereby establishing data transmission between the laptop and the tablet.
[0194] Furthermore, the user can copy a file on the laptop computer through the Bluetooth mouse. Then, the user can touch the Bluetooth mouse to the NFC tag of the tablet computer, thereby establishing a HOGP channel between the Bluetooth mouse and the tablet computer. At this time, the main connection device of the Bluetooth mouse is switched from the laptop computer to the tablet computer, that is, the laptop 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 laptop computer, and the tablet computer can receive the operation information of the Bluetooth mouse. Then, the user can perform a paste operation on the tablet computer through the Bluetooth mouse. For example, the user can execute the paste function in any folder directory on the tablet computer, thereby pasting the file copied on the laptop computer to the tablet computer to complete data sharing between devices.
[0195] It is understandable that the above examples only illustrate the scenario of file copying and do not constitute a limitation on the embodiments of the present application. In some embodiments, they can also be applied to other data sharing scenarios.
[0196] Figure 6 This is a structural diagram of an embodiment of the cross-device connection device of the present application, such as Figure 6 As shown, 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 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, and can 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,
[0197] A first establishing module 61 is configured to establish a first connection between the first device and the third device;
[0198] A second establishing module 62 is configured to establish a first channel between the first device and the third device based on the established first connection between the first device and the third device;
[0199] A third establishing module 63 is configured to establish a second channel between the first device and the third device;
[0200] A sending module 64, configured for the first device to send the device description information of the first device to the third device;
[0201] The connection module 65 is used for the first device to receive 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 device information of the third device and the device information of the second device are used for data transmission between the third device and the second device.
[0202] In one possible implementation, the first connection is a Bluetooth pairing connection, the first channel is a Bluetooth universal attribute protocol channel, and the second channel is a human-computer interaction device channel carried on the universal attribute protocol.
[0203] In one possible implementation, the cross-device connection apparatus 60 further includes a notification module 66; wherein,
[0204] 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.
[0205] In one possible implementation, the cross-device connection apparatus 60 further includes: a holding module 67; wherein,
[0206] The maintaining module 67 is used to maintain the first connection and the first channel between the first device and the second device.
[0207] In one possible implementation, the cross-device connection apparatus 60 further includes: a determination module 68; wherein,
[0208] The determination module 68 is configured for the first device to determine the third device as the primary connection device; wherein the primary connection device is configured to receive operation information sent by the first device.
[0209] In one possible implementation, the driving device node includes a standard device node and a multi-connection control device node; wherein the standard device node is used to receive operation information sent by the first device, and the multi-connection control device node is used to transmit data between the second device and the third device.
[0210] In one possible implementation manner, the multi-connection control device node includes one or more extended functions.
[0211] In one possible implementation, the cross-device connection apparatus 60 further includes: a data transmission module 69; wherein,
[0212] The data transmission module 69 is used to respond to a detected first operation of the user, so that 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; respond to a detected second operation of the user, so that the first device establishes a second channel with the second device and disconnects the second channel with the third device; respond to a detected third operation of the user, so that the first device obtains second operation information and sends the second operation information to the second device; wherein the second operation information is used to enable the second device to request data from the third device based on the event information.
[0213] Figure 6The cross-device connection device 60 provided in the embodiment shown can be used to execute the present application Figure 1-Figure 5 The technical solution of the method embodiment shown, its implementation principle and technical effects can be further referred to the relevant description in the method embodiment.
[0214] It should be understood that the above Figure 6 The division of the various modules of the cross-device connection device 60 shown is only a division of logical functions. In actual implementation, they can be fully or partially integrated into one physical entity, or they can be physically separated. And these modules can all be implemented in the form of software calling through processing elements; they can also all be implemented in the form of hardware; some modules can also be implemented in the form of software calling through processing elements, and some modules can be implemented in the form of hardware. For example, the detection module can be a separately established processing element, or it can be integrated in a chip of an electronic device. The implementation of other modules is similar. In addition, all or part of these modules can be integrated together, or they can be implemented independently. During the implementation process, each step of the above method or each of the above modules can be completed by the hardware integrated logic circuit in the processor element or the instructions in the form of software.
[0215] For example, the above modules may be one or more integrated circuits configured to implement the above methods, such as one or more application-specific integrated circuits (ASICs), one or more microprocessors (DSPs), or one or more field programmable gate arrays (FPGAs). For another example, these modules may be integrated together to implement a system-on-a-chip (SOC).
[0216] It is understood that the interface connection relationship between the modules illustrated in the embodiments of the present application is merely an illustrative illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods from the above embodiments, or a combination of multiple interface connection methods.
[0217] It is understandable that, in order to realize the above functions, the above-mentioned electronic devices and the like include hardware structures and / or software modules corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the embodiments of the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the embodiments of the present application.
[0218] The embodiment of the present application can divide the functional modules of the above-mentioned electronic device etc. according to the above-mentioned method example. For example, each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of software functional 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. There may be other division methods in actual implementation.
[0219] Through the description of the above embodiments, those skilled in the art will clearly understand that for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. The specific working processes of the above-described systems, devices, and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0220] The functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0221] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, 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 medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as flash memory, mobile hard disk, read-only memory, random access memory, magnetic disk or optical disk.
[0222] The above is only a specific embodiment of the present application, but the scope of protection of this application is not limited to this. Any changes or substitutions within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
Claims
1. A cross-device connection method, applied to a first device, characterized in that: A first connection has been established between the first device and the second device; a first channel and a second channel have been established between the first device and the second device; the first channel is used to configure a device type of the second device; The second channel is used to send 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 device information of the second device, and the method includes: The first device establishes the first connection with the third device; On the established first connection between the first device and the third device, the first device establishes the first channel with 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 first device establishes the second 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 are used for data transmission between the third device and the second device; In response to a 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; In response to a detected second operation of the user, the first device establishes the 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 obtains second operation information and sends the second operation information to the second device; wherein the second operation information is used to enable the second device to request data from the third device based on the event information.
2. The method according to claim 1, characterized in that The first connection is a Bluetooth pairing connection, the first channel is a Bluetooth universal attribute protocol channel, and the second channel is a human-computer interaction device channel carried on the universal attribute protocol.
3. The method according to claim 1, characterized in that After the first device establishes the first channel with the third device, the method further includes: The first connection and the first channel are maintained between the first device and the second device.
4. The method according to claim 1, wherein After the first device establishes the first channel with the third device, the method further includes: The first device determines the third device as a primary connection device; wherein the primary connection device is used to receive operation information sent by the first device.
5. The method according to claim 1, wherein The driving device node includes a standard device node and a multi-connection control device node; wherein the standard device node is used to receive operation information sent by the first device, and the multi-connection control device node is used to transmit data between the second device and the third device.
6. The method according to claim 5, characterized in that The multi-connection control device node includes one or more extended functions.
7. A first device, characterized in that: include: A memory, wherein the memory is used to store computer program code, wherein the computer program code includes instructions, and when the first device reads the instructions from the memory, the first device executes the method according to any one of claims 1 to 6.
8. A computer-readable storage medium, characterized in that The method comprises computer instructions, which, when executed on the first device, cause the first device to execute the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Resource sharing device
CN102135810A
Handwriting pen connection method and Bluetooth system
CN113115294A