Device connection method, apparatus and system

By detecting preset interactive events, the second electronic device controls the connection between the third electronic device and the first electronic device, solving the problem of complex and time-consuming connection between devices, and achieving efficient device switching and simplified user operation.

CN115703006BActive Publication Date: 2025-10-24HUAWEI TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110929468.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-13
Publication Date
2025-10-24
Estimated Expiration
2041-08-13

AI Technical Summary

Technical Problem

In multi-device scenarios, the connection process between devices in existing technologies is complex and time-consuming, resulting in low connection efficiency.

Method used

By detecting preset interactive events, the first electronic device sends a message to the second electronic device to control the connection between the third electronic device and the first electronic device, and exchanges data through the second electronic device, realizing device switching without direct Bluetooth connection and simplifying user operation.

Benefits of technology

It improves the efficiency of connection between devices, reduces the complexity of user operation and connection time, and reduces the complexity of device switching.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115703006B_ABST
    Figure CN115703006B_ABST
Patent Text Reader

Abstract

The application provides a device connection method, device and system, applied to the technical field of terminal, and can improve the connection efficiency between electronic devices. The method comprises the following steps: detecting an interaction event; in the case that the preset interaction event is detected, sending a first message to a second electronic device, the first message being used for indicating the preset interaction event, so that the second electronic device controls a third electronic device to connect with the first electronic device; and interacting with the third electronic device through the connection between the first electronic device and the third electronic device to obtain first data.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of terminal, and particularly relates to a device connection method, device and system. BACKGROUND

[0002] At present, games are more and more favored by users. In daily life, users often connect a handle to an electronic device (such as a mobile phone, a tablet computer, a notebook computer) to play a game running on the electronic device through the handle.

[0003] In some scenarios, a user can use a handle to operate a game on multiple electronic devices. For example, at present, a game 1 runs on a television, and the user can operate the handle to establish a connection with the television so as to operate the game on the television through the handle. After that, the user wants to operate a game on a computer, and the user needs to operate the handle again to establish a connection with the computer so as to operate the game on the computer through the handle. It can be seen that, in order to operate a game on multiple electronic devices through a handle, multiple connection establishment operations are needed, and the connection establishment process is relatively complex and time-consuming. How to provide a more efficient connection establishment scheme in a multi-device scenario has become a problem to be solved. SUMMARY

[0004] Embodiments of the present application provide a device connection method, device and system, which can solve the problem of low connection efficiency between devices and improve the connection efficiency between devices.

[0005] To achieve the above object, the present application adopts the following technical solutions:

[0006] In a first aspect, a device connection method is provided. The method can be applied to a first electronic device or a component (such as a chip system) capable of realizing the function of the first electronic device, and the method comprises: detecting an interaction event, in the case of detecting a preset interaction event, sending a first message to a second electronic device, the first message being used to indicate the preset interaction event, so as to make the second electronic device control a third electronic device to connect with the first electronic device. Then, the first data is interacted with the third electronic device through the connection between the first electronic device and the third electronic device.

[0007] The technical scheme of the embodiment of the application can automatically send a first message to a second electronic device after the first electronic device detects a preset interaction event, so as to trigger the second electronic device to control the first electronic device to connect with a third electronic device. Compared with the prior art, in which, in order to make the first electronic device (such as a mobile phone) connect with the third electronic device (such as a handle), a user needs to perform many operations such as opening a Bluetooth setting interface and clicking to search for a Bluetooth signal, the device connection scheme of the embodiment of the application can make the first electronic device connect with the third electronic device without the user needing to perform many operations on each electronic device, which can not only reduce the user's operation of complex interfaces, but also avoid the problem of delayed connection caused by complex interaction between the user and the device, and improve the connection efficiency between devices.

[0008] In a possible design, the third electronic device is connected with the first electronic device through the second electronic device.

[0009] The first data is interacted with the third electronic device through the connection between the third electronic device and the second electronic device.

[0010] In this way, the first data from the third electronic device is forwarded to the first electronic device through the second electronic device, and the third electronic device does not need to establish a direct connection such as a Bluetooth connection with the first electronic device, so that the third electronic device can complete the switching connection even if the Bluetooth switch of the first electronic device is off, and the user does not need to additionally perform operations such as opening the Bluetooth switch of the mobile phone to make the third electronic device switch the connection, thereby reducing the operation complexity of the third electronic device in switching the connection.

[0011] In a possible design, the method further includes:

[0012] Receiving identification information of the third electronic device from the second electronic device;

[0013] Analyzing the first data according to the identification information of the third electronic device.

[0014] In a possible design, the third electronic device is connected with the first electronic device through a third connection;

[0015] The first data is interacted with the third electronic device through the connection between the third electronic device and the second electronic device, including: the first data is interacted with the third electronic device through the third connection.

[0016] In this way, the third electronic device and the first electronic device can establish a direct communication connection. In this way, after the third electronic device switches to connect to the first electronic device, the state of the second electronic device does not affect the control of the first electronic device (such as a mobile phone) by the third electronic device (such as a handle). For example, the second electronic device can turn off Bluetooth or turn off, and neither of them will affect the control of the first electronic device by the third electronic device.

[0017] In a possible design, the method further includes: after detecting the preset interaction event, presenting a first interface, the first interface being used to prompt whether to connect the third electronic device.

[0018] The first message is sent, including: after detecting the first operation instruction, sending the first message, the first operation instruction being an operation instruction indicating to connect the first electronic device.

[0019] Through the interface prompting manner, the problem caused by user's accidental touch can be reduced.

[0020] In a possible design, the method further includes:

[0021] After connecting with the third electronic device, a second interface is presented, the second interface being used to prompt whether to control the third electronic device to connect with the second electronic device.

[0022] After detecting the second operation instruction, the third electronic device is controlled to connect with the second electronic device, the second operation instruction being an operation instruction indicating the third electronic device to connect with the second electronic device.

[0023] In some cases, through the interface prompting manner, the problem caused by user's accidental touch can be reduced. Or, even if the user does not accidentally touch, the user can also switch the third electronic device to connect with the initially connected second electronic device through the interface operation.

[0024] In a possible design, the first message is further used to indicate the time of the preset interaction event. The first electronic device sends the first message, so that other devices in the group can determine the time when each interaction event occurs, so as to accurately determine the focus device (i.e., the device that occurs the preset interaction event) according to the time stamp.

[0025] In a possible design, the preset interaction event is associated with the third electronic device.

[0026] Optionally, the preset interaction event is associated with an electronic device (such as a peripheral device) means that the device function corresponding to the preset interaction event needs to be associated with the peripheral device for input and / or output. Taking opening a game application as an example, the device function corresponding to the opening of the game application is a game function. Optionally, in order to better the game interaction experience, the device can control the game operation on the device by means of a handle. Here, the handle can be referred to as a peripheral device associated with the preset interaction event of opening the game application. Taking opening a document editing application as an example, the device function corresponding to the opening of the document editing application is an input document function. Optionally, in order to improve the input efficiency, the device can input text to the device by means of a keyboard. Here, the keyboard can be referred to as a peripheral device associated with the preset interaction event of opening the document editing application.

[0027] In a possible design, the method further includes:

[0028] The third interface is used to set the association relationship between the preset interaction event and the third electronic device. By providing a setting entry for the user, the user can set a personalized association relationship according to the user's own needs. In this way, when a preset interaction event occurs on a certain device (such as a mobile phone), the device can share the third electronic device (such as a peripheral device) connected in the network group, which corresponds to the event, thereby improving the user's interaction experience.

[0029] In a possible design, the preset interaction event includes any one or more of the following events: a preset touch event, a preset voice input event, opening a preset application, opening a preset function of a preset application, turning on a screen, detecting a touch event at a preset position on the screen, a preset gesture input by the user, and a preset operation performed by the user through a preset application.

[0030] In a second aspect, a device connection method is provided, which is applied to a second electronic device or a chip system, and includes: receiving a first message from a first electronic device when the first electronic device detects a preset interaction event; the first message is used to indicate the preset interaction event; and according to the first message, controlling a third electronic device associated with the preset interaction event to connect with the first electronic device.

[0031] In a possible design, according to the first message, the third electronic device associated with the preset interaction event is controlled to connect with the first electronic device, including:

[0032] receiving first data from the third electronic device through the first connection, and sending the first data to the first electronic device through the second connection according to the first message;

[0033] Or, receiving first data from the first electronic device through the second connection, and sending the first data to the third electronic device through the first connection according to the first message;

[0034] The second electronic device is connected with the first electronic device through a second connection.

[0035] In a possible design, the method further includes:

[0036] sending, to the first electronic device, identification information of the third electronic device, the identification information of the third electronic device being used by the first electronic device to parse the first data.

[0037] In a possible design, according to the first message, the third electronic device associated with the preset interaction event is controlled to be connected with the first electronic device, including:

[0038] According to the first message, a second message is sent to the third electronic device, the second message being used to instruct the third electronic device to establish the third connection with the first electronic device.

[0039] In a possible design, the method further includes:

[0040] sending, to the third electronic device, address information of the first electronic device, the address information being used by the third electronic device to establish the third connection.

[0041] In a possible design, the first message is further used to indicate a time of the preset interaction event.

[0042] A third aspect provides a device connection system, including:

[0043] a first electronic device configured to send a first message in a case where a preset interaction event is detected, the first message being used to indicate the preset interaction event;

[0044] a second electronic device connected with a third electronic device through a first connection, configured to receive the first message from the first electronic device, and control the third electronic device to be connected with the first electronic device according to the first message;

[0045] a third electronic device configured to interact with the first electronic device through a connection between the third electronic device and the first electronic device.

[0046] In a possible design, the third electronic device is connected with the first electronic device through the second electronic device.

[0047] The third electronic device is configured to interact with the first electronic device through the connection between the third electronic device and the first electronic device, including: interacting with the first electronic device through the second electronic device.

[0048] In a possible design, the second electronic device is configured to control the third electronic device to be connected with the first electronic device according to the first message, including: receiving the first data from the third electronic device through the first connection, and sending the first data to the first electronic device through the second connection according to the first message.

[0049] Alternatively, the first data is received from the first electronic device through the second connection, and the first data is sent to the third electronic device through the first connection according to the first message;

[0050] The connection between the second electronic device and the first electronic device is the second connection.

[0051] In a possible design, the second electronic device is further configured to send identification information of the third electronic device to the first electronic device;

[0052] The first electronic device is further configured to: receive the identification information of the third electronic device from the second electronic device; and parse the first data according to the identification information of the third electronic device.

[0053] In a possible design, the third electronic device is further configured to receive a second message from the second electronic device, and the second message is used to instruct the third electronic device to establish the third connection with the first electronic device;

[0054] The third electronic device is further configured to establish the third connection according to the second message.

[0055] The third electronic device is configured to interact with the first electronic device through the connection between the first electronic device and the third electronic device, including: interacting with the first electronic device through the third connection.

[0056] In a possible design, the second electronic device is configured to control the third electronic device to connect with the first electronic device according to the first message, including:

[0057] The second electronic device is configured to send the second message to the third electronic device according to the first message.

[0058] In a possible design, the second electronic device is further configured to: send address information of the first electronic device to the third electronic device,

[0059] The third electronic device is configured to establish the third connection according to the second message, including: the third electronic device establishes the third connection according to the address information of the first electronic device.

[0060] In a possible design, the first electronic device is further configured to: present a first interface after detecting a preset interaction event, the first interface being used to prompt whether to connect the third electronic device;

[0061] The first message is sent, including: the first message is sent after detecting a first operation instruction, the first operation instruction being an operation instruction indicating to connect the first electronic device.

[0062] In a possible design, the first electronic device further includes a second interface, which is used to prompt whether to control the third electronic device to connect with the second electronic device after the third electronic device is connected with the first electronic device.

[0063] The third electronic device is controlled to connect with the second electronic device after the second operation instruction is detected, and the second operation instruction is an operation instruction indicating that the third electronic device connects with the second electronic device.

[0064] In a possible design, the first message further indicates a time of the preset interaction event.

[0065] In a possible design, the preset interaction event is associated with the third electronic device.

[0066] In a possible design, the first electronic device further includes a third interface, which is used to set an association relationship between the preset interaction event and the third electronic device.

[0067] In a possible design, the preset interaction event includes any one or more of the following events: a preset touch event, a preset voice input event, opening a preset application, opening a preset function of the preset application, turning on a screen, detecting a touch event at a preset position of the screen, a preset gesture input by a user, and a preset operation performed by the user through a preset application.

[0068] In a fourth aspect, the present application provides an electronic device having a function of implementing the device connection method in any of the above aspects and possible implementation manners. The function can be implemented by hardware, or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions.

[0069] In a fifth aspect, the present application provides a computer-readable storage medium, which includes computer instructions, and when the computer instructions run on an electronic device, the electronic device performs the device connection method in any of the above aspects and possible implementation manners.

[0070] In a sixth aspect, the present application provides a computer program product, which, when running on an electronic device, causes the electronic device to perform the device connection method in any of the above aspects and possible implementation manners.

[0071] In a seventh aspect, a circuit system is provided, which includes a processing circuit configured to perform the device connection method in any of the above aspects and possible implementation manners.

[0072] In an eighth aspect, an embodiment of the present application provides a chip system, comprising at least one processor and at least one interface circuit, the at least one interface circuit being configured to perform a transceiving function and send an instruction to the at least one processor, and when the at least one processor executes the instruction, the at least one processor performs the device connection method in any of the aspects above and any possible implementation manner thereof. BRIEF DESCRIPTION OF DRAWINGS

[0073] Figure 1 A system architecture diagram is provided for the embodiment of the present application.

[0074] Figure 2 A structure diagram of an electronic device is provided for the embodiment of the present application.

[0075] Figure 3 A software architecture diagram of an electronic device is provided for the embodiment of the present application.

[0076] Figure 4 Another structure diagram of an electronic device is provided for the embodiment of the present application.

[0077] Figure 5 A scenario diagram applicable to the device connection method is provided for the embodiment of the present application.

[0078] Figure 6 , Figure 7 A flow diagram of the device connection method is provided for the embodiment of the present application.

[0079] Figures 8-10 A scenario diagram applicable to the device connection method is provided for the embodiment of the present application.

[0080] Figure 11 A group of interface diagrams is provided for the embodiment of the present application.

[0081] Figure 12 A diagram of an apparatus is provided for the embodiment of the present application.

[0082] Figure 13 A diagram of a chip system is provided for the embodiment of the present application. DETAILED DESCRIPTION

[0083] The embodiment of the present application provides a device connection method, which can be applied to a system comprising a plurality of devices. Each device in the plurality of devices can be connected with an external device. The plurality of devices can share the external devices of each other. Figure 1 An exemplary system diagram is provided for the embodiment of the present application. Referring to Figure 1 , the system comprises a plurality of electronic devices Figure 1 (e.g., electronic devices 101-103) and an external device of the electronic device (which can be referred to as an external device).

[0084] The plurality of electronic devices can establish a communication connection. Optionally, the manner of establishing a connection between the devices includes, but is not limited to, one or more of the following: establishing a communication connection by scanning a two-dimensional code or a bar code, establishing a connection by a wireless fidelity (Wi-Fi) protocol, a Bluetooth communication protocol, or a nearby service. After establishing a communication connection, data transmission can be performed between the devices.

[0085] The embodiments of the present application do not limit the manner of establishing a connection between the electronic devices.

[0086] Optionally, the electronic device can be a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, a netbook, a personal digital assistant (PDA), a television, or the like. The embodiments of the present application do not specially limit the specific form of the electronic device. Figure 1 The form of the electronic device is exemplarily illustrated by taking the electronic device 101 as a television, the electronic device 102 as a tablet computer, and the electronic device 103 as a mobile phone, but this does not constitute a limitation on the form of the electronic device.

[0087] In the embodiments of the present application, the electronic device can be connected to an external device. The communication connection established between the electronic device and the external device can be a wired connection or a wireless connection, which is not limited herein. The communication protocol used for establishing a connection between the electronic device and the external device is not limited. Optionally, the communication protocol includes, but is not limited to, a Bluetooth protocol.

[0088] Optionally, the external device includes, but is not limited to, a handle, a smart pen, a remote controller, a headset, a sound box, a microphone, a keyboard, and a mouse. Exemplarily, the microphone, the keyboard, and the handle can be regarded as input devices. The headset can be regarded as an output device when playing audio, and can be regarded as an input device when used as a key control. Figure 1 The external device is taken as a handle for example, but this does not constitute a limitation on the form and structure of the external device. The external device is taken as a handle for example, and the handle can be connected to the electronic device (such as a computer) in a wireless manner. The headset is taken as an example, the wired headset can be connected to the electronic device (such as a mobile phone) in a wired manner, and the wireless headset (such as a Bluetooth headset) can be connected to the electronic device in a wireless manner (such as a Bluetooth manner).

[0089] Optionally, the devices in the network can share device-related information of each other. The device-related information includes, but is not limited to, information of a connected external device of the device, and information of the device. The information of the external device includes, but is not limited to, identification information of the external device. The information of the device includes, but is not limited to, identification information of the device. Optionally, the identification information of the device includes, but is not limited to, a Bluetooth address, an IP address, or the like of the device.

[0090] For example, the computer and the mobile phone are connected to each other, the mobile phone can send the identification of the mobile phone to the computer, and the computer can send the identification of the computer to the mobile phone. For example, the electronic device is a computer, and the connected external device is a handle, the computer can send the identification of the tablet and the mobile phone in the network to the handle.

[0091] In some scenarios, the external device 104 is currently connected to the electronic device 101, and the user wants to use the external device 104 to operate the electronic device 103, and then the user needs to manually pair the electronic device 103 and the external device 104. For example, the external device 104 is a handle, and the electronic device 103 is a mobile phone. The user controls the handle to enter the pairing mode by, for example, pressing the pairing button on the handle for 5 seconds. After the handle enters the pairing mode, the handle sends a Bluetooth pairing signal. Then, the user unlocks the mobile phone and turns on the Bluetooth switch of the mobile phone, and controls the mobile phone to search for the Bluetooth pairing signal of the handle. After the mobile phone searches for the Bluetooth pairing signal of the handle, the user needs to input a Bluetooth pairing code. It can be seen that, in order to establish a connection between the handle and the mobile phone, the user needs to manually perform a plurality of operations, which consumes a long time and is not efficient.

[0092] In order to improve the connection efficiency between the electronic device and the external device, and reduce the operation complexity of the user, an embodiment of the present application provides a device connection method, which can be applied to Figure 1 The system. For example, the electronic device is a mobile phone, please refer to Figure 2 , which is an example of the structure of the mobile phone provided by the embodiment of the present application. As Figure 2 shown, the electronic device 103 can include a processor, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charge 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, a headset interface 170D, a sensor module 180, a key 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195.

[0093] The sensor module 180 can include a pressure sensor 180A, a gyro 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.

[0094] It can be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the electronic device 103. In other embodiments of the present application, the electronic device 103 can include more or fewer components than illustrated, or combine certain components, or split certain components, or different arrangement of components. The illustrated components can be implemented in hardware, software, or a combination of software and hardware.

[0095] The processor can include one or more processing units, for example: the processor can include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units can be independent devices, or can be integrated in one or more processors.

[0096] The controller can be the nerve center and command center of the electronic device 103. The controller can generate operation control signals according to instruction operation codes and timing signals, and complete the control of fetching and executing instructions.

[0097] The memory can also be provided in the processor, for storing instructions and data. In some embodiments, the memory in the processor is a cache memory. The memory can save instructions or data that the processor has just used or repeatedly uses. If the processor needs to use the instructions or data again, it can directly call from the memory. This avoids repeated access and reduces the waiting time of the processor, thus improving the efficiency of the system.

[0098] In some embodiments, the processor can include one or more interfaces. The interfaces can include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0099] It can be understood that the interface connection relationship between the modules shown in the embodiments of the present application is only illustrative and does not constitute a limitation on the structure of the electronic device 103. In other embodiments of the present application, the electronic device 103 can also use different interface connection methods or a combination of multiple interface connection methods.

[0100] The charging management module 140 is configured to receive charging input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 can receive charging input from a wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 can receive wireless charging input through a wireless charging coil of the electronic device 103. The charging management module 140 can charge the battery 142 and also supply power to the electronic device through the power management module 141.

[0101] The power management module 141 is configured to connect the battery 142, the charging management module 140, and the processor. The power management module 141 receives input from the battery 142 and / or the charging management module 140 to supply power to the processor, the internal memory 121, the external memory, the display screen 194, the camera 193, and the wireless communication module 160, etc. The power management module 141 can also be configured to monitor parameters such as battery capacity, battery cycle count, battery health status (leakage, impedance), etc. In other embodiments, the power management module 141 can also be arranged in the processor. In other embodiments, the power management module 141 and the charging management module 140 can also be arranged in the same device.

[0102] The wireless communication function of the electronic device 103 can be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, and the baseband processor, etc.

[0103] The antenna 1 and the antenna 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device 103 can be used to cover a single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example, the antenna 1 can be multiplexed as a diversity antenna of a wireless local area network. In some other embodiments, the antennas can be used in combination with a tuning switch.

[0104] The mobile communication module 150 can provide a solution including 2G / 3G / 4G / 5G wireless communication applied to the electronic device 103. The mobile communication module 150 can include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves by the antenna 1, and perform filtering, amplification, etc. on the received electromagnetic waves, and transmit the processed electromagnetic waves to the modem processor for demodulation. The mobile communication module 150 can also amplify the signals modulated by the modem processor, and convert the signals into electromagnetic waves radiated by the antenna 1. In some embodiments, at least part of the functional modules of the mobile communication module 150 can be arranged in the processor. In some embodiments, at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor can be arranged in the same device.

[0105] The modem processor can include a modulator and a demodulator. The modulator is used to modulate a low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. The low-frequency baseband signal processed by the baseband processor is transmitted to the application processor. The application processor outputs a sound signal through an audio device (not limited to the loudspeaker 170A, the microphone 170B, etc.), or displays an image or a video through the display screen 194. In some embodiments, the modem processor can be an independent device. In some other embodiments, the modem processor can be independent of the processor, and arranged in the same device as the mobile communication module 150 or other functional modules.

[0106] The wireless communication module 160 can provide a solution for wireless communication, including wireless local area networks (WLAN) (e.g., wireless fidelity (Wi-Fi) network), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR) technology, etc., which are applied to the electronic device 103.

[0107] The wireless communication module 160 can be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives an electromagnetic wave via the antenna 2, frequency-modulates and filters the electromagnetic wave signal, and transmits the processed signal to the processor.

[0108] The wireless communication module 160 can also receive a signal to be transmitted from the processor, frequency-modulate it, amplify it, and convert it into electromagnetic wave radiation via the antenna 2.

[0109] In some embodiments, antenna 1 and mobile communication module 150 of electronic device 103 are coupled, and antenna 2 and wireless communication module 160 are coupled, so that electronic device 103 can communicate with a network and other devices through wireless communication technology. The wireless communication technology can include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology, etc. The GNSS can include a global positioning system (GPS), a global navigation satellite system (GLONASS), a beidu navigation satellite system (BDS), a quasi-zenith satellite system (QZSS), and / or a satellite based augmentation systems (SBAS).

[0110] Electronic device 103 implements a display function through a GPU, a display screen 194, and an application processor, etc. The GPU is a microprocessor for image processing, which is connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor can include one or more GPUs, which execute program instructions to generate or change display information.

[0111] The display screen 194 is configured to display images, videos, and the like. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flex light-emitting diode (FLED), a Miniled, a MicroLed, a Micro-oLed, a quantum dot light emitting diodes (QLED), or the like. In some embodiments, the electronic device 103 can include one or N display screens 194, where N is a positive integer greater than 1.

[0112] The electronic device 103 can implement the photographing function through the ISP, the camera 193, the video codec, the GPU, the display screen 194, and the application processor.

[0113] The ISP is configured to process the data fed back by the camera 193. For example, when taking a photo, the shutter is opened, the light is transmitted to the camera photosensitive element through the lens, the light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing to convert it into an image visible to the naked eye. The ISP can also optimize the noise, brightness, and skin color of the image. The ISP can also optimize the exposure, color temperature, and other parameters of the shooting scene. In some embodiments, the ISP can be disposed in the camera 193.

[0114] The camera 193 is configured to capture still images or videos. An object generates an optical image through a lens and projects it onto a photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, which is then transmitted to the ISP to convert it into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into a standard RGB, YUV, or the like format image signal. In some embodiments, the electronic device 103 can include one or N cameras 193, where N is a positive integer greater than 1.

[0115] The digital signal processor is used to process digital signals, in addition to being able to process digital image signals, it can also process other digital signals. For example, when the electronic device 103 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy, etc.

[0116] The video codec is used to compress or decompress digital video. The electronic device 103 can support one or more video codecs. In this way, the electronic device 103 can play or record videos in multiple encoding formats, such as: moving picture experts group (MPEG) 1, MPEG 2, MPEG 3, MPEG 4, etc.

[0117] The NPU is a neural-network (NN) computing processor, which can quickly process input information by drawing on the structure of a biological neural network, such as the transmission mode between human brain neurons, and can also continuously self-learn. Through the NPU, the electronic device 103 can realize intelligent cognitive applications such as image recognition, face recognition, voice recognition, and text understanding.

[0118] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 103. The external memory card communicates with the processor through the external memory interface 120 to realize data storage functions. For example, music, video, and other files are saved in the external memory card.

[0119] The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor executes the instructions stored in the internal memory 121 to perform various functional applications and data processing of the electronic device 103. The internal memory 121 can include a program storage area and a data storage area. The program storage area can store an operating system, at least one application program required by a function (such as a sound playing function, an image playing function, etc.), etc. The data storage area can store data created during use of the electronic device 103 (such as audio data, a phonebook, etc.), etc. In addition, the internal memory 121 can include a high-speed random access memory, and can also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0120] In some embodiments of the present application, the memory can store identification information of the electronic device 103. For example, a Bluetooth address that can be used to uniquely identify the electronic device 103. In addition, the memory can also store connection data of electronic devices that have been successfully paired with the electronic device 103 before. For example, the connection data can be the Bluetooth address of the electronic device that has been successfully paired with the electronic device 103. Based on the connection data, the electronic device 103 can automatically pair with the electronic device without having to configure the connection between them, such as performing legality verification, etc. The Bluetooth address mentioned above can be a media access control (MAC) address.

[0121] The electronic device 103 can realize audio functions through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the earphone interface 170D, and the application processor, etc. For example, music playing, recording, etc.

[0122] The audio module 170 is used to convert digital audio information into analog audio signals for output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be disposed in the processor, or part of the functions of the audio module 170 can be disposed in the processor.

[0123] The speaker 170A, also known as a "loudspeaker", is used to convert audio electrical signals into sound signals. The electronic device 103 can listen to music or listen to a hands-free call through the speaker 170A.

[0124] The receiver 170B, also known as a "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 103 answers a call or a voice message, the receiver 170B can be held close to the ear to listen to the voice.

[0125] The microphone 170C, also known as a "microphone", "sound collector", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak into the microphone 170C through the mouth to input the sound signal into the microphone 170C. The electronic device 103 can be provided with at least one microphone 170C. In other embodiments, the electronic device 103 can be provided with two microphones 170C, in addition to collecting sound signals, it can also realize the noise reduction function. In other embodiments, the electronic device 103 can also be provided with three, four or more microphones 170C, which can realize the functions of collecting sound signals, noise reduction, and identifying the source of sound, and realize the function of directional recording, etc.

[0126] The earphone interface 170D is used to connect a wired earphone. The earphone interface 170D can be a USB interface 130, or a 3.5mm open mobile terminal platform (OMTP) standard interface, or a cellular telecommunications industry association of the USA (CTIA) standard interface.

[0127] The pressure sensor 180A is used to sense a pressure signal, and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be disposed on the display screen 194. The pressure sensor 180A can be of various types, such as a resistive pressure sensor, an inductive pressure sensor, a capacitive pressure sensor, etc. The capacitive pressure sensor can include at least two parallel plates of conductive material. When a force is applied to the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 103 determines the intensity of the force according to the change in capacitance. When a touch operation is applied to the display screen 194, the electronic device 103 detects the intensity of the touch operation according to the pressure sensor 180A. The electronic device 103 can also calculate the position of the touch according to the detection signal of the pressure sensor 180A. In some embodiments, touch operations applied to the same touch position but with different touch operation intensities can correspond to different operation instructions. For example, when a touch operation with a touch operation intensity less than a pressure threshold is applied to a short message application icon, an instruction to view a short message is executed. When a touch operation with a touch operation intensity greater than or equal to the pressure threshold is applied to the short message application icon, an instruction to create a new short message is executed.

[0128] The gyroscope sensor 180B can be used to determine the motion attitude of the electronic device 103. In some embodiments, the angular velocity of the electronic device 103 around three axes (i.e., the x, y, and z axes) can be determined by the gyroscope sensor 180B. The gyroscope sensor 180B can be used for anti-shake photography. For example, when the shutter is pressed, the gyroscope sensor 180B detects the angle of shaking of the electronic device 103, and calculates the distance that the lens module needs to compensate according to the angle, so that the lens counteracts the shaking of the electronic device 103 by reverse movement, thereby achieving anti-shake. The gyroscope sensor 180B can also be used for navigation and motion sensing game scenarios.

[0129] The barometric pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 103 calculates the altitude, assists positioning and navigation by using the air pressure value measured by the barometric pressure sensor 180C.

[0130] The magnetic sensor 180D includes a Hall sensor. The electronic device 103 can detect the opening and closing of a flip cover using the magnetic sensor 180D. In some embodiments, when the electronic device 103 is a flip phone, the electronic device 103 can detect the opening and closing of the flip according to the magnetic sensor 180D. In turn, according to the detected opening and closing state of the cover or the opening and closing state of the flip, the electronic device 103 can set a feature such as automatic unlocking of the flip.

[0131] The acceleration sensor 180E can detect the magnitude of acceleration of the electronic device 103 in various directions (typically, three axes). The magnitude and direction of gravity can be detected when the electronic device 103 is stationary. It can also be used to identify the electronic device posture, applied to landscape / portrait switching, pedometer, etc.

[0132] The distance sensor 180F is used to measure distance. The electronic device 103 can measure distance by infrared or laser. In some embodiments, such as in a shooting scene, the electronic device 103 can use the distance sensor 180F to measure distance to achieve fast focusing.

[0133] The proximity light sensor 180G can include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode can be an infrared light emitting diode. The electronic device 103 emits infrared light outwardly through the light emitting diode. The electronic device 103 detects infrared reflected light from nearby objects using the photodiode. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 103. When insufficient reflected light is detected, the electronic device 103 can determine that there is no object near the electronic device 103. The electronic device 103 can use the proximity light sensor 180G to detect that the user holds the electronic device 103 close to the ear to talk, so as to automatically turn off the screen to achieve power saving. The proximity light sensor 180G can also be used for automatic unlocking and locking of the cover mode and pocket mode.

[0134] The ambient light sensor 180L is used to sense the brightness of ambient light. The electronic device 103 can adaptively adjust the brightness of the display screen 194 according to the sensed brightness of ambient light. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 103 is in the pocket to prevent accidental touch.

[0135] The fingerprint sensor 180H is used to collect fingerprints. The electronic device 103 can use the collected fingerprint characteristics to achieve fingerprint unlocking, access application lock, fingerprint shooting, fingerprint answering calls, etc.

[0136] The temperature sensor 180J is configured to detect temperature. In some embodiments, the electronic device 103 performs temperature handling strategies based on the temperature detected by the temperature sensor 180J. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the electronic device 103 reduces the performance of a processor located near the temperature sensor 180J to reduce power consumption and implement thermal protection. In another example, when the temperature is below another threshold, the electronic device 103 heats the battery 142 to avoid abnormal shutdown of the electronic device 103 caused by low temperature. In yet another example, when the temperature is below yet another threshold, the electronic device 103 boosts the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.

[0137] The touch sensor 180K, also referred to as a "touch panel". The touch sensor 180K can be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also referred to as a "touch panel". The touch sensor 180K is configured to detect a touch operation acting on or near the touch sensor 180K. The touch sensor 180K can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In another example, the touch sensor 180K can also be disposed on the surface of the electronic device 103, which is different from the position of the display screen 194.

[0138] The bone conduction sensor 180M can obtain a vibration signal. In some embodiments, the bone conduction sensor 180M can obtain a vibration signal of a human body sound vibration bone block. The bone conduction sensor 180M can also contact the human body pulse to receive a blood pressure pulsation signal. In some embodiments, the bone conduction sensor 180M can also be disposed in a headset to form a bone conduction headset. The audio module 170 can analyze a voice signal based on the vibration signal of the sound vibration bone block obtained by the bone conduction sensor 180M to implement a voice function. The application processor can analyze heart rate information based on the blood pressure pulsation signal obtained by the bone conduction sensor 180M to implement a heart rate detection function.

[0139] The keys 190 include a power key, a volume key, and the like. The keys 190 can be mechanical keys. Alternatively, the keys 190 can be touch keys. The electronic device 103 can receive key input and generate key signal input related to user settings and function control of the electronic device 103.

[0140] The motor 191 can generate a vibration prompt. The motor 191 can be used for incoming call vibration prompt, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, playing audio, etc.) can correspond to different vibration feedback effects. The motor 191 can also correspond to different vibration feedback effects for touch operations acting on different regions of the display screen 194. Different application scenarios (such as time reminders, received messages, alarms, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.

[0141] The indicator 192 can be an indicator light, which can be used to indicate the charging state, the power change, and can also be used to indicate messages, missed calls, notifications, etc.

[0142] The SIM card interface 195 is used to connect the SIM card. The SIM card can be inserted into or pulled out of the SIM card interface 195 to realize contact and separation with the electronic device 103. The electronic device 103 can support one or N SIM card interfaces, and N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, etc. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of multiple cards can be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external storage cards. The electronic device 103 interacts with the network through the SIM card to realize functions such as calling and data communication. In some embodiments, the electronic device 103 uses an eSIM, that is, an embedded SIM card. The eSIM card can be embedded in the electronic device 103 and cannot be separated from the electronic device 103.

[0143] The software system of the electronic device 103 can adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. The embodiment of the present application takes a layered system architecture (such as an Android or a Hongmeng system) as an example to exemplarily illustrate the software structure of the electronic device 103.

[0144] Figure 3 FIG. 1 is a software structure block diagram of the electronic device 103 provided by the embodiment of the present application. The layered architecture can divide the software into several layers, and each layer has a clear role and division of labor. The layers communicate with each other through a software interface. In some embodiments, the layered system can include three layers, from top to bottom, an application program layer (referred to as an application layer), an application program framework layer (referred to as a framework layer), and a kernel layer (also referred to as a driver layer).

[0145] The application layer can include a series of application packages. For example, the application packages can be applications such as a camera, a gallery, a calendar, a call, a map, navigation, WLAN, Bluetooth, music, video, a short message, and a desktop launcher. In the embodiments of the present application, the applications include applications related to preset interaction events, such as a game and a text application.

[0146] The framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions. As shown in Figure 3 The framework layer can include a window manager service (WMS) and an activity manager service (AMS), for example. Optionally, the framework layer can also include a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like (not shown in the figure).

[0147] In the embodiments of the present application, the framework layer can receive the interaction event from the kernel layer.

[0148] The kernel layer is a layer between hardware and software. The kernel layer at least includes a display driver, a camera driver, an audio driver, and a sensor driver. The kernel layer is a layer between hardware and software. The kernel layer can include a display driver, an input / output device driver (for example, a keyboard, a touch screen, a headset, a speaker, a microphone, a handle, and the like), a camera driver, an audio driver, and a sensor driver, and the like.

[0149] In the embodiments of the present application, an HID file can be created for a human interface device (HID) in the kernel layer according to a device identifier of the HID. The system can parse the interaction event according to the HID file, and deliver the interaction event to the framework layer for processing.

[0150] The above Figure 3 The above is only one possible example of the software architecture of the electronic device 103, and does not constitute a limitation on the software architecture of the electronic device 103. It can be understood that the software architecture of the electronic device 103 can also be other. For example, in the layered software architecture, more layers or fewer layers can be divided, and the specific functions of each layer are not limited.

[0151] For example, the above only takes the electronic device 103 as an example to illustrate the software and hardware structure of the electronic device in the embodiments of the present application, but does not constitute a limitation on the structure and form of the electronic device. The embodiments of the present application do not limit the structure and form of the electronic device. For example, Figure 4Another example structure of an electronic device is shown. As shown in Figure 4 The electronic device includes a processor 501, a memory 502, and a transceiver 503. The implementation of the processor 501 and the memory 502 can refer to the implementation of the processor and the memory of the electronic device 103. The transceiver 503 is used for the electronic device to interact with other devices (such as the electronic device 101). The transceiver 503 can be a device based on a communication protocol such as Wi-Fi, Bluetooth, or other communication protocols.

[0152] In some embodiments of the present application, the electronic device can include more or fewer components than shown, or combine certain components, or split certain components, or replace certain components, or different arrangement of components. The components shown can be implemented in hardware, software, or a combination of software and hardware.

[0153] The technical solutions of the embodiments of the present application can be applied to a networking system that needs to switch peripheral connection relationships. Hereinafter, the networking system mainly includes a mobile phone, a tablet, and a notebook computer, and the handle is initially connected to the computer. The technical solutions of the embodiments of the present application are described by taking the game scenario as an example.

[0154] For example, as shown in (1) of Figure 5 The tablet, the computer, and the mobile phone are connected, and the computer and the handle are connected. The application program game 1 is running on the computer. The user can operate the game 1 on the computer through the handle. Then, as shown in (2) of Figure 5 The user opens the application program game 2 on the mobile phone. After detecting that the user opens the game 2, the mobile phone can send information of the event (referred to as event 1) of opening the game 2 on the mobile phone to the tablet and the computer in the networking system.

[0155] In some embodiments, after receiving the information of the event 1 (i.e., the game application has been opened on the mobile phone), the computer can infer that the mobile phone is likely to need to be connected to the handle to control the game on the mobile phone more conveniently. Then, the computer can forward the handle event to the mobile phone as a relay role, and the mobile phone can execute corresponding operations in response to the handle event. In this way, the handle can communicate with the mobile phone through the computer and control the game on the mobile phone. For example, when the user presses a key on the handle, the handle sends information of a key pressing event to the computer, and the computer forwards the information of the key pressing event to the mobile phone, so that the mobile phone can execute corresponding operations (such as changing the forward direction of a game character) according to the information of the key pressing event. Optionally, the key pressing event carries an identifier of the key pressed by the user.

[0156] Optionally, after receiving information about event 1, the computer may no longer respond to controller events. For example, when a user presses a button on the controller, the controller sends information about the button press event to the computer, and the computer no longer performs corresponding operations based on the information about the button press event (such as changing the direction of the game character).

[0157] In other embodiments, after receiving information about event 1 (i.e., a game application has been opened on a mobile phone), the computer may infer that the mobile phone likely needs to be connected to a controller to more conveniently control the game on the mobile phone. The computer can then send an instruction to the controller, instructing it to communicate with the mobile phone based on the mobile phone's identification information. For example, if the mobile phone's identification information is a Bluetooth address, after learning that a game application has been opened on the mobile phone, computer 1 can send an instruction to the controller, instructing it to pair with the mobile phone based on the mobile phone's Bluetooth address. In this way, after the Bluetooth connection is established, the controller can communicate directly with the mobile phone. When the controller generates a key press event, it can directly send information about the key press event to the mobile phone, and the mobile phone can perform corresponding operations based on the key press information.

[0158] It should be noted that Figure 5 The thick solid line between the mobile phone and the handle shown in (2) can represent the path for the handle to forward handle events (such as button press events) to the mobile phone through the computer, or it can represent the path for the handle to send handle events directly to the mobile phone.

[0159] Optional, such as Figure 5 As shown in (3), the user can also open the game application on the tablet in the network. After the tablet detects the event of opening the game application on the tablet (referred to as event 2), it can send the information of event 2 to the computers and mobile phones in the network. The computer can send an instruction message to the handle based on the information of event 2 to instruct the handle to establish a connection with the tablet. In this way, the handle can establish a connection with the tablet based on the instruction message, and the handle can exchange data with the tablet through the connection (such as sending handle events), and then the game operation on the tablet can be controlled by the handle. Alternatively, after receiving the information of event 2, the computer can monitor the handle event based on the information of event 2 and forward the handle event to the tablet. The tablet can control the operation of the tablet based on the handle event, such as controlling the game operation.

[0160] The above-mentioned event of opening the game application can be called a preset interaction event. The device that generates the preset interaction event can be called a focus device. For example, Figure 5 In the scenario shown in (1), the user opens a game application on the computer, and the computer can be called the focus device. Figure 5 In the scenario shown in (2), the user opens a game application on the mobile phone, and the mobile phone can be called the focus device. Figure 5In the scenario shown in (3), the user opens a game application on the tablet, and the tablet can be referred to as a focus device. Alternatively, at the same time, the number of focus devices in the network group can be one or more.

[0161] It can be seen that the focus device can change at different times and in different scenarios. In an embodiment of the present application, when the focus device changes and the focus device is not connected to the target peripheral device, the target peripheral device can be automatically controlled by the device currently connected to the target peripheral device (referred to as a connected non-focus device) to connect the target peripheral device to the focus device, so that the focus device can use the target peripheral device to complete the function corresponding to the preset interaction event. That is, the technical solution of the embodiment of the present application can detect the focus device according to the preset interaction event, and automatically control the target peripheral device required by the focus device to switch to the focus device. For example, in a game scenario, the user no longer needs to perform an additional handle pairing action (such as inputting a Bluetooth code) to directly control the game on the mobile phone, reducing the complex interaction steps.

[0162] The following takes the first electronic device as a mobile phone, the second electronic device as a notebook computer, and the third electronic device as a handle as an example. Initially, the notebook computer and the handle establish a first connection. Subsequently, the mobile phone needs to connect and use the handle, and the notebook computer can control the handle to switch the connection, that is, control the handle to connect to the mobile phone. The notebook computer can control the mobile phone to connect to the handle in at least two ways. The first way is that the notebook computer controls the handle to establish a direct connection (a third connection) with the mobile phone. The handle and the mobile phone interact with data through the third connection. The second way is that the handle and the mobile phone do not establish a direct communication connection, and the handle connects to the mobile phone through the computer, and the handle interacts with the mobile phone through the computer. That is, the computer acts as a relay device between the handle and the mobile phone.

[0163] The following describes the two connection switching methods respectively. For the second connection switching method, refer to Figure 6 The process of the handle switching connection includes:

[0164] S101, the notebook computer and the mobile phone establish a connection (i.e., the first connection).

[0165] In an embodiment of the present application, multiple devices can establish a connection. For example, the notebook computer and the mobile phone are networked through a "nearby service". The notebook computer can obtain the IP address of the mobile phone through the "nearby service", and the mobile phone can obtain the IP address of the notebook computer through the "nearby service". Then, the notebook computer and the mobile phone create a socket connection according to the respective obtained IP addresses. After that, the notebook computer and the mobile phone can transmit interaction data through the socket therebetween.

[0166] S102. The laptop computer and the controller are connected.

[0167] The process of establishing a connection between the laptop and the handle can be referred to in the prior art and will not be described in detail here. After the laptop and the handle are connected, data can be exchanged between the handle and the laptop.

[0168] by Figure 5 Taking (1) as an example, in the initial scenario, a laptop computer, a tablet computer, and a mobile phone are networked, and the laptop computer is connected to a peripheral device called a handle, and the user can operate the game on the laptop computer by operating the handle.

[0169] S103. The laptop computer monitors the interaction event.

[0170] Interaction events include input events and / or output events. Input events include, but are not limited to, any one or more of the following: mouse events, gamepad events, keyboard events, and touch events. Output events include, but are not limited to, playing audio and playing video.

[0171] As a possible implementation method, the laptop monitors the interaction events through the system interface. System as an example, the laptop calls The interface monitors mouse events and calls The interface monitors controller events. For example, to monitor mouse events, the interface can create a window to monitor mouse events. Optionally, the window used to monitor interaction events can be a hidden window, meaning it is invisible to the user.

[0172] S104. The mobile phone monitors interaction events.

[0173] As a possible implementation method, the mobile phone can call the system interface to monitor the interaction events.

[0174] S105: The mobile phone monitors an event of opening a game application (an example of a preset interaction event) and sends a first message to the laptop computer.

[0175] Correspondingly, the laptop computer receives the first message from the mobile phone.

[0176] Optionally, the first message is used to indicate a preset interaction event. In the embodiments of the present application, when a message is mentioned as being used for a certain purpose, it means that the message can be used to achieve the purpose, but it does not mean that the message is a dedicated message specifically for achieving the purpose. The message can be a dedicated message or a general message. The message can also achieve other purposes and / or the message can include other content.

[0177] Optionally, the first message is a general message and can be used by the mobile phone to request a connection with the handle.

[0178] Optionally, the first message is a dedicated message, and can carry the identifier of the handle. The receiving party can know that the first message is a message for requesting connection with a certain peripheral device after receiving the dedicated message, and can determine that the sending party requests connection with the handle according to the handle identifier carried by the first message.

[0179] In some embodiments, the devices in the network can share the information of the peripheral devices connected with each other. Specifically, each device broadcasts the information of the peripheral device connected therewith to other devices in the network. Moreover, when the peripheral device connected with the device changes, the device can broadcast the latest connection status of the peripheral device to other devices in the network. In this way, each device in the network can perceive the information of all the peripheral devices connected in the network and the devices connected with the corresponding peripheral devices.

[0180] For example, Table 1 shows the peripheral devices connected with the devices in the network.

[0181] Table 1

[0182] Devices within a network Connected peripherals Laptop Joystick Cell phone No Tablet No

[0183] It can be understood that in the embodiments of the present application, the preset interaction event of the device can be set (flexibly). Optionally, the preset interaction event is associated with one or more peripheral devices. The association means that the device function corresponding to the preset interaction event needs the associated peripheral device to assist in input and / or output. Taking the preset interaction event of opening a game application as an example, the device function corresponding to opening the game is the game function. Optionally, in order to better the game interaction experience, the device can control the game operation on the device by means of the handle. Here, the handle can be referred to as the peripheral device associated with the preset interaction event of opening the game application. Taking the preset interaction event of opening a document editing application as an example, the device function corresponding to opening the document editing application is the input document function. Optionally, in order to improve the input efficiency, the device can input text to the device by means of the keyboard. Here, the keyboard can be referred to as the peripheral device associated with the preset interaction event of opening the document editing application.

[0184] In the embodiments of the present application, when the device listens to the preset interaction event of the device, it is determined that the device needs to use the target peripheral device corresponding to the preset interaction event. In this case, if the device does not have the target peripheral device connected, the device can request the use of the target peripheral device to the device connected with the target peripheral device. Taking the (2) of the above example as an example, the user opens the game application on the mobile phone. After the mobile phone detects the preset interaction event of opening the game application, it can determine that the peripheral device corresponding to the game function is the handle, and can query that the notebook computer is currently connected with the handle. Then, the mobile phone can request the use of the handle to the notebook computer, so as to control the game operation on the mobile phone by means of the handle in the future. Figure 5

[0185] ​S106. The laptop computer sends the identification information of the controller to the mobile phone.

[0186] Accordingly, the mobile phone receives the controller identification information from the laptop. The controller identification information can be used to parse the controller events. As a possible implementation method, the mobile phone creates a HID file based on the controller identification information and parses the controller events based on the HID file.

[0187] Optionally, the identification information of the peripheral device may be a HID device descriptor. The device descriptor may be used to distinguish different peripheral devices. For example, the identification, manufacturer, type, etc. of different peripheral devices may be distinguished. handle, For controllers and other game controllers, you can also distinguish whether the peripheral is a keyboard, mouse or controller, etc.

[0188] Exemplarily, the laptop computer sends the HID identifier of the connected controller to the mobile phone via a socket connection.

[0189] S107. The mobile phone creates a HID file for the controller based on the HID descriptor of the controller.

[0190] The HID file includes but is not limited to the HID report.

[0191] In the embodiment of the present application, considering that the controller does not establish a direct communication connection with the mobile phone, in order to enable the mobile phone to recognize controller events, a HID file for the controller can be created at the kernel layer, such as the kernel layer. Subsequently, the mobile phone can recognize controller events based on the HID file. Creating a HID file for the controller at the kernel layer can be regarded as creating a virtual controller at the kernel layer (the object generated by subsequent controller events). Subsequently, the mobile phone can recognize events of the virtual controller.

[0192] Optionally, after successfully creating the controller's HID file at the kernel layer, the system notifies the application layer of the success. The application then notifies the laptop, letting it know the controller is connected to the phone. The laptop then intercepts controller events, meaning they are not transmitted to the computer game, but instead to the phone game.

[0193] It should be noted that step S107 is based on The example of creating a HID file for identifying input events in the system is used for explanation. In other systems, the mobile phone may perform other operations to identify input events such as a handle.

[0194] S108. The laptop computer receives information about the handle event (an example of first data) through the first connection.

[0195] For example, Figure 5As shown in (2) of FIG. 1, the user presses the button 1 of the handle, and the handle sends the handle event information to the notebook computer through the first connection, and the notebook computer can listen to the handle event information from the handle through the interface.

[0196] S109, the notebook computer sends the handle event information to the mobile phone according to the first message.

[0197] Optionally, the notebook computer sends the handle event information to the mobile phone through the second connection between the notebook computer and the mobile phone.

[0198] For example, the notebook computer encapsulates the handle event into a transmittable format, and sends the handle event information to the mobile phone through the socket connection between the notebook computer and the mobile phone.

[0199] Optionally, the window for listening to the interactive event is set as the focus, so that the game window on the computer loses the focus and no longer responds to the handle event.

[0200] S110, the mobile phone parses the handle event according to the HID file of the handle, and executes the operation corresponding to the handle event.

[0201] As a possible implementation manner, the mobile phone parses the handle event according to the HID file of the handle, and can report the parsed handle event to the game application in the application layer through the framework layer, and the game application can execute the corresponding operation in response to the handle event. For example, as shown in (2) of FIG. 1, the user presses the button 1, and the handle can forward the handle event corresponding to pressing the button 1 to the notebook computer, and the mobile phone can execute the operation corresponding to pressing the button 1 (such as controlling the game character to move leftward) based on the handle event. Figure 5

[0202] In the embodiments of the present application, the time for creating the HID file is not limited. The mobile phone can create the HID file of the handle immediately after receiving the HID descriptor of the handle, or can create the HID file after a preset time period.

[0203] In addition, S110 is an example of parsing the handle event according to the HID file and executing the corresponding operation in the linux system, and in other systems, the handle event can also be parsed in other manners. The embodiments of the present application do not limit the manner of parsing the handle event.

[0204] Figure 6 In the corresponding embodiments, the event of opening the game application is detected on the mobile phone, which means that the mobile phone needs to use the handle to assist in operating the game. In this case, the mobile phone can request the notebook computer connected with the handle to use the handle, and then the notebook computer can forward the handle event to the mobile phone after listening to the handle event. In this way, the mobile phone can receive the handle event and execute the corresponding operation in response to the handle event, so as to realize the control of the handle on the game on the mobile phone.​

[0205] It can be seen that, Figure 6 In the corresponding embodiment, a communication connection is established between the handle and the computer before the handle switches the connection. The computer can listen to the handle event and perform the operation corresponding to the handle event. After the handle switches the connection, the handle is connected with the mobile phone. Among them, the communication connection still exists between the handle and the computer, and the computer can still listen to the handle event. However, the computer no longer responds to the handle event, that is, no longer performs the operation corresponding to the handle event, and the computer forwards the handle event listened to the mobile phone, and the mobile phone responds to the handle event to perform the corresponding operation. From the above analysis, it can be seen that after the handle switches the connection, the handle and the mobile phone are connected through the computer. The connection between the handle and the mobile phone can be called indirect connection.

[0206] Figure 6 In the corresponding embodiment, the handle instruction is transmitted to the mobile phone through the notebook computer (which can be called a relay device), and a direct Bluetooth connection between the handle and the mobile phone is not required. Therefore, even if the Bluetooth switch of the mobile phone is turned off, the switching control can be completed, and the user does not need to additionally turn on the Bluetooth switch of the mobile phone to switch the connection of the handle, thereby reducing the operation complexity of the handle switching connection.

[0207] On the other hand, the relay device can send the handle instruction to multiple focus devices, so that one handle can control multiple focus devices at the same time.

[0208] The embodiment of the present application also provides a device connection method, which is different from Figure 6 In the corresponding embodiment, the handle event needs to be listened to by the notebook computer and forwarded to the mobile phone. In this embodiment, the handle can establish a connection with the mobile phone, and the mobile phone can directly listen to the handle event without the notebook computer as a forwarding device of the handle event. Still taking the scene shown in (1) and (2) of the foregoing embodiment as an example, referring to Figure 5 The device connection method provided by the embodiment includes: Figure 7

[0209] S201, the notebook computer and the mobile phone establish a second connection.

[0210] Taking the notebook computer and the mobile phone establishing a connection through the Bluetooth protocol as an example, the notebook computer and the mobile phone can obtain the Bluetooth address of the other device based on the Bluetooth protocol, and establish a connection with the other device based on the Bluetooth address of the other device.

[0211] S202, the notebook computer and the handle establish a first connection.

[0212] S203, the notebook computer sends the Bluetooth address of the mobile phone to the handle.

[0213] ​In the embodiment of the present application, the device can obtain the address information of other devices in the network, including but not limited to IP addresses, Bluetooth addresses, etc. The device can send the address information of other devices to the peripherals it is connected to, and the peripherals can establish connections with other devices based on the address information of other devices. Figure 7 In the corresponding embodiment, a laptop computer sends the Bluetooth address of a mobile phone to a connected controller, and the controller subsequently establishes a connection with the mobile phone based on the Bluetooth address of the mobile phone. In the embodiment of the present application, the type of address information of the device is not limited, nor is the specific implementation of the peripheral device establishing a connection with the device based on the address information of the device limited.

[0214] Optionally, the handle may record the Bluetooth address of the mobile phone after receiving the Bluetooth address of the mobile phone from the laptop computer.

[0215] S204. The laptop monitors the controller event.

[0216] S205 . In response to monitoring the handle event, the laptop computer executes an operation corresponding to the handle event.

[0217] For example, Figure 5 (1) Under normal circumstances, when a handle is connected to a laptop computer and a game is running on the laptop computer, the laptop computer can perform operations corresponding to the handle events (such as executing operations for the game character to move forward in the game interface) after monitoring the handle events.

[0218] S206: The mobile phone monitors a preset interactive event of opening a game application.

[0219] S207: In response to monitoring a preset interaction event of opening a game application, the mobile phone sends a first message to the laptop computer.

[0220] Optionally, the first message is used to request connection of a handle. The first message can also be used to request use of a handle.

[0221] S208. The laptop computer sends a second message to the controller according to the first message.

[0222] Correspondingly, the handle receives a second message from the laptop computer.

[0223] Optionally, the second message is used to instruct the handle to establish a third connection with the mobile phone.

[0224] As a possible implementation, after receiving a request from a mobile phone to use the controller, the laptop computer can determine from the first message that the mobile phone needs to be connected to the controller. Then, the laptop computer can send a second message to the controller to instruct the controller to establish a connection with the mobile phone based on the Bluetooth address of the mobile phone. Optionally, after sending the second message to the controller, the laptop computer can disconnect from the controller. For example,Figure 5 As shown in (2), after detecting the event of opening the game application, the mobile phone can request the notebook computer to use the handle, and the notebook computer can instruct the handle to establish a connection with the mobile phone through the second message, so that the handle interacts with the mobile phone through the connection.

[0225] S209, the handle establishes a third connection with the mobile phone according to the second message.

[0226] As a possible implementation manner, the handle establishes the third connection with the mobile phone based on the Bluetooth address of the mobile phone. Optionally, the Bluetooth address of the mobile phone can be carried in the second message, or carried in other messages outside the second message.

[0227] S210, the mobile phone receives the information (first data) of the handle event from the handle through the third connection.

[0228] It can be understood that after the mobile phone establishes the third connection with the handle, the handle can send the information of the handle event to the mobile phone through the third connection.

[0229] S211, in response to listening to the handle event, an operation corresponding to the handle event is performed.

[0230] Figure 7 In the corresponding embodiment, a direct communication connection can be established between the handle and the focus device (the mobile phone). In this way, after the handle switches to connect to the mobile phone, the device state of the notebook computer does not affect the control of the handle on the mobile phone. For example, the notebook computer can turn off the Bluetooth, or shut down, which does not affect the control of the handle on the mobile phone.

[0231] It should be noted that the steps in the above method flow are only exemplary. Some of the steps can be replaced by other steps, or some steps can be added or reduced.

[0232] Some operations in the flow of each method embodiment are optionally combined, and / or the order of some operations is optionally changed.

[0233] In addition, the execution order between the steps of each flow is only exemplary, and does not constitute a limitation on the execution order between the steps. Other execution orders between the steps can also be used. The execution order is not intended to indicate the only order in which the operations can be performed. A person of ordinary skill in the art can think of various ways to reorder the operations herein. In addition, it should be pointed out that for a certain method, the details of other processes of other methods herein are also applicable in a similar manner to the above in combination with this method.

[0234] As another example, in some embodiments, a device in a network can not only monitor its own input and output events, but also broadcast those events to other devices in the network. In this way, each device in the network can not only monitor its own input and output events, but also sense the input and output events of other devices, and determine whether other devices need to use corresponding peripherals based on the input and output events of other devices.

[0235] Still Figure 6 For example, after the mobile phone monitors the event of opening a game application, it can broadcast the event to the laptops and tablets in the network. Among them, the laptop can determine based on the event that the mobile phone needs to use the controller connected to it. Then, after monitoring the controller event later, the laptop can forward the controller event to the mobile phone. In other words, Figure 6 Step S105 can be replaced by: the mobile phone sends an event of opening the game application to the laptop. Figure 7 Step S207 in the example can be replaced by: the mobile phone sends an event of opening the game application to the laptop computer.

[0236] Optionally, when a device broadcasts its own interaction events, it can also include the timestamp of the event in the broadcast message. This allows other devices in the group to determine the time when each interaction event occurred and accurately identify the focus device at the corresponding time based on the timestamp.

[0237] For example, Table 2 shows a possible structure of a broadcast message of each device.

[0238] Table 2

[0239]

[0240]

[0241] It should also be noted that the specific steps included in the method flow and the order in which the steps are executed are not limited in the embodiments of the present application. For example, step S203 may be executed before S207, after S207, or simultaneously with S207. S207-S211 may be executed before S205, or after S205.

[0242] The embodiment of the present application also provides a device connection method. In order to reduce the probability of mis-switching, after the mobile phone (focus device) monitors the event of opening the game application (preset interaction event), it can also ask the user whether to connect the handle (target peripheral). After detecting the user's instruction to connect the handle, the mobile phone requests the laptop computer connected to the handle to use the handle. That is, optionally, Figure 6 In the process shown, step S301 is added, and the mobile phone presents a prompt interface, which is used to prompt whether to connect the handle.Figure 6 The step S105 shown can be replaced by: S302, after detecting the operation of the user indicating to connect the handle, requesting the notebook computer to use the handle. Alternatively, the notebook computer can be requested to use the handle after detecting the operation of the user indicating to connect the handle. Figure 7 The flow shown can be added with step S401, the mobile phone presents a prompt interface, the prompt interface is used to prompt whether to connect the handle. Moreover, Figure 7 The step S207 shown can be replaced by: S402, after detecting the event of opening the game application and detecting the operation of the user indicating to connect the handle, requesting the notebook computer to use the handle.

[0243] Exemplarily, in the networking shown in (1) of Figure 8 In the networking shown in (1) of Figure 8 (2) shows the connection between the handle and the mobile phone. The connection can be a direct connection or an indirect connection between the handle and the mobile phone.

[0244] The embodiment of the present application further provides another device connection method, in which the method can provide switching protection and reduce the probability of mis-switching. As a possible implementation manner, after the handle (target external device) is successfully connected with the mobile phone (focus device), the mobile phone can display a prompt interface for prompting the user that the handle is connected with the mobile phone. Alternatively, the notebook computer to which the handle is connected before switching can also display the prompt interface. The prompt interface can further include a rollback control, which is used to restore the connection relationship before the handle is switched. Take Figure 6 for example, the handle restores the connection relationship with the notebook computer before. Alternatively, the handle and the notebook computer can maintain the connection relationship until an event occurs, such as the notebook computer opening a new application or the notebook computer locking or a new focus device being generated.

[0245] It should be noted that the handle is disconnected with the mobile phone, which means that the mobile phone no longer responds to the handle event and executes the operation corresponding to the handle event. The handle restores the connection relationship with the notebook computer before, which means that the notebook computer can respond to the handle event and execute the operation corresponding to the handle event.

[0246] Exemplarily, in the networking shown in (1) of Figure 9In the network shown in (1), the controller is connected to the laptop. After the mobile phone monitors the event of opening game 3, it can request the laptop to establish a connection with the controller. Figure 9 As shown in (2), the mobile phone and the handle have been connected. Optionally, the mobile phone displays an interface 901 (an example of the second interface) to prompt the user that the handle has been connected to the mobile phone. Optionally, the interface includes a withdrawal control 902 for prompting whether to control the connection between the handle and the laptop, that is, prompting whether to restore the previous connection relationship of the handle. Optionally, the computer displays an interface 903.

[0247] In some examples, if an Figure 6 The solution shown is to forward the controller events with the help of a laptop. Figure 9 In the scenario shown in (2), when the mobile phone detects an operation instruction from the user, such as clicking the withdraw control 902 (an example of a second operation instruction), the mobile phone can control the connection between the controller and the mobile phone. The process of the mobile phone controlling the connection between the controller and the computer can refer to the process of the computer controlling the connection between the controller and the mobile phone. That is, the mobile phone can instruct the controller to restore the direct communication connection between the controller and the computer. Alternatively, the controller does not restore the direct communication connection between the controller and the computer, and the mobile phone can serve as a transfer device between the controller and the computer, and the controller and the computer are connected through the mobile phone.

[0248] Optionally, the mobile phone can explicitly or implicitly indicate to the laptop computer that the previous connection relationship of the controller needs to be restored. The explicit indication direction includes but is not limited to the mobile phone sending an indication message to the laptop computer. After the computer determines that the previous connection relationship with the controller needs to be restored, since there is a connection between the computer and the controller, the computer can directly resume responding to the controller events (such as setting the game window to focus) without re-establishing the communication connection.

[0249] In some examples, if an Figure 6 The solution shown is to forward the controller events with the help of a laptop. Figure 9 In the scenario shown in (2), when the computer detects the user's operation such as clicking the recall control 904 through the remote control, the computer determines that the previous connection relationship with the handle needs to be restored. Since there is a connection between the computer and the handle, the computer can directly resume responding to the handle event without re-establishing the communication connection.

[0250] In some examples, if an Figure 7 The controller shown here directly sends controller events to the phone. Figure 9In the scenario shown in (2), when the phone detects a user's operation such as clicking the withdrawal control 902, the phone can implicitly or explicitly indicate to the computer that the connection relationship between the handle and the computer needs to be resumed. The phone can also instruct the handle to establish a connection with the computer based on the computer's Bluetooth address. In this way, the computer can listen to handle events through the connection with the handle and perform corresponding operations in response to the handle events.

[0251] In some examples, if the scheme in which the handle directly sends handle events to the phone is adopted, in the scenario shown in (2), when the computer detects a user's operation such as clicking the withdrawal control 904 through a midair gesture, the computer can instruct the handle to reestablish a communication connection such as the communication connection shown in (3) with the computer according to the computer's Bluetooth address. Figure 7 Figure 9 In the scenario shown in (2), when the computer detects a user's operation such as clicking the withdrawal control 904 through a midair gesture, the computer can instruct the handle to reestablish a communication connection such as the communication connection shown in (3) with the computer according to the computer's Bluetooth address. Figure 9

[0252] In the embodiments of this application, the electronic device can set related information of the shared peripheral. For example, as shown in (1), the phone can provide a switch 1001 for sharing a peripheral. After the switch is turned on, the phone can share the peripheral with devices in the network group. As shown in (2), the phone can also provide an application or function setting control 1002. The user can set an application or application function that needs to share the peripheral through operation of the control. After detecting a user's operation such as clicking the control 1002, the phone can present an interface 1005 such as shown in (3). Optionally, the interface 1005 includes a control 1003 and a control 1004. After detecting a user's operation such as clicking the control 1003, the phone can present an interface (an example of a third interface) such as shown in (4), through which the user can set the peripheral associated with the function in the application (i.e., set the association between the interaction event and the peripheral). Subsequently, when the text editing function is detected, the phone can request other devices in the network group to share the keyboard so that the user can edit text in the phone using the keyboard. When the text browsing function is detected, the phone can request other devices in the network group to share the mouse so that the user can browse text in the phone using the mouse. Figure 11 Figure 11 Figure 11 Figure 11 Figure 11

[0253] ​​​​​​​The above mainly takes opening a game application as a preset interactive event, and the peripheral corresponding to the preset interactive event as a handle as an example to illustrate the technical solution of the embodiment of the present application. The preset interactive event can also be other. Optionally, the preset interactive event includes but is not limited to any one or more of the following: a preset touch event, a preset voice input event, opening a preset application, opening a preset function of a preset application, displaying the interface of a preset function of a preset application, lighting up the screen, lighting up the screen through a first preset gesture (such as a specific pattern password, etc.), detecting a touch event at a preset position on the screen, detecting a second preset gesture, and detecting a preset operation performed by the user through a preset application. The embodiment of the present application does not limit the preset interactive events. It should be understood that as long as the interactive event can trigger the call of the target peripheral device, it can be regarded as a preset interactive event.

[0254] Among them, the preset operation performed by the user through the preset application can be, for example, the operation of entering text through a text editing application. When the electronic device detects that the user is entering text, it can request the corresponding peripheral devices (such as keyboards) of other devices in the group. For another example, the preset operation performed by the user through the preset application can be the operation of browsing text through a text editing application. For another example, it can be the operation of playing music through a music application.

[0255] Preset touch events can be defined by the system or the user. For example, when a user is listening to music in a music app, they can perform a preset touch operation, such as a long press, on the current interface (which can be the music interface or the desktop, etc.). In response to the preset touch operation, the electronic device can request to share the peripherals (such as speakers) associated with the touch operation with other devices in the group.

[0256] The preset voice input event may be, for example, when a user is listening to music using a music application, inputting a voice command "connect speaker" to the electronic device. In response to the voice command, the electronic device may request the speakers of other devices in the sharing group.

[0257] For example, taking the external speaker as an example, Figure 10 As shown in (1), the speaker is currently connected to the computer and can play the audio on the computer. The user opens the music application on the mobile phone. The mobile phone detects the event of opening the music application and detects the user's operation of connecting the speaker (such as clicking the "Yes" button). Then, it can request the computer to connect to the speaker. After the interaction between the computer, mobile phone, and speaker, as shown in Figure 10 As shown in (2), the speaker can be connected to a mobile phone (either through a computer or directly), and then the music on the mobile phone can be played through the speaker.

[0258] For example, the peripheral device is a Bluetooth headset. The Bluetooth headset is currently connected to the phone. The user can open a music application on the phone and listen to the music on the phone through the Bluetooth headset. The user opens a music application on the tablet. After the tablet detects the event of opening the music application, the tablet can request the phone to share the Bluetooth headset, so that the user can listen to the music on the tablet through the Bluetooth headset.

[0259] For example, the peripheral device is a microphone. The microphone is currently connected to the phone. The user can open an audio recording application and input audio to the phone through the microphone. The user opens an audio recording application on the tablet. After the tablet detects the event of opening the audio recording application, the tablet can request the phone to share the microphone, so that the user can input audio to the tablet through the microphone.

[0260] In some embodiments, there can be multiple focus devices in a period of time. If the target peripheral devices required by the multiple focus devices are different, each focus device can request the device connected to the target peripheral device to share the target peripheral device according to the method of the above embodiments. For example, in a system composed of a phone, a tablet and a computer, the computer is connected to a handle, a keyboard and a mouse. Then, user A opens a game application on the phone, and user B opens a text editing application on the tablet. The phone can request the computer to connect the required handle, and the tablet can request the computer to connect the required keyboard and mouse. For another example, in a system composed of a phone, a tablet and a computer, the computer is connected to a handle, and the tablet is connected to a mouse. Then, user A opens a game application on the phone, and user B opens a text editing application on the computer. The phone can request the computer to connect the required handle, and the computer can request the tablet to connect the required keyboard and mouse. For another example, in a network composed of a phone, a tablet, a computer and a television, the computer is connected to a handle A, a keyboard and a mouse, and the tablet is connected to a handle B. Then, user A opens a game application on the phone, and user B opens a game application on the television. The phone can request the computer to connect the required handle A, and the television can request the tablet to connect the required handle B.

[0261] In some embodiments, there can be multiple focus devices in a period of time. If the target peripheral devices required by the multiple focus devices are the same, the multiple focus devices can be set with call priorities. The focus device with the highest call priority can connect the target peripheral device first. For example, in a system composed of a phone, a tablet and a computer, the computer is connected to a handle, a keyboard and a mouse. Then, user A opens a game application on the phone, and user B opens a game application on the tablet. The phone and the tablet can both request the computer to connect the handle. If the call priority of the phone is higher than that of the tablet, the computer controls the handle to be connected to the phone.

[0262] The above describes the technical solutions of the embodiments of the present application mainly taking the peripheral device (the third electronic device) as an input device, i.e., the handle as an example. In some other embodiments, the peripheral device can also be an output device.

[0263] For example, the first electronic device is a mobile phone, the second electronic device is a tablet, and the third electronic device is a sound box. Initially, the tablet is connected to the sound box. After the user opens the music application on the mobile phone, the mobile phone sends a first message to the tablet. After receiving the first message, the tablet determines that the mobile phone needs to be connected to the sound box. Subsequently, the tablet receives audio data from the mobile phone through the second connection between the mobile phone and the tablet, and sends the audio data to the sound box through the first connection between the tablet and the sound box according to the first message. In this way, the sound box can play the audio on the mobile phone.

[0264] Alternatively, after receiving the first message, the tablet sends a second message to the sound box through the first connection between the tablet and the sound box, instructing the sound box to establish a third connection with the mobile phone. After receiving the second message, the sound box can establish the third connection with the mobile phone accordingly. Subsequently, the sound box can directly receive audio data from the mobile phone through the third connection.

[0265] Some other embodiments of the present application provide a device, which can be the above-mentioned electronic device (such as a folding screen mobile phone). The device can include a display screen, a memory, and one or more processors. The display screen, the memory, and the processor are coupled. The memory is configured to store computer program code, which includes computer instructions. When the processor executes the computer instructions, the electronic device can perform various functions or steps performed by the mobile phone in the above-mentioned method embodiments. The structure of the electronic device can refer to the electronic device shown in Figure 2 or Figure 4 .

[0266] Among them, the core structure of the electronic device can be represented as Figure 12 The core structure can include a processing module 1301, an input module 1302, a storage module 1303, and a display module 1304.

[0267] The processing module 1301 can include at least one of a central processing unit (CPU), an application processor (AP), or a communication processor (CP). The processing module 1301 can perform operations or data processing related to the control and / or communication of at least one of the other elements of the user electronic device. Specifically, the processing module 1301 can be used to control the content displayed on the main screen according to certain trigger conditions. Or determine the content displayed on the screen according to the preset rules. The processing module 1301 is also used to process the input instructions or data, and determine the display style according to the processed data.

[0268] In the embodiments of the present application, if Figure 12 The structure shown in the first electronic device or chip system, the processing module 1301 can be used for detecting interaction events.

[0269] Optionally, the processing module 1301 is further used for parsing the first data according to the identification information of the third electronic device.

[0270] Optionally, the processing module 1301 is further used for connecting the third electronic device with the second electronic device after detecting the second operation instruction, and the second operation instruction is an operation instruction indicating the third electronic device to connect with the second electronic device.

[0271] In the embodiments of the present application, if Figure 12 The structure shown in the second electronic device or chip system, the processing module 1301 can be used for connecting the third electronic device associated with the preset interaction event with the first electronic device according to the first message.

[0272] According to the first message, the third electronic device associated with the preset interaction event is connected with the first electronic device, including:

[0273] Receiving the first data from the third electronic device through the first connection, and sending the first data to the first electronic device through the second connection according to the first message;

[0274] Or, receiving the first data from the first electronic device through the second connection, and sending the first data to the third electronic device through the first connection according to the first message;

[0275] Optionally, according to the first message, the third electronic device associated with the preset interaction event is connected with the first electronic device, including:

[0276] According to the first message, the second message is sent to the third electronic device, and the second message is used to instruct the third electronic device to establish a third connection with the first electronic device.

[0277] The input module 1302 is used for acquiring the instruction or data input by the user, and transmitting the acquired instruction or data to other modules of the electronic device. Specifically, the input mode of the input module 1302 can include touch, gesture, proximity screen, etc., and can also be voice input. For example, the input module can be the screen of the electronic device, which acquires the input operation of the user and generates an input signal according to the acquired input operation, and transmits the input signal to the processing module 1301.

[0278] The storage module 1303 can include volatile memory and / or non-volatile memory. The storage module is used to store at least one related instruction or data in other modules of the user terminal device. Specifically, the storage module can record the position of the interface in which the terminal interface element UI is located.

[0279] The display module 1304 can include, for example, a liquid crystal display (LCD), a light emitting diode (LED) display, an organic light emitting diode (OLED) display, a micro electro mechanical system (MEMS) display, or an electronic paper display. It is used to display content (e.g., text, images, videos, icons, symbols, etc.) that a user can view.

[0280] In the embodiments of the present application, if Figure 12 The display module 1304 is used to present a first interface after detecting a preset interaction event, and the first interface is used to prompt whether to connect a third electronic device.

[0281] The display module 1304 is also used to present a second interface after connecting with the third electronic device, and the second interface is used to prompt whether to control the third electronic device to connect with a second electronic device.

[0282] The display module 1304 is also used to present a third interface, and the third interface is used to set an association relationship between the preset interaction event and the third electronic device.

[0283] Optionally, Figure 12 The structure shown in the figure can also include a communication module 1305 for supporting communication between the electronic device and other electronic devices. For example, the communication module can be connected to a network via wireless communication or wired communication to communicate with other personal terminals or network servers. Wireless communication can use at least one of the cellular communication protocols, such as Long Term Evolution (LTE), Long Term Evolution-Advanced (LTE-A), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Universal Mobile Telecommunications System (UMTS), Wireless Broadband (WiBro), or Global System for Mobile Communications (GSM). Wireless communication can include, for example, short-range communication. Short-range communication can include at least one of wireless fidelity (Wi-Fi), Bluetooth, near field communication (NFC), magnetic stripe transmission (MST), or GNSS.

[0284] In the embodiments of the present application, if Figure 12 The communication module 1305 is used to send a first message to a second electronic device in the case of detecting a preset interaction event, and the first message is used to indicate the preset interaction event, so that the second electronic device controls a third electronic device to connect with a first electronic device.

[0285] Interact with the third electronic device through the connection between the third electronic device and the second electronic device.

[0286] Optionally, the interacting with the third electronic device through the connection between the third electronic device and the second electronic device comprises: interacting with the third electronic device through the second electronic device.

[0287] The interacting with the third electronic device through the connection between the third electronic device and the second electronic device comprises: interacting with the third electronic device through the third connection.

[0288] Optionally, the sending the first message comprises: sending the first message after detecting the first operation instruction, the first operation instruction being an operation instruction indicating the connection of the first electronic device.

[0289] Optionally, the communication module 1305 is further configured to receive the identification information of the third electronic device from the second electronic device.

[0290] In the embodiments of the present application, if Figure 12 The communication module 1305 is configured to receive a first message from the first electronic device in a case where the first electronic device detects a preset interaction event, the first message being used to indicate the preset interaction event.

[0291] Optionally, the communication module 1305 is further configured to send the identification information of the third electronic device to the first electronic device, the identification information of the third electronic device being used by the first electronic device to analyze the first data.

[0292] Optionally, the communication module 1305 is further configured to send address information of the first electronic device to the third electronic device, the address information being used by the third electronic device to establish the third connection.

[0293] It should be noted that the description of each step in the method embodiments of the present application can be cited to the corresponding modules of the device, which will not be described here.

[0294] The embodiments of the present application also provide a chip system, such as Figure 13As shown, the chip system includes at least one processor 1401 and at least one interface circuit 1402. The processor 1401 and the interface circuit 1402 can be interconnected through a line. For example, the interface circuit 1402 can be used to receive a signal from other devices (e.g., a memory of an electronic device). For another example, the interface circuit 1402 can be used to send a signal to other devices (e.g., the processor 1401). Illustratively, the interface circuit 1402 can read an instruction stored in a memory and send the instruction to the processor 1401. When the instruction is executed by the processor 1401, the electronic device can be caused to perform various steps in the above-described embodiments. Of course, the chip system can also include other discrete devices, which are not limited herein.

[0295] The embodiments of the present application also provide a computer storage medium, which includes computer instructions, when the computer instructions are run on the above-described electronic device, the electronic device is caused to perform various functions or steps performed by the mobile phone in the above-described method embodiments.

[0296] The embodiments of the present application also provide a computer program product, when the computer program product is run on a computer, the computer is caused to perform various functions or steps performed by the mobile phone in the above-described method embodiments.

[0297] Through the above description of the embodiments, those skilled in the art can clearly understand that, for the convenience and brevity of description, only the above-described division of the functional modules is taken as an example for illustration, and in actual application, the above-described functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.

[0298] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only illustrative, for example, the division of modules or units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another device, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed ones can be through some interfaces, indirect coupling or communication connection between devices or units, which can be electrical, mechanical or other forms.

[0299] The units described as separate components can or can not be physically separate, and the components shown as units can be one physical unit or multiple physical units, that is, can be located in one place, or can be distributed to multiple different places. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiments.

[0300] In addition, each function unit in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software function unit.

[0301] If the integrated unit is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on such understanding, the technical solutions of the embodiments of the present application essentially or the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The software product is stored in a storage medium, including a plurality of instructions to make a device (which can be a single-chip microcomputer, a chip, etc.) or a processor execute all or part of the steps of the method of each embodiment of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and various storage medium capable of storing program codes.

[0302] The above is only a specific embodiment of the present application, but the protection scope of the present application is not limited thereto. Any change or replacement within the technical scope disclosed in the present application should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.

Claims

1. A device connection system, characterized by Comprise: A first electronic device configured to, in a case where a preset interaction event is detected and a connection with a third electronic device is not established, send a first message, the first message being used to indicate the preset interaction event and to request to establish a connection with the third electronic device; A second electronic device, which establishes a first connection with the third electronic device, is configured to receive the first message from the first electronic device and control the third electronic device to connect with the first electronic device according to the first message; The third electronic device is configured to interact first data with the first electronic device through the connection between the third electronic device and the first electronic device; The connection between the third electronic device and the first electronic device comprises a third connection, and the third connection is a direct connection between the third electronic device and the first electronic device; The third electronic device is configured to interact first data with the first electronic device through the connection between the third electronic device and the first electronic device, comprising: interacting the first data with the first electronic device through the third connection.

2. The system of claim 1, wherein, The third electronic device is connected with the first electronic device through the second electronic device; The third electronic device is configured to interact first data with the first electronic device through the connection between the third electronic device and the first electronic device, comprising: interacting the first data with the first electronic device through the second electronic device.

3. The system of claim 1 or 2, wherein, The second electronic device is configured to control the third electronic device to connect with the first electronic device according to the first message, comprising: receiving the first data from the third electronic device through the first connection, and sending the first data to the first electronic device through a second connection according to the first message; Or, receiving the first data from the first electronic device through the second connection, and sending the first data to the third electronic device through the first connection according to the first message; Wherein, the connection between the second electronic device and the first electronic device is a second connection.

4. The system of any one of claims 1-3, wherein: The second electronic device is further configured to send identification information of the third electronic device to the first electronic device; The first electronic device is further configured to: receive the identification information of the third electronic device from the second electronic device; and parse the first data according to the identification information of the third electronic device.

5. The system of any one of claims 1-4, wherein: The third electronic device is further configured to receive a second message from the second electronic device, the second message being used to instruct the third electronic device to establish a third connection with the first electronic device; The third electronic device is further configured to establish the third connection according to the second message.

6. The system of claim 5, wherein, The second electronic device is configured to control the third electronic device to connect with the first electronic device according to the first message, comprising: According to the first message, sending the second message to the third electronic device.

7. The system of claim 5 or 6, wherein: The second electronic device is further configured to send address information of the first electronic device to the third electronic device, The third electronic device is configured to establish the third connection according to the second message, including that the third electronic device establishes the third connection according to the address information of the first electronic device.

8. The system of any one of claims 1-7, wherein, The first electronic device is further configured to present a first interface after detecting the preset interaction event, the first interface being used to prompt whether to connect the third electronic device. The first message is sent after detecting a first operation instruction, the first operation instruction being an operation instruction indicating to connect the first electronic device.

9. The system of any one of claims 1-8, wherein, The first electronic device is further configured to present a second interface after connecting with the third electronic device, the second interface being used to prompt whether to control the third electronic device to connect with the second electronic device. The third electronic device is controlled to connect with the second electronic device after detecting a second operation instruction, the second operation instruction being an operation instruction indicating the third electronic device to connect with the second electronic device.

10. The system of any one of claims 1-9, wherein, The first message is further used to indicate a time of the preset interaction event.

11. The system of any one of claims 1-10, wherein, The preset interaction event is associated with the third electronic device.

12. The system of any one of claims 1-11, wherein, The first electronic device is further configured to present a third interface, the third interface being used to set an association relationship between the preset interaction event and the third electronic device.

13. The system of any one of claims 1-12, wherein, The preset interaction event includes any one or more of the following events: a preset touch event, a preset voice input event, opening a preset application, opening a preset function of a preset application, turning on a screen, detecting a touch event at a preset position on the screen, a preset gesture input by a user, and a preset operation performed by a user through a preset application.

14. A device connection method characterized by, The method is applied to a first electronic device, and the method includes: detecting an interaction event; sending a first message to a second electronic device under a condition that a preset interaction event is detected and a connection with a third electronic device is not established, the first message being used to indicate the preset interaction event and to request to establish a connection with the third electronic device, so that the second electronic device controls the third electronic device to connect with the first electronic device; the connection of the third electronic device with the first electronic device includes a third connection, and the third connection is a direct connection between the first electronic device and the third electronic device; interacting first data with the third electronic device through the connection between the first electronic device and the third electronic device; The third electronic device and the first electronic device are connected through the second electronic device.

15. The method of claim 14, wherein, The third electronic device and the first electronic device are connected through the second electronic device. The method further includes:

16. The method according to claim 14 or 15, characterized in that receiving identification information of the third electronic device from the second electronic device; and presenting a third interface according to the identification information of the third electronic device, the third interface being used to set an association relationship between the preset interaction event and the third electronic device. According to the identification information of the third electronic device, the first data is parsed.

17. The method according to any one of claims 14-16, characterized by, The method further includes: after detecting the preset interaction event, presenting a first interface, the first interface being used for prompting whether to connect the third electronic device. The first message is sent, including: after detecting a first operation instruction, the first message is sent, the first operation instruction being an operation instruction indicating to connect the first electronic device.

18. The method according to any one of claims 14-17, characterized by, The method further includes: After connecting with the third electronic device, a second interface is presented, the second interface being used for prompting whether to control the third electronic device to connect with the second electronic device; After detecting a second operation instruction, the third electronic device is controlled to connect with the second electronic device, the second operation instruction being an operation instruction indicating the third electronic device to connect with the second electronic device.

19. The method according to any one of claims 14-18, characterized by, The first message is further used for indicating a time of the preset interaction event.

20. The method of any one of claims 14-19, wherein, The preset interaction event is associated with the third electronic device.

21. The method according to any one of claims 14-20, characterized by, The method further includes: A third interface is presented, the third interface being used for setting an association relationship between the preset interaction event and the third electronic device.

22. The method of any one of claims 14-21, wherein, The preset interaction event includes any one or more of the following events: a preset touch event, a preset voice input event, opening a preset application, opening a preset function of a preset application, lighting a screen, detecting a touch event at a preset position of the screen, a preset gesture input by a user, and a preset operation performed by the user through a preset application.

23. A device connection method, characterized by, The method applied to a second electronic device includes: A first connection is established with a third electronic device; In a case where a first electronic device detects a preset interaction event and the first electronic device does not establish a connection with the third electronic device, a first message is received from the first electronic device; the first message is used for indicating the preset interaction event and for requesting to establish a connection with the third electronic device; According to the first message, the third electronic device associated with the preset interaction event is controlled to connect with the first electronic device; the connection of the third electronic device with the first electronic device includes a third connection, and the third connection is a direct connection of the third electronic device with the first electronic device.

24. The method of claim 23, wherein, According to the first message, the third electronic device associated with the preset interaction event is controlled to connect with the first electronic device, including: The first data is received from the third electronic device through the first connection, and the first data is sent to the first electronic device through a second connection according to the first message; Or, the first data is received from the first electronic device through the second connection, and the first data is sent to the third electronic device through the first connection according to the first message; The connection between the second electronic device and the first electronic device is the second connection.

25. The method of claim 24, wherein, The method further includes: The identification information of the third electronic device is sent to the first electronic device; the identification information of the third electronic device is used for the first electronic device to parse the first data.

26. The method of any one of claims 23-25, wherein, According to the first message, a third electronic device associated with the preset interaction event is controlled to connect with the first electronic device, including: According to the first message, a second message is sent to the third electronic device, and the second message is used to instruct the third electronic device to establish a third connection with the first electronic device.

27. The method of claim 26, wherein, The method further includes: The address information of the first electronic device is sent to the third electronic device, and the address information is used for the third electronic device to establish the third connection.

28. The method of any one of claims 23-27, wherein, The first message is further used to indicate a time of the preset interaction event.

29. An electronic device, comprising: Comprise: One or more processors; Memory; And one or more computer programs, wherein the one or more computer programs are stored on the memory, and when the computer programs are executed by the one or more processors, the electronic device executes the method as claimed in any one of claims 14-28.

30. A computer-readable storage medium, characterized in that, The computer readable storage medium comprises computer programs or instructions, which, when running on a computer, cause the computer to execute the method as claimed in any one of claims 14-28.

31. A computer program product, characterised in that, The computer program product comprises: computer programs or instructions, which, when running on a computer, cause the computer to execute the method as claimed in any one of claims 14-28.

Citation Information

Patent Citations

  • Wireless screen projection method and device, intelligent tablet, terminal and system

    CN110312160A