Bluetooth connection method and device of electronic equipment, equipment and storage medium

By sorting the attribute parameters of smart home appliances, the target device is connected to Bluetooth, which solves the problem of misjudgment and misconfiguration network in multiple environments of smart home appliances, and improves the efficiency and accuracy of distribution networks.

CN119211893APending Publication Date: 2024-12-27MIDEA GROUP WUHAN REFRIGERATION EQUIPMENT CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310765547.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-26
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

In the case of many smart home appliances and many environmental devices, users are prone to misjudgment when connecting Bluetooth through mobile APP, resulting in an increase in misconfiguration rate. The existing technology lacks effective solutions.

Method used

By obtaining the attribute parameters of the electronic device, such as angle parameters, signal strength and distance parameters, sorting the electronic devices to be connected, determining the most suitable target device for Bluetooth connection, reducing the probability of misjudgment and improving the distribution network efficiency.

Benefits of technology

It effectively reduces the probability of misjudgment of the devices to be connected, ensures that users accurately connect to the target devices, and improves the efficiency and user experience of smart home appliance distribution networks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119211893A_ABST
    Figure CN119211893A_ABST
Patent Text Reader

Abstract

The invention discloses a Bluetooth connection method and device of electronic equipment, equipment and a storage medium. The method comprises the following steps: acquiring attribute parameters of at least two pieces of electronic equipment; the attribute parameters are in one-to-one correspondence with the electronic equipment and are used for representing parameters of the electronic equipment for Bluetooth connection; sorting the at least two electronic devices based on the attribute parameters to obtain a sorting result; determining to-be-connected target equipment based on the sorting result; and carrying out Bluetooth connection on the target equipment. According to the technical scheme, the electronic devices are sorted by representing the attribute parameters of the electronic devices for Bluetooth connection, the sorting result is obtained, then the to-be-connected electronic devices which are reasonably sorted can be obtained, and the misjudgment probability of the to-be-connected electronic devices is effectively reduced; and performing Bluetooth connection on the target equipment in the to-be-connected electronic equipment corresponding to the sorting result, thereby more accurately determining the target equipment expected by the user to perform Bluetooth connection, and improving the network distribution efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of smart home appliances, and more specifically, to a Bluetooth connection method, apparatus, device and storage medium for electronic devices. Background Art

[0002] In the related technologies, with the introduction of smart homes and the popularity of smart technologies, there are endless home appliances with smart functions on the market. When users expect to use mobile phone applications (Application, APP) to directly control smart appliances or network smart appliances via Bluetooth, the APP will prompt a list of smart appliances to be connected, and the user selects a smart appliance in the list to control or network. With the popularization of smart appliances, there will be more and more smart appliances in users' homes, and there will be more and more network-configurable devices in the environment during network configuration, which may cause the list of smart appliances to be connected prompted by the APP to be misjudged, which in turn leads to an increase in the misconfiguration rate. However, there is currently no effective solution to this problem. Summary of the invention

[0003] In view of this, the embodiments of the present application provide a Bluetooth connection method, apparatus, device and storage medium for an electronic device, aiming to effectively reduce the probability of misjudgment of the electronic device to be connected and improve network configuration efficiency.

[0004] The technical solution of the embodiment of the present application is implemented as follows:

[0005] The present application provides a Bluetooth connection method for an electronic device, which is applied to a terminal device. The method includes:

[0006] Acquire attribute parameters of at least two electronic devices; the attribute parameters correspond to the electronic devices one by one and are used to characterize parameters of the electronic devices used for Bluetooth connection;

[0007] Sorting the at least two electronic devices based on the attribute parameters to obtain a sorting result;

[0008] Determine a target device to be connected based on the sorting result;

[0009] A Bluetooth connection is established for the target device.

[0010] In the above solution, the attribute parameter includes a first angle parameter, and the first angle parameter represents an angle value of the electronic device compared to a set orientation; and the at least two electronic devices are sorted based on the attribute parameter to obtain a sorting result, including:

[0011] Based on the first angle parameter and the second angle parameter of the terminal device, determining a third angle parameter representing the orientation difference between the terminal device and the electronic device; the second angle parameter represents the angle value of the terminal device compared to the set orientation;

[0012] The at least two electronic devices are sorted in ascending order of the third angle parameter to obtain the sorting result.

[0013] In the above solution, the attribute parameter also includes a fourth angle parameter; the fourth angle parameter represents the angle value of each of the at least two antennas of the electronic device compared to the terminal device; and the at least two electronic devices are sorted based on the attribute parameter to obtain a sorting result, including:

[0014] Based on at least two of the fourth angle parameters, determining a third angle parameter characterizing an orientation difference between the terminal device and the electronic device;

[0015] The at least two electronic devices are sorted in ascending order according to the absolute values ​​of the third angle parameters to obtain the sorting result.

[0016] In the above solution, the attribute parameter also includes a signal parameter, and the signal parameter represents the signal strength of the electronic device used for Bluetooth connection; and the sorting of the at least two electronic devices based on the attribute parameter to obtain the sorting result also includes:

[0017] If there are multiple electronic devices with the same third angle parameter among the at least two electronic devices, the multiple electronic devices in the sorting result are sorted in descending order of signal strength to obtain an updated sorting result.

[0018] In the above solution, the attribute parameter further includes a distance parameter, and the distance parameter represents the relative distance between the electronic device and the terminal device; and the sorting of the at least two electronic devices based on the attribute parameter to obtain the sorting result further includes:

[0019] If there are multiple electronic devices with the same third angle parameter among the at least two electronic devices, the multiple electronic devices in the sorting result are sorted in ascending order of the relative distance to obtain an updated sorting result.

[0020] In the above solution, determining the target device to be connected based on the sorting result includes:

[0021] The first N electronic devices in the sorting result are determined as the target devices; N is a positive integer greater than or equal to 1.

[0022] In the above solution, the Bluetooth connection of the target device includes:

[0023] In response to an operation instruction of a user, generating connection request information of the target device;

[0024] Perform a Bluetooth connection to the target device based on the connection request information.

[0025] In the above solution, the acquiring of attribute parameters of at least two electronic devices includes:

[0026] Based on the broadcast signal of each of the at least two electronic devices, the attribute parameters of each of the at least two electronic devices are acquired.

[0027] In the above solution, after the target device is connected via Bluetooth, the method further includes:

[0028] Sending the target device the gateway configuration information of the Internet where the terminal device is located; the gateway configuration information is used to instruct the target device to access the Internet.

[0029] The present application provides a Bluetooth connection device for an electronic device, which is applied to a terminal device. The device includes:

[0030] An acquisition module, used to acquire attribute parameters of at least two electronic devices; the attribute parameters correspond to the electronic devices one by one and are used to characterize the parameters of the electronic devices used for Bluetooth connection;

[0031] A sorting module, configured to sort the at least two electronic devices based on the attribute parameters to obtain a sorting result;

[0032] A determination module, used to determine a target device to be connected based on the sorting result;

[0033] A connection module is used to establish a Bluetooth connection with the target device.

[0034] An embodiment of the present application provides a terminal device, comprising: a processor and a memory for storing a computer program that can be run on the processor, wherein:

[0035] The processor is used to execute the steps of the above-mentioned Bluetooth connection method when running the computer program.

[0036] An embodiment of the present application provides a storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned Bluetooth connection method are implemented.

[0037] The embodiments of the present application provide a method, apparatus, device and storage medium for Bluetooth connection of electronic devices, the method comprising: obtaining attribute parameters of at least two electronic devices; the attribute parameters correspond one-to-one with the electronic devices and are used to characterize the parameters used by the electronic devices for Bluetooth connection; sorting the at least two electronic devices based on the attribute parameters to obtain a sorting result; determining the target device to be connected based on the sorting result; and connecting the target device to Bluetooth. The technical solution of the embodiments of the present application is adopted to sort the electronic devices by characterizing the attribute parameters used by the electronic devices for Bluetooth connection to obtain a sorting result, thereby being able to obtain reasonably sorted electronic devices to be connected, effectively reducing the probability of misjudgment of the electronic devices to be connected; connecting the target device to Bluetooth in the electronic devices to be connected corresponding to the sorting result can more accurately determine the target device that the user expects to connect to Bluetooth, thereby improving the network configuration efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 A schematic diagram of a Bluetooth connection method for an electronic device according to an embodiment of the present application;

[0039] Figure 2 A schematic diagram of the technical principle of a Bluetooth connection method for an electronic device in an application example of the present application;

[0040] Figure 3 A schematic diagram of a scenario of a Bluetooth connection method of an electronic device in an application example of the present application;

[0041] Figure 4 This is a schematic diagram of the Bluetooth AOA positioning technology of the Bluetooth connection method of the electronic device in the embodiment of the present application;

[0042] Figure 5 A schematic diagram of the structure of a Bluetooth connection device of an electronic device according to an embodiment of the present application;

[0043] Figure 6 A schematic diagram of a hardware entity structure of a terminal device according to an embodiment of the present application. DETAILED DESCRIPTION

[0044] The present application is further described in detail below in conjunction with the accompanying drawings and embodiments.

[0045] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application.

[0046] The embodiment of the present application provides a Bluetooth connection method for an electronic device, which is applied to a terminal device. Based on the Bluetooth connection method of the embodiment of the present application, the probability of misjudgment of the electronic device to be connected can be effectively reduced, and the network configuration efficiency can be improved.

[0047] Before describing the Bluetooth connection method according to the embodiment of the present application, an exemplary description of the electronic device is first given.

[0048] The electronic device of the embodiment of the present application may be a home appliance, and in particular may be a smart home appliance. Smart home appliances include home appliances formed by introducing microprocessors, sensor technology, and network communication technology into home appliances, and have the function of automatically sensing the state of residential space, the state of home appliances themselves, and the state of home appliance services, and can automatically control and receive control instructions from residential users in the house or remotely; at the same time, as a component of a smart home, smart home appliances can be interconnected with other home appliances and home facilities in the house to form a system and realize smart home functions. For example, smart home appliances may be home appliances such as air conditioners, washing machines, refrigerators, televisions, and electric speakers.

[0049] For the above electronic devices, the following terms are defined:

[0050] The main hardware and software parts of electronic equipment include wireless communication technology (WiFi) modules, remote controls, electronic control boards, etc., which enable communication connections to be established between electronic equipment and mobile terminals.

[0051] The Serial Number (SN) is a unique identification code recorded in the electronic control board or WiFi module of an electronic device. Each electronic device has a unique SN.

[0052] The device identification (Device ID) number refers to the unique identification (ID) number corresponding to the SN that is assigned by the server (for example, the cloud) after the electronic device is normally configured and connected to the network.

[0053] The family identification (Room ID) number refers to the ID number used to manage all subordinate electronic devices in a family. Each Device ID corresponds to a Room ID.

[0054] The user's identity (ID) number refers to the user's unique account name, used to log in to the APP.

[0055] Terminal devices refer to portable terminal devices such as smartphones, tablet computers, smart wearable devices, etc. that have the function of running APP.

[0056] APP refers to software used to connect electronic devices to Bluetooth or pair them with Bluetooth, such as smart home service software.

[0057] A gyroscope is a device that uses a angular motion detection shell that uses the momentum of a high-speed rotating body to detect the angular motion of one or two axes orthogonal to the axis of rotation in relative inertial space.

[0058] The Bluetooth connection method of the electronic device in the embodiment of the present application is as follows: Figure 1 As shown, including:

[0059] Step 101: Acquire attribute parameters of at least two electronic devices; the attribute parameters correspond to the electronic devices one by one and are used to characterize the parameters of the electronic devices used for Bluetooth connection.

[0060] It can be understood that the Bluetooth connection method of the electronic device in the embodiment of the present application is applied to the terminal device, and the terminal device can receive the current attribute parameters sent by each electronic device.

[0061] In an application example, the terminal device may receive Bluetooth broadcast signals sent by various electronic devices, and acquire attribute parameters of the corresponding electronic devices based on the received Bluetooth broadcast signals.

[0062] Exemplarily, the terminal device may also store the acquired attribute parameters of each electronic device in a storage module.

[0063] Exemplarily, the attribute parameter of the electronic device may include at least one of the following: an angle value representing the electronic device compared to a set orientation and a signal strength representing the electronic device for Bluetooth connection.

[0064] In an application example, obtaining attribute parameters of at least two electronic devices includes:

[0065] Based on the broadcast signal of each of the at least two electronic devices, the attribute parameter of each of the at least two electronic devices is acquired.

[0066] Exemplarily, based on the broadcast signal of each of the at least two electronic devices, the attribute parameters of each of the at least two electronic devices are obtained. Each electronic device can turn on Bluetooth broadcast and send out a Bluetooth broadcast signal carrying the attribute parameters; the terminal device receives the Bluetooth broadcast signal and extracts the attribute parameters of the corresponding electronic device from the Bluetooth broadcast signal.

[0067] Exemplarily, the broadcast signal may be a Bluetooth broadcast signal sent by the electronic device via Bluetooth. The Bluetooth of the electronic device may be in a normally-on state or in a dormant state capable of periodically broadcasting attribute parameters to save power consumption.

[0068] Step 102: Sort the at least two electronic devices based on the attribute parameters to obtain a sorting result.

[0069] Here, at least two electronic devices are sorted by sorting each electronic device based on the aforementioned angle value. For example, the azimuth difference between the terminal devices is determined based on the angle value of each electronic device, and the electronic devices are sorted in order from small to large according to the azimuth difference. This enables each electronic device to be sorted in order from small to large according to the azimuth difference relative to the terminal device.

[0070] In an application example, the attribute parameter includes a first angle parameter, and the first angle parameter represents an angle value of the electronic device compared to a set orientation; and at least two electronic devices are sorted based on the attribute parameter to obtain a sorting result, including:

[0071] Determining a third angle parameter representing the orientation difference between the terminal device and the electronic device based on the first angle parameter and the second angle parameter of the terminal device; the second angle parameter represents the angle value of the terminal device compared to the set orientation;

[0072] At least two electronic devices are sorted in ascending order of the third angle parameter to obtain a sorting result.

[0073] Exemplarily, determining a third angle parameter characterizing an orientation difference between the terminal device and the electronic device based on the first angle parameter and the second angle parameter of the terminal device may include:

[0074] A difference operation is performed on the first angle parameter and the second angle parameter of the terminal device to obtain an angle difference value between the first angle parameter and the second angle parameter of the terminal device; an absolute value operation is performed on the angle difference value between the first angle parameter and the second angle parameter of the terminal device to obtain a third angle parameter representing the orientation difference between the terminal device and the electronic device.

[0075] Exemplarily, the set direction may be the south direction determined by a compass, and the south direction is determined as the reference 0 degrees. The terminal device and the electronic device use the same reference 0 degrees to determine the angle parameter, so as to more accurately calculate the angle difference between the electronic device and the terminal device and the third angle parameter, so as to more accurately sort the devices to be networked in the environment according to the user's intention according to the third angle parameter, thereby improving the user's network configuration success rate and user experience.

[0076] In the above solution, the attribute parameter also includes a fourth angle parameter; the fourth angle parameter represents the angle value of each antenna of the at least two antennas of the electronic device compared to the terminal device; and the at least two electronic devices are sorted based on the attribute parameter to obtain a sorting result, including:

[0077] Determining a third angle parameter characterizing an orientation difference between the terminal device and the electronic device based on at least two fourth angle parameters;

[0078] At least two electronic devices are sorted in ascending order of absolute values ​​of the third angle parameter to obtain a sorting result.

[0079] Exemplarily, the fourth angle parameter may be an angle value generated by a built-in antenna in the electronic device when the terminal device transmits a direction-finding signal to the electronic device through an antenna using an angle of arrival (AOA) technology and the direction-finding signal passes through the electronic device.

[0080] Exemplarily, based on at least two fourth angle parameters, the third angle parameter characterizing the difference in orientation between the terminal device and the electronic device is determined, and the third angle parameter characterizing the difference in orientation between the terminal device and the electronic device can be determined by the phase difference between each two fourth angle parameters of the at least two fourth angle parameters. Specifically, when the direction-finding signal passes through, a phase difference is generated due to the different distances between each antenna in the smart home appliance that receives the direction-finding signal and the terminal device, and the direction of the signal is calculated, and the third angle parameter characterizing the difference in orientation between the terminal device and the electronic device is further calculated.

[0081] Here, at least two electronic devices may be sorted, and each electronic device may be sorted based on the aforementioned signal strength, for example, by sorting each electronic device in descending order according to the signal strength of each electronic device, thereby achieving sorting each electronic device in descending order according to the signal strength for Bluetooth connection.

[0082] In an application example, the attribute parameter also includes a signal parameter, and the signal parameter represents the signal strength of the electronic device used for Bluetooth connection; sorting at least two electronic devices based on the attribute parameter to obtain a sorting result also includes:

[0083] If there are multiple electronic devices with the same third angle parameter among the at least two electronic devices, the multiple electronic devices in the sorting result are sorted in descending order of signal strength to obtain an updated sorting result.

[0084] Exemplarily, the signal strength may be the theoretical Bluetooth signal strength of the electronic device at the distance from the terminal device. The signal strength may be related to the distance between the electronic device and the terminal device. The sorting result is updated by the signal strength, and electronic devices with the same third angle parameter (i.e., electronic devices with the same angle difference with the terminal device) can be re-sorted so that electronic devices with stronger Bluetooth signal strength are sorted in a front position, thereby more accurately determining the target device to be connected.

[0085] Here, at least two electronic devices may be sorted, and each electronic device may be sorted based on the aforementioned signal strength, for example, by sorting each electronic device in descending order according to the signal strength of each electronic device, thereby achieving sorting each electronic device in descending order according to the signal strength for Bluetooth connection.

[0086] In an application example, the attribute parameter further includes a distance parameter, and the distance parameter represents a relative distance between the electronic device and the terminal device; and sorting at least two electronic devices based on the attribute parameter to obtain a sorting result further includes:

[0087] If there are multiple electronic devices with the same third angle parameter among the at least two electronic devices, the multiple electronic devices in the sorting result are sorted in ascending order of relative distance to obtain an updated sorting result.

[0088] Exemplarily, the relative distance may be related to the Bluetooth signal strength between the electronic device and the terminal device. The relative position relationship between each electronic device and the terminal device may be obtained by measuring the Bluetooth signal strength (Received Signal Strength Indicator, RSSI) of the electronic device. The RSSI between the electronic device and the terminal device is calibrated in advance, and a comparison table of RSSI and relative distance is prepared. When the RSSI is obtained during application, the corresponding relative distance can be obtained.

[0089] Among them, by updating the sorting results through relative distance, electronic devices with the same third angle parameter (that is, electronic devices with the same angle difference with the terminal device) can be re-sorted, so that electronic devices closer to the terminal device are sorted in a front position, thereby more accurately determining the target device to be connected.

[0090] Step 103: Determine the target device to be connected based on the sorting result.

[0091] Here, determining the target device to be connected based on the sorting result may be to screen the electronic devices in the sorting result based on a preset condition to obtain the electronic devices that meet the preset condition; and determining the electronic devices that meet the preset condition as the target device to be connected. The preset condition may include that the electronic device is ranked in the top N in the sorting result, where N is a positive integer greater than or equal to 1.

[0092] In an application example, determining a target device to be connected based on the sorting result includes:

[0093] The first N electronic devices in the sorting result are determined as the target devices; N is a positive integer greater than or equal to 1.

[0094] Exemplarily, the electronic device ranked first in the sorting results has the characteristics of a smaller third angle parameter (i.e., the direction of the electronic device and the terminal device are nearly consistent or the same) and a larger signal strength (i.e., the distance between the electronic device and the terminal device is closer). Based on the above characteristics, it can be determined that the electronic device ranked first in the sorting results is the target device that the user wishes to connect to.

[0095] Exemplarily, N can be 1, which can determine the only optimal target device in the sorting result, connect the optimal target device, and achieve the best network configuration accuracy; N can also be a positive integer greater than 1, which can determine multiple target devices in the sorting result, connect the multiple target devices in sequence, and simplify the network configuration operation and improve the network configuration efficiency on the basis of improving the network configuration accuracy.

[0096] Step 104: Establish a Bluetooth connection to the target device.

[0097] Here, performing Bluetooth connection to the target device refers to sending a Bluetooth connection request to the target device based on a Bluetooth address parameter corresponding to the target device, and establishing a Bluetooth connection with the target device.

[0098] It is understandable that the Bluetooth broadcast signal sent by each electronic device also carries the network address of the electronic device, for example, the aforementioned SN. In this way, after determining the target device based on the aforementioned sorting result, a Bluetooth connection request can be sent based on the SN of the target device to establish a Bluetooth connection with the target device.

[0099] In an application example, a Bluetooth connection is made to a target device, including:

[0100] In response to an operation instruction of a user, generating connection request information of a target device;

[0101] Perform a Bluetooth connection to the target device based on the connection request information.

[0102] Exemplarily, in response to a user's operating instruction, generating connection request information of the target device may be receiving the user's operating instruction, wherein the operating instruction is used to instruct the user to select the target device from the aforementioned sorting results; after determining the target device based on the operating instruction, sending a Bluetooth connection request based on the SN of the target device.

[0103] In other embodiments, after establishing a Bluetooth connection with the target device, the terminal device can send first control information to the target device via Bluetooth, where the first control information is used to control the target device.

[0104] In an application example, after establishing a Bluetooth connection with the target device, the Bluetooth connection method further includes:

[0105] Send the target device the gateway configuration information of the Internet where the terminal device is located; the gateway configuration information is used to instruct the target device to access the Internet.

[0106] Exemplarily, the gateway configuration information may include the router account information and password information of the Internet. After sending the gateway configuration information of the Internet where the terminal device is located to the target device, the target device can access the Internet based on the gateway configuration information to become a network node, which can be remotely accessed by the terminal device.

[0107] In other embodiments, after the target device accesses the Internet based on the gateway configuration information, the terminal device can send second control information to the target device through the Internet, and the second control information is used to control the target device.

[0108] In this way, by connecting the target device to the Internet, the terminal device sends control information to the target device via the Internet, and the target device can be effectively controlled even when the terminal device and the target device are far apart.

[0109] In the embodiment of the present application, electronic devices are sorted by characterizing the attribute parameters used by the electronic devices for Bluetooth connection to obtain the sorting result; the target device in the electronic devices to be connected corresponding to the sorting result is connected by Bluetooth. In this way, the electronic devices to be connected can be reasonably sorted, effectively reducing the probability of misjudgment of the electronic devices to be connected; and the target device that the user expects to connect by Bluetooth can be determined more accurately, thereby improving the network configuration efficiency.

[0110] The Bluetooth connection method of the embodiment of the present application is illustrated below with reference to an application example.

[0111] In this application example, Figure 2 As shown in FIG. 1 , there are multiple smart home appliances in the user's home environment. Each smart home appliance turns on Bluetooth for broadcasting, and the broadcast signal carries gyroscope angle data. The user's mobile phone terminal has installed a smart home appliance APP, which searches for nearby smart home appliances via Bluetooth. In this scenario, Figure 3 As shown, when the user holds the mobile phone, he will subconsciously point the phone toward the smart home appliance to be connected, move the phone to the same direction as the smart home appliance to be connected, and keep the phone in the same direction as the smart home appliance to be connected. At this time, the APP performs a difference operation based on the gyroscope angle data in the Bluetooth broadcast of the smart home appliance and the gyroscope angle data of the mobile phone itself, and combines the Bluetooth signal strength of the smart home appliance or the relative distance between the smart home appliance and the mobile phone to fusion sort. The sorting results are shown in Table 1; the user selects the device ranked first in the environment, such as smart home appliance 1, and initiates a connection request; completes the Bluetooth direct connection control or Bluetooth network distribution control of the smart home appliance to be controlled. It should be noted that the actual Bluetooth signal strength will fluctuate up and down.

[0112] Table 1 Ranking of smart home appliances

[0113] Sorting Smart home appliances Gyroscope angle data difference absolute value Bluetooth signal strength theoretical value 1 Air Conditioner 2 0° -40dBm 2 Air Conditioner 3 45° -35dBm 3 Air Conditioning 4 45° -50dBm 4 Air Conditioner 1 90° -30dBm 5 Air conditioning 5 90° -45dBm

[0114] In this application example, Figure 4 As shown, the mobile phone uses the AOA antenna to transmit the direction-finding signal, and the receiving terminal, that is, the smart home appliance has a built-in antenna array. The smart home appliance has multiple array antennas built in. When the direction-finding signal passes through, a phase difference will be generated due to the different distances between each array antenna in the smart home appliance that receives the direction-finding signal and the mobile phone, and then the direction of the signal is calculated, that is, the direction of the smart home appliance relative to the mobile phone.

[0115] In this application example, the relative position relationship between each smart home appliance and the mobile phone can be obtained by measuring the Bluetooth signal strength RSSI of the smart home appliance. The Bluetooth signal strength RSSI of the smart home appliance is calibrated in advance, and a comparison table of RSSI and relative distance is prepared. When the RSSI is obtained during application, the corresponding relative distance can be obtained.

[0116] In order to implement the method of the embodiment of the present application, the embodiment of the present application also provides a Bluetooth connection device of an electronic device, which corresponds to the above-mentioned Bluetooth connection method, and each step in the above-mentioned Bluetooth connection method embodiment is also fully applicable to the Bluetooth connection device embodiment of the electronic device.

[0117] like Figure 5 As shown, the device 500 of the electronic device includes: an acquisition module 501, a sorting module 502, a determination module 503 and a connection module 504. The acquisition module 501 is used to acquire attribute parameters of at least two electronic devices; the attribute parameters correspond to the electronic devices one by one, and are used to characterize the parameters of the electronic devices used for Bluetooth connection. The sorting module 502 is used to sort the at least two electronic devices based on the attribute parameters to obtain a sorting result. The determination module 503 is used to determine the target device to be connected based on the sorting result. The connection module 504 is used to connect the target device to Bluetooth.

[0118] In some embodiments, the attribute parameter includes a first angle parameter, and the first angle parameter represents an angle value of the electronic device compared to a set orientation; the sorting module 502 sorts the at least two electronic devices based on the attribute parameter to obtain a sorting result, including:

[0119] Based on the first angle parameter and the second angle parameter of the terminal device, determining a third angle parameter representing the orientation difference between the terminal device and the electronic device; the second angle parameter represents the angle value of the terminal device compared to the set orientation;

[0120] The at least two electronic devices are sorted in ascending order of the third angle parameter to obtain the sorting result.

[0121] In some embodiments, the attribute parameter further includes a fourth angle parameter; the fourth angle parameter represents an angle value of each of the at least two antennas of the electronic device compared to the terminal device; the sorting module 502 sorts the at least two electronic devices based on the attribute parameter to obtain a sorting result, including:

[0122] Based on at least two of the fourth angle parameters, determining a third angle parameter characterizing an orientation difference between the terminal device and the electronic device;

[0123] The at least two electronic devices are sorted in ascending order according to the absolute values ​​of the third angle parameters to obtain the sorting result.

[0124] In some embodiments, the attribute parameter further includes a signal parameter, and the signal parameter represents the signal strength of the electronic device for Bluetooth connection; the sorting module 502 sorts the at least two electronic devices based on the attribute parameter to obtain a sorting result, and further includes:

[0125] If there are multiple electronic devices with the same third angle parameter among the at least two electronic devices, the multiple electronic devices in the sorting result are sorted in descending order of signal strength to obtain an updated sorting result.

[0126] In some embodiments, the attribute parameter further includes a distance parameter, and the distance parameter represents a relative distance between the electronic device and the terminal device; the sorting module 502 sorts the at least two electronic devices based on the attribute parameter to obtain a sorting result, and further includes:

[0127] If there are multiple electronic devices with the same third angle parameter among the at least two electronic devices, the multiple electronic devices in the sorting result are sorted in ascending order of the relative distance to obtain an updated sorting result.

[0128] In some embodiments, the determination module 503 determines the target device to be connected based on the sorting result, including:

[0129] The first N electronic devices in the sorting result are determined as the target devices; N is a positive integer greater than or equal to 1.

[0130] In some embodiments, the connection module 504 performs a Bluetooth connection on the target device, including:

[0131] In response to an operation instruction of a user, generating connection request information of the target device;

[0132] Perform a Bluetooth connection to the target device based on the connection request information.

[0133] In some embodiments, the acquisition module 501 acquires attribute parameters of at least two electronic devices, including:

[0134] Based on the broadcast signal of each of the at least two electronic devices, the attribute parameters of each of the at least two electronic devices are acquired.

[0135] In some embodiments, the connection module 504 is further configured to:

[0136] Sending the target device the gateway configuration information of the Internet where the terminal device is located; the gateway configuration information is used to instruct the target device to access the Internet.

[0137] In actual application, the acquisition module 501, the sorting module 502, the determination module 503 and the connection module 504 can be implemented by a processor. Of course, the processor needs to run the computer program in the memory to implement its functions.

[0138] It should be noted that: the Bluetooth connection device of the electronic device provided in the above embodiment only uses the division of the above program modules as an example when performing control. In actual applications, the above processing can be assigned to different program modules as needed, that is, the internal structure of the device can be divided into different program modules to complete all or part of the processing described above. In addition, the Bluetooth connection device of the electronic device provided in the above embodiment and the aforementioned Bluetooth connection method embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.

[0139] Based on the hardware implementation of the above program modules, and in order to implement the method of the embodiment of the present application, the embodiment of the present application also provides a terminal device. Figure 6 Only an exemplary structure of the terminal device is shown, not all structures, and can be implemented as needed. Figure 6 Partial or complete structure shown.

[0140] like Figure 6 As shown, the terminal device 600 provided in the embodiment of the present application includes: at least one processor 601, a memory 602 and a user interface 603. The various components in the terminal device 600 are coupled together through a bus system 604. It can be understood that the bus system 604 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 604 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, Figure 6Various buses are labeled as bus system 604 .

[0141] The user interface 603 may include a display, a keyboard, a mouse, a trackball, a click wheel, keys, buttons, a touch pad or a touch screen.

[0142] The memory 602 in the embodiment of the present application is used to store various types of data to support the operation of the control device. Examples of such data include: any computer program used to operate on the control device.

[0143] The Bluetooth connection method of the terminal device disclosed in the embodiment of the present application can be applied to the processor 601, or implemented by the processor 601. The processor 601 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the Bluetooth connection method of the terminal device can be completed by the hardware integrated logic circuit or software instructions in the processor 601. The above-mentioned processor 601 can be a general processor, a digital signal processor (DSP, DigitalSignal Processor), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The processor 601 can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiment of the present application. The general processor can be a microprocessor or any conventional processor, etc. In combination with the steps of the method disclosed in the embodiment of the present application, it can be directly embodied as a hardware decoding processor to execute, or it can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium, which is located in the memory 602, and the processor 601 reads the information in the memory 602, and completes the steps of the Bluetooth connection method of the terminal device provided in the embodiment of the present application in combination with its hardware.

[0144] In an exemplary embodiment, the terminal device may be implemented by one or more application specific integrated circuits (ASIC), DSP, programmable logic device (PLD), complex programmable logic device (CPLD), field programmable gate array (FPGA), general processor, controller, microcontroller (MCU), microprocessor, or other electronic components to execute the aforementioned method.

[0145] It can be understood that the memory 602 can be a volatile memory or a non-volatile memory, and can also include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disk, or a compact disc read-only memory (CD-ROM); the magnetic surface memory can be a disk memory or a tape memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), synchronous static random access memory (SSRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM, SyncLink Dynamic Random Access Memory), and direct RAM bus random access memory (DRRAM, Direct Rambus Random Access Memory).The memories described in the embodiments of the present application are intended to include, but are not limited to, these and any other suitable types of memories.

[0146] In an exemplary embodiment, the present application also provides a storage medium, namely a computer storage medium, which may be a computer-readable storage medium, for example, a memory 602 storing a computer program, and the computer program may be executed by a processor 601 of a terminal device to complete the steps described in the method of the present application. The computer-readable storage medium may be a memory such as a ROM, a PROM, an EPROM, an EEPROM, a Flash Memory, a magnetic surface memory, an optical disk, or a CD-ROM.

[0147] It should be noted that: "first", "second", etc. are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0148] In addition, the technical solutions described in the embodiments of the present application can be combined arbitrarily without conflict.

[0149] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A Bluetooth connection method for an electronic device, characterized in that: Applied to a terminal device, the method comprises: Acquire attribute parameters of at least two electronic devices; the attribute parameters correspond to the electronic devices one by one and are used to characterize parameters of the electronic devices used for Bluetooth connection; Sorting the at least two electronic devices based on the attribute parameters to obtain a sorting result; Determine a target device to be connected based on the sorting result; A Bluetooth connection is established for the target device.

2. The method according to claim 1, characterized in that: The attribute parameter includes a first angle parameter, and the first angle parameter represents an angle value of the electronic device compared to a set orientation; and the sorting of the at least two electronic devices based on the attribute parameter to obtain a sorting result includes: Based on the first angle parameter and the second angle parameter of the terminal device, determining a third angle parameter representing the orientation difference between the terminal device and the electronic device; the second angle parameter represents the angle value of the terminal device compared to the set orientation; The at least two electronic devices are sorted in ascending order of the third angle parameter to obtain the sorting result.

3. The method according to claim 1, characterized in that The attribute parameter further includes a fourth angle parameter; the fourth angle parameter represents an angle value of each of the at least two antennas of the electronic device compared to the terminal device; and the at least two electronic devices are sorted based on the attribute parameter to obtain a sorting result, including: Based on at least two of the fourth angle parameters, determining a third angle parameter characterizing an orientation difference between the terminal device and the electronic device; The at least two electronic devices are sorted in ascending order according to the absolute values ​​of the third angle parameters to obtain the sorting result.

4. The method according to claim 2 or 3, characterized in that: The attribute parameter also includes a signal parameter, and the signal parameter represents the signal strength of the electronic device used for Bluetooth connection; and the sorting of the at least two electronic devices based on the attribute parameter to obtain a sorting result further includes: If there are multiple electronic devices with the same third angle parameter among the at least two electronic devices, the multiple electronic devices in the sorting result are sorted in descending order of signal strength to obtain an updated sorting result.

5. The method according to claim 2 or 3, characterized in that: The attribute parameter further includes a distance parameter, and the distance parameter represents a relative distance between the electronic device and the terminal device; and the sorting of the at least two electronic devices based on the attribute parameter to obtain a sorting result further includes: If there are multiple electronic devices with the same third angle parameter among the at least two electronic devices, the multiple electronic devices in the sorting result are sorted in ascending order of the relative distance to obtain an updated sorting result.

6. The method according to claim 1, characterized in that The determining the target device to be connected based on the sorting result includes: The first N electronic devices in the sorting result are determined as the target devices; wherein N is a positive integer greater than or equal to 1.

7. The method according to claim 1, characterized in that The step of connecting the target device to the Bluetooth device includes: In response to an operation instruction of a user, generating connection request information of the target device; Perform a Bluetooth connection to the target device based on the connection request information.

8. The method according to claim 1, characterized in that The acquiring of attribute parameters of at least two electronic devices includes: Based on the broadcast signal of each of the at least two electronic devices, the attribute parameters of each of the at least two electronic devices are acquired.

9. The method according to claim 1, characterized in that: After the target device is connected to the Bluetooth, the method further includes: Sending the target device the gateway configuration information of the Internet where the terminal device is located; the gateway configuration information is used to instruct the target device to access the Internet.

10. A Bluetooth connection device for an electronic device, characterized in that: Applied to a terminal device, the device comprises: An acquisition module, used to acquire attribute parameters of at least two electronic devices; the attribute parameters correspond to the electronic devices one by one and are used to characterize the parameters of the electronic devices used for Bluetooth connection; A sorting module, configured to sort the at least two electronic devices based on the attribute parameters to obtain a sorting result; A determination module, used to determine a target device to be connected based on the sorting result; A connection module is used to establish a Bluetooth connection with the target device.

11. A terminal device, characterized in that: include: A processor and a memory for storing a computer program that can be executed on the processor, wherein: The processor is used to execute the steps of the method according to any one of claims 1 to 9 when running a computer program.

12. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 9 are implemented.