Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the 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 a mobile device acquired by at least one bluetooth device.
The mobile device is a mobile device with a bluetooth receiving and transmitting function, and when a bluetooth signal sent by the mobile device is received by the at least one bluetooth device, the bluetooth device can collect current received signal strength, namely, collect a received signal strength indication RSSI (Received Signal Strength Indication) signal of the mobile device.
Optionally, the mobile device may periodically send a bluetooth field intensity measurement signal, and the at least one bluetooth device acquires an RSSI signal based on a signal strength of the received bluetooth field intensity measurement signal.
For example, in an intelligent home scenario, a plurality of bluetooth devices such as a bluetooth speaker, a bluetooth air conditioner, a bluetooth lamp, etc. exist in a room, and a bracelet worn by a user is the mobile device. The hand ring transmits Bluetooth signals, and a plurality of Bluetooth devices such as a Bluetooth sound box, a Bluetooth air conditioner, a Bluetooth lamp and the like in the coverage area of the Bluetooth signals can receive the Bluetooth signals and acquire corresponding RSSI signals.
In this embodiment, the bluetooth service node may be a device with service capability, or may be an intelligent hardware with the function, which may be used to maintain information of an indoor bluetooth device: a. information required to be configured: room name 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, between the mobile device and the service node. The distance topology can be automatically generated by mutually detecting RSSI signal strength between devices and service nodes.
Optionally, the bluetooth service node supports bluetooth Mesh technology (bluetooth 5.0).
Alternatively, the mobile device may be a wearable device or 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, each bluetooth device is interconnected with each other, bluetooth service nodes, and mobile devices through a Mesh network (not all connection relations are shown), and the bluetooth devices, the mobile devices and the bluetooth service nodes within the bluetooth transceiving range can be interconnected by 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 lights, adjusting air conditioner temperature and the like) corresponding to the control commands.
Step 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. In general, the strength of the RSSI signal is inversely related to the distance between devices, the smaller the distance is, the larger the RSSI signal value is, and the distance between a bluetooth device and the mobile device can be determined based on the strength of the RSSI signal.
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 device and the mobile device, the target bluetooth device may be further determined based on the distance between each bluetooth device and the mobile device, and the distance topology and/or control instructions. Therefore, the Bluetooth device which the user wants to control can be automatically identified according to the position of the user.
Wherein, the target bluetooth device may be one or more.
Typically, the user will tend to operate nearby devices, and optionally, the bluetooth device of the at least one bluetooth device that is closest to the mobile device may be determined to be the target bluetooth device.
And 104, sending a control instruction to the target Bluetooth equipment.
And the Bluetooth service node generates a control command based on the control command and sends the control command to the target Bluetooth device. The control command may be a voice control command, a text control command, a key operation command, or the like.
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 a mobile device 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. According to the embodiment of the invention, the distance between each Bluetooth device and the mobile device is calculated by collecting the RSSI signal, so that the target Bluetooth device to be controlled is determined, the convenience of positioning the target Bluetooth device can be improved, a user does not need to input a complicated control instruction, and the user can conveniently use the target Bluetooth device.
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 voice control signal collected by the mobile device is received is further limited, and the positioning control method according to the embodiment is applied to a bluetooth service node, and includes the following steps:
step 201, a received signal strength indication RSSI signal of a mobile device collected by at least one bluetooth device is received.
The mobile device is a mobile device with a bluetooth receiving and transmitting function, and when a bluetooth signal sent by the mobile device is received by the at least one bluetooth device, the bluetooth device can collect current received signal strength, namely, collect a received signal strength indication RSSI (Received Signal Strength Indication) signal of the mobile device.
Optionally, the mobile device may periodically send a bluetooth field intensity measurement signal, and the at least one bluetooth device acquires an RSSI signal based on a signal strength of the received bluetooth field intensity measurement signal.
For example, in an intelligent home scenario, a plurality of bluetooth devices such as a bluetooth speaker, a bluetooth air conditioner, a bluetooth lamp, etc. exist in a room, and a bracelet worn by a user is the mobile device. The hand ring transmits Bluetooth signals, and a plurality of Bluetooth devices such as a Bluetooth sound box, a Bluetooth air conditioner, a Bluetooth lamp and the like in the coverage area of the Bluetooth signals can receive the Bluetooth signals and acquire corresponding RSSI signals.
In this embodiment, the bluetooth service node may be a device with service capability, or may be an intelligent hardware with the function, which may be used to maintain information of an indoor bluetooth device: a. information required to be configured: room name 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, between the mobile device and the service node. The distance topology can be automatically generated by mutually detecting RSSI signal strength between devices and service nodes.
Optionally, the bluetooth service node supports bluetooth Mesh technology (bluetooth 5.0).
Alternatively, the mobile device may be a wearable device or 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, each bluetooth device is interconnected with each other, bluetooth service nodes, and mobile devices through a Mesh network (not all connection relations are shown), and the bluetooth devices, the mobile devices and the bluetooth service nodes within the bluetooth transceiving range can be interconnected by 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 lights, adjusting air conditioner temperature 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. In general, the strength of the RSSI signal is inversely related to the distance between devices, the smaller the distance is, the larger the RSSI signal value is, and the distance between a bluetooth device and the mobile device can be determined based on the strength of the RSSI signal.
Step 203, receiving a voice control signal collected by the mobile device.
Conventional voice control devices of the prior art generally implement voice control of devices by installing a voice control module on a bluetooth device that performs a function, or by a smart speaker. In the intelligent scenario of multiple bluetooth devices, deploying a voice control module on each device can undoubtedly increase manufacturing costs. According to the embodiment, the mobile device collects the voice control signals to control the multi-Bluetooth device, so that the manufacturing cost can be effectively reduced; and the user can directly realize the shortcut input to the mobile equipment worn or carried, thereby being convenient for voice recording and improving the convenience of voice control.
The receiving the voice control signal collected by the mobile device may be receiving the voice control signal collected and sent by the mobile device; or receiving a voice control signal forwarded by a bluetooth device in the at least one bluetooth device, wherein the voice control signal is a voice control signal collected by the mobile device. The Bluetooth control signal can be transmitted to the Bluetooth service node by the Bluetooth equipment in the at least one Bluetooth equipment after being acquired by the mobile equipment, so that the situation that the distance between the mobile equipment and the Bluetooth service node is too far to effectively transmit the voice control signal to the Bluetooth service node is avoided. Wherein, the Bluetooth device 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, where the command word is obtained by the mobile device by using a local or cloud voice recognition module to recognize voice into a command word, or the voice control signal is a voice signal, where the voice signal is obtained by using a local or cloud voice recognition module of the bluetooth service node to recognize voice into a command word.
Step 204, determining a target bluetooth device in 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 each bluetooth device and the mobile device.
Step 204 includes mode 1:
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 Bluetooth devices matched with the command type of the voice control signal.
Based on steps 201 and 202, the distance between each bluetooth device transmitting the RSSI signal and the mobile device can be calculated;
optionally, the voice signal of the user performs semantic analysis through a voice recognition module of the mobile device or the local or cloud of the bluetooth service node, and recognizes the voice into command words to determine the command type. The command type includes a command object and/or a command action, etc. For example, based on a temperature control command of "28 degrees", it is determined that the command target is "air conditioner", and the command action is temperature control.
The target bluetooth device may be determined by determining the bluetooth device closest to the mobile device among the command type matching devices. For example, after it is determined that the command object is "air conditioning" and the command operation is temperature adjustment, the air conditioning device closest to the mobile device is determined based on the distance between each bluetooth device and the mobile device, and the temperature adjustment operation is performed on the closest air conditioning device.
The user can control the nearby equipment through simple commands (such as turning on a lamp, turning off an air conditioner and the like), so that the user experience is improved.
Step 204 includes mode 2:
and determining a target Bluetooth device in at least one Bluetooth device based on the distance topology and the distance, wherein the target Bluetooth device is the nearest Bluetooth device to the mobile device in Bluetooth devices matched with a preset area of the distance topology.
The distance topology is generated based on the distance between the Bluetooth devices and the mobile device, namely, based on the distance between the Bluetooth devices and the mobile device, the relative position relationship between the Bluetooth devices and 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 topological grid area where the mobile equipment is located; the above bluetooth devices matching with the preset area of the distance topology may be understood as bluetooth devices in the distance topology mesh area where the mobile device is located, for example, as shown in fig. 3, the mobile device is located in a distance topology mesh formed by bluetooth devices 1-1, 1-2 and 1-3, where the bluetooth devices 1-1, 1-2 and 1-3 are bluetooth devices matching with the preset area of the distance topology.
Alternatively, the distance topology correlates with a spatial location of at least a portion of the bluetooth devices, for example, the distance topology correlates with a spatial location of a fixed bluetooth device in advance, and based on the distance topology, a spatial location of a movable bluetooth device (e.g., a sweeping robot) may be further determined, so as to determine a spatial location of each bluetooth device. The preset area comprises an area which is located in the same spatial position as the mobile equipment in the distance topology. The bluetooth device that matches the preset area of the distance topology may be understood as a bluetooth device in the same spatial location range as the mobile device in the distance topology. The spatial position range may be divided in advance, for example, divided based on rooms, or divided based on the activity habits of users. 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 (e.g., room 1) based on a distance topology, the bluetooth devices 1-1, 1-2, and 1-3 are determined to be bluetooth devices that match a preset area of the distance topology; the nearest one of the bluetooth devices 1-1, 1-2 and 1-3 is determined to be the target bluetooth device, although the mobile device is closer to the bluetooth device 2-1 of another spatial location range (e.g., room 2).
Step 204 includes mode 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 Bluetooth devices matched with the command type of the voice control signal and a 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 to determine the command type of the voice control signal determined by the target bluetooth device, and reference may be made to the mode 1, which is not described herein. For example, as shown in fig. 3, where bluetooth devices 1-1, 1-3 and 2-1 are bluetooth lamp devices, when a user makes a voice of "turn on" the lamp, the mobile device collects a corresponding voice signal, the bluetooth service node determines that a command object is a lamp based on the voice signal, and the command action is on, determines that the mobile device and bluetooth devices 1-1, 1-2 and 1-3 are in the same spatial location range based on the distance topology and/or that bluetooth devices 1-1, 1-2 and 1-3 are located in a topological grid area where the mobile device is located, and determines the bluetooth device closest to the mobile device from among bluetooth devices 1-1, 1-3 as a target bluetooth device. The matching sequence of the preset area of the distance topology and the matching sequence of the command type are not limited when the mode is executed, the matching of the preset area of the distance topology and the matching of the command type can be executed first, the matching of the command type and the matching of the preset area of the distance topology can be executed first, or the matching of the command type and the matching of the preset area of the distance topology can be executed simultaneously, and then the intersection is acquired.
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 a mobile device 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 each bluetooth device and the mobile device; and sending a control instruction corresponding to the voice control signal to the target Bluetooth equipment. According to 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 the distance judgment, so that the accuracy of the determination of the target Bluetooth device can be further improved, and the user can conveniently and 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 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;
and the sending module 404 is 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 signals 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 by the embodiment of the present invention can implement each process implemented by the mobile terminal in the embodiments of the methods of fig. 1 to 3, and in order to avoid repetition, a detailed description is omitted here. 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 device, which is acquired by at least one Bluetooth device; a distance calculating module, configured to calculate a distance between each bluetooth device and the mobile device based on the RSSI signal; a target determining module for determining 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. According to the embodiment of the invention, the distance between each Bluetooth device and the mobile device is calculated by collecting the RSSI signal, so that the target Bluetooth device to be controlled is determined, the convenience of positioning the target Bluetooth device can be improved, a user does not need to input a complicated control instruction, and the user can conveniently use the target Bluetooth device.
Specifically, referring to fig. 5, an embodiment of the present invention further provides an electronic device, including 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 indication RSSI signal of the mobile device 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 instruction to the target bluetooth device.
In fig. 5, a bus architecture (represented by bus 501), the bus 501 may include any number of interconnected buses and bridges, with the bus 501 linking together various circuits, including one or more processors, represented by the processor 503, and memory, represented by the memory 504. The bus 501 may also link together various other circuits such as peripheral devices, voltage regulators, power management circuits, etc., which are well known in the art and, therefore, will not be described further herein. Bus interface 502 provides an interface between bus 501 and transceiver 505. The transceiver 505 may be one element or may be a plurality of elements, such as a plurality of 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 an antenna 506, and further, the antenna 506 also 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 memory 504 may be used to store data used by processor 503 in performing operations.
Alternatively, the processor 503 may be CPU, ASIC, FPGA or a CPLD.
The embodiment of the invention also provides electronic equipment, which comprises: the positioning control method comprises a processor, a memory and a program stored in the memory and capable of running on the processor, wherein the program realizes the processes of the positioning control method embodiment when being executed by the processor, and can achieve the same technical effects, and the repetition is avoided, and the description is omitted here.
The embodiment of the invention also provides a computer readable storage medium, on which a computer program is stored, which when executed by a processor, implements the processes of the above positioning control method embodiment, and can achieve the same technical effects, so that repetition is avoided and no further description is given here. Wherein the computer readable storage medium is selected from Read-Only Memory (ROM), random access Memory (Random Access Memory, RAM), magnetic disk or 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 one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The embodiments of the present invention have been described above with reference to the accompanying drawings, but the present invention is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and many forms may be made by those having ordinary skill in the art without departing from the spirit of the present invention and the scope of the claims, which are to be protected by the present invention.