A connection method for a device and an electronic device

By obtaining user facial images and spatial coordinates, and automatically identifying and connecting target devices, the problem of cumbersome equipment connection operations in the prior art is solved, and convenient and efficient equipment connection is achieved.

CN114091006BActive Publication Date: 2025-07-01HUAWEI DEVICE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010858224.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-08-24
Publication Date
2025-07-01
Estimated Expiration
2040-08-24

AI Technical Summary

Technical Problem

In the prior art, the operation of projecting screens to large-screen devices such as TVs or connecting speakers to play music is cumbersome. Users need to click multiple times and wait for the device list to refresh to identify the target device, which is prone to errors.

Method used

By obtaining user facial images, calculating the spatial coordinates and orientation information of the preset points on the face, combining the device's position information, the target device is automatically determined and a connection request is initiated, simplifying the device connection process.

Benefits of technology

It realizes convenience in device connection, reduces user operation steps, and improves connection accuracy and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114091006B_ABST
    Figure CN114091006B_ABST
Patent Text Reader

Abstract

A connection method for a device and an electronic device, relating to the field of communication technologies. The method includes: sending a positioning request to at least one second electronic device to determine first position information of the second electronic device in the coordinate system of the first electronic device; acquiring a facial image of the user; calculating spatial coordinates of a preset facial point of the user in the coordinate system of the first electronic device; identifying facial orientation information of the user from the facial image; determining a first target device among the second electronic devices based on the facial orientation information of the user, the spatial coordinates of the preset facial point, and the first position information; and sending a connection request to the first target device to establish a connection with the first target device. The connection method provided in this application can facilitate a user to connect a device to be controlled.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technologies, and in particular, to a method for connecting devices and an electronic device. Background Art

[0002] Operations such as mirroring to large-screen devices like TVs or connecting to speakers to play music are rather cumbersome. Users need to click to mirror or connect to the device, then wait for the device list to refresh, then identify which is the target device, and click on the target device, and sometimes may click the wrong one. Summary of the Invention

[0003] This application provides a method for connecting devices and an electronic device, and also provides a computer-readable storage medium, so as to provide a method for connecting devices that can establish a communication connection with a target device according to the user's face orientation.

[0004] In a first aspect, this application provides a method for connecting devices, which is applied to a first electronic device and includes:

[0005] Sending a positioning request to at least one second electronic device to determine first position information of the second electronic device in the coordinate system of the first electronic device;

[0006] Obtaining a facial image of the user and calculating spatial coordinates of a preset point on the user's face in the coordinate system of the first electronic device;

[0007] Identifying the facial orientation information of the user from the facial image;

[0008] Based on the facial orientation information of the user, the spatial coordinates of the facial preset point, and the first position information, determining a first target device among the second electronic devices;

[0009] Sending a connection request to the first target device to establish a connection with the first target device.

[0010] Further, sending a positioning request to at least one second electronic device to determine first position information of the second electronic device in the coordinate system of the first electronic device includes:

[0011] Sending a positioning request to at least one second electronic device to obtain an alignment angle and a distance between the first electronic device and the second electronic device;

[0012] Based on the alignment angle and the distance, determining spatial coordinates of the second electronic device in the coordinate system of the first electronic device.

[0013] Further, identifying the facial orientation information of the user from the facial image includes:

[0014] Input the user's facial image into a pre-set recognition model to obtain the facial orientation of the user in the coordinate system of the first electronic device.

[0015] Further, calculate the spatial coordinates of the preset points on the user's face, including:

[0016] Obtain the 3D model of the user's facial image;

[0017] Determine the preset points on the user's face and the coordinates of the preset points on the user's face in the coordinate system of the 3D model;

[0018] Convert the coordinates of the preset points on the face in the 3D model coordinate system into the spatial coordinates of the spatial coordinate system of the first electronic device.

[0019] Further, based on the user's facial orientation information, the spatial coordinates of the preset points on the face, and the first position information, determine the first target device in the second electronic device, including:

[0020] Based on the user's facial orientation information and the spatial coordinates of the preset points on the face, establish an indication vector;

[0021] Based on the first position information, calculate the distance between the second electronic device and the indication vector to determine the first target device in the second electronic device.

[0022] Further, send a positioning request to at least one second electronic device to determine the first position information of the second electronic device in the coordinate system of the first electronic device, and further include:

[0023] Send a positioning request to at least one second electronic device, so that the second electronic device determines the second position information of the first electronic device in the coordinate system of the second electronic device according to the positioning request;

[0024] Before determining the first target device in the second electronic device based on the user's facial orientation information, the spatial coordinates of the preset points on the face, and the first position information, further include:

[0025] Receive the screen orientation information of the second electronic device, where the screen orientation information is determined by the second electronic device based on the second position information;

[0026] Based on the screen orientation information, screen the second electronic devices;

[0027] Or,

[0028] Receive positioning information from the second electronic device, and based on the positioning information, determine whether the screen of the second electronic device faces the first electronic device;

[0029] Based on the judgment result, screen the second electronic devices.

[0030] Further, before sending a positioning request to at least one second electronic device, it further includes:

[0031] Detect a first instruction for connecting to the second electronic device;

[0032] In response to the detected first instruction, turn on the connection mode to send a positioning request.

[0033] Further, after initiating a connection request to a first target device to establish a connection with the first target device, it further includes:

[0034] Obtain a detection range based on the indication vector and a preset angle;

[0035] Detect whether a second target device other than the first target device is included in the detection range;

[0036] If there is a second target device other than the first target device, detect a second instruction for connecting to the second target device;

[0037] In response to the second instruction, enable the first electronic device to establish a connection with the second target device.

[0038] In a second aspect, the present application further provides an electronic device, including a processor and a storage device. When the application program stored in the storage device is run by the processor, the electronic device is caused to perform the following steps:

[0039] Send a positioning request to at least one second electronic device to determine first position information of the second electronic device in the coordinate system of the first electronic device;

[0040] Obtain a facial image of the user and calculate the spatial coordinates of a preset point on the user's face in the coordinate system of the first electronic device;

[0041] Identify the facial orientation information of the user from the facial image;

[0042] Based on the facial orientation information of the user, the spatial coordinates of the facial preset point, and the first position information, determine the first target device in the second electronic device;

[0043] Initiate a connection request to the first target device to establish a connection with the first target device.

[0044] Further, when the application program is run by the processor, the steps for causing the electronic device to send a positioning request to at least one second electronic device to determine first position information of the second electronic device in the coordinate system of the first electronic device include the following steps:

[0045] Send a positioning request to at least one second electronic device to obtain the alignment angle and distance between the first electronic device and the second electronic device;

[0046] Based on the alignment angle and distance, determine the spatial coordinates of the second electronic device in the coordinate system of the first electronic device.

[0047] Further, when the application program is run by the processor, the electronic device is caused to execute the steps of identifying the facial orientation information of the user from the facial image, including the following steps:

[0048] Input the facial image of the user into a preset recognition model to obtain the facial orientation of the user in the coordinate system of the first electronic device.

[0049] Further, when the application program is run by the processor, the electronic device is caused to execute the steps of calculating the spatial coordinates of the preset points on the face of the user, including the following steps:

[0050] Obtain the 3D model of the facial image of the user;

[0051] Determine the preset points on the face of the user and the coordinates of the preset points on the face of the user in the coordinate system of the 3D model;

[0052] Convert the coordinates of the preset points on the face in the 3D model coordinate system into the spatial coordinates of the spatial coordinate system of the first electronic device.

[0053] Further, when the application program is run by the processor, the electronic device is caused to execute the steps of determining the first target device in the second electronic device based on the facial orientation information of the user, the spatial coordinates of the preset points on the face, and the first position information, including the following steps:

[0054] Based on the facial orientation information of the user and the spatial coordinates of the preset points on the face, establish an indication vector;

[0055] Based on the first position information, calculate the distance between the second electronic device and the indication vector to determine the first target device in the second electronic device.

[0056] Further, when the application program is run by the processor, the electronic device is caused to execute the steps of sending a positioning request to at least one second electronic device to determine the first position information of the second electronic device in the coordinate system of the first electronic device, and further includes the following steps:

[0057] Send a positioning request to at least one second electronic device, so that the second electronic device determines the second position information of the first electronic device in the coordinate system of the second electronic device according to the positioning request;

[0058] Before the application program is run by the processor and causes the electronic device to execute the steps of determining the first target device in the second electronic device based on the facial orientation information of the user, the spatial coordinates of the preset points on the face, and the first position information, the following steps are further included:

[0059] Receive the screen orientation information of the second electronic device, where the screen orientation information is determined by the second electronic device based on the second location information;

[0060] Filter the second electronic device based on the screen orientation information;

[0061] Or,

[0062] Receive positioning information from the second electronic device, and determine whether the screen of the second electronic device faces the first electronic device based on the positioning information;

[0063] Filter the second electronic device based on the judgment result.

[0064] Further, before the application program is run by the processor and enables the electronic device to execute the step of sending a positioning request to at least one second electronic device, the following steps are further included:

[0065] Detect a first instruction for connecting to the second electronic device;

[0066] In response to the detected first instruction, enable the connection mode to send a positioning request.

[0067] Further, after the application program is run by the processor and enables the electronic device to execute the step of initiating a connection request to a first target device to establish a connection with the first target device, the following steps are further included:

[0068] Obtain a detection range based on the indication vector and a preset angle;

[0069] Detect whether a second target device other than the first target device is included in the detection range;

[0070] If there is a second target device other than the first target device, detect a second instruction for connecting to the second target device;

[0071] In response to the second instruction, enable the first electronic device to establish a connection with the second target device.

[0072] In a third aspect, the present application provides a computer-readable storage medium, in which a computer program is stored, and when it runs on a computer, it enables the computer to execute the method described in the first aspect.

[0073] In a fourth aspect, the present application provides a computer program, and when the computer program is executed by a computer, it is used to execute the method described in the first aspect.

[0074] In a possible design, the program in the fourth aspect may be stored in whole or in part on a storage medium packaged together with the processor, or may be stored in whole or in part on a memory not packaged together with the processor. Description of the Drawings

[0075] Figure 1 is a schematic structural diagram of a first electronic device provided by an embodiment of the present invention

[0076] Figure 2 is a schematic structural diagram of a second electronic device provided by an embodiment of the present invention

[0077] Figure 3 is a Bluetooth protocol framework diagram provided by an embodiment of the present invention;

[0078] Figures 4A - 4D is a set of schematic diagrams of the measurement principle of an alignment angle provided by an embodiment of the present invention;

[0079] Figure 5 is a flowchart of a method for connecting devices provided by an embodiment of the present invention;

[0080] Figure 6 is a flowchart of a method for connecting devices provided by an embodiment of the present invention;

[0081] Figure 7 is an example diagram of an application scenario of a method for connecting an electronic device provided by an embodiment of Application No. 1;

[0082] Figure 8 is an example diagram of the screen orientation of a second electronic device provided by an embodiment of the present application;

[0083] Figure 9 is an example diagram of a detection range provided by an embodiment of the present application;

[0084] Figure 10 is an example diagram of another detection range provided by an embodiment of the present application;

[0085] Figure 11 is a flowchart of a method for connecting another device provided by an embodiment of the present application;

[0086] Figure 12 is provided by an embodiment of the present application Figure 11 is an example diagram of an application scenario of the method for connecting the device shown. Detailed Description of the Invention

[0087] The technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings in the embodiments of the present application. Among them, in the description of the embodiments of the present application, unless otherwise specified, " / " means "or". For example, A / B may mean A or B. The "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B may mean: A exists alone, A and B exist simultaneously, and B exists alone. These three situations.

[0088] Hereinafter, the terms "first" and "second" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, features defined with "first" and "second" may explicitly or implicitly include one or more of such features. In the description of the embodiments of the present application, unless otherwise specified, the meaning of "a plurality" is two or more.

[0089] The operations of casting the screen to a large-screen device such as a TV or connecting to a speaker to play music are rather cumbersome. The user needs to click to cast the screen or connect the device, then wait for the device list to refresh, then identify which is the target device, and click on the target device. Sometimes, the wrong device may be clicked.

[0090] Figure 1 It is a structural schematic diagram of the first electronic device 100;

[0091] The first electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. Among them, the sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0092] It can be understood that the structure illustrated in the embodiments of the present invention does not constitute a specific limitation on the first electronic device 100. In some other embodiments of the present application, the first electronic device 100 may include more or fewer components than those illustrated, or combine certain components, or split certain components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0093] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units may be independent devices or integrated in one or more processors.

[0094] The controller may generate operation control signals according to the instruction operation code and timing signals to complete the control of fetching and executing instructions.

[0095] A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory may store the instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can directly call it from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

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

[0097] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple groups of I2C buses. The processor 110 may be respectively coupled to the touch sensor 180K, the charger, the flashlight, the camera 193, etc. through different I2C bus interfaces. For example, the processor 110 may be coupled to the touch sensor 180K through the I2C interface, enabling the processor 110 to communicate with the touch sensor 180K through the I2C bus interface to implement the touch function of the first electronic device 100.

[0098] The I2S interface may be used for audio communication. In some embodiments, the processor 110 may include multiple groups of I2S buses. The processor 110 may be coupled to the audio module 170 through the I2S bus to implement communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 may transmit an audio signal to the wireless communication module 160 through the I2S interface to implement the function of answering a call through a Bluetooth headset.

[0099] The PCM interface may also be used for audio communication to sample, quantize, and encode analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 may be coupled through the PCM bus interface. In some embodiments, the audio module 170 may also transmit an audio signal to the wireless communication module 160 through the PCM interface to implement the function of answering a call through a Bluetooth headset. Both the I2S interface and the PCM interface may be used for audio communication.

[0100] The UART interface is a general-purpose serial data bus for asynchronous communication. This bus can be a two-way communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is typically used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 through the UART interface to implement the function of playing music through the Bluetooth headset.

[0101] The MIPI interface can be used to connect the processor 110 to peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc. In some embodiments, the processor 110 and the camera 193 communicate through the CSI interface to implement the shooting function of the first electronic device 100. The processor 110 and the display screen 194 communicate through the DSI interface to implement the display function of the first electronic device 100.

[0102] The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 to the camera 193, the display screen 194, the wireless communication module 160, the audio module 170, the sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.

[0103] The USB interface 130 is an interface that complies with the USB standard specification, and can specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the first electronic device 100, and can also be used to transfer data between the first electronic device 100 and peripheral devices. It can also be used to connect headphones to play audio. This interface can also be used to connect other electronic devices, such as AR devices, etc.

[0104] It can be understood that the interface connection relationships between the modules illustrated in the embodiments of the present invention are only illustrative and do not constitute a structural limitation on the first electronic device 100. In other embodiments of the present application, the first electronic device 100 can also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

[0105] The charging management module 140 is used to receive a charging input from a charger. The charger can be a wireless charger or a wired charger. In some embodiments of wired charging, the charging management module 140 can receive the charging input from a wired charger through the USB interface 130. In some embodiments of wireless charging, the charging management module 140 can receive a wireless charging input through the wireless charging coil of the first electronic device 100. While charging the battery 142, the charging management module 140 can also supply power to the electronic device through the power management module 141.

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

[0107] The wireless communication function of the first electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modulation and demodulation processor, and the baseband processor, etc.

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

[0109] The mobile communication module 150 may provide a solution for wireless communication such as 2G / 3G / 4G / 5G applied to the first electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 may receive electromagnetic waves through the antenna 1, filter and amplify the received electromagnetic waves, and then transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 may also amplify the signal modulated by the modulation and demodulation processor and convert it into electromagnetic waves through the antenna 1 for radiation. In some embodiments, at least some functional modules of the mobile communication module 150 may be provided in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 may be provided in the same device.

[0110] The modulation and demodulation processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. Subsequently, the demodulator transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After being processed by the baseband processor, the low-frequency baseband signal is transmitted to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, receiver 170B, etc.), or displays an image or video through the display screen 194. In some embodiments, the modulation and demodulation processor may be an independent device. In other embodiments, the modulation and demodulation processor may be independent of the processor 110 and provided in the same device as the mobile communication module 150 or other functional modules.

[0111] The wireless communication module 160 may provide solutions for wireless communications applied to the first electronic device 100, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite systems (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, performs frequency modulation and filtering processing on the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 may also receive the signals to be sent from the processor 110, perform frequency modulation and amplification on them, and convert them into electromagnetic waves through the antenna 2 for radiation.

[0112] In some embodiments, the antenna 1 of the first electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the first electronic device 100 can communicate with the network and other devices through wireless communication technologies. The wireless communication technologies may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technologies, etc. The GNSS may include global positioning system (GPS), global navigation satellite system (GLONASS), beidou navigation satellite system (BDS), quasi-zenith satellite system (QZSS), and / or satellite based augmentation systems (SBAS). It should be noted that the number of antennas shown in the figure is only exemplary, and more antennas can be set, such as 3, 4, or more.

[0113] The first electronic device 100 implements the display function through the GPU, the display screen 194, and the application processor, etc. The GPU is a microprocessor for image processing, and 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 110 may include one or more GPUs, which execute program instructions to generate or change display information.

[0114] The display screen 194 is used to display images, videos, etc. 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 flexible light-emitting diode (FLED), a MiniLED, a MicroLED, a Micro-OLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the first electronic device 100 may include one or N display screens 194, where N is a positive integer greater than 1.

[0115] The first electronic device 100 can implement the shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, etc.

[0116] The ISP is used to process the data fed back by the camera 193. For example, when taking a photo, the shutter is opened, and light passes through the lens and is transmitted to the camera's photosensitive element. The light signal is converted into an electrical signal, and the camera's photosensitive element transmits the electrical signal to the ISP for processing and converts it into an image visible to the naked eye. The ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. The ISP can also optimize parameters such as the exposure and color temperature of the shooting scene. In some embodiments, the ISP can be set in the camera 193.

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

[0118] The digital signal processor is used to process digital signals. In addition to processing digital image signals, it can also process other digital signals. For example, when the first electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy, etc.

[0119] The video codec is used to compress or decompress digital videos. The first electronic device 100 can support one or more video codecs. In this way, the first electronic device 100 can play or record videos in multiple coding formats, such as: Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.

[0120] The NPU is a neural-network (NN) computing processor. By learning from the biological neural network structure, such as learning from the transmission mode between human brain neurons, it can quickly process the input information and can also continuously self-learn. Through the NPU, applications such as intelligent cognition of the first electronic device 100 can be realized, such as: image recognition, face recognition, speech recognition, text understanding, etc.

[0121] 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 first electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement the data storage function. For example, files such as music and videos are saved in the external memory card.

[0122] The internal memory 121 can be used to store computer-executable program code, and the executable program code includes instructions. The internal memory 121 can include a program storage area and a data storage area. Among them, the program storage area can store the operating system, application programs required for at least one function (such as the sound playback function, the image playback function, etc.). The data storage area can store the data created during the use of the first electronic device 100 (such as audio data, phone book, etc.). In addition, the internal memory 121 can include high-speed random access memory and can also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc. The processor 110 executes various functional applications and data processing of the first electronic device 100 by running the instructions stored in the internal memory 121 and / or the instructions stored in the memory provided in the processor.

[0123] The first electronic device 100 can implement audio functions through the audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and the application processor, etc. Such as music playback, recording, etc.

[0124] The audio module 170 is used to convert digital audio information into an analog audio signal for output, and is also used to convert an analog audio input into a digital audio signal. The audio module 170 can also be used for encoding and decoding audio signals. In some embodiments, the audio module 170 can be disposed in the processor 110, or some functional modules of the audio module 170 can be disposed in the processor 110.

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

[0126] The receiver 170B, also known as the "earpiece", is used to convert an audio electrical signal into a sound signal. When the first electronic device 100 answers a call or a voice message, the voice can be listened to by placing the receiver 170B close to the human ear.

[0127] The microphone 170C, also known as the "microphone" or "transmitter", is used to convert a sound signal into an electrical signal. When making a call or sending a voice message, the user can speak by placing the mouth close to the microphone 170C to input the sound signal into the microphone 170C. The first electronic device 100 can be provided with at least one microphone 170C. In some other embodiments, the first electronic device 100 can be provided with two microphones 170C, which can not only collect sound signals but also implement a noise reduction function. In some other embodiments, the first electronic device 100 can also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify the sound source, and implement functions such as directional recording.

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

[0129] The pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be set on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. The capacitive pressure sensor can be a parallel plate including at least two conductive materials. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The first electronic device 100 determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 194, the first electronic device 100 detects the touch operation intensity according to the pressure sensor 180A. The first electronic device 100 can also calculate the touch position according to the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on 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 the first pressure threshold acts on the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.

[0130] The gyro sensor 180B can be used to determine the motion posture of the first electronic device 100. In some embodiments, the angular velocity of the first electronic device 100 around three axes (i.e., x, y, and z axes) can be determined by the gyro sensor 180B. The gyro sensor 180B can be used for anti-shake shooting. Exemplarily, when the shutter is pressed, the gyro sensor 180B detects the angle of the shake of the first electronic device 100, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shake of the first electronic device 100 through reverse movement to achieve anti-shake. The gyro sensor 180B can also be used for navigation and somatosensory game scenes.

[0131] The air pressure sensor 180C is used to measure air pressure. In some embodiments, the first electronic device 100 calculates the altitude through the air pressure value measured by the air pressure sensor 180C to assist positioning and navigation.

[0132] The magnetic sensor 180D includes a Hall sensor. The first electronic device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip leather case. In some embodiments, when the first electronic device 100 is a flip phone, the first electronic device 100 can detect the opening and closing of the flip cover according to the magnetic sensor 180D. Then, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, the flip cover automatic unlocking and other features are set.

[0133] The acceleration sensor 180E can detect the magnitude of the acceleration of the first electronic device 100 in various directions (generally three axes). When the first electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the electronic device and is applied to applications such as horizontal and vertical screen switching and pedometers.

[0134] The distance sensor 180F is used to measure distance. The first electronic device 100 can measure distance through infrared or laser. In some embodiments, when shooting a scene, the first electronic device 100 can use the distance sensor 180F to measure distance to achieve rapid focusing.

[0135] The proximity light sensor 180G may include, for example, a light-emitting diode (LED) and a light detector, such as a photodiode. The light-emitting diode may be an infrared light-emitting diode. The first electronic device 100 emits infrared light outward through the light-emitting diode. The first electronic device 100 uses the photodiode to detect the infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the first electronic device 100. When insufficient reflected light is detected, the first electronic device 100 can determine that there is no object near the first electronic device 100. The first electronic device 100 can use the proximity light sensor 180G to detect that the user is holding the first electronic device 100 close to the ear for a call, 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 leather case mode and pocket mode.

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

[0137] The fingerprint sensor 180H is used to collect fingerprints. The first electronic device 100 can use the collected fingerprint characteristics to achieve fingerprint unlocking, access to the application lock, fingerprint photography, fingerprint answering of incoming calls, etc.

[0138] The temperature sensor 180J is used to detect temperature. In some embodiments, the first electronic device 100 utilizes the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the first electronic device 100 reduces the performance of the processor located near the temperature sensor 180J in order to reduce power consumption and implement thermal protection. In some other embodiments, when the temperature is lower than another threshold, the first electronic device 100 heats the battery 142 to prevent abnormal shutdown of the first electronic device 100 caused by low temperature. In some other embodiments, when the temperature is lower than yet another threshold, the first electronic device 100 boosts the output voltage of the battery 142 to prevent abnormal shutdown caused by low temperature.

[0139] The touch sensor 180K, also known as a "touch control device". The touch sensor 180K can be disposed on the display screen 194, and together with the display screen 194, it forms a touch screen, also known as a "touch control screen". The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor can transmit the detected touch operations 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 some other embodiments, the touch sensor 180K can also be disposed on the surface of the first electronic device 100, at a different position from where the display screen 194 is located.

[0140] The bone conduction sensor 180M can acquire vibration signals. In some embodiments, the bone conduction sensor 180M can acquire the vibration signals of the vibrating bone mass of the human vocal part. The bone conduction sensor 180M can also contact the human pulse to receive blood pressure pulsation signals. In some embodiments, the bone conduction sensor 180M can also be disposed in the earphone to form a bone conduction earphone. The audio module 170 can parse out voice signals based on the vibration signals of the vibrating bone mass of the human vocal part acquired by the bone conduction sensor 180M to implement the voice function. The application processor can parse out heart rate information based on the blood pressure pulsation signals acquired by the bone conduction sensor 180M to implement the heart rate detection function.

[0141] The keys 190 include a power-on key, volume keys, etc. The keys 190 can be mechanical keys. They can also be touch keys. The first electronic device 100 can receive key inputs and generate key signal inputs related to the user settings and function control of the first electronic device 100.

[0142] The motor 191 can generate vibration prompts. The motor 191 can be used for incoming call vibration prompts and also for touch vibration feedback. For example, touch operations for different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations on different areas of the display screen 194, the motor 191 can also correspond to different vibration feedback effects. Different application scenarios (such as time reminder, receiving messages, alarm clock, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.

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

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

[0145] Figure 2 An exemplary structural schematic diagram of a second electronic device 200 provided by an embodiment of the present invention is shown.

[0146] The following takes the second electronic device 200 as an example to specifically illustrate the embodiment. It should be understood that Figure 2 The shown second electronic device 200 is only an example, and the second electronic device 200 can have more or fewer components than Figure 2 shown, can combine two or more components, or can have different component configurations. The various components shown in the figure can be implemented in hardware, software, or a combination of hardware and software including one or more signal processing and / or application specific integrated circuits.

[0147] Such as Figure 2As shown, the second electronic device 200 may include: a processor 201, a memory 202, a wireless communication processing module 203, an antenna 204, a power switch 205, a wired LAN communication processing module 206, an HDMI communication processing module 207, a USB communication processing module 208, a display screen 209, and an audio module 210. Among them: The processor 201 can be used to read and execute computer-readable instructions. In a specific implementation, the processor 201 may mainly include a controller, an arithmetic unit, and registers. Among them, the controller is mainly responsible for instruction decoding and sending a control signal for the operation corresponding to the instruction. The arithmetic unit is mainly responsible for storing the register operands and intermediate operation results temporarily stored during the execution of the instruction, etc. In a specific implementation, the hardware architecture of the processor 201 can be an application-specific integrated circuit (ASIC) architecture, a MIPS architecture, an ARM architecture, or an NP architecture, etc.

[0148] In some embodiments, the processor 201 can be used to parse the signals received by the wireless communication module 203 and / or the wired LAN communication processing module 206, such as a positioning request broadcast by the first electronic device 100, a request for establishing a Bluetooth communication connection sent by the first electronic device 100, and so on. The processor 201 can be used to perform corresponding processing operations according to the parsing results, such as responses to the user's first input and second input, and so on.

[0149] In some embodiments, the processor 201 can also be used to generate signals sent out by the wireless communication module 203 and / or the wired LAN communication processing module 206, such as Bluetooth broadcast signals, beacon signals, or signals sent to the first electronic device 100 for feedback of status information (such as standby, power-on, etc.).

[0150] The memory 202 is coupled to the processor 201 and is used to store various software programs and / or multiple sets of instructions. In a specific implementation, the memory 202 may include a high-speed random-access memory, and may also include a non-volatile memory, such as one or more disk storage devices, flash memory devices, or other non-volatile solid-state storage devices. The memory 202 can store an operating system, such as embedded operating systems like uCOS, VxWorks, RTLinux, etc. The memory 202 can also store a communication program, which can be used to communicate with the first electronic device 100, one or more servers, or accessory devices.

[0151] The wireless communication module 203 may include one or more of a Bluetooth communication module 203A, a WLAN communication module 203B, and an infrared communication module 204C. Among them, the Bluetooth communication module 203A may include a classic Bluetooth (BT) module and a low-power Bluetooth (BLE) module.

[0152] In some embodiments, one or more of the Bluetooth communication module 203A, the WLAN communication module 203B, and the infrared communication module 204C can monitor signals emitted by other devices (such as the first electronic device 100), such as positioning request signals, etc., and can send response signals, such as positioning responses, etc., so that other devices (such as the first electronic device 100) can discover the second electronic device 200 and establish a wireless communication connection with other devices (such as the first electronic device 100), and communicate with other devices (such as the first electronic device 100) through one or more wireless communication technologies among Bluetooth, WLAN, or infrared.

[0153] In other embodiments, one or more of the Bluetooth communication module 203A, the WLAN communication module 203B, and the infrared communication module 203C can also emit signals, such as broadcast Bluetooth signals, beacon signals, so that other devices (such as the first electronic device 100) can discover the second electronic device 200 and establish a wireless communication connection with other devices (such as the first electronic device 100), and communicate with other devices (such as the first electronic device 100) through one or more wireless communication technologies among Bluetooth or WLAN.

[0154] The wireless communication module 203 can also include a cellular mobile communication module (not shown). The cellular mobile communication processing module can communicate with other devices (such as a server) through cellular mobile communication technology.

[0155] The wireless communication function of the second electronic device 200 can be implemented through the antenna 204, the wireless communication module 203, the modulation and demodulation processor, etc.

[0156] The antenna 204 can be used to transmit and receive electromagnetic wave signals. Each antenna in the second electronic device 200 can be used to cover a single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization rate of the antennas. For example: The antenna of the WLAN communication module 203B can be multiplexed as the antenna of the Bluetooth communication module 203A. In some other embodiments, the antenna can be used in combination with a tuning switch.

[0157] In some embodiments, the Bluetooth communication module 203A can have one or more antennas. When there are two or more antennas of the Bluetooth communication module 203A, the first electronic device 100 can measure the angle of arrival (AOA) or the angle of departure (AOD) of the Bluetooth signal sent by the second electronic device 200.

[0158] The power switch 205 can be used to control the power supply to the second electronic device 200.

[0159] The wired LAN communication processing module 206 can be used to communicate with other devices in the same LAN via the wired LAN, and can also be used to connect to the WAN via the wired LAN to communicate with devices in the WAN.

[0160] The HDMI communication processing module 207 can be used to communicate with other devices via an HDMI interface (not shown).

[0161] The display screen 209 can be used to display images, videos, etc. The display screen 129 can be a liquid crystal display (LCD), an organic light-emitting diode (OLED) display screen, an active-matrix organic light-emitting diode (AMOLED) display screen, a flexible light-emitting diode (FLED) display screen, a quantum dot light-emitting diode (QLED) display screen, and so on.

[0162] The audio module 210 can be used to output an audio signal via an audio output interface, so that the second electronic device 200 supports audio playback. The audio module can also be used to receive audio data via an audio input interface. The second electronic device 200 can be a media playback device such as a television.

[0163] In some embodiments, the second electronic device 200 may further include a serial interface such as an RS-232 interface. This serial interface can be connected to other devices, such as an audio external device like a speaker, so that the display and the audio external device cooperate to play audio and video.

[0164] It can be understood that Figure 2 The schematic structure does not constitute a specific limitation on the second electronic device 200. In other embodiments of the present invention, the second electronic device 200 may include more or fewer components than shown, or combine certain components, or split certain components, or have different component arrangements. The illustrated components can be implemented in hardware, software, or a combination of software and hardware.

[0165] Figure 3A Bluetooth protocol framework diagram provided by an embodiment of the present invention, specifically including but not limited to a Host protocol stack, HCI (Host Controller Interface), and a controller. In the method described in the embodiment of the present invention, the Bluetooth protocol frameworks used by the first electronic device and the second electronic device can refer to this part of the content. Among them, the Host protocol stack defines multiple applications (profiles) and core protocols (protocols) in the Bluetooth framework. Each profile defines its corresponding message format and application rules. A profile is a Bluetooth service (Application). To achieve interoperability between different devices on different platforms, the Bluetooth protocol has developed specifications for various possible and generally meaningful application scenarios, such as A2DP (advanced audio distribution profile), HFP (hands-free profile), and so on. The core protocols include but are not limited to the basic Bluetooth service protocol SDP (Service Discover Protocol), the Logical Link Control and Adaptation Protocol L2CAP, etc. The core protocols are essential in the Bluetooth protocol stack.

[0166] Among them, HCI provides a unified interface for upper-layer protocols to enter the link manager and a unified way to enter the baseband. There will be several transport layers between the host core protocol stack and the controller. These transport layers are transparent and are responsible for transmitting data. The Bluetooth Special Interest Group (SIG) has specified four physical bus methods for connecting to hardware, namely four HCI transport layers: USB, RS232, UART, and PC card.

[0167] Among them, the controller defines the underlying hardware part, including radio frequency (RF), baseband (BB), and link management (LM). The RF layer realizes the filtering and transmission of data bit streams through microwaves in the unlicensed ISM band of 2.4 GHz, and mainly defines the conditions that the Bluetooth transceiver needs to meet to work properly in this frequency band. The baseband is responsible for frequency hopping and the transmission of Bluetooth data and information frames. The link management is responsible for connecting, establishing, and tearing down links and performing security control. The LM (Link Manager) layer is the link management layer protocol of the Bluetooth protocol stack, responsible for translating upper-layer HCI commands into operations acceptable to the baseband, establishing asynchronous connection-oriented links (ACL) and synchronous connection-oriented / extended (SCO) links, and working modes for putting Bluetooth devices into energy-saving states, etc. The LC (Link Control) layer is responsible for responding to upper-layer LM commands (such as LM commands for performing functions like establishing a transmission link for data packets and maintaining the link) during the transmission of a batch of data packets.

[0168] The method described in the embodiments of the present invention is implemented by Figure 1 part of the wireless communication module 160 of the first electronic device 100 shown, and specifically can be executed by a Bluetooth module or a Bluetooth chip.

[0169] Figures 4A - 4D It is a set of Bluetooth direction finding function schematic diagrams provided by the embodiments of the present invention, specifically related to the measurement principles of the angle of arrival (AoA) and the angle of departure (AoD) of BLE signals, and is used to calculate the alignment angle between the first electronic device and the second electronic device.

[0170] The following introduces the measurement principle of the angle of arrival (AoA) of BLE signals involved in the embodiments of the present invention.

[0171] Figures 4A - 4B It is a schematic diagram for calculating the Bluetooth angle of arrival AoA provided by the embodiments of the present invention. As Figure 4AAs shown, the transmitter 410 can transmit an AoA broadcast packet (constant tone extension (CTE) packet) via BLE. The AoA CTE packet is a continuous modulated sequence without verification, and does not contain a cyclic redundancy check (CRC) and a message integrity code (MIC). The Host of the receiver 420 issues the antenna sequence information used for measurement via an HCI command. After starting the measurement, the controller 421 sequentially switches to the specified antennas according to the antenna sequence information issued by the Host for I&Q sampling, and reports the sampling information to the Host via an HCI command, and the Host calculates the relative angle.

[0172] The transmitter 410 can control an antenna 410 to send the AoA CTE packet through the controller 411. The receiver 420 can control the RF switch 422 through the controller 421 to switch to the specified antennas for reception in a certain order. Among them, the receiver 420 has at least two antennas 423. Among them, the receiver 420 measures the angle of arrival (AoA) of the BLE signal of the transmitter 410. In some embodiments, in order to improve the estimation accuracy of the wave angle of arrival, multiple antennas, such as three, can be equipped. The arrangement of the array can be linear, circular, spherical, etc., which is not limited here.

[0173] As Figure 4B shown, assume that the receiver 420 has two antennas (antenna A and antenna B) with a spacing of d, and the received BLE signal is a plane electromagnetic wave. Among them, since the reception of the BLE signal by antenna A and antenna B is asynchronous, the receiver 420 can compare the phases of the BLE signals received by antenna A and antenna B to determine the phase difference between the BLE signals received by antenna A and antenna B.

[0174] Among them, the angle of arrival (AoA) of the BLE signal can be calculated by the following formula (1):

[0175]

[0176] Among them, θ is the angle of arrival (AoA) of the BLE signal, ψ is the phase difference between the BLE signals received by antenna A and antenna B, λ is the wavelength of the BLE signal, and d is the distance between antenna A and antenna B. Here, the θ angle can be set as the alignment angle between the first electronic device and the second electronic device, that is, the alignment angle between the first electronic device and the second electronic device can be calculated by formula (1).

[0177] In some possible embodiments, the transmitter 410 may be the second electronic device 200, and the receiver 410 may be the first electronic device 100. There are at least two antennas for transmitting / receiving BLE signals on the first electronic device 100, and at least one antenna for transmitting / receiving BLE signals on the second electronic device 200. The first electronic device 100 may determine the alignment angle of the first electronic device 100 relative to the second electronic device 200 through the AoA principle of measuring the BLE signal shown in the above Figure 4A and Figure 4B .

[0178] In some possible embodiments, the transmitter 410 may be the first electronic device 100, and the receiver 420 may be the second electronic device 200. There is at least one antenna for transmitting / receiving BLE signals on the first electronic device 100, and at least two antennas for transmitting / receiving BLE signals on the second electronic device 200. The second electronic device 200 may determine the alignment angle of the first electronic device 100 relative to the second electronic device 200 through the AoA principle of measuring the BLE signal shown in the above Figure 4A and Figure 4B .

[0179] The following introduces the measurement principle of the angle of departure (AoD) of the BLE signal involved in the embodiments of the present invention.

[0180] Figures 4C - 4D It is a schematic diagram of calculating the AoD of Bluetooth provided by the embodiment of the present invention. As shown in Figure 4D , the transmitter 430 may transmit an AoD broadcast packet (constant tone extension (CTE) packet) through BLE. The AoD CTE packet is a continuous modulated sequence without verification, without cyclic redundancy check (CRC) and message integrity code (MIC). The Host of the transmitter 430 issues the antenna sequence information used during measurement through an HCI command. After the measurement starts, the controller 441 of the receiver 440 performs I&Q sampling on the BLE signals sent by each antenna of the receiver 440 according to the antenna sequence information issued by the Host of the transmitter 430, and reports the sampling information to the Host through an HCI command, and the Host calculates the relative angle.

[0181] The receiving party 440 can control an antenna 442 through a controller 441 to receive the AoD CTE packet transmitted by the transmitting party 430. The transmitting party 430 can control a radio frequency switch 432 through a controller 431 to switch to a specified antenna in a certain order to transmit the AoD CTE packet. Among them, the transmitting party 430 has at least two antennas 433. Among them, the angle of departure (AoD) of the BLE signal of the transmitting party 430 measured by the receiving party 440. In some embodiments, in order to improve the estimation accuracy of the angle of arrival of the wave, multiple antennas can be equipped, and the arrangement of the array can be linear, circular, spherical, etc., which is not limited here.

[0182] As Figure 4C shown, assume that the transmitting party 430 has two antennas (antenna A and antenna B) with a spacing of d, and the BLE signal transmitted is a plane electromagnetic wave. Among them, since the BLE signals transmitted by antenna A and antenna B are not synchronized, the receiving party 440 can compare the phases of the BLE signals received from antenna A and antenna B of the transmitting party 430 to determine the phase difference between the BLE signals transmitted by antenna A and antenna B.

[0183] Among them, the angle of departure (AoD) of the BLE signal can be calculated by the following formula (2):

[0184]

[0185] Among them, θ is the angle of departure (AoD) of the BLE signal, ψ is the phase difference between the BLE signals transmitted by antenna A and antenna B, λ is the wavelength of the BLE signal, and d is the distance between antenna A and antenna B. Here, the θ angle can be set as the alignment angle between the first electronic device and the second electronic device, that is, the alignment angle between the first electronic device and the second electronic device can be calculated by formula (2).

[0186] In some possible embodiments, the transmitting party 430 can be the second electronic device 200, and the receiving party 440 can be the first electronic device 100. The first electronic device 100 has at least two antennas for transmitting / receiving BLE signals, and the second electronic device 200 has at least one antenna for transmitting / receiving BLE signals. The first electronic device 100 can pass the above Figure 4C and Figure 4D shown principle of measuring the AoD of the BLE signal to determine the alignment angle of the first electronic device 100 relative to the second electronic device 200.

[0187] In some possible embodiments, the transmitting party 430 may be the first electronic device 100, and the receiving party 440 may be the second electronic device 200. There is at least one antenna for transmitting / receiving BLE signals on the first electronic device 100, and at least two antennas for transmitting / receiving BLE signals on the second electronic device 200. The second electronic device 200 may determine the alignment angle of the first electronic device 100 relative to the second electronic device 200 by the principle of measuring the AoD of the BLE signal shown in Figure 4C and Figure 4D .

[0188] Figure 5 FIG. is a flowchart of a device connection method provided by an embodiment of the present invention. This method can be applied to the first electronic device 100. The device connection method includes:

[0189] Step 502, sending a positioning request to at least one second electronic device to determine the first position information of the second electronic device in the coordinate system of the first electronic device

[0190] The first position information includes the coordinates of the second electronic device in the coordinate system of the first electronic device.

[0191] Step 504, obtaining a facial image of the user, and calculating the spatial coordinates of a preset point on the face of the user in the coordinate system of the first electronic device;

[0192] Step 506, identifying the facial orientation information of the user from the facial image. Specifically, the facial orientation information includes the facial orientation of the user.

[0193] Step 508, determining a first target device in the second electronic device based on the facial orientation information of the user, the spatial coordinates of the facial preset point, and the first position information;

[0194] Step 510, sending a connection request to the first target device to establish a connection with the first target device.

[0195] The device connection method provided by this application places the user's face position, face orientation, and surrounding connectable devices in a coordinate system to confirm which device the user is looking at, for convenient connection.

[0196] Figure 6 FIG. is a flowchart of a device connection method provided by an embodiment of the present invention. This method can be applied to the first electronic device 100. The device connection method includes:

[0197] Step 602, the first electronic device detects a first instruction for connecting to the second electronic device.

[0198] The second electronic device includes, but is not limited to, a smart phone with a Bluetooth module, a Bluetooth speaker, a projection device, etc. Specifically, these devices correspond to the above-mentioned second electronic device 200 and include a Bluetooth module that supports a protocol above Bluetooth 5.1.

[0199] Among them, a target device is included in the second electronic device, and the target device is a device that the user wants to connect to or control. For example, if the user wants to control a screen mirroring device through the first electronic device 100, the screen mirroring device is the target device.

[0200] Exemplarily, refer to Figure 7 , which specifically relates to an example diagram of an application scenario of a connection method for an electronic device provided in an embodiment of the present application. The user faces TV1 / speaker 1, and it is very likely that the user wants to connect to or control TV1 / speaker 1, and TV1 / speaker 1 is the target device.

[0201] The first instruction is used to turn on the Bluetooth module of the first electronic device 100. Specifically, the first instruction may include an instruction input by the user, and the input method of the instruction may include input through the screen, voice input, etc.

[0202] Step 604, the first electronic device responds to the first instruction and turns on the connection mode to send the positioning request.

[0203] After detecting the above first instruction, the first electronic device 100 responds to the first instruction and sends a positioning request to at least one second electronic device.

[0204] In a possible implementation manner, the first electronic device 100 may broadcast periodically (for example, with a period of 1 second) to send a positioning request to the second electronic device 200. Or the first electronic device 100 sends a positioning request after detecting the above first instruction.

[0205] Step 606, the second electronic device sends positioning data to the first electronic device

[0206] The data may include a CTE data packet, data for calculating the distance between the first electronic device and the second electronic device, data for indicating whether the second electronic device is facing the first electronic device, and also includes the alignment angle between the second electronic device and the first electronic device, etc. Specifically, the type of the data is associated with the above positioning request.

[0207] Step 608, determine the first position information of the second electronic device in the coordinate system of the first electronic device.

[0208] In one embodiment, the above positioning data is a CTE data packet sent by the second electronic device to the first electronic device.

[0209] Specifically, in the embodiments of the present invention, the second electronic device 200 responds to the positioning request of the first electronic device 100 and sends a specially customized orientation signal thereto. The second electronic device 200 sends a CTE data packet to the first electronic device 100 for the first electronic device 100 to calculate the alignment angle of the second electronic device 200 relative to the first electronic device 100.

[0210] In some embodiments of the present invention, as described above Figures 4A - 4B shown in the BLE signal AOA measurement principle, where the first electronic device 100 can be the receiver of the BLE signal and the second electronic device 200 can be the transmitter of the BLE signal. After the first electronic device 100 sends a positioning request and is confirmed by the second electronic device 200, the second electronic device 200 can send a CTE broadcast packet to the first electronic device 100. The first electronic device 100 can switch to the specified antenna to receive the CTE broadcast packet in a certain order and calculate the AoA of the BLE signal transmitted by the second electronic device 200 according to the above formula (1), that is, the alignment angle of the second electronic device 200 relative to the first electronic device 100.

[0211] In some embodiments of the present invention, as described above Figures 4C - 4D shown in the BLE signal AOD measurement principle, where the first electronic device 100 can be the receiver of the BLE signal and the second electronic device 200 can be the transmitter of the BLE signal. After the first electronic device 100 sends a positioning request and is confirmed by the second electronic device 200, the second electronic device 200 can switch the specified antenna to send a CTE broadcast packet to the first electronic device 100 in a certain order. The first electronic device 100 can receive the CTE broadcast packet and calculate the AoD of the BLE signal transmitted by the second electronic device 200 according to the above formula (2), that is, the alignment angle of the second electronic device 200 relative to the first electronic device 100.

[0212] In one embodiment, the data for positioning described above can be directly the alignment angle of the second electronic device 200 relative to the first electronic device 100.

[0213] Specifically, as described above Figures 4A - 4BThe BLE signal AOA measurement principle shown in the figure, where the first electronic device 100 can be the sender of the BLE signal, and the second electronic device 200 can be the receiver of the BLE signal. After the first electronic device 100 sends a positioning request and is confirmed by the second electronic device 200, the first electronic device 100 can send a CTE broadcast packet to the second electronic device 200. The second electronic device 200 can switch to the specified antenna to receive the CTE broadcast packet in a certain order, and calculate the AoA of the BLE signal emitted by the first electronic device 100 according to the above formula (2), that is, the alignment angle of the first electronic device 100 relative to the second electronic device 200. Subsequently, the second electronic device 200 sends the alignment angle to the first electronic device 100.

[0214] In some embodiments of the present invention, as described above Figures 4C - 4D The BLE signal AOD measurement principle shown in the figure, where the first electronic device 100 can be the sender of the BLE signal, and the second electronic device 200 can be the receiver of the BLE signal. After the first electronic device 100 sends a positioning request and is confirmed by the second electronic device 200, the first electronic device 100 can switch to the specified antenna to send a CTE broadcast packet to the second electronic device 200 in a certain order. The second electronic device 200 can receive the CTE broadcast packet, and calculate the AoD of the BLE signal emitted by the first electronic device 200 according to the above formula (2), that is, the alignment angle of the first electronic device 100 relative to the second electronic device 200. Subsequently, the second electronic device 200 sends the alignment angle to the first electronic device 100.

[0215] In another embodiment of the present invention, the data for positioning sent by the second electronic device to the first electronic device in step 506 includes other data for ranging, specifically for determining the distance between the first electronic device and the second electronic device. For example, the data packet includes the intensity signal RSSI. Specifically, the second electronic device determines the RSSI and then sends it to the first electronic device. The first electronic device calculates through the formula d = 10^((abs(rssi)-A) / (10*n)), where d is the calculated distance (unit: m), rssi is the received signal strength, A is the received signal strength when the transmitter and receiver are 1 meter apart, and n is the environmental attenuation factor. It should be noted that the first electronic device and the second electronic device can also calculate the distance in other ways, and the method of calculating the distance illustrated in this embodiment does not constitute a limitation on the way of calculating this distance.

[0216] In one embodiment, the alignment angle and distance between the first electronic device 100 and the second electronic device 200 can be calculated by the first electronic device 100, or can be calculated by the second electronic device 200 and then sent to the first electronic device 100.

[0217] In one embodiment, based on the distance information and the above-mentioned alignment angle, the coordinates of the second electronic device 200 in the spatial coordinate system of the first electronic device 100 can be determined.

[0218] In one embodiment, the above-mentioned first position information includes the coordinates of the second electronic device 200 in the spatial coordinate system of the first electronic device 100.

[0219] Step 610: Obtain the facial image of the user and calculate the spatial coordinates of the preset points on the user's face in the coordinate system of the first electronic device; this step can be executed simultaneously when the positioning request is sent in step 604.

[0220] Specifically, the facial image of the user is captured by a 3D camera, which includes cameras such as ToF, binocular, and structured light. The ToF, binocular, and structured light cameras can locate the face coordinates in the coordinate system of the first electronic device.

[0221] In one example, when the above-mentioned 3D camera takes a photo, it performs 3D modeling on the face and identifies the 3D modeling coordinates of the face. Taking the center of the two eyes as the representative of the face position, the coordinates of the center point of the two eyes in the 3D model can be directly obtained. By converting the 3D model coordinates with the coordinate system of the first electronic device in this solution, the coordinates of the face position in the coordinate system of the first electronic device can be obtained.

[0222] Specifically, taking the structured light 3D camera as an example, the structured light 3D camera includes an infrared projection module, a color camera, and a processor dedicated to calculating depth. Structured light, as the name implies, is a special light source, usually divided into three types: discrete light spots, stripe light, and coded structured light. When working, the specially coded light spots are projected from the infrared projection module onto the user's face. The user's face reflects infrared light, and the infrared projection module receives the reflected light to form a picture. According to the distortion of the light spots, the distance of each point on the user's face from the camera plane is calculated, and the depth of the user's face obtained is processed by the processor for calculating depth. Then, a 3D model is formed for the image of the user's face. The preset points on the user's face are determined in the coordinate system of the 3D model, and then the coordinates of the preset points on the face in the coordinate system of the 3D model are converted into the coordinates in the spatial coordinate system of the first electronic device.

[0223] It should be noted that the above conversion step occurs when the coordinate systems of the 3D camera and the first electronic device are different. If the coordinate systems of the 3D camera and the first electronic device are the same, no conversion is required.

[0224] Step 612: Identify the facial orientation information of the user from the facial image

[0225] The facial orientation information specifically includes the facial direction. This step can be performed simultaneously when sending a positioning request in step 604.

[0226] In one embodiment, the acquired facial image of the user can be input into an existing pre-set image recognition model, and based on this recognition model, the facial direction of the user can be determined. The facial direction of the user is located in the coordinate system of the first electronic device. It should be noted that this step may also include a step of recognizing the user's face to determine whether it is the actual operator. For example, by establishing an image database of operators, detecting whether the current operator is the person recorded in this image database. If not, then it is not the user of the first electronic device, and steps 612 and the following steps do not need to be executed.

[0227] Step 614, receive the screen orientation information of the second electronic device. Among them, the screen orientation information is determined by the second electronic device based on the second position information, and based on the screen orientation information, the second electronic device is filtered.

[0228] Specifically, the second position information includes the alignment angle between the first electronic device and the second electronic device. Specifically, how to determine the alignment angle has been shown above and will not be elaborated here. The second electronic device can also calculate the coordinates of the first electronic device in the coordinate system of the second electronic device according to the above principle of calculating the alignment angle.

[0229] In one embodiment, the data for positioning sent by the second electronic device to the first electronic device in the above step 606 may further include the screen orientation information of the second electronic device. This screen orientation information can be determined by the second electronic device and then sent to the first electronic device.

[0230] In one embodiment, when the alignment angle between the first electronic device and the second electronic device is known, the second electronic device determines the screen orientation information of the second electronic device according to the orientation of the preset coordinate axis in its space coordinate system.

[0231] See Figure 8 , which specifically relates to an example diagram for determining the screen orientation of the second electronic device in an embodiment of a device connection method of the present application.

[0232] In the space coordinate system of the second electronic device 200, with the front-facing direction of the electronic device screen as the Z-axis direction and the plane formed by the X / Y axes of the electronic device screen, a space coordinate system is formed. The second electronic device can locate and detect the position coordinates of the first electronic device in its coordinate system through the alignment angle and distance, and check whether the Z-axis component of the position coordinates is greater than 0 to determine whether the screen of the second electronic device is facing the first electronic device.

[0233] Specifically, if it is determined that the Z-axis component is greater than zero, the screen faces the first electronic device. If it is less than or equal to 0, it means that the screen of the second electronic device does not face the first electronic device. For example Figure 7 , the Z-axis component of TV1 is greater than 0, and the Z-axis of TV2 is less than 0. That is, TV1 faces the first electronic device, and TV2 does not face the electronic device. Since TV2 does not face the first electronic device, TV2 can be directly set as a non-target device to reduce the subsequent processing pressure.

[0234] In this embodiment, the second electronic device can directly send the conclusive information such as whether its screen faces the first electronic device to the first electronic device. In this way, the first electronic device can directly know the screen orientation of the second electronic device and, based on the screen orientation judgment result, screen the second electronic device. For example, a second electronic device whose screen does not face the first electronic device is definitely not the device that the user wants to control and can be deleted or blocked, and no communication connection is sent to it, further improving the recognition efficiency. It should be noted that how to screen the second electronic device specifically can also be set according to the user's needs.

[0235] In one embodiment, the second electronic device can send the magnitude of the above-mentioned Z-axis component to the first electronic device, and then the first electronic device determines whether the screen of the second electronic device faces itself. Specifically, the second electronic device sends positioning information to the first electronic device, and the first electronic device receives the positioning information (the magnitude of the Z-axis component) to determine whether the screen of the second electronic device faces itself, so as to screen the second electronic device.

[0236] Step 616, based on the user's facial orientation information, the spatial coordinates of the facial preset point, and the location information, determine the first target device in the second electronic device.

[0237] In one embodiment, based on the user's facial orientation information and the spatial coordinates of the facial preset point, an indication vector is established. Calculate the distance between each second electronic device and the indication vector, and determine the second electronic device with the smallest distance from the indication vector as the first target device.

[0238] Specifically, the first target device is the second electronic device that the user wants to control or connect based on the first electronic device.

[0239] Specifically, the first electronic device 100 can establish an indication vector along the facial orientation based on the obtained spatial coordinates of the facial preset point of the user, where the spatial coordinates of the facial preset point are located on the indication vector. Specifically, as shown above, the first electronic device 100 can obtain the spatial coordinates of the facial preset point through the above 3D camera.

[0240] Given the spatial coordinates of the second electronic device in the coordinate system of the first electronic device and the above-mentioned indication vector, the distance between the second electronic device and the indication vector can be calculated, and the first electronic device can designate the second electronic device with the smallest distance vector distance as the first target device. Refer to Figure 8 , the currently established indication vector L is directed towards TV / Audio 1. Compared with TV / Audio 2, the vector L is closer to TV / Audio 1, so TV / Audio 1 is the target device.

[0241] Step 618, initiate a request to establish a communication connection with the target device

[0242] When the first electronic device knows the target device, it can directly send a communication connection request to it to control the target device or communicate with it.

[0243] It should be noted that the method disclosed in this article is executed on devices that support protocols above Bluetooth 5.1. Of course, it can also be executed in other communication networks that support spatial positioning.

[0244] In one embodiment, the method disclosed in this application may further include the following steps:

[0245] Based on the indication vector and a preset angle, obtain a detection range, and detect whether the detection range includes a second target device other than the first target device. If there is a second target device other than the first target device, switch the first target device to the second target device.

[0246] The purpose of this step is to determine whether the connection is incorrect after establishing a communication connection with the first target device. This detection range indicates a certain range in the direction the user is facing, and within this range, it is highly likely to include the electronic device the user actually wants to control. For example, after the first electronic device establishes a connection with the target device, if the user finds that it is not the device they want to connect to, the first electronic device can display all the second electronic devices within this detection range on the screen. Since the second electronic devices within the current detection range have already been screened, it is more convenient for the user to make a selection.

[0247] Refer to Figure 9 and Figure 10 , which specifically relates to the detection range established by the first electronic device based on the indication vector and the spatial coordinates of preset points on the user's face.

[0248] In one embodiment, as Figure 9, taking the spatial coordinates of the preset point on the face as the vertex, with the indicating vector L as the axis, a detection range can be established according to the required angle a. For example, the angle a is 45 degrees, thus forming a cone with the spatial coordinates of the preset point on the face as the vertex. Devices falling within this cone may include the target device that the user wants to control. After this step, a preliminary screening of the devices that the user wants to control can be performed, and the screening results can be displayed for the user to make corrections, re-switch connections, or close connections.

[0249] In another embodiment, as Figure 10 , a circle can be drawn with the spatial coordinates of the preset point on the user's face as the center and a set distance as the radius r, and then projected along the direction of the indicating vector to form a cylinder as shown in the figure. For example, the radius r is 0.5 m. Devices falling within this cylinder include the target device that the user wants to control. After this step, a preliminary screening of the devices that the user wants to control can be performed, and the screening results can be displayed for the user to make corrections, re-switch connections, or close connections.

[0250] The spatial ranges covered by the above-mentioned cylinder and cone are the above-mentioned detection ranges.

[0251] This application also provides another method for connecting devices. Refer to Figure 11 , specifically referring to the flowchart of the method for connecting this device. This method can be applied to a first electronic device and includes:

[0252] Step 1102: Receive a positioning request and the user's facial image sent by a second electronic device

[0253] Specifically, if the user wants to establish a connection between the second electronic device 200 and the first electronic device 100, a positioning request can be sent. This positioning request can include an assistance request, which enables the first electronic device 100 to confirm whether the user is facing it. Specifically, the second electronic device can send the user's facial picture to the first electronic device 100 for use in determining whether the user is facing it in subsequent steps.

[0254] Step 1104: Identify the user's orientation

[0255] Determining the user's orientation can include the following methods: tracking the user's eyeballs and judging the user's orientation based on the tracking results. Specifically, eyeball tracking is common knowledge in this field and will not be elaborated here.

[0256] In another embodiment, obtain the user's facial image and input the image into an existing recognition model to determine the user's facial orientation.

[0257] In a possible implementation, after obtaining a positioning request, the first electronic device can capture a user image in real time and determine whether the user's face is facing itself through recognition. Specifically, the first electronic device can analyze whether the user's face image is complete. For example, when the user has their back to the first electronic device 100 or is sideways to the first electronic device, it can be determined that the user is not facing itself.

[0258] Step 1106, if the user is facing the electronic device, send feedback information to the second electronic device, where the feedback information is used to instruct the second electronic device to initiate a connection request to the first electronic device.

[0259] When the first electronic device detects that the user is facing itself, it can be determined that the user has the intention to control it, and feedback information can be sent to the second electronic device so that the second electronic device initiates a communication connection request to the first electronic device.

[0260] See Figure 12 , Figure 11 Involving Figure 11 The scenario example diagram when the method shown is executed.

[0261] After obtaining the user's face image, TV1 can capture the user image in real time for recognition or capture the user's eyeballs when receiving a positioning request from the second electronic device 200. Based on the recognition or capture result, it determines whether the user is facing TV1. When it is confirmed that the user is looking at itself, it sends feedback information to the second electronic device 200, instructing the second electronic device 200 to initiate a connection establishment request to itself.

[0262] It can be understood that in order to implement the above functions, the above terminals and the like include corresponding hardware structures and / or software modules for executing each function. Those skilled in the art should easily realize that, combining the units and algorithm steps of each example described in the embodiments disclosed in this article, the embodiments of the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed in the way of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the embodiments of the present invention.

[0263] Embodiments of the present application can divide the above-mentioned terminals and the like into functional modules according to the above method examples. For example, each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware or in the form of a software functional module. It should be noted that the division of modules in the embodiments of the present invention is illustrative, only a logical function division, and there can be other division methods in actual implementation.

[0264] Through the description of the above embodiments, those skilled in the art can clearly understand that for the convenience and simplicity of description, only the above division of each functional module is used as an example. In actual applications, the above functions can be allocated to 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. The specific working processes of the systems, devices, and units described above can refer to the corresponding processes in the foregoing method embodiments and will not be repeated here.

[0265] In each embodiment of the present application, each functional unit can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.

[0266] If the above integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the embodiments of the present application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the methods described in the various embodiments of the present application. The foregoing storage medium includes: various media that can store program codes such as flash memory, mobile hard disk, read-only memory, random access memory, magnetic disk, or optical disk.

[0267] The above is only the specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application should be covered by 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 connection method for a device, characterized in that, Applied to a first electronic device, including: Sending a positioning request to at least one second electronic device to determine first position information of the second electronic device in the coordinate system of the first electronic device; Obtaining a facial image of the user and calculating spatial coordinates of a preset facial point of the user in the coordinate system of the first electronic device; Identifying facial orientation information of the user from the facial image; Determining a first target device in the second electronic device based on the facial orientation information of the user, the spatial coordinates of the preset facial point, and the first position information; Initiating a connection request to the first target device to establish a connection with the first target device; The step of sending a positioning request to at least one second electronic device to determine first position information of the second electronic device in the coordinate system of the first electronic device further includes: Sending a positioning request to at least one of the second electronic devices, so that the second electronic device determines second position information of the first electronic device in the coordinate system of the second electronic device according to the positioning request; Before determining the first target device in the second electronic device based on the facial orientation information of the user, the spatial coordinates of the preset facial point, and the first position information, further includes: Receiving screen orientation information of the second electronic device, where the screen orientation information is determined by the second electronic device based on the second position information; Filtering the second electronic device based on the screen orientation information.

2. The connection method according to claim 1, characterized in that, The step of sending a positioning request to at least one second electronic device to determine first position information of the second electronic device in the coordinate system of the first electronic device includes: Sending a positioning request to at least one of the second electronic devices to obtain an alignment angle and a distance between the first electronic device and the second electronic device; Determining spatial coordinates of the second electronic device in the coordinate system of the first electronic device based on the alignment angle and the distance.

3. The connection method according to claim 1, characterized in that, The step of identifying facial orientation information of the user from the facial image includes: Inputting the facial image of the user into a preset recognition model to obtain the facial orientation of the user in the coordinate system of the first electronic device.

4. The connection method according to claim 1, characterized in that, The step of calculating spatial coordinates of the preset facial point of the user includes: Obtaining a 3D model of the facial image of the user; Determining the preset facial point of the user and the coordinates of the preset facial point of the user in the coordinate system of the 3D model; Converting the coordinates of the preset facial point in the 3D model coordinate system into spatial coordinates of the spatial coordinate system of the first electronic device.

5. The connection method according to claim 1, wherein The step of determining the first target device in the second electronic device based on the facial orientation information of the user, the spatial coordinates of the preset facial point, and the first position information includes: Establishing an indication vector based on the facial orientation information of the user and the spatial coordinates of the preset facial point; Calculating a distance between the second electronic device and the indication vector based on the first position information to determine the first target device in the second electronic device.

6. The connection method according to any one of claims 1-5, characterized in that, Before sending the positioning request to at least one second electronic device, the following steps are further included: Detect a first instruction for connecting to the second electronic device; In response to the detected first instruction, enable the connection mode to send the positioning request.

7. The connection method according to claim 5, characterized in that After sending a connection request to the first target device to establish a connection with the first target device, the following steps are further included: Obtain a detection range based on the indication vector and a preset angle; Detect whether the detection range includes a second target device other than the first target device; If there is a second target device other than the first target device, detect a second instruction for connecting to the second target device; In response to the second instruction, enable the first electronic device to establish a connection with the second target device.

8. An electronic device, characterized in that, It includes a processor and a storage device. The storage device stores an application program. When the application program is run by the processor, the electronic device performs the following steps: Send a positioning request to at least one second electronic device to determine first position information of the second electronic device in the coordinate system of the first electronic device; Obtain a facial image of the user and calculate spatial coordinates of a preset point on the user's face in the coordinate system of the first electronic device; Identify facial orientation information of the user from the facial image; Based on the facial orientation information of the user, the spatial coordinates of the facial preset point, and the first position information, determine a first target device among the second electronic devices; Send a connection request to the first target device to establish a connection with the first target device; When sending the positioning request to at least one second electronic device to determine first position information of the second electronic device in the coordinate system of the first electronic device, the following steps are further included: Send a positioning request to at least one of the second electronic devices, so that the second electronic device determines second position information of the first electronic device in the coordinate system of the second electronic device according to the positioning request; Before determining the first target device among the second electronic devices based on the facial orientation information of the user, the spatial coordinates of the facial preset point, and the first position information, the following steps are further included: Receive screen orientation information of the second electronic device, where the screen orientation information is determined by the second electronic device based on the second position information; Filter the second electronic devices based on the screen orientation information.

9. The electronic device according to claim 8, wherein When the application program is run by the processor, enabling the electronic device to perform the step of sending a positioning request to at least one second electronic device to determine first position information of the second electronic device in the coordinate system of the first electronic device includes the following steps: Send a positioning request to at least one of the second electronic devices to obtain an alignment angle and a distance between the first electronic device and the second electronic device; Based on the alignment angle and the distance, determine spatial coordinates of the second electronic device in the coordinate system of the first electronic device.

10. The electronic device according to claim 8, characterized in that, When the application program runs on the processor, it causes the electronic device to execute the step of identifying the facial orientation information of the user from the facial image, including the following steps: Input the facial image of the user into a preset recognition model to obtain the facial orientation of the user in the coordinate system of the first electronic device.

11. The electronic device according to claim 8, wherein When the application program runs on the processor, it causes the electronic device to execute the step of calculating the spatial coordinates of the preset points on the user's face, including the following steps: Obtain the 3D model of the facial image of the user; Determine the preset points on the user's face and the coordinates of the preset points on the user's face in the coordinate system of the 3D model; Convert the coordinates of the preset points on the face in the 3D model coordinate system into the spatial coordinates of the spatial coordinate system of the first electronic device.

12. The electronic device according to claim 8, wherein When the application program runs on the processor, it causes the electronic device to execute the step of determining the first target device in the second electronic device based on the facial orientation information of the user, the spatial coordinates of the preset points on the face, and the first position information, including the following steps: Establish an indication vector based on the facial orientation information of the user and the spatial coordinates of the preset points on the face; Calculate the distance between the second electronic device and the indication vector based on the first position information to determine the first target device in the second electronic device.

13. The electronic device according to any one of claims 8-12, characterized in that, Before the application program runs on the processor and causes the electronic device to execute the step of sending a positioning request to at least one second electronic device, it further includes the following steps: Detect a first instruction for connecting to the second electronic device; In response to the detected first instruction, turn on the connection mode to send the positioning request.

14. The electronic device according to claim 12, wherein After the application program runs on the processor and causes the electronic device to execute the step of sending a connection request to the first target device to establish a connection with the first target device, it further includes the following steps: Obtain a detection range based on the indication vector and a preset angle; Detect whether the detection range includes a second target device other than the first target device; If there is a second target device other than the first target device, detect a second instruction for connecting to the second target device; In response to the second instruction, cause the first electronic device to establish a connection with the second target device.

15. A computer-readable storage medium, characterized in that, It includes computer instructions that, when running on an electronic device, cause the electronic device to execute the connection method of the device according to any one of claims 1-7.

16. A computer program product, characterized in that, When the computer program product runs on a computer, it causes the computer to execute the connection method of the device according to any one of claims 1-7.

Citation Information

Patent Citations

  • A control method and a device of an electronic device

    CN109388238A

  • Electronic equipment control method and electronic equipment

    CN110557740A