Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention provides a positioning control method which is applied to a Bluetooth service node. Referring to fig. 1, fig. 1 is a flowchart of a positioning control method according to an embodiment of the present invention, as shown in fig. 1, including the following steps:
step 101, receiving a Received Signal Strength Indication (RSSI) signal of the mobile device, which is collected by at least one Bluetooth device.
The mobile device is a mobile device with a bluetooth transceiving function, and when a bluetooth Signal sent by the mobile device is received by the at least one bluetooth device, the bluetooth device may acquire the current received Signal Strength, that is, a received Signal Strength indication (rssi) (received Signal Strength indication) Signal of the mobile device is acquired.
Optionally, the mobile device may periodically send a bluetooth field strength measurement signal, and the at least one bluetooth device acquires an RSSI signal based on the signal strength of the received bluetooth field strength measurement signal.
For example, under the intelligent house scene, there are a plurality of bluetooth equipment such as bluetooth speaker, bluetooth air conditioner, bluetooth electric light in the room, and the bracelet that the user wore is above-mentioned mobile device. Above-mentioned bracelet sends bluetooth signal, and a plurality of bluetooth equipment such as bluetooth speaker, bluetooth air conditioner, bluetooth electric light in this bluetooth signal coverage can accept this bluetooth signal to gather and obtain the RSSI signal that corresponds.
In this embodiment, the bluetooth service node may be a device with service capability, or may be an intelligent hardware with the function, and may be configured to maintain information of an indoor bluetooth device: a. information required for configuration: the name of the room where each Bluetooth device is located; b. no configuration of automatically collected information is required: the type of each bluetooth device (lamp, refrigerator, etc.), the distance topology between each bluetooth device, between each bluetooth device and the mobile device, and between the mobile device and the service node. The distance topology can be automatically generated by mutual detection of RSSI signal strength between devices and service nodes.
Optionally, the bluetooth service node supports bluetooth Mesh technology (bluetooth 5.0).
Optionally, the mobile device may be a wearable device or a mobile device such as a handheld device.
The Bluetooth equipment can be an intelligent lamp, an intelligent air conditioner, an intelligent curtain or an intelligent refrigerator and the like; optionally, the bluetooth devices are bluetooth intelligent hardware supporting bluetooth Mesh technology (bluetooth 5.0), referring to fig. 3, the bluetooth devices are interconnected with each other, with the bluetooth service node, and with the mobile device through a Mesh network (not shown in all connection relationships), and the bluetooth devices, the mobile device, and the bluetooth service node in a bluetooth transceiving range may be interconnected for transceiving. The Bluetooth device can collect RSSI signals of the mobile device in real time, report the RSSI signals to the Bluetooth service node, can be used for receiving voice control commands collected by the mobile device and forwarding the voice control commands to the Bluetooth service node, and can also be used for receiving control commands sent by the Bluetooth service node and executing operations (such as turning on a light, adjusting the temperature of an air conditioner and the like) corresponding to the control commands.
And 102, calculating the distance between each Bluetooth device and the mobile device based on the RSSI signal.
As the mobile device moves, the distance between each bluetooth device and the mobile device may change in real time. Generally, the strength of the RSSI signal is inversely related to the distance between devices, the greater the distance, the smaller the RSSI signal value, the smaller the distance, the greater the RSSI signal value, and based on the strength of the RSSI signal, the distance between the bluetooth device and the mobile device can be determined.
Step 103, determining a target Bluetooth device in the at least one Bluetooth device based on the distance.
After determining the distance between the bluetooth devices and the mobile device, the target bluetooth device may be further determined based on the distance between each bluetooth device and the mobile device, the distance topology, and/or the control instruction. Therefore, the Bluetooth device which the user wants to control can be automatically identified according to the position of the user.
The number of the target bluetooth devices may be one or more.
Usually, the user tends to operate the nearby devices, and optionally, the bluetooth device closest to the mobile device in the at least one bluetooth device may be determined as the target bluetooth device.
And step 104, sending a control instruction to the target Bluetooth equipment.
And the user inputs a control command by utilizing the mobile equipment, and the Bluetooth service node generates a control command based on the control command and sends the control command to the target Bluetooth equipment. The control command may be a voice control command, a text control command, and/or a key operation command.
Optionally, the bluetooth service node sends the control instruction to the target bluetooth device through a bluetooth mesh network.
The positioning control method of the embodiment of the invention is applied to a Bluetooth service node and comprises the following steps: receiving a Received Signal Strength Indication (RSSI) signal of the mobile equipment, which is acquired by at least one Bluetooth device; calculating the distance between each Bluetooth device and the mobile device based on the RSSI signal; determining a target Bluetooth device of the at least one Bluetooth device based on the distance; and sending a control instruction to the target Bluetooth device. In the embodiment of the invention, the RSSI signal is collected to calculate the distance between each Bluetooth device and the mobile device so as to determine the target Bluetooth device to be controlled, so that the positioning convenience of the target Bluetooth device can be improved, a user does not need to input a complicated control instruction, and the use by the user is facilitated.
Referring to fig. 2 and 2a, fig. 2 and 2a are flowcharts of a positioning control method according to another embodiment of the present invention, which is different from the previous embodiment mainly in that the embodiment of the present invention further defines receiving a voice control signal acquired by the mobile device, and the positioning control method according to this embodiment is applied to a bluetooth serving node, and includes the following steps:
step 201, receiving a received signal strength indication RSSI signal of a mobile device collected by at least one bluetooth device.
The mobile device is a mobile device with a bluetooth transceiving function, and when a bluetooth Signal sent by the mobile device is received by the at least one bluetooth device, the bluetooth device may acquire the current received Signal Strength, that is, a received Signal Strength indication (rssi) (received Signal Strength indication) Signal of the mobile device is acquired.
Optionally, the mobile device may periodically send a bluetooth field strength measurement signal, and the at least one bluetooth device acquires an RSSI signal based on the signal strength of the received bluetooth field strength measurement signal.
For example, under the intelligent house scene, there are a plurality of bluetooth equipment such as bluetooth speaker, bluetooth air conditioner, bluetooth electric light in the room, and the bracelet that the user wore is above-mentioned mobile device. Above-mentioned bracelet sends bluetooth signal, and a plurality of bluetooth equipment such as bluetooth speaker, bluetooth air conditioner, bluetooth electric light in this bluetooth signal coverage can accept this bluetooth signal to gather and obtain the RSSI signal that corresponds.
In this embodiment, the bluetooth service node may be a device with service capability, or may be an intelligent hardware with the function, and may be configured to maintain information of an indoor bluetooth device: a. information required for configuration: the name of the room where each Bluetooth device is located; b. no configuration of automatically collected information is required: the type of each bluetooth device (lamp, refrigerator, etc.), the distance topology between each bluetooth device, between each bluetooth device and the mobile device, and between the mobile device and the service node. The distance topology can be automatically generated by mutual detection of RSSI signal strength between devices and service nodes.
Optionally, the bluetooth service node supports bluetooth Mesh technology (bluetooth 5.0).
Optionally, the mobile device may be a wearable device or a mobile device such as a handheld device.
The Bluetooth equipment can be an intelligent lamp, an intelligent air conditioner, an intelligent curtain or an intelligent refrigerator and the like; optionally, the bluetooth devices are bluetooth intelligent hardware supporting bluetooth Mesh technology (bluetooth 5.0), referring to fig. 3, the bluetooth devices are interconnected with each other, with the bluetooth service node, and with the mobile device through a Mesh network (not shown in all connection relationships), and the bluetooth devices, the mobile device, and the bluetooth service node in a bluetooth transceiving range may be interconnected for transceiving. The Bluetooth device can collect RSSI signals of the mobile device in real time, report the RSSI signals to the Bluetooth service node, can be used for receiving voice control commands collected by the mobile device and forwarding the voice control commands to the Bluetooth service node, and can also be used for receiving control commands sent by the Bluetooth service node and executing operations (such as turning on a light, adjusting the temperature of an air conditioner and the like) corresponding to the control commands.
Step 202, calculating the distance between each bluetooth device and the mobile device based on the RSSI signal.
As the mobile device moves, the distance between each bluetooth device and the mobile device may change in real time. Generally, the strength of the RSSI signal is inversely related to the distance between devices, the greater the distance, the smaller the RSSI signal value, the smaller the distance, the greater the RSSI signal value, and based on the strength of the RSSI signal, the distance between the bluetooth device and the mobile device can be determined.
And 203, receiving the voice control signal collected by the mobile equipment.
The conventional voice control device in the prior art generally implements voice control of the device by installing a voice control module on a bluetooth device for function execution or by using a smart speaker. In the intelligent scenario of multiple bluetooth devices, deploying a voice control module on each device undoubtedly increases the manufacturing cost. In the embodiment, the mobile equipment acquires the voice control signal to realize the control of the multiple Bluetooth equipment, so that the manufacturing cost can be effectively reduced; and the user can directly realize shortcut input to the wearable or carried mobile device, so that voice recording is facilitated, and the convenience of voice control can be improved.
The receiving of the voice control signal collected by the mobile device may be receiving a voice control signal collected and sent by the mobile device; or receiving a voice control signal forwarded by a bluetooth device of the at least one bluetooth device, wherein the voice control signal is a voice control signal acquired by the mobile device. The mobile device collects and directly sends the collected signals to the Bluetooth service node, and the collected signals can be sent to the Bluetooth device in the at least one Bluetooth device and forwarded by the Bluetooth device in the at least one Bluetooth device, so that the situation that the mobile device is too far away from the Bluetooth service node and cannot effectively send voice control signals to the Bluetooth service node is avoided. The number of the Bluetooth devices for forwarding the voice control signal can be one or more.
Optionally, the mobile device sends the voice control signal to the bluetooth service node through a bluetooth mesh network. Optionally, the voice control signal is a command word, and the command word is obtained by the mobile device through recognizing a voice into the command word by a local or cloud voice recognition module of the mobile device, or the voice control signal is a voice signal, and the voice is recognized into the command word by a local or cloud voice recognition module of the bluetooth service node.
Step 204, determining a target bluetooth device of the at least one bluetooth device based on the distance and at least one of the voice control signal and a distance topology, wherein the distance topology is generated between the bluetooth devices based on the distance and between the bluetooth devices and the mobile device.
The step 204 includes the following steps:
and determining a target Bluetooth device in at least one Bluetooth device based on the voice control signal and the distance, wherein the target Bluetooth device is the Bluetooth device closest to the mobile device in the Bluetooth devices matched with the command type of the voice control signal.
Based on steps 201 and 202, the distance between each bluetooth device sending the RSSI signal and the mobile device can be calculated;
optionally, the voice signal of the user performs semantic analysis through a local or cloud voice recognition module of the mobile device or the bluetooth service node, and recognizes the voice as a command word to determine the command type. The command type includes a command object and/or a command action, etc. For example, based on the "adjust to 28 degrees" temperature adjustment command, the command object is determined to be "air conditioning" and the command action is temperature adjustment.
The target bluetooth device may be determined by determining the bluetooth device closest to the mobile device among the devices whose command types match. For example, after the command object is determined to be "air conditioning" and the command operation is temperature adjustment, the air conditioning apparatus closest to the mobile apparatus is determined based on the distance between each bluetooth apparatus and the mobile apparatus, and the temperature adjustment operation is performed on the closest air conditioning apparatus.
The user can realize the control of the nearby equipment through simple commands (such as 'turn on lamp', 'turn off air conditioner' and the like), and the user experience is improved.
The step 204 includes a method 2:
and determining a target Bluetooth device in the at least one Bluetooth device based on the distance topology and the distance, wherein the target Bluetooth device is the Bluetooth device closest to the mobile device in the Bluetooth devices matched with the preset area of the distance topology.
The distance topology is distance topology between the bluetooth devices generated based on the distance and between the bluetooth devices and the mobile device, that is, based on the distance between the bluetooth devices and the mobile device, the relative position relationship between the bluetooth devices and between the mobile device is specifically generated so as to form a position network between the bluetooth devices and the mobile device.
In this mode 2, the target bluetooth device is further determined based on the distance topology. The preset area comprises a distance topological mesh area where the mobile equipment is located; the bluetooth device matching the preset area of the distance topology may be understood as a bluetooth device in the distance topology grid area where the mobile device is located, for example, as shown in fig. 3, the mobile device is located in the distance topology grid formed by the bluetooth devices 1-1, 1-2, and 1-3, and the bluetooth devices 1-1, 1-2, and 1-3 are bluetooth devices matching the preset area of the distance topology.
Or, the distance topology is associated with spatial positions of at least some bluetooth devices, for example, the distance topology is associated with spatial positions of fixed bluetooth devices in advance, and based on the distance topology, spatial positions of movable bluetooth devices (for example, a sweeping robot) can be further determined, so as to determine spatial positions of the bluetooth devices. The preset area includes an area in the distance topology that is at the same spatial location as the mobile device. The bluetooth device matched with the preset area of the distance topology may be understood as a bluetooth device in the same spatial position range as the mobile device in the distance topology. The spatial position range may be divided in advance, for example, based on a room, or based on activity habits of a user. For example, as shown in fig. 3, when it can be determined that the mobile device is in the same spatial location range as the bluetooth devices 1-1, 1-2, and 1-3 based on a distance topology (e.g., room 1), the bluetooth devices 1-1, 1-2, and 1-3 are determined to be bluetooth devices that match a preset region of the distance topology; although the mobile device is located closer to the bluetooth device 2-1 of another spatial location range (e.g., room 2), the bluetooth device closest to the mobile device among the bluetooth devices 1-1, 1-2, and 1-3 is determined as a target bluetooth device.
The step 204 includes a method 3:
and determining a target Bluetooth device in at least one Bluetooth device based on the voice control signal, the distance topology and the distance, wherein the target Bluetooth device is the Bluetooth device closest to the mobile device in the Bluetooth devices matched with the command type of the voice control signal and the preset area of the distance topology.
In the mode 3, on the basis of the mode 2, the command type of the voice control signal is further used for determining that the target bluetooth device determines, and the method for determining the command type of the voice control signal may refer to the mode 1, which is not described herein again. For example, as shown in fig. 3, wherein bluetooth devices 1-1, 1-3, and 2-1 are bluetooth lamp devices, when a user issues a "light on" voice, a mobile device collects a corresponding voice signal, a bluetooth service node determines, based on the voice signal, that a command object is a lamp and a command action is turned on, determines, based on the distance topology, that the mobile device and the bluetooth devices 1-1, 1-2, and 1-3 are located in the same spatial position range and/or the bluetooth devices 1-1, 1-2, and 1-3 are located in a distance topology grid area where the mobile device is located, and determines, as a target bluetooth device, a bluetooth device closest to the mobile device among the bluetooth devices 1-1, 1-3. When the method is executed, the sequence of matching with the preset region of the distance topology and the sequence of matching with the command type are not limited, the matching with the preset region of the distance topology can be executed firstly and then the matching with the command type can be executed, the matching with the command type can be executed firstly and then the matching with the preset region of the distance topology can be executed, or the matching with the command type and then the matching with the preset region of the distance topology can be executed simultaneously, and then the intersection is taken.
And step 205, sending a control instruction corresponding to the voice control signal to the target bluetooth device.
The positioning control method of the embodiment of the invention comprises the following steps: receiving a Received Signal Strength Indication (RSSI) signal of the mobile equipment, which is acquired by at least one Bluetooth device; calculating the distance between each Bluetooth device and the mobile device based on the RSSI signal; receiving a voice control signal acquired by the mobile equipment; determining a target Bluetooth device of the at least one Bluetooth device based on the distance and at least one of the voice control signal and a distance topology, wherein the distance topology is a distance topology between Bluetooth devices generated based on the distance and between Bluetooth devices and the mobile device; and sending a control instruction corresponding to the voice control signal to the target Bluetooth equipment. In the embodiment of the invention, at least one of the voice control signal and the distance topology is further used as the judgment condition of the target Bluetooth device on the basis of distance judgment, so that the accuracy of the determination of the target Bluetooth device can be further improved, and a user can intelligently control the Bluetooth device through a simple voice instruction.
Referring to fig. 4, fig. 4 is a schematic diagram of a bluetooth service node according to an embodiment of the present invention. As shown in fig. 4, the bluetooth service node 400 includes:
a first receiving module 401, configured to receive a received signal strength indication RSSI signal of a mobile device, which is collected by at least one bluetooth device;
a distance calculating module 402, configured to calculate a distance between each bluetooth device and the mobile device based on the RSSI signal;
a target determining module 403, configured to determine a target bluetooth device of the at least one bluetooth device based on the distance;
a sending module 404, configured to send a control instruction to the target bluetooth device.
Optionally, the bluetooth service node further includes:
the second receiving module is used for receiving the voice control signal acquired by the mobile equipment;
the sending module is specifically configured to:
and sending a control instruction corresponding to the voice control signal to the target Bluetooth equipment.
The bluetooth service node provided in the embodiment of the present invention can implement each process implemented by the mobile terminal in the embodiments of the methods in fig. 1 to fig. 3, and is not described herein again to avoid repetition. The Bluetooth service node of the embodiment of the invention comprises: the first receiving module is used for receiving a Received Signal Strength Indication (RSSI) signal of the mobile equipment, which is acquired by at least one Bluetooth device; the distance calculation module is used for calculating the distance between each Bluetooth device and the mobile device based on the RSSI signal; a target determination module to determine a target Bluetooth device of the at least one Bluetooth device based on the distance; and the sending module is used for sending a control instruction to the target Bluetooth equipment. In the embodiment of the invention, the RSSI signal is collected to calculate the distance between each Bluetooth device and the mobile device so as to determine the target Bluetooth device to be controlled, so that the positioning convenience of the target Bluetooth device can be improved, a user does not need to input a complicated control instruction, and the use by the user is facilitated.
Specifically, referring to fig. 5, an electronic device according to an embodiment of the present invention further includes a bus 501, a bus interface 502, a processor 503, a memory 504, a transceiver 505, and an antenna 506.
The processor 503 is configured to receive a received signal strength indicator RSSI signal of the mobile device, which is collected by at least one bluetooth device; calculating the distance between each Bluetooth device and the mobile device based on the RSSI signal; determining a target Bluetooth device of the at least one Bluetooth device based on the distance;
the transceiver 505 is configured to send a control command to the target bluetooth device.
In fig. 5, a bus architecture (represented by bus 501), bus 501 may include any number of interconnected buses and bridges, with bus 501 linking various circuits including one or more processors, represented by processor 503, and memory, represented by memory 504. The bus 501 may also link together various other circuits such as peripherals, voltage regulators, power management circuits, and the like, which are well known in the art, and therefore, will not be described any further herein. A bus interface 502 provides an interface between the bus 501 and the transceiver 505. The transceiver 505 may be one element or may be multiple elements, such as multiple receivers and transmitters, providing a means for communicating with various other apparatus over a transmission medium. The data processed by the processor 503 is transmitted over a wireless medium via the antenna 506, and further, the antenna 506 receives the data and transmits the data to the processor 503.
The processor 503 is responsible for managing the bus 501 and general processing and may also provide various functions including timing, peripheral interfaces, voltage regulation, power management, and other control functions. And the memory 504 may be used to store data used by the processor 503 in performing operations.
Alternatively, the processor 503 may be a CPU, ASIC, FPGA or CPLD.
An embodiment of the present invention further provides an electronic device, including: the positioning control method comprises a processor, a memory and a program which is stored on the memory and can run on the processor, wherein the program realizes each process of the positioning control method embodiment when being executed by the processor, can achieve the same technical effect, and is not repeated herein for avoiding repetition.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements each process of the above-mentioned embodiment of the positioning control method, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here. The computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.