CN115884140A - Cross-device connection method, electronic device, and storage medium - Google Patents

Cross-device connection method, electronic device, and storage medium Download PDF

Info

Publication number
CN115884140A
CN115884140A CN202111148202.7A CN202111148202A CN115884140A CN 115884140 A CN115884140 A CN 115884140A CN 202111148202 A CN202111148202 A CN 202111148202A CN 115884140 A CN115884140 A CN 115884140A
Authority
CN
China
Prior art keywords
equipment
channel
information
connection
bluetooth
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111148202.7A
Other languages
Chinese (zh)
Inventor
梁乾灯
牟洋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202111148202.7A priority Critical patent/CN115884140A/en
Priority to PCT/CN2022/117546 priority patent/WO2023051204A1/en
Publication of CN115884140A publication Critical patent/CN115884140A/en
Pending legal-status Critical Current

Links

Images

Classifications

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

Abstract

The embodiment of the application provides a cross-device connection method, electronic equipment and a storage medium, which relate to the technical field of communication, and the method comprises the following steps: the method comprises the steps that first connection is established between first equipment and third equipment; on the established first connection between the first device and the third device, the first device and the third device establish a first channel; the first equipment and the third equipment establish a second channel; the first equipment sends the equipment description information of the first equipment to the third equipment; the first equipment receives equipment information sent by the third equipment, sends the equipment information sent by the third equipment to the second equipment, and sends the equipment information of the second equipment to the third equipment; and the equipment information of the third equipment and the equipment information of the second equipment are used for data transmission between the third equipment and the second equipment. The method provided by the embodiment of the application can effectively complete the switching of the wireless accessory equipment among the plurality of intelligent equipment, so that the data transmission among the plurality of intelligent equipment can be completed.

Description

Cross-device connection method, electronic device, and storage medium
Technical Field
The embodiment of the application relates to the technical field of communication, in particular to a cross-device connection method, electronic equipment and a storage medium.
Background
With the development of electronic technology and communication technology, more and more intelligent devices are available for users. For example, a user may have two laptops at the same time, or one laptop and one tablet at the same time. Under the scene, a wireless accessory device (such as a mouse) such as bluetooth which a user may wish to use by himself can be shared among the plurality of intelligent devices, so that boundary pairing connection and quick switching are achieved. Further, it is desirable for a user to utilize the wireless accessory device to facilitate information transfer and data sharing between the plurality of smart devices.
However, when the current wireless accessory device is switched or data shared between the plurality of intelligent devices, the cloud server needs to be relied on, that is, the wireless accessory device and the intelligent device can be switched or data shared after information interaction with the cloud server is required, which causes inconvenience to users and reduces user experience.
Disclosure of Invention
The embodiment of the application provides a cross-device connection method, electronic equipment and a storage medium, and provides a cross-device connection mode, so that switching of wireless accessory equipment among a plurality of intelligent equipment can be effectively completed, and data transmission among the intelligent equipment can be completed.
In a first aspect, an embodiment of the present application provides a cross-device connection method, which is applied to a first device, where the first device and a second device have already established a first connection; the first device and the second device establish a first channel and a second channel; the first channel is used for configuring the device type of the second device; the second channel is used for sending the device description information of the first device, and the device description information is used for creating a driving device node; the first device has stored device information of the second device, including:
the first device establishes a first connection with a third device; wherein the first device may be a wireless accessory device, such as a bluetooth mouse. The second device and the third device may be smart terminal devices, such as tablets, computers, televisions, and the like. The first connection may be a wireless connection or a wired connection.
On the established first connection between the first device and the third device, the first device and the third device establish a first channel; wherein the first channel may be a communication protocol channel corresponding to the first connection, for example, a bluetooth generic attribute protocol channel,
the first equipment and the third equipment establish a second channel; the second channel may be a human-machine interaction channel based on the first channel, for example, a human-machine interaction device channel carried on a generic attribute protocol.
The first equipment sends the equipment description information of the first equipment to the third equipment; the device description information may include information related to enumerated driving devices in the first device.
The first equipment receives equipment information sent by the third equipment, sends the equipment information sent by the third equipment to the second equipment, and sends the equipment information of the second equipment to the third equipment; and the equipment information of the third equipment and the equipment information of the second equipment are used for data transmission between the third equipment and the second equipment. The device information may include a device identifier of the device, for example, a device identifier of the second device and a device identifier of the third device. The device identification may be a MAC address and/or network IP information.
In the embodiment of the application, the first device establishes connection and a channel with the second device and the third device respectively, and creates the driving device node on the second device and the third device, so that switching of the wireless accessory device among a plurality of intelligent devices can be realized, and data transmission among the intelligent devices can be completed.
In one possible implementation manner, the first connection is a bluetooth pairing connection, the first channel is a bluetooth generic attribute protocol channel, and the second channel is a human-computer interaction device channel borne on a generic attribute protocol.
In one possible implementation manner, after the first device and the third device establish the first channel, the method further includes:
the first equipment sends a switching notice to the second equipment; wherein the switching notification is to disconnect the second channel between the first device and the second device.
In the embodiment of the application, the second channel between the first device and the second device can be effectively cut off by sending the switching notification, so that the second device can be prevented from mistakenly receiving the operation information sent by the first device.
In one possible implementation manner, after the first device and the third device establish the first channel, the method further includes:
a first connection and a first channel are maintained between the first device and the second device.
In the embodiment of the application, the first connection and the first channel between the first device and the second device are maintained, so that when the first device is switched back to the second device from interaction with the third device, the first connection and the first channel do not need to be established, and therefore the task processing efficiency can be improved.
In one possible implementation manner, after the first device and the third device establish the first channel, the method further includes:
the first device determines the third device as a main connection device; the main connection device is used for receiving the operation information sent by the first device.
In the embodiment of the application, the identification of the main connection device is used for distinguishing the device currently receiving the operation information, so that the identification efficiency can be improved, and misoperation can be avoided, for example, the operation information is sent to the wrong device.
In one possible implementation manner, the driving device node includes a standard device node and a multi-connection control device node; the standard device node is used for receiving operation information sent by the first device, and the multi-connection control device node is used for data transmission between the second device and the third device.
In the embodiment of the application, the data transmission function between the intelligent devices can be realized by enumerating the multi-connection control device nodes on the intelligent devices.
In one possible implementation, the multi-connection control device node includes one or more extended functions.
In the embodiment of the application, a user can optionally select one or more extended functions from a plurality of extended functions, for example, file copying, application screen projection and the like. Therefore, the flexibility of function selection can be improved, and the user experience can be further improved.
In one possible implementation manner, the method further includes:
responding to the detected first operation of the user, the first equipment acquires first operation information and sends the first operation information to the third equipment; the first operation information is used for enabling the third equipment to acquire event information; wherein 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 a source path and a file name of a file to be copied.
Responding to the detected second operation of the user, the first equipment and the second equipment establish a second channel, and disconnect the second channel with the third equipment; wherein the second operation may be that the user brings the first device close to the second device to reestablish the second channel with the second device.
Responding to the detected third operation of the user, the first equipment acquires second operation information and sends the second operation information to the second equipment; wherein the second operation information is used to cause the second device to request data from the third device based on the event information. And the third operation can click a paste function, so that the file to be copied can be pasted from the third device to the second device.
In a second aspect, an embodiment of the present application provides a cross-device connection apparatus, which is applied to a first device, where the first device and a second device have already established a first connection; the first device and the second device establish a first channel and a second channel; the first channel is used for configuring the device type of the second device; the second channel is used for sending the device description information of the first device, and the device description information is used for creating a driving device node; the first device has stored device information of the second device, including:
the first establishing module is used for establishing a first connection between the first equipment and the third equipment;
a second establishing module, configured to establish a first channel between the first device and the third device on the established first connection between the first device and the third device;
a third establishing module, configured to establish a second channel between the first device and a third device;
the sending module is used for the first equipment to send the equipment description information of the first equipment to the third equipment;
the connection module is used for the first equipment to receive the equipment information sent by the third equipment, send the equipment information sent by the third equipment to the second equipment and send the equipment information of the second equipment to the third equipment; and the equipment information of the third equipment and the equipment information of the second equipment are used for data transmission between the third equipment and the second equipment.
In one possible implementation manner, the first connection is a bluetooth pairing connection, the first channel is a bluetooth generic attribute protocol channel, and the second channel is a human-computer interaction device channel borne on a generic attribute protocol.
In one possible implementation manner, the cross-device connection apparatus further includes:
a notification module, configured to send a handover notification to a second device by a first device; wherein the switching notification is to disconnect the second channel between the first device and the second device.
In one possible implementation manner, the cross-device connection apparatus further includes:
and the holding module is used for holding the first connection and the first channel between the first equipment and the second equipment.
In one possible implementation manner, the cross-device connection apparatus further includes:
the determining module is used for determining the third equipment as the main connecting equipment by the first equipment; the main connection device is used for receiving the operation information sent by the first device.
In one possible implementation manner, the driving device node includes a standard device node and a multi-connection control device node; the standard device node is used for receiving operation information sent by the first device, and the multi-connection control device node is used for data transmission between the second device and the third device.
In one possible implementation, the multi-connection control device node includes one or more extended functions.
In one possible implementation manner, the cross-device connection apparatus further includes:
the data transmission module is used for responding to the detected first operation of the user, and the first equipment acquires first operation information and sends the first operation information to the third equipment; the first operation information is used for enabling the third equipment to acquire event information; responding to the detected second operation of the user, the first equipment and the second equipment establish a second channel, and disconnect the second channel with the third equipment; responding to the detected third operation of the user, the first equipment acquires second operation information and sends the second operation information to the second equipment; wherein the second operation information is used to cause the second device to request data from the third device based on the event information.
In a third aspect, an embodiment of the present application provides a first device, including:
a memory for storing computer program code, the computer program code comprising instructions that a first device has established a first connection with a second device; the first device and the second device establish a first channel and a second channel; the first channel is used for configuring the device type of the second device; the second channel is used for sending the device description information of the first device, and the device description information is used for creating a driving device node; the first device stores the device information of the second device, and when the first device reads the instruction from the memory, the first device executes the following steps:
the method comprises the steps that first connection is established between first equipment and third equipment;
on the established first connection between the first device and the third device, the first device and the third device establish a first channel;
the first equipment and the third equipment establish a second channel;
the first equipment sends the equipment description information of the first equipment to the third equipment;
the first equipment receives equipment information sent by the third equipment, sends the equipment information sent by the third equipment to the second equipment, and sends the equipment information of the second equipment to the third equipment; and the equipment information of the third equipment and the equipment information of the second equipment are used for data transmission between the third equipment and the second equipment.
In one possible implementation manner, the first connection is a bluetooth pairing connection, the first channel is a bluetooth generic attribute protocol channel, and the second channel is a human-computer interaction device channel borne on a generic attribute protocol.
In one possible implementation manner, when the instruction is executed by the electronic device, after the electronic device executes the step of establishing the first channel between the first device and the third device, the following steps are further executed:
the first equipment sends a switching notice to the second equipment; wherein the switching notification is to disconnect the second channel between the first device and the second device.
In one possible implementation manner, when the instruction is executed by the electronic device, after the electronic device executes the step of establishing the first channel between the first device and the third device, the following steps are further executed:
a first connection and a first channel are maintained between the first device and the second device.
In one possible implementation manner, when the instruction is executed by the electronic device, after the electronic device executes the step of establishing the first channel between the first device and the third device, the following steps are further executed:
the first device determines the third device as a main connection device; the main connection device is used for receiving the operation information sent by the first device.
In one possible implementation manner, the driving device node includes a standard device node and a multi-connection control device node; the standard device node is used for receiving operation information sent by the first device, and the multi-connection control device node is used for data transmission between the second device and the third device.
In one possible implementation, the multi-connection control device node includes one or more extended functions.
In one possible implementation manner, when the instruction is executed by the electronic device, the electronic device further performs the following steps:
responding to the detected first operation of the user, the first equipment acquires first operation information and sends the first operation information to the third equipment; the first operation information is used for enabling the third equipment to acquire event information;
responding to the detected second operation of the user, the first equipment and the second equipment establish a second channel, and disconnect the second channel with the third equipment;
responding to the detected third operation of the user, the first equipment acquires second operation information and sends the second operation information to the second equipment; wherein the second operation information is used to cause the second device to request data from the third device based on the event information.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium having stored thereon a computer program, which, when run on a computer, causes the computer to perform the method according to the first aspect.
In a fifth aspect, the present application provides a computer program, which is configured to perform the method of the first aspect when the computer program is executed by a computer.
In a 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 in part or in whole on a memory not packaged with the processor.
Drawings
Fig. 1 is a schematic view of an application scenario provided in an embodiment of the present application;
fig. 2 is a schematic diagram of a software structure of an electronic device according to an embodiment of the present application;
fig. 3 is a schematic hardware structure diagram of an electronic device according to an embodiment of the present disclosure;
FIG. 4 is a flowchart illustrating an embodiment of a cross-device connection method provided in the present application;
fig. 5 is a schematic view of an extended function selection interface provided in an embodiment of the present application;
fig. 6 is a schematic structural diagram of an embodiment of a cross-device connection apparatus provided in the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. In the description of the embodiments herein, "/" means "or" unless otherwise specified, for example, a/B may mean a or B; "and/or" herein is merely an association describing an associated object, and means that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone.
In the following, the terms "first", "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the embodiments of the present application, "a plurality" means two or more unless otherwise specified.
With the development of electronic technology and communication technology, more and more intelligent devices are available for users. For example, a user may have two laptops at the same time, or one laptop and one tablet at the same time. Under the scene, a wireless accessory device (such as a mouse) such as bluetooth which a user may wish to use by himself can be shared among the plurality of intelligent devices, so that boundary pairing connection and quick switching are achieved. Further, users also desire to utilize the wireless accessory device to facilitate information transfer and data sharing between the plurality of smart devices.
However, when the current wireless accessory device is switched or data shared between the plurality of intelligent devices, the cloud server needs to be relied on, that is, the wireless accessory device and the intelligent device can be switched or data shared after information interaction with the cloud server is required, which causes inconvenience to users and reduces user experience.
In order to solve the above problem, an embodiment of the present application provides a cross-device connection method, which is applied to the first device 10. The first device 10 may be a wireless accessory device, such as a mouse, a keyboard, a stylus pen, an earphone, a game pad, a remote controller, an interactive sensing glove, a speaker, and the like, which support multiple connections. It is understood that the above examples do not constitute a limitation on the embodiments of the present application, and in some embodiments, the first device 10 may also be other types of wireless accessory devices.
Fig. 1 is an application scenario of the cross-device connection method, as shown in fig. 1, the application scenario includes a first device 10, a second device 20, and a third device 30. The second device 20 and the third device 30 may be smart devices, such as a mobile phone (mobile phone), a tablet computer (Pad), a computer with transceiver function, a notebook computer, a Virtual Reality (VR) terminal device, an Augmented Reality (AR) terminal device, a wireless terminal in industrial control (industrial control), a wireless terminal in self driving (self driving), a wireless terminal in remote medical (remote medical), a wireless terminal in smart grid (smart grid), a wireless terminal in transportation safety (transportation safety), a wireless terminal in smart city (smart city), a wireless terminal in smart home (smart home), a wearable device, a vehicle-mounted device, and the like. In addition, the intelligent device can be an intelligent device using a software OS platform such as windows OS, linux, apple iOS/MacOS, android and the like.
The first device 10 may be in wired or wireless communication with the second device 20 and the third device 30. The wired connection may include a connection manner such as USB, and the wireless connection may include a connection manner such as bluetooth, WIFI, UWB, NFC, and the like.
Next, a system framework of the second apparatus 20 and the third apparatus 30 will be described with reference to fig. 2. Taking the second device 20 as an example, as shown in fig. 2, the second device 20 includes a physical layer 21, a data link layer 22, a device driver layer 23, and an application layer 24. Wherein the content of the first and second substances,
the physical layer 21 is used to provide different types of communication interfaces, which may be interfaces 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), and which may be wired (e.g., USB) or wireless (e.g., WIFI, bluetooth, etc.).
The data link layer 22 may include a driver of a standard protocol or a proprietary protocol, where the standard protocol may include a driver protocol such as Human Interface Device (HID), and the proprietary protocol may include a driver protocol such as Mobile Broadband and Home Device management (IoT Device management), and may also be other standard protocols or proprietary protocols, and the driver of the standard protocol or the proprietary protocol is not particularly limited in this application.
The device driver layer 23 may enumerate a variety of driver devices of the external device (e.g., the first device 10). The driver may be a device driver interface based on a driver protocol (e.g., HID protocol or MBB protocol, etc.) in the data link layer 22 described above. Illustratively, the driving device may include a mouse, a keyboard, a multi-connection control device, and other driving devices. The device driving interface may include a mouse driver, a keyboard driver, a multi-connection control device driver, and the like. The device driver interface may be in one-to-one correspondence with the driver devices, that is, the mouse driver is used to control operations of the mouse, the keyboard driver is used to control operations of the keyboard, and the multi-connection control device driver is used to control information interaction between the external device and the smart device and switching between the external device and the smart device.
For example, when an external device enumerates its driver device in the device driver layer 23, types of multiple device driver interfaces corresponding to the external device may be obtained, where the types of the device driver interfaces at least include the multiple connection control device driver types. Taking the external device as a mouse as an example, the mouse can obtain two device driver interface types, namely a mouse driver and a multi-connection control device driver, in the device driver layer 23. Wherein the mouse driver may be a standard device driver corresponding to the standard protocol (e.g., HID protocol) and the multi-connection control device driver may be an extended device driver corresponding to the proprietary protocol (e.g., MBB protocol). Next, the device driver layer 23 may enumerate a standard mouse corresponding to a standard device driver, which may be a standard device based on the HID protocol, and an extended mouse corresponding to an extended device driver, which may implement standard functions of a mouse, such as clicking, sliding, and dragging a cursor. The extended mouse may be an extended device based on the MBB protocol, and information interaction between the mouse and the smart device may be achieved through the extended device, for example, files in one smart device are copied to another smart device through the extended mouse. That is, when the mouse device performs enumeration of the driver devices, the device driver layer 23 may contain a standard mouse of a standard device type, and a multi-connection control mouse of an extended device type.
The application layer 24 may be used to provide a variety of applications, which may be commonly used functional applications or customized functional applications. The common functional applications may include file copy, NFC-touch application, and the like. The customized function application may include applications such as device discovery, data transmission among multiple devices, mouse traversal, application screen projection, and the like. Illustratively, files in smart device A may be copied to smart device B via a file copy application. It should be understood that the applications in the general-purpose functional application and the customized functional application are only exemplary, and do not constitute a limitation to the embodiments of the present application, and in some embodiments, other applications may also be included.
An exemplary electronic device provided in the following embodiments of the present application is first described below with reference to fig. 3. Fig. 3 shows a schematic structural diagram of an electronic device 100, which electronic device 100 may be the first device 10 described above.
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 key 190, a motor 191, an indicator 192, a camera 193, a display screen 194, a Subscriber Identity Module (SIM) card interface 195, and the like. 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, and the like.
It is to be understood that the illustrated structure of the embodiment of the present invention does not specifically limit the electronic device 100. In other embodiments of the present application, electronic device 100 may include more or fewer components than shown, or some components may be combined, some components may be split, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Processor 110 may include one or more processing units, such as: the processor 110 may include an Application Processor (AP), a modem processor, a Graphics Processor (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), among others. The different processing units may be separate devices or may be integrated into one or more processors.
The controller can generate an operation control signal according to the instruction operation code and the timing signal to complete the control of instruction fetching and instruction execution.
A memory may also be provided in processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that have just been used or recycled by the processor 110. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. Avoiding repeated accesses reduces the latency of the processor 110, thereby increasing the efficiency of the system.
In some embodiments, processor 110 may include one or more interfaces. The interface may include an integrated circuit (I2C) interface, an integrated circuit built-in audio (I2S) interface, a Pulse Code Modulation (PCM) interface, a universal asynchronous receiver/transmitter (UART) interface, a mobile industry processor interface (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, etc.
The USB interface 130 is an interface conforming to the USB standard specification, and may be a Mini USB interface, a Micro USB interface, a USB Type C interface, or the like. The USB interface 130 may be used to connect a charger to charge the electronic device 100, and may also be used to transmit data between the electronic device 100 and a peripheral device. And the earphone can also be used for connecting an earphone and playing audio through the earphone. The interface may also be used to connect other electronic devices, such as AR devices and the like.
It should be understood that the connection relationship between the modules according to the embodiment of the present invention is only illustrative, and is not limited to the structure of the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection manners or a combination of multiple interface connection manners in the above embodiments.
The charging management module 140 is configured to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive a wireless charging input through a wireless charging coil of the electronic device 100. The charging management module 140 may also supply power to the electronic device through the power management module 141 while charging the battery 142.
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 charge management module 140, and supplies power to the processor 110, the internal memory 121, the display 194, the camera 193, the wireless communication module 160, and the like. The power management module 141 may also be used to monitor parameters such as battery capacity, battery cycle count, battery state of health (leakage, impedance), etc. In some other embodiments, the power management module 141 may also be disposed in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may be disposed in the same device.
The wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device 100 may be used to cover a single or multiple communication bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed as a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 150 may provide a solution including 2G/3G/4G/5G wireless communication 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), and the like. The mobile communication module 150 may receive the electromagnetic wave from the antenna 1, filter, amplify, etc. the received electromagnetic wave, and transmit the electromagnetic wave to the modem processor for demodulation. The mobile communication module 150 may also amplify the signal modulated by the modem processor, and convert the signal into electromagnetic wave through the antenna 1 to radiate the electromagnetic wave. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be provided in the same device as at least some of the modules of the processor 110.
The modem processor may include a modulator and a demodulator. The modulator is used for modulating a low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then passes the demodulated low frequency baseband signal to a baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and then transferred 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 a stand-alone device. In other embodiments, the modem processor may be provided in the same device as the mobile communication module 150 or other functional modules, independent of the processor 110.
The wireless communication module 160 may provide a solution for wireless communication applied to the electronic device 100, including Wireless Local Area Networks (WLANs) (e.g., wireless fidelity (Wi-Fi) networks), bluetooth (bluetooth, BT), global Navigation Satellite System (GNSS), frequency Modulation (FM), near Field Communication (NFC), infrared (IR), and the like. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, performs frequency modulation and filtering processing on electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, perform frequency modulation and amplification on the signal, and convert the signal into electromagnetic waves through the antenna 2 to radiate the electromagnetic waves.
In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150 and antenna 2 is coupled to wireless communication module 160 so that electronic device 100 can communicate with networks and other devices through wireless communication techniques. The wireless communication technology may include global system for mobile communications (GSM), general Packet Radio Service (GPRS), code division multiple access (code division multiple access, CDMA), wideband Code Division Multiple Access (WCDMA), time-division code division multiple access (time-division code division multiple access, TD-SCDMA), long Term Evolution (LTE), BT, GNSS, WLAN, NFC, FM, and/or IR technologies, etc. 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).
The electronic device 100 implements display functions via the GPU, the display screen 194, and the application processor. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and an application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
The display screen 194 is used to display images, video, and the like. The display screen 194 includes a display panel. The display panel may adopt a Liquid Crystal Display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (active-matrix organic light-emitting diode, AMOLED), a flexible light-emitting diode (FLED), a miniature, a Micro-oeld, a quantum dot light-emitting diode (QLED), and the like. In some embodiments, the electronic device 100 may include 1 or N display screens 194, N being a positive integer greater than 1.
The electronic device 100 may implement a shooting function through the ISP, the camera 193, the video codec, the GPU, the display 194, the application processor, and the like.
The ISP is used to process the data fed back by the camera 193. For example, when a user takes a picture, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, an optical signal is converted into an electric signal, and the camera photosensitive element transmits the electric signal to the ISP for processing and converting into an image visible to the naked eye. The ISP can also carry out algorithm optimization on the noise, brightness and skin color of the image. The ISP can also optimize parameters such as exposure, color temperature and the like of a shooting scene. In some embodiments, the ISP may be provided in camera 193.
The camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image to the photosensitive element. The photosensitive element may be a Charge Coupled Device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The light sensing element converts the optical signal into an electrical signal, which is then passed to the ISP where it is converted into a digital image signal. And 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 and other formats. In some embodiments, electronic device 100 may include 1 or N cameras 193, N being a positive integer greater than 1.
The digital signal processor is used for processing digital signals, and can process digital image signals and other digital signals. For example, when the electronic device 100 selects a frequency bin, the digital signal processor is used to perform fourier transform or the like on the frequency bin energy.
Video codecs are used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. In this way, the electronic device 100 may play or record video in a variety of encoding formats, such as: moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, and the like.
The NPU is a neural-network (NN) computing processor that processes input information quickly by using a biological neural network structure, for example, by using a transfer mode between neurons of a human brain, and can also learn by itself continuously. Applications such as intelligent recognition of the electronic device 100 can be realized through the NPU, for example: image recognition, face recognition, speech recognition, text understanding, and the like.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to extend the storage capability of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music, video, etc. are saved in an external memory card.
The internal memory 121 may be used to store computer-executable program code, which includes instructions. The internal memory 121 may include a program storage area and a data storage area. The storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required by at least one function, and the like. The storage data area may store data (such as audio data, phone book, etc.) created during use of the electronic device 100, and the like. In addition, the internal memory 121 may include a high-speed random access memory, and may further include a nonvolatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (UFS), and the like. The processor 110 executes various functional applications of the electronic device 100 and data processing by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
The electronic device 100 may implement audio functions via the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone interface 170D, and the application processor. Such as music playing, recording, etc.
The audio module 170 is used to convert digital audio information into analog audio signals for output, and also used to convert analog audio inputs into digital audio signals. The audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be disposed in the processor 110, or some functional modules of the audio module 170 may be disposed in the processor 110.
The speaker 170A, also called a "horn", is used to convert the audio electrical signal into an acoustic signal. The electronic apparatus 100 can listen to music through the speaker 170A or listen to a handsfree call.
The receiver 170B, also called "earpiece", is used to convert the electrical audio signal into an acoustic signal. When the electronic apparatus 100 receives a call or voice information, it can receive voice by placing the receiver 170B close to the ear of the person.
The microphone 170C, also referred to as a "microphone," is used to convert sound signals into electrical signals. When making a call or transmitting voice information, the user can input a voice signal to the microphone 170C by speaking near the microphone 170C through the mouth. The electronic device 100 may be provided with at least one microphone 170C. In other embodiments, the electronic device 100 may be provided with two microphones 170C to achieve a noise reduction function in addition to collecting sound signals. In other embodiments, the electronic device 100 may further include three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, perform directional recording, and so on.
The earphone interface 170D is used to connect a wired earphone. The headset interface 170D may be the USB interface 130, or may be a 3.5mm open mobile electronic device platform (OMTP) standard interface, a cellular telecommunications industry association (cellular telecommunications industry association of the USA, CTIA) standard interface.
The keys 190 include a power-on key, a volume key, and the like. The keys 190 may be mechanical keys. Or may be touch keys. The electronic apparatus 100 may receive a key input, and generate a key signal input related to user setting and function control of the electronic apparatus 100.
The motor 191 may generate a vibration cue. The motor 191 may be used for incoming call vibration prompts as well as for touch vibration feedback. For example, touch operations applied to different applications (e.g., photographing, audio playing, etc.) may correspond to different vibration feedback effects. The motor 191 may also respond to different vibration feedback effects for touch operations applied to different areas of the display screen 194. Different application scenes (such as time reminding, receiving information, alarm clock, game and the like) can also correspond to different vibration feedback effects. The touch vibration feedback effect may also support customization.
Indicator 192 may be an indicator light that may be used to indicate a state of charge, a change in charge, or a message, missed call, notification, etc.
The SIM card interface 195 is used to connect a SIM card. The SIM card can be brought into and out of contact with the electronic apparatus 100 by being inserted into the SIM card interface 195 or being pulled out of the SIM card interface 195. The electronic device 100 may support 1 or N SIM card interfaces, N being a positive integer greater than 1. The SIM card interface 195 may support a Nano SIM card, a Micro SIM card, a SIM card, etc. The same SIM card interface 195 can be inserted with multiple cards at the same time. The types of the plurality of cards can be the same or different. The SIM card interface 195 is also compatible with different types of SIM cards. The SIM card interface 195 may also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as communication and data communication. In some embodiments, the electronic device 100 employs esims, namely: an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
Fig. 4 is a flowchart illustrating an embodiment of a cross-device connection method provided in the embodiment of the present application, including:
in step 401, the first device 10 is connected to the second device 20.
Specifically, the first device 10 may be connected with the second device 20 in a wireless manner. The wireless mode may include Bluetooth (BT), so that a bluetooth pairing connection between the first device 10 and the second device 20 may be achieved. In a specific implementation, when the first device 10 performs a pairing connection with the second device 20 through a bluetooth manner, the first device 10 may perform a bluetooth pairing with the second device 20 through the following two manners.
In a first mode
The first device 10 may be in proximity to the second device 20 and may let the second device 20 discover the first device 10 by bluetooth broadcast messages in the first device 10. When the second device 20 discovers the first device 10, bluetooth pairing may be initiated with the first device 10, whereby a bluetooth pairing connection may be established between the first device 10 and the second device 20.
Mode two
The first device 10 may touch an NFC tag on the second device 20, where the NFC tag on the second device 20 includes a bluetooth MAC address of the second device 20, so that the first device 10 may discover the second device 20 through the bluetooth MAC address, and may further perform bluetooth pairing with the second device 20. In a specific implementation, when the bluetooth pairing connection is performed in the above NFC-to-touch manner, the first device 10 may actively discover the bluetooth MAC address of the second device 20 through proximity sensing, for example, the first device 10 may be configured with an NFC/UWB reader, and the second device 20 may be configured with an NFC tag/UWB radio frequency card.
Optionally, the second device 20 may also touch an NFC tag on the first device 10, where the NFC tag on the first device 10 includes a bluetooth MAC address of the first device 10, so that the second device 20 may discover the first device 10 and may further perform bluetooth pairing with the first device 10. In a specific implementation, when the bluetooth pairing connection is performed in the NFC-to-bump manner, the first device 10 may actively discover the bluetooth MAC address of the first device 10 through proximity sensing, 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 particularly limit the manner of establishing the bluetooth pairing connection between the first device 10 and the second device 20.
In addition, it should be noted that when the bluetooth pairing connection is established between the first device 10 and the second device 20, operations such as authentication/key exchange, authentication, and the like between the first device 10 and the second device 20 may also be completed, and reference may be specifically made to a bluetooth protocol of a related standard organization, which is not described herein again.
In step 402, the first device 10 establishes a bluetooth GATT channel with the second device 20.
Specifically, after the first device 10 establishes the 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 on the bluetooth pairing connection. The bluetooth GATT channel may be used for information interaction between the bluetooth low energy devices, e.g., the device type of the second device 20 may be configured via 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 (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 is understood that, on the main connection device, operation information such as clicking, scrolling, and dragging of the first device 10 may be received, and an operation corresponding to the operation information may be performed. The HOGP channel is described in detail below, and is not described herein again.
After the first device 10 establishes the bluetooth GATT channel with the second device 20, the first device 10 may set the second device 20 as the primary connection device. It is understood that the bluetooth GATT is a short signaling configuration management protocol in the bluetooth protocol, and if different wireless protocols are used, the name of the bluetooth GATT may be different, but is not limited to the embodiment of the present application.
In step 403, the first device 10 establishes a hop gateway with the second device 20.
Specifically, after the first device 10 and the second device 20 successfully establish the bluetooth GATT channel, the first device 10 may also establish the hop channel with the second device 20. The hop gateway may be configured to send device description information of the first device 10, so that a corresponding driver device node may be created on the second device 20. The above-described device description information may be information related to the enumerated drive device in the first device 10. For example, the first device 10 may enumerate a plurality of driver devices, which may include standard devices and extended devices (e.g., a multi-connection control device). Next, the first device 10 may transmit the device description information to the second device 20, thereby enabling the second device 20 to create a corresponding driving device node based on the related information of the driving device. That is, after the first device 10 establishes the HOGP channel with the second device 20, the first device 10 may send description information of its driving device to the second device 20. When the second device 20 receives the description information of the driving device sent by the first device 10, the driving device node of the first device 10, that is, the standard device node and the extended device node of the first device 10, may be created based on the device description information of the first device 10.
It will be appreciated that the standard device node may be a logical device for receiving operational information of the first device 10, such as clicking, scrolling and dragging, and the standard device node may be based on a standard protocol such as HID, and the standard device node may use a standard driver interface (e.g., mouse driver, keyboard driver, etc.). The above-mentioned extension device may be a logical device for exchanging information with the first device 10 to implement information sharing between the second device 20 and the third device 30, the extension device node may be based on a private protocol such as MBB, and the extension device node may use an extension driver interface (e.g., a multi-connection control driver).
The second device 20 sends 404 the device information to the first device 10.
Specifically, when the first device 10 and the second device 20 establish the aforementioned hop gateway, and the second device 20 has created a driving device node of the first device 10, the second device 20 may send device information of the second device 20 to the first device 10. In a specific implementation, the second device 20 may send the device information of the second device 20 to the first device 10 through the extended driver interface. The first device 10 may store the device information of the second device 20 after receiving the device information transmitted by the second device 20. The device information of the second device 20 may include a device identifier (for example, the device identifier may be a MAC address) of the second device 20 and/or Internet Protocol (IP) information.
In step 405, the first device 10 establishes a connection with the third device 30.
Specifically, the first device 10 may initiate a connection request to the third device 30 for establishing 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 a bluetooth pairing manner. Illustratively, the third device 30 may be provided with an NFC tag that may include a bluetooth MAC address of the third device 30, which may be used to discover the third device 30. When a user holds the first device 10 to approach 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 in an NFC induction manner, so that the first device 10 and the third device 30 may establish a bluetooth pairing connection.
Optionally, the NFC tag of the third device 30 may further include information about a device Serial Number (SN) and a device model of the third device 30.
At step 406, the first device 10 establishes a bluetooth GATT channel with the third device 30.
Specifically, after the first device 10 establishes the bluetooth pairing connection with the third device 30, the first device 10 may also establish a bluetooth GATT channel with the third device 30. When the bluetooth GATT channel is successfully established, the first device 10 may set the third device 30 as a main connection device. At this time, the first device 10 may also transmit a handover notification to the second device 20, the handover notification being used to notify that the second device 20 is switched from the primary connection device to the non-primary connection device, and may cut off the HOGP connection tunnel between the first device 10 and the second device 20, whereby the second device 20 may be made unable to receive the operation information of the first device 10. That is, at this time, only the third device 30 may receive the operation information reported by the first device 10, and may perform a corresponding operation according to the operation information. Taking the first device 10 as a mouse as an example, the operation information reported by the first device 10 may be information such as key click and scroll wheel scroll.
It can be understood that, after receiving the handover notification sent by the first device 10, the second device 20 changes to a non-primary connection device, and may cut off the hog connection path with the first device 10, but may maintain the bluetooth pairing connection and the GATT path with the first device 10, so that when the first device 10 is subsequently handed over back to the second device 20, it is not necessary to perform bluetooth pairing and establish the GATT path again, and thus handover efficiency may be improved.
In step 407, the first device 10 establishes a hop gateway with the third device 30.
Specifically, after the first device 10 and the third device 30 successfully establish the GATT channel, the first device 10 and the third device 30 may also establish the hog channel. At this time, the third device 30, as a main connection device, may receive operation information of the first device 10, thereby making it possible for the third device 30 to perform a corresponding operation according to the received operation information.
In step 408, the first device 10 obtains the device description information and sends the device description information to the third device 30.
Specifically, the first device 10 may obtain device description information, where the device description information may include related information of the drive device enumerated by the first device 10 (e.g., enumerated drive device type). The types of the driving device may include a standard device type and an extended device type (e.g., a multi-connection control device type). The information related to the standard device may be used to create a corresponding standard device node in the third device 30, so that the third device 30 may receive the operation information reported by the first device 10 through the standard device node. The related information of the extension device may be used to create a corresponding multi-connection control device node, so that data transmission between the third device 30 and the second device 20 may be realized through information interaction with the first device 10.
Next, the first device 10 may transmit the above-described device description information to the third device 30.
In step 409, the third device 30 receives the device description information sent by the first device 10, and creates a driving device node according to the device description information.
Specifically, after receiving the device description information sent by the first device 10, the third device 30 may create a corresponding driving device node according to 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, a corresponding standard device node may be created, and a corresponding driver (e.g., a standard device driver) may be loaded for the standard device node, at this time, the third device 30 may receive the operation information sent by the first device 10 through the standard device node.
When the third device 30 receives the relevant information of the extension device sent by the first device 10, a corresponding extension device node (e.g., a multi-connection control device node) may be created, and a corresponding driver, that is, an extension device driver (e.g., a multi-connection control device driver), may be loaded for the extension device node.
Further, when the third device 30 creates the above-mentioned extension device node, a corresponding extension function may also be set for the extension device node to be created. For example, when the third device 30 receives the information (e.g., the type of the extension device) about the extension device sent by the first device 10, a function authorization window may pop up on the display interface of the third device 30. Wherein the functionality authorization window may include one or more extended functionality options. The user can arbitrarily check the above extended function options to determine the extended function of the extended device node, that is, to enable the selected extended function to be effective. When the user selects the corresponding extended function option, the extended device node is created in the third device 30, and the extended device node may have the extended function selected by the user.
Referring now to fig. 5, for example, as shown in fig. 5, the interface 500 is a display interface including a function authorization window 501 and a standard device node 502, where the function authorization window 501 includes an information sharing function option 5011 and an application screen projection function option 5012. When the user clicks the information sharing function option 5011, the extension device node 503 may be created, so that the interface 510 including the standard device node 502 and the extension device node 503 may be obtained, wherein the extension device node 503 may have the information sharing function.
It should be noted that, in some embodiments, the standard device node and the extended device node may also be the same device node, and the number of the device nodes created by the third device 30 is not particularly limited in this embodiment.
In step 410, the third device 30 transmits the device information of the third device 30 to the first device 10.
Specifically, after the third device 30 successfully creates the above-mentioned extension device node, the device information of the third device 30 may be sent to the first device 10 through the extension device node. The device information of the third device 30 may include information such as a MAC address and/or an Internet Protocol (IP) of the third device 30.
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.
Specifically, since the main connection device connected to the first device 10 is changed, for example, the main connection device is changed from the second device 20 to the third device 30. At this time, the first device 10 may transmit the device information of the changed main connection device (e.g., the third device 30) to the main connection device (e.g., the second device 20) before the change, thereby allowing the third device 30 and the second device 20 to interact with each other based on the device information of the other.
In step 412, the first device 10 sends the device information of the second device 20 to the third device 30.
Specifically, the first device 10 may transmit the device information of the second device 20, which is stored in advance in step 404, to the third device 30, so that interaction between the third device 30 and the second device 20 based on the device information of the other party may be enabled.
It is to be understood that step 412 may be executed concurrently with step 411, before step 411, or after step 411, that is, the execution order of step 412 and step 411 may not be sequential.
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.
In some embodiments, the data transmission may be understood that the third device performs data interaction with the 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 may be a bluetooth network, a WIFI network (for example, a P2P network or a network via a third terminal), and the like, which may perform data transmission, and the present application does not limit this.
Specifically, after receiving the device information of the second device 20 sent by the first device 10, the third device 30 may perform data transmission with the second device 20, where the data transmission may be data transmission based on a Local Area Network (LAN) or data transmission based on a wide Area Network (wan), and the embodiment of the present application does not specially limit the manner of data transmission between the devices. In a specific implementation, the third device 30 may employ a preset interaction rule, for example, the preset interaction rule may be: the device with the smaller MAC address in the two devices can be used as a server, and the device with the larger MAC address can be used as a 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 may create a Socket server, and may monitor a corresponding transport layer (e.g., TCP or UDP layer) port for establishing a data transmission relationship with the second device 20. The protocol corresponding to Socket connection may be a standard protocol such as DLNA, or may also be a proprietary protocol such as Cast +, which is not limited in the embodiment of the present application.
Alternatively, if the MAC address of the third device 30 is larger than the MAC address of the second device 20, the third device 30 may act as a client and may initiate data transmission with the second device 20. At this time, the third device 30 (i.e., client) may attempt to connect to the second device 20 (i.e., server) using the IP address in the device information of the second device 20. It can be understood that, if the device information includes the internet Protocol information, the IP Address may be obtained through the internet IP information, and if the device information only includes the MAC Address, the IP Address may also be obtained by querying an Address Resolution Protocol (ARP) table in a local area according to the MAC Address in the device information. It will be appreciated that if the first attempt by the third device 30 to connect to the second device 20 fails, the connection may be attempted multiple times until the connection is successful. If the third device 30 and the second device 20 are successfully connected, it indicates that the data transmission relationship between the second device 20 and the third device 30 is successful, and at this time, information interaction or data sharing may be further performed between the second device 20 and the third device 30.
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.
Specifically, after the second device 20 receives the device information of the third device 30 sent by the first device 10, data transmission may be performed with the third device 30. In a specific implementation, taking the interaction rule preset in step 413 as an example, if the third device 30 is a Socket server, the second device 20 may be a client. At this time, the second device 20 may attempt to connect to the third device 30 using the IP address in the device information of the third device 30. If the third device 30 is a client, the second device 20 may be a server. At this time, the second device 20 may create a Socket server, and may listen to a corresponding port of a transport layer (e.g., a TCP or UDP layer) for establishing a data transmission relationship with the third device 30.
If the connection is successful, it indicates that the data transmission between the second device 20 and the third device 30 is successful, and at this time, the second device 20 and the third device 30 may further perform information interaction or data sharing.
In response to the first operation by the user, the third device 30 acquires event information, step 415.
Specifically, the user may perform an operation on the first device 10, for example, the user may perform a click, a slide, and the like on the first device 10. In response to the detected user operation, the first device 10 acquires operation information and may report the operation information to the third device 30. When the third device 30 receives the operation information reported by the first device 10, an operation corresponding to the operation information may be performed. For example, in the case of file copy, the user may click on the copy function option for any file in the third device 30 using the first device 10 for file copy. In response to the copy operation of the user, the file copy application in the application layer of the third device 30 monitors the copy operation of the user, and acquires event information (e.g., a source path and a file name of a file to be copied) corresponding to the copy operation.
The third device 30 sends the event information to the second device 20, step 416.
Specifically, after the third device 30 acquires the event information, the event information may be synchronized to the second device 20. Illustratively, the third device 30 may transmit the above event information to the second device 20. Taking file copy as an example, the event information may include a source path and a file name of the file to be copied.
In response to the second operation by the user, the first device 10 switches the main connection device from the third device 30 to the second device 20, step 417.
Specifically, after the user completes the copy operation on the third device 30, the user may bring the first device 10 close to the second device 20 for switching the main connection device from the third device 30 to the second device 20, so that the user may operate on the third device 30 through the first device 10, and may complete the file copy task. For example, the user may touch the first device 10 to the NFC tag of the second device 20, and thus may read the bluetooth MAC address in the NFC tag of the second device 20. In response to the second operation of the user, since the first device 10 and the second device 20 have already established the bluetooth paired connection and the GATT channel, at this time, the first device 10 may further establish the hog channel with the second device 20, thereby enabling the first device 10 to hand over the main connection device from the third device 30 to the second device 20, that is, the first device 10 may disconnect the hog channel with the third device 30 and establish the hog channel with the second device 20.
In response to the user's third operation, the second device 20 requests the third device 30 to transmit data, step 418.
Specifically, after the first device 10 establishes the hop gateway with the second device 20 and sets the second device 20 as the main connection device, the user may further perform an operation on the first device 10. For example, the user may right click a pop-up menu bar under any folder directory in the second device 20, and click a paste function option in the menu bar for executing a paste operation, the file copying application of the second device 20 monitors the paste operation of the user, acquires the event information sent by the third device 30 to the second device 20 in step 416, and may request the third device 30 to transmit the file to be copied to the folder directory in the second device 20 according to the event information. In response to the third operation of the user, the second device 20 may send a file transmission request to the third device 30 through the data transmission channel established in the above steps 413 and 414, where the file transmission request is used to request transmission of the file to be copied. The file transfer request may include a target path, where the target path may be used to identify a storage path (e.g., a folder directory) of the file to be copied in the second device 20, and optionally, the file transfer request may further include event information. After receiving the file transmission request sent by the second device 20, the third device 30 may transmit the file to be copied to the third device 30 through the data transmission channel.
It is understood that, in the above embodiments, steps 401 to 418 are optional steps, and this application only provides one possible embodiment, and may further include more or less steps than steps 401 to 418, which is not limited in this application.
It should be noted that the foregoing embodiments only exemplarily show that the connection between the first device 10 and the second device 20 and the third device 30 is implemented in a wireless manner such as bluetooth, but the connection is not limited to the foregoing wireless manner such as bluetooth, and in some embodiments, the connection between the first device 10 and the second device 20 and the third device 30 may also be established in a wired manner such as USB.
In addition, in order to ensure the security of data transmission, the data transmission between the first device 10 and the second and third devices 20 and 30 may use a predetermined encryption and decryption mechanism, but is not limited to whether the encryption and decryption mechanism is used or not, and is not limited to which encryption and decryption mechanism is used. That is, whether or not to encrypt and decrypt the device, or what encryption and decryption mechanism to use, may be subject to the security capability supported by the physical interface standard in the device.
The file copying scenario is exemplified by the first device 10 being a bluetooth mouse, the second device 20 being a tablet computer (e.g., PAD), and the third device 30 being a notebook computer (e.g., PC). The Bluetooth mouse can be configured with an NFC reader, and the notebook computer and the tablet computer can be configured with an NFC label.
Firstly, the Bluetooth mouse can be connected with the tablet computer in a pairing mode through Bluetooth, and after the Bluetooth connection is established with the tablet computer, a Bluetooth GATT channel and a HOGP channel are further established with the tablet computer, and at the moment, the tablet computer is a main connecting device of the Bluetooth mouse. In addition, the tablet computer can also issue the equipment information of the tablet computer to the Bluetooth mouse, so that the Bluetooth mouse can store the equipment information of the tablet computer.
Then, the bluetooth mouse can be close to the notebook computer, so that the NFC reader of the bluetooth mouse can read the bluetooth MAC address in the NFC tag on the notebook computer, and thus bluetooth pairing with the notebook computer can be initiated based on the bluetooth MAC address.
After the Bluetooth pairing connection is established between the Bluetooth mouse and the notebook computer, a GATT channel can be further established between the Bluetooth mouse and the notebook computer, and the notebook computer can be set as a main connection device. At this time, the bluetooth mouse may set the tablet computer as a non-primary connection device and may disconnect the hopp channel from the tablet computer, but may still maintain the GATT channel with the tablet computer.
Then, the bluetooth mouse can further establish a HOGP channel with the notebook computer. At this time, a plurality of logical device nodes of the bluetooth mouse can be generated on the notebook computer. The logical device nodes may be a standard device node and a multi-connection control device node, and the standard device node and the multi-connection control device node may be obtained by a driving device type enumerated by a bluetooth mouse, for example, the bluetooth mouse may enumerate two driving device types, namely a bluetooth mouse type and a multi-connection control mouse type, where the bluetooth mouse type may be used to generate the standard device node on a notebook computer, and the notebook computer may be used to receive operation information reported by the bluetooth mouse through the standard device node; the multi-connection control mouse type can be used for generating a multi-connection control device node on the notebook computer, information interaction between the Bluetooth mouse and the notebook computer can be achieved through the multi-connection control device node, and then information sharing between the notebook computer and the tablet computer can be achieved.
Optionally, when the bluetooth mouse enumerates the multi-connection control device node, an authorization request window may pop up on the notebook computer, where the authorization request window may include a plurality of extended function options, for example, a function option of whether information is shared, or not. The user can check the multiple extended function options to confirm that the extended function is effective. After the user confirms the extended functions, the corresponding multi-connection control equipment node can be generated in the notebook computer, and the corresponding driver can be mounted, and at the moment, the multi-connection control equipment node has the extended functions selected by the user.
After the notebook computer generates the multi-connection control device node, the device information of the notebook computer can be issued to the Bluetooth mouse, so that the Bluetooth mouse can forward the device information of the notebook computer to the tablet computer, and the Bluetooth mouse can further send the stored device information of the tablet computer to the notebook computer.
After the notebook computer receives the equipment information of the tablet computer, data transmission processing with the tablet computer can be carried out. Taking a notebook computer as a server, the notebook computer can create a Socket server and monitor a corresponding transmission layer port, so that data transmission with a tablet computer can be completed.
After the tablet computer receives the equipment information of the notebook computer, the tablet computer can perform interactive processing with the notebook computer. It can be understood that if the notebook computer is the server, the tablet computer is the client; if the notebook computer is the client, the tablet computer is the server. Taking the tablet computer as the client, at this time, the tablet computer may obtain the IP address in the device information of the notebook computer, and may try to connect to the notebook computer according to the IP address, thereby establishing data transmission between the notebook computer and the tablet computer.
Further, the user can copy a file in the notebook computer through the bluetooth mouse. Then, the user can touch the bluetooth mouse to the NFC tag of the tablet computer, so that the bluetooth mouse and the tablet computer can establish a hop gateway. At this time, the main connection device of the bluetooth mouse is switched from the notebook computer to the tablet computer, that is, the notebook computer is a non-main connection device, and the tablet computer is a main connection device. The Bluetooth mouse can be disconnected with the HOGP channel of the notebook 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 perform a paste function under any folder directory on the tablet computer, so that a file copied on the notebook computer can be pasted into the tablet computer, thereby completing data sharing between devices.
It is to be understood that the above examples only illustrate a file replication scenario, and do not constitute a limitation to the embodiments of the present application, and in some embodiments, the above examples may also be applied to other data sharing scenarios.
Fig. 6 is a schematic structural diagram of an embodiment of the cross-device connection apparatus according to the present application, and as shown in fig. 6, the cross-device connection apparatus 60 is applied to a first device, and a first connection is established between the first device and a second device; the first device and the second device establish a first channel and a second channel; the first channel is used for configuring the device type of the second device; the second channel is used for sending the device description information of the first device, and the device description information is used for creating a driving device node; the first device having stored the device information of the second device may include: a first establishing module 61, a second establishing module 62, a third establishing module 63, a sending module 64 and a connecting module 65; wherein the content of the first and second substances,
a first establishing module 61, configured to establish a first connection between a first device and a third device;
a second establishing module 62, configured to establish a first channel between the first device and the third device on the established first connection between the first device and the third device;
a third establishing module 63, configured to establish a second channel between the first device and a third device;
a sending module 64, configured to send, by the first device, the device description information of the first device to the third device;
a connection module 65, configured to receive, by the first device, 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; and the equipment information of the third equipment and the equipment information of the second equipment are used for data transmission between the third equipment and the second equipment.
In one possible implementation manner, the first connection is a bluetooth pairing connection, the first channel is a bluetooth generic attribute protocol channel, and the second channel is a human-computer interaction device channel borne on a generic attribute protocol.
In one possible implementation manner, the cross-device connection apparatus 60 further includes: a notification module 66; wherein the content of the first and second substances,
a notification module 66, configured to send a handover notification to the second device by the first device; wherein the switching notification is to disconnect the second channel between the first device and the second device.
In one possible implementation manner, the cross-device connection apparatus 60 further includes: a holding module 67; wherein, the first and the second end of the pipe are connected with each other,
and the holding module 67 is used for holding the first connection and the first channel between the first device and the second device.
In one possible implementation manner, the cross-device connection apparatus 60 further includes: a determination module 68; wherein the content of the first and second substances,
a determination module 68, configured to determine, by the first device, the third device as the primary connection device; the main connection device is used for receiving the operation information sent by the first device.
In one possible implementation manner, the driving device node includes a standard device node and a multi-connection control device node; the standard device node is used for receiving operation information sent by the first device, and the multi-connection control device node is used for data transmission between the second device and the third device.
In one possible implementation, the multi-connection control device node includes one or more extended functions.
In one possible implementation manner, the cross-device connection apparatus 60 further includes: a data transmission module 69; wherein the content of the first and second substances,
a data transmission module 69, configured to, in response to the detected first operation of the user, acquire first operation information by the first device, and send the first operation information to the third device; the first operation information is used for enabling the third equipment to acquire event information; responding to the detected second operation of the user, the first equipment and the second equipment establish a second channel, and disconnect the second channel with the third equipment; responding to the detected third operation of the user, the first equipment acquires second operation information and sends the second operation information to the second equipment; 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 cross-device connection apparatus 60 provided in the embodiment shown in fig. 6 may be used to implement the technical solutions of the method embodiments shown in fig. 1 to fig. 5 of the present application, and the implementation principles and technical effects thereof may be further described with reference to the related descriptions in the method embodiments.
It should be understood that the above division of the modules of the cross-device connection apparatus 60 shown in fig. 6 is only a logical division, and the actual implementation may be wholly or partially integrated into one physical entity or may be physically separated. And these modules can be realized in the form of software called by processing element; or may be implemented entirely in hardware; and part of the modules can be realized in the form of calling by the processing element in software, and part of the modules can be realized in the form of hardware. For example, the detection module may be a separately established processing element, or may be integrated into a chip of the electronic device. Other modules are implemented similarly. In addition, all or part of the modules can be integrated together or can be independently realized. In implementation, each step of the above method or each module above may be implemented by an integrated logic circuit of hardware in a processor element or an instruction in the form of software.
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), or one or more microprocessors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs), among others. For another example, these modules may be integrated together and implemented in the form of a System-On-a-Chip (SOC).
It should be understood that the interface connection relationship between the modules illustrated in the embodiments of the present application is only an illustration, and does not limit the structure of the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection manners or a combination of multiple interface connection manners in the above embodiments.
It is to be understood that the electronic devices and the like described above include hardware structures and/or software modules for performing the respective functions in order to realize the functions described above. Those of skill in the art will readily appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as hardware or combinations of hardware and computer software. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the embodiments of the present application.
In the embodiment of the present application, the electronic device and the like may be divided into functional modules according to the method example, for example, each functional module may be divided according to each function, or two or more functions may be integrated into one processing module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. It should be noted that, in the embodiment of the present application, the division of the module is schematic, and is only one logic function division, and there may be another division manner in actual implementation.
Through the above description of the embodiments, it is clear to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional modules is merely used as an example, and in practical applications, the above function distribution may be completed by different functional modules according to needs, that is, the internal structure of the device may be divided into different functional modules to complete all or part of the above described functions. For the specific working processes of the system, the apparatus and the unit described above, reference may be made to the corresponding processes in the foregoing method embodiments, and details are not described here again.
Each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application may be essentially implemented or make a contribution to the prior art, or all or part of the technical solutions may be implemented in the form of a software product stored in a storage medium and including several instructions for causing a computer device (which may be a personal computer, a server, or a network device) or a processor to execute all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: flash memory, removable hard drive, read only memory, random access memory, magnetic or optical disk, and the like.
The above description is only an embodiment of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions within the technical scope disclosed in the present application should be covered within the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A cross-device connection method is applied to a first device, and is characterized in that the first device and a second device establish a first connection; the first device and the second device have established a first channel and a second channel; the first channel is used for configuring the device type of the second device; the second channel is used for sending device description information of the first device, and the device description information is used for creating a driving device node; the first device having stored device information of the second device, the method comprising:
the first device establishes the first connection with a third device;
establishing, by the first device and the third device, the first channel over the established first connection between the first device and the third device;
the first device and the third device establish the second channel;
the first equipment sends the equipment description information of the first equipment to the third equipment;
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; 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.
2. The method of claim 1, wherein the first connection is a bluetooth paired connection, the first channel is a bluetooth generic attribute protocol channel, and the second channel is a human-machine interaction device channel carried on a generic attribute protocol.
3. The method of claim 1 or 2, wherein after the first device establishes the first channel with the third device, the method further comprises:
the first device sends a switching notification to the second device; wherein the switching notification is to disconnect the second channel between the first device and the second device.
4. The method of any of claims 1-3, wherein after the first device and the third device establish the first channel, the method further comprises:
the first connection and the first channel are maintained between the first device and the second device.
5. The method of any of claims 1-4, wherein after the first device establishes the first channel with the third device, the method further comprises:
the first device determining the third device as a primary connection device; the main connection device is used for receiving the operation information sent by the first device.
6. The method according to any of claims 1-5, wherein the driver device nodes comprise standard device nodes and multi-connection control device nodes; the standard device node is configured to receive operation information sent by the first device, and the multi-connection control device node is configured to perform data transmission between the second device and the third device.
7. The method of claim 6, wherein the multi-connection control device node comprises one or more extended functions.
8. The method according to any one of claims 1-7, further comprising:
responding to the detected first operation of the user, the first equipment acquires first operation information and sends the first operation information to the third equipment; wherein the first operation information is used for enabling the third device to acquire event information;
in response to the 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;
responding to the detected third operation of the user, the first equipment acquires second operation information and sends the second operation information to the second equipment; wherein the second operation information is used to cause the second device to request data from the third device based on the event information.
9. A first device, comprising: a memory for storing computer program code, the computer program code comprising instructions that, when read from the memory by the first device, cause the first device to perform the method of any of claims 1-8.
10. A computer readable storage medium comprising computer instructions that, when executed on the first device, cause the first device to perform the method of any one of claims 1-8.
CN202111148202.7A 2021-09-29 2021-09-29 Cross-device connection method, electronic device, and storage medium Pending CN115884140A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202111148202.7A CN115884140A (en) 2021-09-29 2021-09-29 Cross-device connection method, electronic device, and storage medium
PCT/CN2022/117546 WO2023051204A1 (en) 2021-09-29 2022-09-07 Cross-device connection method, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111148202.7A CN115884140A (en) 2021-09-29 2021-09-29 Cross-device connection method, electronic device, and storage medium

Publications (1)

Publication Number Publication Date
CN115884140A true CN115884140A (en) 2023-03-31

Family

ID=85755930

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111148202.7A Pending CN115884140A (en) 2021-09-29 2021-09-29 Cross-device connection method, electronic device, and storage medium

Country Status (2)

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

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110185009A1 (en) * 2010-01-22 2011-07-28 Ours Technology Inc. Resource sharing devices
US20160285952A1 (en) * 2015-03-25 2016-09-29 Qualcomm Incorporated Conveying data between devices in wireless personal area network
US20170351396A1 (en) * 2016-06-03 2017-12-07 Logitech Europe S.A. Automatic application launching in a multi-host flow-enabled system
CN113115294B (en) * 2021-04-22 2022-05-03 荣耀终端有限公司 Stylus pen connection method and Bluetooth system
CN113377272A (en) * 2021-06-02 2021-09-10 Tcl通讯(宁波)有限公司 Method and device for sharing mouse among multiple devices, terminal device and storage medium

Also Published As

Publication number Publication date
WO2023051204A1 (en) 2023-04-06

Similar Documents

Publication Publication Date Title
JP7378576B2 (en) Terminal device, method and system for implementing one-touch screen projection using remote control device
US20220039179A1 (en) Bluetooth Connection Method and Device
WO2021036835A1 (en) Bluetooth search method and system, and related apparatus
JP2022529033A (en) Bluetooth connection method, device, and system
WO2021052178A1 (en) Wi-fi connection method and device
JP7239257B2 (en) Data transfer method and electronic device
CN111373713B (en) Message transmission method and device
WO2021104114A1 (en) Method for providing wireless fidelity (wifi) network access service, and electronic device
WO2021043219A1 (en) Bluetooth reconnection method and related apparatus
WO2021043198A1 (en) Bluetooth pairing method, and related device
WO2022068513A1 (en) Wireless communication method and terminal device
WO2021147660A1 (en) Data transmission method, and device
WO2020078332A1 (en) Negotiation method based on voice call translation capability, and electronic devices
CN113038627B (en) File sharing method, mobile device and computer storage medium
US20240008107A1 (en) Communication connection establishment method and system, electronic device, and storage medium
WO2022143156A1 (en) Encrypted call method and apparatus, terminal, and storage medium
WO2021218544A1 (en) Wireless connection providing system, method, and electronic apparatus
EP4102927A1 (en) Dual wifi connection method and electronic device
CN115550423A (en) Data communication method, electronic device, and storage medium
WO2023051204A1 (en) Cross-device connection method, electronic device and storage medium
WO2022057521A1 (en) Method and devices for configuring device
WO2023025059A1 (en) Communication system and communication method
WO2022095581A1 (en) Data transmission method and terminal device
CN117014377A (en) Congestion control negotiation method, electronic equipment and storage medium
CN117098253A (en) Networking method and device

Legal Events

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