Bluetooth sensorless control method, system and device
By using multiple broadcast signals and preset RSSI values in the Bluetooth sensorless interactive system to control the controlled device, the problem of sensorless interaction accuracy caused by Bluetooth signal error is solved, and higher accuracy and user experience is achieved.
Patent Information
- Application Number
- CN202411621561.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-14
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2044-11-14
AI Technical Summary
In Bluetooth ranging sensing interaction system, the error of Bluetooth signal strength indicator (RSSI) causes the accuracy of insensitive interaction to be affected, and may frequently trigger the on or off operation by mistake, causing inconvenience and safety hazards to users.
By sending multiple broadcast signals on the Bluetooth module of the controlled device, the handheld device performs Bluetooth pairing with the Bluetooth module based on these signals, obtains the RSSI real-time value, and issues corresponding instructions according to the preset RSSI value to control the controlled device.
It realizes the accuracy and real-time nature of Bluetooth sensorless interaction control, improves user experience, reduces false triggering, and enhances the security of the system.
Smart Images

Figure CN119155664B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of Bluetooth sensorless interaction, and in particular to a Bluetooth sensorless control method, system and device. Background Art
[0002] In the Bluetooth ranging sensing interaction system, the error of Bluetooth signal strength indication (RSSI) brings challenges to the senseless interaction. Since the Bluetooth signal is affected by environmental factors, such as obstacles and signal interference, the accuracy of the senseless interaction system is affected, and it may frequently trigger the on or off operation by mistake, causing inconvenience and safety hazards to users.
[0003] For example, in a Bluetooth ranging induction unlocking scenario, since the Bluetooth signal is affected by environmental factors, such as obstacles, signal interference, etc., the accuracy of the inductive unlocking system is affected, and the unlocking or locking operations may be frequently triggered by mistake, causing inconvenience and safety hazards to users.
[0004] Traditional contactless unlocking systems mostly use the distance based on Bluetooth signals to trigger the unlocking operation, ignoring the stability of the signal and changes in the environment, and often result in delayed unlocking or delayed locking, affecting the user experience. Summary of the invention
[0005] The technical problem to be solved by the present invention is to provide a Bluetooth sensorless control method, system and device for the above-mentioned defects.
[0006] The technical solution adopted by the present invention to solve the technical problem is: a Bluetooth sensorless control method, comprising the following steps:
[0007] The Bluetooth module of the controlled device sends multiple broadcast signals when powered on, wherein the effective coverage range of the first broadcast signal is greater than the effective coverage range of the second broadcast signal;
[0008] The handheld device performs Bluetooth pairing with the Bluetooth module based on the first broadcast signal and the second broadcast signal to establish communication, and obtains a real-time RSSI value based on the first broadcast signal;
[0009] When the RSSI real-time value is greater than a first preset RSSI value, a first instruction is issued to the controlled device.
[0010] In one embodiment, the broadcast signal further includes a fourth broadcast signal, the effective coverage range of the second broadcast signal is greater than the effective coverage range of the fourth broadcast signal, and the method further includes:
[0011] The controlled device executing the first instruction requires the handheld device to feedback that it has detected the fourth broadcast signal and entered the fourth broadcast effective coverage range; otherwise, the controlled device ignores the first instruction.
[0012] In one embodiment, the broadcast signal further includes a third broadcast signal, the effective coverage range of the fourth broadcast signal is greater than the effective coverage range of the third broadcast signal, and the method further includes:
[0013] When the handheld device detects the third broadcast signal and enters its effective coverage range, sending a second instruction to the controlled device;
[0014] Determining whether the controlled device successfully executes the first instruction;
[0015] If not, execute the second instruction; if so, ignore the second instruction.
[0016] In one embodiment, the method further comprises:
[0017] When the RSSI real-time value is less than a second preset RSSI value, issuing a third instruction to the controlled device;
[0018] The first preset RSSI value is greater than the second preset RSSI value.
[0019] In one embodiment, the broadcast signal further includes a third broadcast signal, the effective coverage range of the fourth broadcast signal is greater than the effective coverage range of the third broadcast signal, and the method further includes:
[0020] The controlled device executing the third instruction requires the handheld device to feedback that it has left the effective coverage of the third broadcast signal; otherwise, the controlled device ignores the third instruction.
[0021] In one embodiment, the method further comprises:
[0022] When the handheld device determines that it has left the effective coverage of the fourth broadcast signal, sending a fourth instruction to the controlled device;
[0023] Determining whether the controlled device successfully executes the third instruction;
[0024] If not, execute the fourth instruction; if so, ignore the fourth instruction.
[0025] In one embodiment, the method further comprises:
[0026] Obtaining the current RSSI value based on the first broadcast signal corresponding to executing the second instruction several times to form a first array, and obtaining the current RSSI value based on the first broadcast signal corresponding to executing the fourth instruction several times to form a second array;
[0027] Calculate a first average value according to the first array, and calculate a second average value according to the second array;
[0028] The first average value is greater than the first preset RSSI value, the first preset RSSI value is greater than the second preset RSSI value, and the second preset RSSI value is greater than the second average value.
[0029] In one embodiment, the number of the handheld device is more than one, and the method further comprises:
[0030] Query whether the handheld device is in a preset dynamic device table;
[0031] When it is determined that the handheld device is in the unlocking scene and is not in the preset dynamic device table, the counting variable M is counted cumulatively; and the handheld device is entered into the preset dynamic device table;
[0032] When it is determined that the handheld device is in a locked state and is in the preset dynamic device table, the counting variable M is counted down; and the handheld device is removed from the preset dynamic device table;
[0033] When the counting variable M is greater than or equal to 1, the controlled device is in an unlocked state;
[0034] When the counting variable M is less than 1, the controlled device is put into a locked state.
[0035] In addition, the present invention also provides a Bluetooth sensorless control system, which is used to implement the Bluetooth sensorless control method as described above.
[0036] In addition, the present invention also provides a Bluetooth sensorless control device, comprising a controlled device and a handheld device, wherein the controlled device further comprises a logic control unit, a motor control unit and a Bluetooth module;
[0037] The Bluetooth module is used to send out multiple broadcast signals when powered on, wherein the effective coverage range of the first broadcast signal is greater than the effective coverage range of the second broadcast signal;
[0038] The handheld device is used to perform Bluetooth pairing with the Bluetooth module based on the first broadcast signal and the second broadcast signal to establish communication, and is also used to obtain an RSSI real-time value based on the first broadcast signal. When the RSSI real-time value is greater than a first preset RSSI value, a first instruction is issued to the controlled device so that the logic control unit determines whether to control the motor control unit to drive the motor to complete the unlocking operation according to the first instruction.
[0039] The implementation of the Bluetooth seamless control method, system and device of the present invention has the following beneficial effects: the present invention establishes Bluetooth stable connection and secure communication as well as locates and calculates distance based on multiple broadcast signals, which can further realize the accuracy and real-time performance of Bluetooth seamless interactive control and improve user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] The present invention will be further described below with reference to the accompanying drawings and embodiments, in which:
[0041] Figure 1 is a schematic diagram of the physical coverage of a Bluetooth broadcast signal provided by an embodiment of the present invention;
[0042] Figure 2 yes Figure 1 Schematic diagram showing the physical space relationship between broadcast 3 and broadcast 4 and the preset RSSI value;
[0043] Figure 3 It is a flowchart of a Bluetooth sensorless control method provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0044] In order to have a clearer understanding of the technical features, purposes and effects of the present invention, specific embodiments of the present invention are now described in detail with reference to the accompanying drawings.
[0045] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present invention. However, it should be clear to those skilled in the art that the present invention may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present invention.
[0046] In order to facilitate the understanding of the present invention, the present invention will be described more fully below, and the present invention can be implemented in many different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the disclosure of the present invention more thorough and comprehensive.
[0047] It should be understood that although the terms first, second, third, etc. may be used to describe various information in the embodiments of the present invention, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. It is not necessarily required or implied that there is any such actual relationship or order between these entities or operations.
[0048] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the specification of the present invention herein are only for the purpose of describing specific embodiments and are not intended to limit the present invention.
[0049] Example 1
[0050] The Bluetooth sensorless control device of this embodiment includes a controlled device and a handheld device. The controlled device also includes a logic control unit, a motor control unit and a Bluetooth module. It can be understood that handheld devices include but are not limited to smart phones, laptops, tablets, smart watches, smart bracelets, etc. The Bluetooth sensorless interactive control method / device of the present invention can be used in control scenarios of lock devices, smart bulbs, smart lights, smart sockets, smart thermostats and other devices. The specific embodiments below mainly take mobile phones as examples and mainly use lock device control scenarios to exemplify the Bluetooth sensorless control of the present invention.
[0051] The Bluetooth module is used to send out multiple broadcast signals when powered on, wherein the effective coverage of the first broadcast signal is greater than the effective coverage of the second broadcast signal. It is understandable that the Bluetooth module will not send out any broadcast when not powered on. The handheld device is used to perform Bluetooth pairing with the Bluetooth module based on the first broadcast signal and the second broadcast signal to establish secure communication, and is also used to obtain the RSSI real-time value based on the first broadcast signal. When the RSSI real-time value is greater than the first preset RSSI value, a first instruction is sent to the controlled device so that the logic control unit determines whether to control the motor control unit to drive the motor to complete the unlocking operation according to the first instruction.
[0052] Taking the controlled device as a lock device as an example, the present invention is further explained through the lock device control application scenario description, the lock device includes a logic control unit, a motor control unit and a Bluetooth module, and the first instruction is a custom unlocking instruction. After the handheld device and the lock device complete Bluetooth pairing and successfully establish secure communication through the Bluetooth module, the handheld device obtains the RSSI real-time value based on the first broadcast signal in real time. When the RSSI real-time value is greater than the first preset RSSI value, the handheld device can send a custom unlocking instruction to the lock device through the APP.
[0053] It should be noted that Bluetooth signals are electromagnetic waves. Theoretically, their broadcast range can be infinite. However, in practical applications, the effective coverage of Bluetooth signals is limited by many factors, such as transmission power, receiving sensitivity, environmental interference and obstacles. These factors will affect the strength and stability of the signal. In practical applications, RSSI (Received Signal Strength Indicator) is usually used to measure the strength and quality of the signal. In order to ensure the stability and reliability of communication, an RSSI threshold is usually set, and signals below this threshold are considered unstable or invalid. Due to environmental and equipment limitations. The Bluetooth broadcast range referred to in the present invention refers to an effective and stable signal coverage range, such as a radius range where RSSI is greater than -85.
[0054] Figure 1 The schematic diagram of the physical coverage of the Bluetooth broadcast signal of the present invention is shown. When powered on, the Bluetooth module of the lock device sends broadcast 1 (first broadcast signal) and broadcast 2 (second broadcast signal). By configuring different transmission powers for each broadcast, the coverage of the broadcast is different. Broadcast 1 is mainly used to broadcast basic information of the Bluetooth module, including device name, Mac address (such as 00:1A:2B:3C:4D:5E), connectable broadcast packet type, and Tx Power Level. Broadcast 2 is a Beacon broadcast, including a UUID unique identifier (such as 0x22222222-2222-2222-2222-2222222222222) and TxPower Level.
[0055] Specifically, regarding the secure communication establishment process, the binding and authentication principles between the Bluetooth module and the handheld device are as follows:
[0056] 1. Power on the Bluetooth module. You can use hard reset (long press the reset button on the Bluetooth module) to clear the binding information of the Bluetooth module as needed.
[0057] 2. The handheld device scans and retrieves the Bluetooth module, connects to the Bluetooth module through the Bluetooth GATT protocol, and establishes BLE communication. The handheld device will randomly generate a 128-bit AES key and pass it to the Bluetooth module, and the handheld device will save a copy. The key is used to establish the necessary information for future communications.
[0058] 3. Once the Bluetooth module receives and saves the AES key, the module enters the bound state.
[0059] 4. When the Bluetooth module is in the bound state, when the handheld device scans and retrieves the Bluetooth module, connects to the Bluetooth module through the GATT protocol, and establishes BLE communication, the Bluetooth module will randomly generate a string and encrypt it using the locally saved AES key, and pass the encrypted data to the handheld device through BLE communication. The handheld device needs to use the locally saved AES key to decrypt the encrypted data, and then pass the decrypted string to the Bluetooth module. Only when the decrypted string passed by the handheld device is completely consistent with the string randomly generated by the Bluetooth module, the Bluetooth module and the handheld device can establish secure communication, otherwise, the Bluetooth module actively disconnects the Bluetooth connection with the handheld device. Start a local countdown from the Bluetooth module "passing the encrypted data to the handheld device through BLE communication", for example, 2 seconds. If the countdown time is reached and the module still has not received the correct string, the Bluetooth module actively disconnects the Bluetooth connection with the handheld device.
[0060] 5. The Bluetooth module transmits the UUID unique identifier of all broadcast signals to the handheld device via BLE. The handheld device saves it locally and registers and monitors the Beacon broadcast.
[0061] For example, in the unlocking scenario, the user carries a handheld device and approaches the lock from a distance (greater than the farthest effective distance covered by Broadcast 1). When the handheld device enters the effective range of Broadcast 1 emitted by the Bluetooth module, the Bluetooth module and the handheld device can sense each other's presence. When the handheld device detects Broadcast 2, it determines whether it is the same as the locally saved Broadcast 2 based on the UUID unique identifier of Broadcast 2. If they are the same, the App in the handheld device is activated, and if they are different, they are ignored. After activating the App, the detection of Broadcast 1 is immediately turned on. When Broadcast 1 is detected, a stable communication connection is established with the module, and the authentication process with the Bluetooth module is completed. After the App establishes a Bluetooth connection with the lock device, when the RSSI real-time value is greater than the RSSI_CUSTOM_OPEN (the first preset RSSI value) set by the user, the App sends a command to the lock device to request unlocking.
[0062] This embodiment establishes a stable Bluetooth connection and secure communication as well as locates and calculates distance based on multiple broadcast signals, which can further achieve the accuracy and real-time performance of Bluetooth seamless interactive control and improve user experience.
[0063] In some embodiments, in order to further ensure safe unlocking and ensure that the lock is within the user's visible / controllable range when unlocking, the broadcast signal also includes a fourth broadcast signal, and the effective coverage range of the second broadcast signal is greater than the effective coverage range of the fourth broadcast signal. Figure 1As shown, when the Bluetooth module of the lock device is powered on, it sends out broadcast 1 (first broadcast signal), broadcast 2 (second broadcast signal), and broadcast 4 (fourth broadcast signal). By configuring different transmission powers for each broadcast, the coverage range of the broadcast is: R1>R2>R4. For example, R1 = 15m, R2 = 10m, R4 = 5m. Broadcast 4 is a Beacon broadcast, including a UUID unique identifier (such as 0x44444444-4444-4444-4444-4444444444444), and TxPower Level.
[0064] In this embodiment, after the handheld device and the lock device complete Bluetooth pairing through the Bluetooth module and successfully establish secure communication, the handheld device obtains the RSSI real-time value based on the first broadcast signal in real time. When the RSSI real-time value is greater than the first preset RSSI value, the handheld device can send a custom unlocking instruction to the lock device through the APP. Moreover, the controlled device needs the handheld device to feedback that it has detected the fourth broadcast signal and entered the effective coverage range of the fourth broadcast when executing the first instruction (custom unlocking instruction). Otherwise, the controlled device ignores the custom unlocking instruction. It can be understood that when the RSSI real-time value is greater than the first preset RSSI value, the handheld device can send a custom unlocking instruction to the lock device through the APP, and at this time the handheld device may be outside broadcast 4 or inside broadcast 4. Only when it is determined that the handheld device has detected broadcast 4 and entered its effective coverage range, the controlled device will execute the custom unlocking instruction. If the handheld device is outside broadcast 4, the controlled device will ignore the instruction.
[0065] Exemplarily, after the App establishes a Bluetooth connection with the lock device, when the handheld device enters the effective range of Broadcast 4 (the judgment condition can be that Broadcast 4 can be stably retrieved and RSSI is greater than -85), the App can transmit information similar to "Enter Broadcast 4" to the module side through GATT communication. At the same time, the handheld device collects the RSSI real-time value based on Broadcast 1. When the RSSI real-time value is greater than the RSSI_CUSTOM_OPEN set by the user, the App sends a command to the lock device to request unlocking. When the App sends a command to the lock device to request unlocking, the lock device has not received information similar to "Enter Broadcast 4" transmitted from the App side to the module side through GATT communication, and the lock device will ignore the unlocking request sent by the App. This embodiment can ensure that the lock device is within the user's visible range or controllable range when unlocking, and can further achieve safe unlocking.
[0066] Example 2
[0067] This embodiment sets a forced unlocking logic. Specifically, the broadcast signal of this embodiment also includes a third broadcast signal, and the effective coverage range of the fourth broadcast signal is greater than the effective coverage range of the third broadcast signal. Figure 1 As shown, when the Bluetooth module of the lock device is powered on, it sends out broadcast 1 (first broadcast signal), broadcast 2 (second broadcast signal), broadcast 4 (fourth broadcast signal), and broadcast 3 (third broadcast signal). By configuring different transmission powers for each broadcast, the coverage range of the broadcast is: R1>R2>R4>R3. For example, R1 = 15m, R2 = 10m, R3 = 1m, R4 = 5m. Broadcast 3 is a Beacon broadcast, including a UUID unique identifier (such as 0x33333333-3333-3333-3333-3333333333333), Tx Power Level.
[0068] In this embodiment, after the handheld device and the lock device complete Bluetooth pairing through the Bluetooth module and successfully establish secure communication, the handheld device obtains the RSSI real-time value based on the first broadcast signal in real time. When the RSSI real-time value is greater than the first preset RSSI value, the handheld device can send a custom unlocking instruction to the lock device through the APP. Then, when the handheld device detects Broadcast 3 and the handheld device itself enters the effective coverage range of Broadcast 3, a second instruction is sent to the controlled device. Determine whether the controlled device successfully executes the first instruction. If not, execute the second instruction. If yes, ignore the second instruction. In other words, the second instruction is a forced opening instruction.
[0069] For example, when the App transmits information similar to "entering broadcast 3" to the module through GATT communication, the lock device executes the unlocking logic even if the RSSI real-time value is not greater than the RSSI_CUSTOM_OPEN set by the user. This embodiment can achieve forced unlocking through the forced opening logic set based on broadcast 3 when the custom unlocking instruction is not successfully executed or when a control abnormality occurs, ensuring that the lock device can be opened smoothly and protecting the user's use of the device.
[0070] Example 3
[0071] Based on the above embodiment, when the handheld device determines that the RSSI real-time value is less than the second preset RSSI value, it sends a third instruction to the controlled device. The third instruction is a custom lock instruction. That is to say, after the handheld device and the lock device complete Bluetooth pairing and successfully establish secure communication through the Bluetooth module, the handheld device obtains the RSSI real-time value based on the first broadcast signal in real time. When the RSSI real-time value is less than the second preset RSSI value, the handheld device can send a custom lock instruction to the lock device through the APP. This embodiment realizes the locking of the lock device in the locking scene by setting a custom lock logic.
[0072] In some embodiments, in order to further lock the lock safely and ensure that no user stays within the closed range set by the lock, the controlled device of this embodiment needs the handheld device to feedback that it has left the effective coverage range of the third broadcast signal when executing the third instruction. Otherwise, the controlled device ignores the third instruction. That is to say, after the handheld device and the lock device complete the Bluetooth pairing through the Bluetooth module and successfully establish a secure communication, the handheld device obtains the RSSI real-time value based on the first broadcast signal in real time. When the RSSI real-time value is less than the second preset RSSI value, the handheld device can send a custom lock instruction to the lock device through the APP. Moreover, the prerequisite for the lock device to execute the custom lock instruction is to determine that the handheld device has left the effective coverage range of the third broadcast signal. It can be understood that when issuing a custom lock instruction, the handheld device may be outside Broadcast 3 or inside Broadcast 3. Only when it is determined that the handheld device has left the effective coverage range of Broadcast 3, the controlled device will execute the custom lock instruction. If the handheld device is inside Broadcast 3, the controlled device will ignore the instruction.
[0073] Exemplarily, when the user's handheld device is away from the lock and the handheld device leaves the effective range of Broadcast 3 (the judgment condition may be that Broadcast 3 has not been retrieved within a certain period of time, or that the RSSI of Broadcast 3 is less than -85), the App transmits information similar to "leaving Broadcast 3" to the module side through GATT communication. At the same time, the handheld device collects the RSSI real-time value based on Broadcast 1. When the RSSI real-time value is less than the RSSI_CUSTOM_CLOSE (the second preset RSSI value) set by the user, the App sends a command to the lock device to request locking. When the App sends a command to the lock device to request locking, the lock device has not received information similar to "leaving Broadcast 3" transmitted to the lock device by the App through GATT communication, and the lock device will ignore the lock request issued by the App. This embodiment can further achieve safe locking when it is ensured that no user stays within the closed range set by the lock.
[0074] In some embodiments, a forced locking logic is also set, and the fourth instruction corresponds to a forced locking instruction. Specifically, when the handheld device determines that it has left the effective coverage of the fourth broadcast signal, the fourth instruction is sent to the controlled device. It is determined whether the controlled device successfully executes the third instruction. If not, the fourth instruction is executed. If yes, the fourth instruction is ignored.
[0075] It can be understood that in this embodiment, after the handheld device and the lock device complete Bluetooth pairing through the Bluetooth module and successfully establish secure communication, the handheld device obtains the RSSI real-time value based on the first broadcast signal in real time. When the RSSI real-time value is less than the second preset RSSI value, the handheld device can send a custom lock command to the lock device through the APP. In addition, the lock device executes the custom lock command only after determining that the handheld device has left the effective coverage of the third broadcast signal. Otherwise, the lock device ignores the custom lock command. When the handheld device determines that it has left the effective coverage of the fourth broadcast signal, it sends a fourth command to the controlled device. Determine whether the controlled device successfully executes the third command. If not, execute the fourth command. If so, ignore the fourth command.
[0076] For example, when the App transmits information similar to "Leave Broadcast 4" to the module via GATT communication, even if the RSSI real-time value is not less than the RSSI_CUSTOM_CLOSE set by the user, the lock device executes the lock logic. This embodiment can implement forced lock when the custom lock instruction is not successfully executed or when a control abnormality occurs, thereby ensuring that the lock device can be successfully closed through the forced lock logic set based on Broadcast 4.
[0077] It can be understood that according to the unlocking / locking scenario process of the above embodiment, the real-time RSSI value based on broadcast 1 is collected. For example, in the unlocking process, although the user can set the RSSI_CUSTOM_OPEN for unlocking by himself, it is still affected by forced locking. If the handheld device has not entered the effective coverage radius of broadcast 4, then even if the App sends an unlocking instruction to the module, it will be ignored by the locking device. Similarly, in the locking process, although the user can set the RSSI_CUSTOM_CLOSE by himself, it is still affected by forced unlocking. If the handheld device is still in the effective coverage radius of broadcast 3, then even if the App sends a locking instruction to the module, it will be ignored by the locking device. Therefore, the relationship between RSSI_CUSTOM_OPEN and RSSI_CUSTOM_CLOSE set by the user and broadcast 3 and broadcast 4 in physical space is as follows. Figure 2 shown.
[0078] As an option, regarding the first preset RSSI value and the second preset RSSI value set by the user, the determination method may be: obtaining the current RSSI value based on the first broadcast signal corresponding to the execution of the second instruction several times to form a first array, and obtaining the current RSSI value based on the first broadcast signal corresponding to the execution of the fourth instruction several times to form a second array. The first average value is calculated based on the first array, and the second average value is calculated based on the second array. The first average value is greater than the first preset RSSI value, the first preset RSSI value is greater than the second preset RSSI value, and the second preset RSSI value is greater than the second average value.
[0079] Exemplarily, the lock device sends broadcasts 1 to 4, and the power of each broadcast is fixed after factory configuration. However, for different handheld devices and different specific installation and use environments, the RSSI value of broadcast 1 will be different when the handheld device is at the effective boundary of broadcast 3 to broadcast 4. In order to match and adapt the lock device to the specific handheld device and the specific installation and use environment, the handheld device will record the RSSI values of broadcast 1 during the first five forced unlocking and forced locking after the device is installed, thereby obtaining the RSSI array RSSR_ARRAY_OPEN about broadcast 1 during forced unlocking, and the RSSI array RSSR_ARRAY_CLOSE about broadcast 1 during forced unlocking, and the RSSI data in array 1 are averaged to obtain RSSI_AVG_OPEN and RSSI_AVG_CLOSE. According to the above conclusions, RSSI_CUSTOM_OPEN and RSSI_CUSTOM_CLOSE set by the user and RSSI_AVG_OPEN and RSSI_AVG_CLOSE should maintain the following size relationship: RSSI_AVG_OPEN>RSSI_CUSTOM_OPEN>RSSI_CUSTOM_CLOSE>RSSI_AVG_CLOSE.
[0080] In some embodiments, in a multi-user scenario, an automated counting management can be used to customize the timing processing logic of opening and closing, so that when the first user enters, the lock is opened, and when the last user leaves, the lock is closed. Specifically, query whether the handheld device is in the preset dynamic device table. When it is determined that the handheld device is in the unlocking scene and is not in the preset dynamic device table, the counting variable M is counted cumulatively. In addition, the handheld device is entered into the preset dynamic device table. When it is determined that the handheld device is in the locking scene and is in the preset dynamic device table, the counting variable M is counted cumulatively. In addition, the handheld device is removed from the preset dynamic device table. When the counting variable M is greater than or equal to 1, the controlled device is in an unlocked state. When the counting variable M is less than 1, the controlled device is in a locked state.
[0081] It can be understood that the unlocking scenario refers to the handheld device entering the effective coverage range of the third broadcast signal or the real-time RSSI value detected by the handheld device about broadcast 1 is greater than the first preset RSSI value, and the locking scenario refers to the handheld device leaving the effective coverage range of the fourth broadcast signal or the real-time RSSI value detected by the handheld device about broadcast 1 is less than the second preset RSSI value.
[0082] For example, if the current state of the lock is locked, broadcasts 1 to 4 are being broadcasted to the outside. There are three users A, B, and C. The first user A approaches the lock device from far to near. When the user A handheld device sends an "unlock command" to the lock device, the lock device adds 1 to the count M (the initial value of M is 0), and M = 1. When the second user B approaches the lock device from far to near, when the user B handheld device sends an "unlock command" to the lock device, the lock device adds 1 to the count M, and M = 2. User A moves away from the lock device from near to far. When the user A handheld device sends a "lock command" to the lock device, the lock device subtracts 1 from the count M, and M = 1. Because M is not equal to 0, the lock device will not lock. When the third user C approaches the lock device from far to near, when the user C handheld device sends an "unlock command" to the lock device, the lock device adds 1 to the count M, and M = 2. When user C moves away from the lock device from close to far away, when user C's handheld device sends a "lock command" to the lock device, the lock device will reduce the count M by 1, M = 1, because M is not equal to 0, so the lock device will not lock. When user B moves away from the lock device from close to far away, when user B's handheld device sends a "lock command" to the lock device, the lock device will reduce the count M by 1, M = 0, because M is equal to 0, so the lock device will lock.
[0083] That is to say, for example, the current lock is in the closed state, that is, M=0.
[0084] User A comes in: When A reaches the custom lock line ( Figure 2 As shown in the figure, the handheld device sends a custom lock command to the lock device; the lock device searches the "door device table" (the default dynamic device table) and finds that the handheld device is not in the list, so the result in the logical judgment is -0; M=0-0=0; the lock device is locked at this time. When A comes to the custom unlock line ( Figure 2 As shown in the figure, the handheld device sends a custom unlocking command to the lock device; the lock device queries the "Device Table Inside the Door" and finds that the handheld device is not in the list, then the result in the logical judgment is +1; M=0+1=1; unlocking is executed; the device is added to the "Device Table Inside the Door".
[0085] User B comes in: When B comes to the custom lock line, the handheld device sends a custom lock command to the lock device; the lock device queries the "door device table" and finds that the handheld device is not in the list, so the result in the logical judgment is -0; M=1-0=1; the lock device is unlocking at this time. When B comes to the custom unlock line, the handheld device sends a custom unlock command to the lock device; the lock device queries the "door device table" and finds that the handheld device is not in the list, so the result in the logical judgment is +1; M=1+1=2; the lock device is unlocking at this time; add the device to the "door device table".
[0086] User A leaves: When A reaches the custom unlocking line, the handheld device sends a custom unlocking line command to the lock device; the lock device queries the "Device Table Inside the Door" and finds that the handheld device is in the list, then the result in the logical judgment is +0; M=2+0=2; the lock device is unlocking at this time. When A reaches the custom locking line, the handheld device sends a custom locking command to the lock device; the lock device queries the "Device Table Inside the Door" and finds that the handheld device is in the list, then the result in the logical judgment is -1; M=2-1=1; the lock device is unlocking at this time; remove the device from the "Device Table Inside the Door".
[0087] User B leaves: When B comes to the custom unlocking line, the handheld device sends a custom unlocking command to the lock device; the lock device queries the "Device Table Inside the Door" and finds that the handheld device is in the list, then the result in the logical judgment is +0; M=1+0=1; the lock device is unlocking at this time. When B comes to the custom locking line, the handheld device sends a custom locking line command to the lock device; the lock device queries the "Device Table Inside the Door" and finds that the handheld device is in the list, then the result in the logical judgment is -1; M=1-1=0; the lock device executes locking at this time; remove the device from the "Device Table Inside the Door".
[0088] As an option, you can also use automated counting to manage the processing logic between forced closing, custom closing, custom opening, and forced opening. User A comes in: When A comes to the forced closing line, the handheld device sends a "forced closing" command to the lock device; the lock device queries the "Device Table Inside the Door" and finds that the handheld device is not in the list, then the result in the logical judgment is -0; M=0-0=0; at this time the lock device is locked. When A comes to the custom locking line, the handheld device sends a "locking" command to the lock device; the lock device queries the "Device Table Inside the Door" and finds that the handheld device is not in the list, then the result in the logical judgment is -0; M=0-0=0; at this time the lock device is locked. When A comes to the custom unlocking line (such as Figure 2As shown in the figure, the handheld device sends an "unlock" command to the lock device; the lock device queries the "door device table" and finds that the handheld device is not in the list, so the result in the logical judgment is +1; M=0+1=1; the lock device now performs unlocking; the device is added to the "door device table". When A comes to the forced opening line, the handheld device sends a "forced opening" command to the lock device; the lock device queries the "door device table" and finds that the handheld device is in the list, so the result in the logical judgment is +0; M=1+0=1; the lock device is unlocking.
[0089] Example 4
[0090] The Bluetooth sensorless control method of this embodiment refers to Figure 3 , including the following steps:
[0091] S1. The Bluetooth module of the controlled device sends out multiple broadcast signals when powered on, wherein the effective coverage range of the first broadcast signal is greater than the effective coverage range of the second broadcast signal.
[0092] S2. The handheld device performs Bluetooth pairing with the Bluetooth module based on the first broadcast signal and the second broadcast signal to establish communication, and obtains a real-time RSSI value based on the first broadcast signal.
[0093] S3. When the RSSI real-time value is greater than the first preset RSSI value, a first instruction is sent to the controlled device.
[0094] Taking the lock device control application scenario as an example, the first instruction is a custom unlocking instruction. After the handheld device and the lock device complete Bluetooth pairing and successfully establish secure communication through the Bluetooth module, the handheld device obtains the RSSI real-time value based on the first broadcast signal in real time. When the RSSI real-time value is greater than the first preset RSSI value, the handheld device can send a custom unlocking instruction to the lock device through the APP. This embodiment establishes a stable Bluetooth connection and secure communication based on multiple broadcast signals, as well as locates and calculates the distance, which can further achieve the accuracy and real-time performance of Bluetooth non-sensing interactive control and improve the user experience.
[0095] In some embodiments, in order to further unlock safely and ensure that the lock is within the visible / controllable range of the user when unlocking, the broadcast signal also includes a fourth broadcast signal, and the effective coverage range of the second broadcast signal is greater than the effective coverage range of the fourth broadcast signal. The method of this embodiment also includes: the controlled device needs the handheld device to feedback that it has detected the fourth broadcast signal and entered the effective coverage range of the fourth broadcast when executing the first instruction. Otherwise, the controlled device ignores the first instruction. In this embodiment, after the handheld device and the lock device complete Bluetooth pairing through the Bluetooth module and successfully establish secure communication, the handheld device obtains the RSSI real-time value based on the first broadcast signal in real time. When the RSSI real-time value is greater than the first preset RSSI value, the handheld device can send a custom unlocking instruction to the lock device through the APP. In addition, when it is determined that the handheld device detects broadcast 4 and the handheld device itself enters the effective coverage range of broadcast 4, the controlled device executes the first instruction (custom unlocking instruction). If the handheld device is outside broadcast 4 when issuing the custom unlocking instruction, the controlled device will ignore the first instruction.
[0096] In some embodiments, the broadcast signal also includes a third broadcast signal, and the effective coverage range of the fourth broadcast signal is greater than the effective coverage range of the third broadcast signal. The method of this embodiment also includes: when the handheld device detects the third broadcast signal and enters its effective coverage range, a second instruction is sent to the controlled device. Determine whether the controlled device successfully executes the first instruction. If not, execute the second instruction. If yes, ignore the second instruction. This embodiment sets a forced unlocking logic. After the handheld device and the lock device complete Bluetooth pairing and successfully establish secure communication through the Bluetooth module, the handheld device obtains the RSSI real-time value based on the first broadcast signal in real time. When the RSSI real-time value is greater than the first preset RSSI value, the handheld device can send a custom unlocking instruction to the lock device through the APP. In addition, when the handheld device detects broadcast 3 and the handheld device itself enters the effective coverage range of broadcast 3, a second instruction is sent to the controlled device. Determine whether the controlled device successfully executes the first instruction. If not, execute the second instruction. If yes, ignore the second instruction. In other words, the second instruction is a forced opening instruction.
[0097] This embodiment can realize forced unlocking through the forced opening logic set based on broadcast 3 when the custom unlocking instruction is not successfully executed or when a control abnormality occurs, ensuring that the lock device can be opened smoothly and protecting the user's use of the device.
[0098] In some embodiments, the method further includes: when the RSSI real-time value is less than the second preset RSSI value, a third instruction is issued to the controlled device. The third instruction is a custom lock instruction. That is to say, after the handheld device and the lock device complete Bluetooth pairing and successfully establish secure communication through the Bluetooth module, the handheld device obtains the RSSI real-time value based on the first broadcast signal in real time. When the RSSI real-time value is less than the second preset RSSI value, the handheld device can issue a custom lock instruction to the lock device through the APP. This embodiment realizes the locking of the lock device in the locking scene by setting a custom lock logic.
[0099] In some embodiments, in order to further lock the lock safely and ensure that no user stays within the closed range set by the lock, the method also includes: the controlled device needs the handheld device to feedback that it has left the effective coverage range of the third broadcast signal when executing the third instruction. Otherwise, the controlled device ignores the third instruction. That is to say, after the handheld device and the lock device complete the Bluetooth pairing through the Bluetooth module and successfully establish a secure communication, the handheld device obtains the RSSI real-time value based on the first broadcast signal in real time. When the RSSI real-time value is less than the second preset RSSI value, the handheld device can send a custom lock instruction to the lock device through the APP. In addition, the prerequisite for the lock device to execute the custom lock instruction is to determine that the handheld device has left the effective coverage range of the third broadcast signal. It can be understood that when issuing the custom lock instruction, the handheld device may be outside the broadcast 3 or inside the broadcast 3. Only when the handheld device determines that it has left the effective coverage range of the broadcast 3, the controlled device executes the custom lock instruction. If the handheld device is in the broadcast 3, the controlled device will ignore the instruction. This embodiment can further achieve safe locking when ensuring that no user stays within the closed range set by the lock.
[0100] In some embodiments, a forced lock logic is also set, and the fourth instruction corresponds to a forced lock instruction. Specifically, the method also includes: when the handheld device determines that it has left the effective coverage of the fourth broadcast signal, sending the fourth instruction to the controlled device. Determine whether the controlled device successfully executes the third instruction. If not, execute the fourth instruction. If yes, ignore the fourth instruction. It can be understood that in this embodiment, after the handheld device and the lock device complete Bluetooth pairing and successfully establish secure communication through the Bluetooth module, the handheld device obtains the RSSI real-time value based on the first broadcast signal in real time. When the RSSI real-time value is less than the second preset RSSI value, the handheld device can send a custom lock instruction to the lock device through the APP. In addition, the lock device executes the third instruction and the handheld device needs to feedback that it has left the effective coverage of the third broadcast signal. Otherwise, the lock device ignores the custom lock instruction. When the handheld device determines that it has left the effective coverage of the fourth broadcast signal, send the fourth instruction to the controlled device. Determine whether the controlled device successfully executes the third instruction. If not, execute the fourth instruction.
[0101] This embodiment uses the forced closing logic set based on broadcast 4 to achieve forced locking when the custom locking instruction is not successfully executed or when a control abnormality occurs, thereby ensuring that the lock device can be closed smoothly.
[0102] Example 5
[0103] The Bluetooth sensorless control system of this embodiment is used to implement the Bluetooth sensorless control method as in the above-mentioned embodiment. It can be understood that the Bluetooth sensorless control device of the above-mentioned embodiment of the Bluetooth sensorless control system of this embodiment may specifically include a controlled device and a handheld device, and the controlled device also includes a logic control unit, a motor control unit and a Bluetooth module. Handheld devices include but are not limited to smart phones, laptops, tablet computers, smart watches, smart bracelets, etc. The Bluetooth sensorless interactive control method / device / system of the present invention can be used in control scenarios of devices such as lock devices, smart bulbs, smart lights, smart sockets, and smart thermostats. This embodiment establishes a stable Bluetooth connection and secure communication based on multiple broadcast signals, as well as locates and calculates the distance, which can further realize the accuracy and real-time performance of Bluetooth sensorless interactive control and improve the user experience.
[0104] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0105] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0106] It can be understood that the above embodiments only express the preferred implementation modes of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the patent scope of the present invention. It should be pointed out that, for ordinary technicians in this field, the above technical features can be freely combined without departing from the concept of the present invention, and several deformations and improvements can be made, which all belong to the protection scope of the present invention. Therefore, all equivalent changes and modifications made to the scope of the claims of the present invention should belong to the coverage of the claims of the present invention.
Claims
1. A Bluetooth sensorless control method, characterized in that: The following steps are involved: The Bluetooth module of the controlled device sends multiple broadcast signals when powered on, wherein the effective coverage range of the first broadcast signal is greater than the effective coverage range of the second broadcast signal; The handheld device performs Bluetooth pairing with the Bluetooth module based on the first broadcast signal and the second broadcast signal to establish communication, and obtains a real-time RSSI value based on the first broadcast signal; When the RSSI real-time value is greater than a first preset RSSI value, issuing a first instruction to the controlled device; The broadcast signal further includes a fourth broadcast signal and a third broadcast signal, the effective coverage range of the second broadcast signal is greater than the effective coverage range of the fourth broadcast signal, and the effective coverage range of the fourth broadcast signal is greater than the effective coverage range of the third broadcast signal; The controlled device executes the first instruction only if the handheld device responds that it has detected the fourth broadcast signal and entered the fourth broadcast effective coverage range; otherwise, the controlled device ignores the first instruction; When the handheld device detects the third broadcast signal and enters its effective coverage range, sending a second instruction to the controlled device; Determining whether the controlled device successfully executes the first instruction; If not, execute the second instruction; if so, ignore the second instruction.
2. The Bluetooth sensorless control method according to claim 1, characterized in that: The method further includes: When the RSSI real-time value is less than a second preset RSSI value, issuing a third instruction to the controlled device; The first preset RSSI value is greater than the second preset RSSI value.
3. The Bluetooth sensorless control method according to claim 2, characterized in that: The method further includes: The controlled device executing the third instruction requires the handheld device to feedback that it has left the effective coverage of the third broadcast signal; otherwise, the controlled device ignores the third instruction.
4. The Bluetooth sensorless control method according to claim 3, characterized in that: The method further includes: When the handheld device determines that it has left the effective coverage of the fourth broadcast signal, sending a fourth instruction to the controlled device; Determining whether the controlled device successfully executes the third instruction; If not, execute the fourth instruction; if so, ignore the fourth instruction.
5. The Bluetooth sensorless control method according to claim 4, characterized in that: The method further includes: Obtaining the current RSSI value based on the first broadcast signal corresponding to executing the second instruction several times to form a first array, and obtaining the current RSSI value based on the first broadcast signal corresponding to executing the fourth instruction several times to form a second array; Calculate a first average value according to the first array, and calculate a second average value according to the second array; The first average value is greater than the first preset RSSI value, the first preset RSSI value is greater than the second preset RSSI value, and the second preset RSSI value is greater than the second average value.
6. The Bluetooth sensorless control method according to claim 4, characterized in that: The number of the handheld device is more than one, and the method further comprises: Query whether the handheld device is in a preset dynamic device table; When it is determined that the handheld device is in the unlocking scene and is not in the preset dynamic device table, the counting variable M is counted cumulatively; and the handheld device is entered into the preset dynamic device table; When it is determined that the handheld device is in a locked state and is in the preset dynamic device table, the counting variable M is counted down; and the handheld device is removed from the preset dynamic device table; When the counting variable M is greater than or equal to 1, the controlled device is in an unlocked state; When the counting variable M is less than 1, the controlled device is put into a locked state.
7. A Bluetooth sensorless control system, characterized in that: It comprises a controlled device and a handheld device, and the controlled device and the handheld device are used to implement the Bluetooth sensorless control method as described in any one of claims 1 to 6.
8. A Bluetooth sensorless control device, characterized in that: It includes a controlled device and a handheld device, wherein the controlled device also includes a logic control unit, a motor control unit and a Bluetooth module; The Bluetooth module is used to send out multiple broadcast signals in a powered-on state, wherein the effective coverage range of the first broadcast signal is greater than the effective coverage range of the second broadcast signal, the broadcast signals further include a fourth broadcast signal and a third broadcast signal, the effective coverage range of the second broadcast signal is greater than the effective coverage range of the fourth broadcast signal, and the effective coverage range of the fourth broadcast signal is greater than the effective coverage range of the third broadcast signal; The handheld device is used to perform Bluetooth pairing with the Bluetooth module based on the first broadcast signal and the second broadcast signal to establish communication, and is also used to obtain an RSSI real-time value based on the first broadcast signal, and when the RSSI real-time value is greater than a first preset RSSI value, send a first instruction to the controlled device, so that the logic control unit determines whether to control the motor control unit to drive the motor to complete the unlocking operation according to the first instruction; The controlled device executes the first instruction only if the handheld device responds that it has detected the fourth broadcast signal and entered the fourth broadcast effective coverage range; otherwise, the controlled device ignores the first instruction; When the handheld device detects the third broadcast signal and enters its effective coverage, a second instruction is sent to the controlled device; it is determined whether the controlled device successfully executes the first instruction; if not, the second instruction is executed; if yes, the second instruction is ignored.
Citation Information
Patent Citations
Bluetooth door control equipment, Bluetooth terminal and Bluetooth door control management system and method
CN106127890A