WO2018145289A1 - Positioning method and apparatus based on bluetooth ble - Google Patents

Positioning method and apparatus based on bluetooth ble Download PDF

Info

Publication number
WO2018145289A1
WO2018145289A1 PCT/CN2017/073192 CN2017073192W WO2018145289A1 WO 2018145289 A1 WO2018145289 A1 WO 2018145289A1 CN 2017073192 W CN2017073192 W CN 2017073192W WO 2018145289 A1 WO2018145289 A1 WO 2018145289A1
Authority
WO
WIPO (PCT)
Prior art keywords
slave device
terminal device
target
ble slave
ble
Prior art date
Application number
PCT/CN2017/073192
Other languages
French (fr)
Chinese (zh)
Inventor
陈法海
赵所峰
Original Assignee
深圳市汇顶科技股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市汇顶科技股份有限公司 filed Critical 深圳市汇顶科技股份有限公司
Priority to PCT/CN2017/073192 priority Critical patent/WO2018145289A1/en
Priority to CN201780000077.0A priority patent/CN107079257A/en
Publication of WO2018145289A1 publication Critical patent/WO2018145289A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/02Services making use of location information
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication

Definitions

  • the present invention relates to the field of wireless communications, and in particular, to a Bluetooth BLE-based positioning method and apparatus.
  • Positioning refers to the realization of positional positioning in an indoor environment, which mainly adopts an indoor position positioning system formed by integration of various technologies such as wireless communication, base station positioning, and inertial navigation positioning.
  • common indoor wireless positioning technologies include: wireless local area network (Wi-Fi), Bluetooth, infrared, ultra-wideband, radio frequency identification (RFID), Zifeng (ZigBee) and ultrasound.
  • the positioning system consists of a Bluetooth AP and a server.
  • the positioning is performed by the mobile device repeatedly communicating the broadcast information through the Bluetooth AP to communicate with the server, and calculating by the server. After that, an invention of the current location information of the mobile device is obtained and sent to the mobile device.
  • the positioning system comprises an iBeacon information distribution system, an iBeacon base station and a mobile terminal, wherein the information distribution system is composed of a background management system, a service authentication interface, and a radio frequency antenna; the base station is composed of a data storage module and a Bluetooth radio frequency.
  • Antenna composition; the mobile terminal is composed of a data processing module, a Bluetooth transceiver module, a wireless transceiver module, a Bluetooth RF receiving antenna, and a wireless RF transceiver antenna.
  • the above prior art has many disadvantages: 1.
  • the Bluetooth transmission communication network is complicated to construct, and many Bluetooth APs are deployed, which is inconvenient to maintain and has high hardware cost. 2, need a special server to process the data sent by the Bluetooth AP, there will be data network delay and data bandwidth problems, also increased the system Cost.
  • the local positioning device used in the invention is solidified and not flexible enough, so it is impossible to upgrade and modify various positioning methods.
  • the positioning mentioned in the invention is to locate the location of the mobile terminal, and it is not possible to locate the position of the iBeacon or the Bluetooth AP, and thus, when searching for an object, the lost or hidden object cannot be located.
  • An object of the present invention is to provide a Bluetooth BLE-based positioning method and apparatus, which can conveniently locate a target BLE slave device, and greatly shorten the time for finding a target BLE slave device. Moreover, the positioning of the target BLE slave device can be realized without deploying the iBeacon or the Bluetooth AP indoors, without requiring a complicated data processing architecture and reducing hardware costs.
  • the embodiment of the present invention provides a Bluetooth BLE-based positioning method, which is applied to a terminal device.
  • the Bluetooth BLE-based positioning method includes: scanning a BLE slave device; after the scan finds the target BLE slave device, Locating at least two locations of the terminal device, obtaining a location Si where the terminal device itself is located, and a distance Ri between the terminal device and the target BLE slave device; calculating a location of the target BLE slave device according to the acquired Si and Ri .
  • the embodiment of the present invention further provides a Bluetooth BLE-based positioning device, which is applied to a terminal device.
  • the Bluetooth BLE-based positioning device includes: a scanning module, an acquiring module, and a computing module; and a scanning module, configured to scan the BLE slave device; a module, after the scanning module scans to find the target BLE slave device, in turn, the terminal device is located in at least two locations, obtaining the location Si where the terminal device itself is located, and the distance Ri between the terminal device and the target BLE slave device; And a calculation module, configured to calculate a location of the target BLE slave device according to the acquired Si and Ri.
  • the embodiment of the present invention acquires the location Si where the terminal device itself is located and the distance Ri between the terminal device and the target BLE slave device by controlling the terminal device in at least two locations. And calculating the position of the target BLE slave device according to the obtained Si and Ri. This makes it easy to locate the target BLE slave device, greatly reducing the time to find the target BLE slave device. Moreover, the positioning of the target BLE slave device can be realized without deploying the iBeacon or the Bluetooth AP indoors, without requiring a complicated data processing architecture and reducing hardware costs.
  • FIG. 1 is a flowchart of a Bluetooth BLE-based positioning method according to a first embodiment of the present invention
  • FIG. 2 is a flowchart of a Bluetooth BLE-based positioning method according to a second embodiment of the present invention
  • FIG. 3 is a flowchart of a Bluetooth BLE-based positioning method according to a third embodiment of the present invention.
  • FIG. 4 is a schematic diagram of a target BLE slave device acquired by a terminal device in different locations according to a third embodiment of the present invention
  • FIG. 5 is another schematic diagram of a target BLE slave device that is acquired when a terminal device is in a different location according to a third embodiment of the present invention
  • FIG. 6 is a flowchart of a Bluetooth BLE-based positioning method according to a fourth embodiment of the present invention.
  • FIG. 7 is a flowchart of a Bluetooth BLE-based positioning method according to a fifth embodiment of the present invention.
  • FIG. 8 is a block diagram of a Bluetooth BLE-based positioning apparatus according to a sixth embodiment of the present invention.
  • FIG. 9 is a block diagram of a Bluetooth BLE-based positioning apparatus in accordance with a seventh embodiment of the present invention.
  • FIG. 10 is a block diagram of a Bluetooth BLE based positioning apparatus in accordance with an eighth embodiment of the present invention.
  • FIG. 11 is a block diagram of a Bluetooth BLE-based positioning device in accordance with a ninth embodiment of the present invention.
  • Figure 12 is a block diagram of a Bluetooth BLE based positioning apparatus in accordance with a tenth embodiment of the present invention.
  • a first embodiment of the present invention relates to a Bluetooth BLE-based positioning method applied to a terminal device.
  • the specific process is shown in Figure 1, which includes:
  • Step 101 Turn on the low-power Bluetooth BLE switch of the terminal device to scan the BLE slave device.
  • the BLE slave device can be a smart device with communication function.
  • the BLE slave device can be, but is not limited to, an active pen.
  • Bluetooth on the terminal device can support the protocol of bluetooth4.1/4.2.
  • the switch enable key is set for the Bluetooth of the terminal device, and when the switch enable key is triggered, the terminal device can search for a nearby BLE slave device.
  • the search results are listed in the form of a list.
  • the BLE slave device displayed in the list may include, but is not limited to, the following information: the name of the BLE slave device, the physical address (MAC address), the RSSI value (the RSSI Chinese interpretation is the received signal strength indication), and the like.
  • step 102 it is determined whether the target BLE slave device is found. If yes, go to step 103; otherwise, go back to step 101.
  • the user can follow the BLE slave device name or MAC address from the scan list. Find the target BLE slave device you need to find. Click on the virtual button used to find the target BLE slave device.
  • the terminal device may determine to scan to the target BLE slave device.
  • each BLE slave device can be stored in advance in the terminal device.
  • a target BLE slave device is selected from the pre-stored BLE slave devices before scanning the BLE slave device. When scanning to the target BLE slave device, it can be determined that the target BLE slave device is found.
  • Step 103 Acquire an initial position S1 where the terminal device itself is located. Obtain the distance R1 between the terminal device and the target BLE slave device.
  • Step 104 The terminal device is controlled to acquire the location S2 where the terminal device itself is located at other locations. Obtain the distance R2 between the terminal device and the target BLE slave device.
  • Step 105 Calculate the location of the target BLE slave device according to the acquired S1, R1, S2, and R2.
  • the first region range in which the target BLE slave device is located can be determined according to S1 and R1.
  • the second area range in which the target BLE slave device is located can be determined.
  • the coincidence position of the first area range and the second area range can be determined as the location where the target BLE slave device is located.
  • the terminal device in order to make the location of the acquisition target BLE more accurate, can also be controlled to acquire S3 and R3 in the third position.
  • S1, R1, S2, R2, S3, and R3 the position of the target BLE slave device is calculated.
  • the present embodiment makes it possible to conveniently locate the target BLE slave device, which greatly shortens the time for finding the target BLE slave device. Moreover, the positioning of the target BLE slave device can be realized without deploying the iBeacon or the Bluetooth AP indoors, without requiring a complicated data processing architecture and reducing hardware costs.
  • a second embodiment of the present invention relates to a Bluetooth BLE based positioning method.
  • the second embodiment is an improvement made on the basis of the first embodiment.
  • the main improvement is that in the second embodiment, the weighted centroid algorithm is used to calculate the area where the target BLE slave device is located.
  • Figure 2 which includes:
  • Step 201 Turn on the low-power Bluetooth BLE switch of the terminal device to scan the BLE slave device.
  • the BLE slave device can be a smart device with communication function.
  • the BLE slave device can be, but is not limited to, an active pen.
  • Bluetooth on the terminal device can support the protocol of bluetooth4.1/4.2.
  • the target BLE slave device periodically transmits a broadcast data packet. When the terminal device receives the broadcast packet. The terminal device can scan nearby BLE slave devices.
  • the switch enable key is set for the Bluetooth of the terminal device, and when the switch enable key is triggered, the terminal device can search for a nearby BLE slave device.
  • the search results are listed in the form of a list.
  • the BLE slave device displayed in the list may include, but is not limited to, the following information: the name of the BLE slave device, the physical address (MAC address), the RSSI value (the RSSI Chinese interpretation is the received signal strength indication), and the like.
  • Step 202 Determine whether the target BLE slave device is found. If yes, go to step 203; otherwise, go back to step 201.
  • the user can find the target BLE slave device that needs to be searched from the scan list according to the name or MAC address of the BLE slave device. Click on the virtual button used to find the target BLE slave device.
  • the terminal device receives the seek instruction for the target BLE slave device, it may determine that the target BLE slave device is found.
  • each BLE slave device can be stored in advance in the terminal device.
  • a target BLE slave device is selected from the pre-stored BLE slave devices before scanning the BLE slave device. When scanning to the target BLE slave device, it can be determined that the target BLE slave device is found.
  • Step 203 Acquire an initial position S1 where the terminal device itself is located.
  • the initial location of the obtained terminal device may be a coordinate origin.
  • Step 204 Calculate a distance R1 between the terminal device and the target BLE slave device according to the RSSI value.
  • the signal of the target BLE slave device may be received first.
  • the signal strength RSSI value is obtained from the received target BLE from the signal of the device.
  • the distance based on the received signal strength RSSI can be used to calculate the distance between the terminal device and the target BLE slave device.
  • the terminal device receives the Measured Power sent by the target BLE from the device (Measured Power is the reference received signal when the iBeacon module is at a distance of 1 m from the receiver) and the RSSI value after the attenuation through the wireless channel.
  • the distance between the terminal device and the target BLE slave device is determined according to the model formula of the indoor wireless signal propagation.
  • d0 in the formula is usually 1 meter.
  • P(d0) is the power RSSI value received by the terminal device when the distance between the terminal device and the target BLE slave device is 1 meter.
  • the unit of power RSSI is dBm.
  • a is the wireless channel attenuation factor, which is closely related to the specific wireless environment. It can be stored in advance in the terminal device.
  • Step 205 the terminal device is controlled to acquire the other location S2 where the terminal device itself is located at other locations. Obtain the distance R2 between the terminal device and the target BLE slave device.
  • This step may first receive a signal from the target BLE slave device. And the signal strength RSSI value is obtained from the received target BLE from the signal of the device. Adjust the location of the terminal device based on the extracted RSSI value. At the location of the mobile terminal device, the terminal device displays its own moving direction and moving distance. The terminal device also prompts for the RSSI value. Specifically, when the terminal device and the target The RSSI value also changes when the distance of the BLE from the device changes. such as:
  • the RSSI signal is getting stronger. It indicates that the terminal device moves toward the target BLE slave device, and the target BLE slave device is located in the moving direction of the terminal device. The user can be prompted to target the BLE slave device in the direction of movement of the terminal device. In order to facilitate the user to control the terminal device in other locations, the acquired data is more accurate.
  • the acquired data is more accurate.
  • the RSSI signal first becomes stronger, it gradually weakens. It indicates that the target BLE slave device is located on both sides of the mobile device's moving route. The user can be prompted that the target BLE slave device is located on both sides of the terminal device moving route. In order to facilitate the user to control the terminal device in other locations, the acquired data is more accurate.
  • Other locations of the terminal device are relative positions relative to the initial position.
  • the relative position of the terminal device at other locations can be obtained by acquiring the moving direction and distance of the terminal device relative to the initial position by the acceleration sensor.
  • the relative position of the terminal device at other positions is calculated according to the moving direction and distance.
  • a weighted centroid algorithm is used to calculate the geometric centroid of each position of the terminal device according to the coordinates of Si and the value of Ri.
  • S1 and S2 can be defined as the coordinates (X1, Y1) of two known nodes S1, the coordinates (X2, Y2) of S2, and S12 is defined as the centroid (X12, Y12) (the center of mass is roughly The position of the target BLE slave device), the distance from S12 to S1 is R1, and the distance from S12 to S2 is R2.
  • the principle of the weighted centroid algorithm is roughly as follows:
  • X12 (X1/R1+X2/R2)/(1/R1+1/R2);
  • Y12 (Y1/R1+Y2/R2)/(1/R1+1/R2).
  • 1 of Ri is the weight of the Si node. Since the distance of the terminal device from the device is relatively close to the target BLE, the measurement error of the target BLE slave device position is relatively small. That is, the smaller the Ri is, the larger the weight is, and the larger the Ri is, the smaller the weight is.
  • the target BLE slave device is located at the position where the center of mass of Si is located. Moreover, in the actual design, in order to make the location of the acquisition target BLE more accurate. It is also possible to control the terminal device to acquire S3, R3 in the third position. Finally, based on S1, R1, S2, R2, S3, and R3, the position of the target BLE slave device is calculated. In an actual application, the terminal device can also be controlled to acquire S n and R n in at least N locations. Where N is a natural number greater than 3.
  • the centroids (X123..n, Y123..n) of Sn are calculated from the coordinates of Sn and the value of Rn.
  • X123..n (X1/d1+X2/d2+X3/d3+...+X n/d n)/(1/d1+1/d2+1/d3...+1/dn);
  • Y123..n (Y1/d1+Y2/d2+Y3/d3+...+Y n/d n)/(1/d1+1/d2+1/d3...+1/dn).
  • the target BLE slave device is located in the area where the geometric centroid is located.
  • the position of the target BLE slave device is a relative position with respect to the above initial position.
  • the present embodiment uses a weighted centroid algorithm to calculate the area where the target BLE slave device is located.
  • a specific calculation of the location of the target BLE slave device is provided.
  • the position of the acquisition target BLE slave device is made more accurate.
  • a third embodiment of the present invention relates to a Bluetooth BLE based positioning method.
  • the third embodiment is substantially the same as the second embodiment.
  • the main difference is that in the second embodiment, the weighted centroid algorithm is used to calculate the area where the target BLE slave device is located. And in the third embodiment In the middle, the area where the target BLE slave device is located is calculated by the equation formula of the column circle.
  • Step 301 Turn on the low power Bluetooth BLE switch of the terminal device to scan the BLE slave device.
  • the BLE slave device can be a smart device with communication function.
  • the BLE slave device can be, but is not limited to, an active pen.
  • Bluetooth on the terminal device can support the protocol of bluetooth4.1/4.2.
  • the switch enable key is set for the Bluetooth of the terminal device, and when the switch enable key is triggered, the terminal device can search for a nearby BLE slave device.
  • the search results are listed in the form of a list.
  • the BLE slave device displayed in the list may include, but is not limited to, the following information: the name of the BLE slave device, the physical address (MAC address), the RSSI value (the RSSI Chinese interpretation is the received signal strength indication), and the like.
  • step 302 it is determined whether the target BLE slave device is found. If yes, go to step 303; otherwise, go back to step 301.
  • the user can find the target BLE slave device that needs to be searched from the scan list according to the name or MAC address of the BLE slave device. Click on the virtual button used to find the target BLE slave device.
  • the terminal device receives the seek instruction for the target BLE slave device, it may determine that the target BLE slave device is found.
  • each BLE slave device can be stored in advance in the terminal device.
  • a target BLE slave device is selected from the pre-stored BLE slave devices before scanning the BLE slave device. When scanning to the target BLE slave device, it can be determined that the target BLE slave device is found.
  • Step 303 Acquire an initial position S1 where the terminal device itself is located.
  • the initial location of the obtained terminal device may be a coordinate origin.
  • Step 304 Calculate a distance R1 between the terminal device and the target BLE slave device according to the RSSI value.
  • the terminal device can receive a signal from the target BLE slave device.
  • the signal strength RSSI value is obtained from the received signal. Based on the parsed RSSI value, the distance R1 between the terminal device and the target BLE slave device is calculated.
  • the distance based on the received signal strength RSSI can be used to calculate the distance between the terminal device and the target BLE slave device.
  • the terminal device receives the Measured Power sent by the target BLE from the device (Measured Power is the reference received signal when the iBeacon module is at a distance of 1 m from the receiver) and the RSSI value after the attenuation through the wireless channel.
  • the distance between the terminal device and the target BLE slave device is determined according to the model formula of the indoor wireless signal propagation.
  • d0 in the formula is usually 1 meter.
  • P(d0) is the power RSSI value received by the terminal device when the distance between the terminal device and the target BLE slave device is 1 meter.
  • the unit of power RSSI is dBm.
  • a is the wireless channel attenuation factor, which is closely related to the specific wireless environment. It can be stored in advance in the terminal device.
  • the initial position of the terminal device itself is S1.
  • the distance R1 between the terminal device and the target BLE slave device. Therefore, the target BLE slave device is on a circle with a radius of R1 centered on S1.
  • step 305 the terminal device is controlled to acquire the other location S2 where the terminal device itself is located at other locations. Obtain the distance R2 between the terminal device and the target BLE slave device. At this time, the target BLE slave device is on a circle with a radius of R2 centered on S2.
  • Other locations of the terminal device are relative positions relative to the initial position.
  • the relative position of the terminal device at other locations can be obtained by acquiring the moving direction and distance of the terminal device relative to the initial position by the acceleration sensor. Calculate the terminal device based on the moving direction and distance
  • Step 306 in the horizontal direction, taking Si as the center Ri as the equation formula of the radius column circle.
  • the target BLE slave device is located on a circle having a radius of R1 centered on S1.
  • the target BLE slave device is located on a circle with a radius of R2 centered on S2. So the target BLE slave device is located in the intersection of the above two circles.
  • Step 307 calculating the intersection of each circle based on the coordinates of Si and the value of Ri.
  • the target BLE slave device is located at one of the above two points. .
  • the terminal device in order to make the acquisition target BLE from the position of the device more accurate. It is also possible to control the terminal device to acquire S3, R3 in the third position.
  • the position of the target BLE slave device is calculated as point B.
  • the target BLE slave device is located in the area where the intersection of each circle is common, that is, the area where point B is located.
  • the position of the target BLE slave device is a relative position with respect to the above initial position.
  • the present embodiment calculates the area where the target BLE slave device is located by the equation formula of the column circle.
  • a specific calculation of the location of the target BLE slave device is provided.
  • the position of the acquisition target BLE slave device is made more accurate.
  • a fourth embodiment of the present invention relates to a Bluetooth BLE based positioning method.
  • the fourth embodiment is an improvement made on the basis of the first, second or third embodiment.
  • the main improvement is that in the fourth embodiment, if the positional accuracy of the target BLE slave device exceeds the preset value, the terminal device is moved to the new location, the Si, Ri are reacquired, and finally, according to all Si, Ri, Calculate the location of the target BLE slave device.
  • Step 601 Turn on the low power Bluetooth BLE switch of the terminal device to scan the BLE slave device.
  • the BLE slave device can be a smart device with communication function.
  • the BLE slave device can be, but is not limited to, an active pen.
  • Bluetooth on the terminal device can support the protocol of bluetooth4.1/4.2.
  • the switch enable key is set for the Bluetooth of the terminal device, and when the switch enable key is triggered, the terminal device can search for a nearby BLE slave device.
  • the search results are listed in the form of a list.
  • the BLE slave device displayed in the list may include, but is not limited to, the following information: the name of the BLE slave device, the physical address (MAC address), the RSSI value (the RSSI Chinese interpretation is the received signal strength indication), and the like.
  • Step 602 Determine whether the target BLE slave device is found. If yes, go to step 603; otherwise, go back to step 601.
  • the user can find the target BLE slave device that needs to be searched from the scan list according to the name or MAC address of the BLE slave device. Click on the virtual button used to find the target BLE slave device.
  • the terminal device receives the seek instruction for the target BLE slave device, it may determine that the target BLE slave device is found.
  • each BLE slave device can be stored in advance in the terminal device.
  • a target BLE slave device is selected from the pre-stored BLE slave devices before scanning the BLE slave device. When scanning to the target BLE slave device, it can be determined that the target BLE slave device is found.
  • Step 603 Acquire an initial position S1 where the terminal device itself is located. Obtain the distance R1 between the terminal device and the target BLE slave device.
  • Step 604 the terminal device is controlled to acquire the bit of the terminal device itself in another location.
  • Set S2. Obtain the distance R2 between the terminal device and the target BLE slave device.
  • Step 605 Calculate the location of the target BLE slave device according to the acquired S1, R1, S2, and R2.
  • the first region range in which the target BLE slave device is located can be determined according to S1 and R1.
  • the second area range in which the target BLE slave device is located can be determined.
  • the coincidence position of the first area range and the second area range can be determined as the location where the target BLE slave device is located.
  • the terminal device in order to make the location of the acquisition target BLE more accurate, can also be controlled to acquire S3 and R3 in the third position.
  • S1, R1, S2, R2, S3, and R3 the position of the target BLE slave device is calculated.
  • Step 606 Determine whether the positional accuracy of the target BLE slave device exceeds a preset value. If yes, go to step 607; otherwise, end.
  • the positional accuracy of the target BLE from the device can be set to within 1 square meter. If the position of the target BLE slave device is within 1 square meter, the positional accuracy of the target BLE slave device does not exceed the preset value. If the target BLE slave device's position range exceeds 1 square meter, the target BLE slave device's positional accuracy exceeds the preset value. Moreover, it is worth mentioning that the above accuracy is not limited to being set to within 1 square meter. The above precision can be designed to an arbitrary value according to actual design requirements.
  • Step 607 Move the terminal device to the new location, and re-acquire the location Si where the terminal device itself is located. Obtain the distance Ri between the terminal device and the target BLE slave device. Among them, the new location is a location different from all the locations of the previous calculation target BLE slave device.
  • Step 608 Recalculate the location of the target BLE slave device according to all acquired Si and Ri.
  • the positional accuracy of the target BLE slave device may also exceed the preset value. At this point, the user can Manually stop the above positioning process.
  • the present embodiment can make the position of the located target BLE more accurate from the device.
  • a fifth embodiment of the present invention relates to a Bluetooth BLE-based positioning method.
  • the fifth embodiment is substantially the same as the fourth embodiment.
  • the main improvement is that in the fourth embodiment, if the positional accuracy of the target BLE slave device exceeds the preset value, the terminal device is moved to the new location, the Si, Ri are reacquired, and finally, according to all Si, Ri, Calculate the location of the target BLE slave device.
  • the prompt information for asking the user whether to continue searching is displayed.
  • Step 701 Turn on the low power Bluetooth BLE switch of the terminal device to scan the BLE slave device.
  • the BLE slave device can be a smart device with communication function.
  • the BLE slave device can be, but is not limited to, an active pen.
  • Bluetooth on the terminal device can support the protocol of bluetooth4.1/4.2.
  • the switch enable key is set for the Bluetooth of the terminal device, and when the switch enable key is triggered, the terminal device can search for a nearby BLE slave device.
  • the search results are listed in the form of a list.
  • the BLE slave device displayed in the list may include, but is not limited to, the following information: the name of the BLE slave device, the physical address (MAC address), the RSSI value (the RSSI Chinese interpretation is the received signal strength indication), and the like.
  • step 702 it is determined whether the target BLE slave device is found. If yes, go to step 703; otherwise, go back to step 701.
  • the user can find the target BLE slave device that needs to be searched from the scan list according to the name or MAC address of the BLE slave device. Click to find the target BLE slave device Virtual button.
  • the terminal device receives the seek instruction for the target BLE slave device, it may determine that the target BLE slave device is found.
  • each BLE slave device can be stored in advance in the terminal device.
  • a target BLE slave device is selected from the pre-stored BLE slave devices before scanning the BLE slave device. When scanning to the target BLE slave device, it can be determined that the target BLE slave device is found.
  • Step 703 Acquire an initial position S1 where the terminal device itself is located. Obtain the distance R1 between the terminal device and the target BLE slave device.
  • Step 704 the terminal device is controlled to acquire the location S2 where the terminal device itself is located at other locations. Obtain the distance R2 between the terminal device and the target BLE slave device.
  • Step 705 Calculate the location of the target BLE slave device according to the acquired S1, R1, S2, and R2.
  • the first region range in which the target BLE slave device is located can be determined according to S1 and R1.
  • the second area range in which the target BLE slave device is located can be determined.
  • the coincidence position of the first area range and the second area range can be determined as the location where the target BLE slave device is located.
  • the terminal device in order to make the location of the acquisition target BLE more accurate, can also be controlled to acquire S3 and R3 in the third position.
  • S1, R1, S2, R2, S3, and R3 the position of the target BLE slave device is calculated.
  • Step 706 Determine whether the positional accuracy of the target BLE slave device exceeds a preset value. If yes, go to step 707; otherwise, end.
  • the positional accuracy of the target BLE from the device can be set to within 1 square meter. If the position of the target BLE slave device is within 1 square meter, the positional accuracy of the target BLE slave device does not exceed the preset value. If the target BLE slave device's position range exceeds 1 square meter, the target BLE slave device's positional accuracy exceeds the preset value. And, it is worth mentioning that The accuracy is not limited to being set to within 1 square meter. The above precision can be designed to an arbitrary value according to actual design requirements.
  • Step 707 displaying prompt information for asking the user whether to continue searching.
  • the user may not be able to find the target BLE slave device from the location of the device according to the calculated target BLE. At this time, the user can control the terminal device to move to a new location according to the displayed information, and continue to acquire Si and Ri. Then calculate the position of the target BLE slave device based on all Si, Ri.
  • the present embodiment can make the position of the located target BLE more accurate from the device.
  • a sixth embodiment of the present invention relates to a Bluetooth BLE-based positioning apparatus that is applied to a terminal device.
  • the Bluetooth BLE-based positioning device includes a scanning module 81, an acquisition module 82, and a calculation module 83.
  • the scanning module 81 is used to scan the BLE slave device.
  • the obtaining module 82 is configured to acquire the location Si where the terminal device itself is located in at least two locations after the scanning module 81 scans to find the target BLE slave device, and acquire the distance Ri between the terminal device and the target BLE slave device.
  • the calculation module 83 is configured to calculate the position of the target BLE slave device according to the acquired Si and Ri.
  • the present embodiment is an apparatus embodiment corresponding to the first embodiment, and the present embodiment can be implemented in cooperation with the first embodiment.
  • the related technical details mentioned in the first embodiment are still effective in the present embodiment, and are not described herein again in order to reduce repetition.
  • this The relevant technical details mentioned in the embodiment can also be applied in the first embodiment.
  • each module involved in this embodiment is a logic module.
  • a logical unit may be a physical unit, a part of a physical unit, or multiple physical entities. A combination of units is implemented.
  • the present embodiment does not introduce a unit that is not closely related to solving the technical problem proposed by the present invention, but this does not mean that there are no other units in the present embodiment.
  • the present embodiment makes it possible to conveniently locate the target BLE slave device, which greatly shortens the time for finding the target BLE slave device. Moreover, the positioning of the target BLE slave device can be realized without deploying the iBeacon or the Bluetooth AP indoors, without requiring a complicated data processing architecture and reducing hardware costs.
  • a seventh embodiment of the present invention relates to a Bluetooth BLE based positioning apparatus.
  • the seventh embodiment is an improvement made on the basis of the sixth embodiment.
  • the main improvement is that in the seventh embodiment, the obtaining module at least includes: an obtaining submodule and a first calculating submodule.
  • the first calculation sub-module is configured to calculate the position of the target BLE slave device by using a weighted centroid algorithm.
  • the Bluetooth BLE-based positioning device includes a scanning module 81, an acquisition module 82, and a calculation module 83.
  • the scanning module 81 is used to scan the BLE slave device.
  • the obtaining module 82 is configured to acquire the location Si where the terminal device itself is located in at least two locations after the scanning module 81 scans to find the target BLE slave device, and acquire the distance Ri between the terminal device and the target BLE slave device.
  • the calculation module 83 is configured to calculate the position of the target BLE slave device according to the acquired Si and Ri.
  • the initial position of the terminal device is the coordinate origin, and the other positions are relative positions with respect to the initial position.
  • the position of the target BLE slave device is a relative position with respect to the initial position.
  • the obtaining module 82 includes at least an obtaining submodule 821 and a first calculating submodule 822.
  • the acquisition sub-module 821 is configured to acquire a moving direction and a distance of the terminal device relative to the initial position by using the acceleration sensor.
  • the first calculation sub-module 822 is configured to calculate the relative position of the terminal device at other locations according to the moving direction and the distance.
  • the Bluetooth BLE-based positioning device further includes a receiving module, a parsing module, and an adjusting module. And a receiving module, configured to receive a signal of the target BLE slave device.
  • a parsing module is configured to parse the signal strength RSSI value from the received signal.
  • the adjustment module (the receiving module, the parsing module, and the adjustment module are not shown in the figure) are used to adjust other locations where the terminal device is located according to the parsed RSSI value. It is worth mentioning, for example, one: during the movement of the terminal device, if the RSSI signal is getting stronger. It indicates that the terminal device moves toward the target BLE slave device, and the target BLE slave device is located in the moving direction of the terminal device.
  • the user can be prompted to target the BLE slave device in the direction of movement of the terminal device. In order to facilitate the user to control the terminal device in other locations, the acquired data is more accurate.
  • the first calculation sub-module 822 is further configured to calculate a geometric centroid of each position of the terminal device according to the coordinates of Si and the value of Ri using a weighted centroid algorithm, and the target BLE slave device is located in an area where the geometric centroid is located.
  • the obtaining module 82 further includes: a receiving submodule 823, a parsing submodule 824, and a second computing submodule 825.
  • the receiving submodule 823 is configured to receive a signal of the target BLE slave device.
  • the parsing sub-module 824 is configured to parse the signal strength RSSI value from the received signal.
  • the second calculation sub-module 825 is configured to calculate a distance Ri between the terminal device and the target BLE slave device according to the parsed RSSI value.
  • the second calculation sub-module 825 includes: an acquisition unit and a second calculation unit.
  • the obtaining unit is configured to obtain the RSSI value P(d).
  • a is a preset value
  • d0 is a preset distance between the terminal device and the target BLE slave device
  • P(d0) is a known number obtained according to d0.
  • the present embodiment can be implemented in cooperation with the second embodiment.
  • the related technical details mentioned in the second embodiment are still effective in the present embodiment, and the technical effects that can be achieved in the second embodiment can also be implemented in the present embodiment. To reduce the repetition, details are not described herein again. Accordingly, the related art details mentioned in the present embodiment can also be applied to the second embodiment.
  • the present embodiment uses a weighted centroid algorithm to calculate the area where the target BLE slave device is located.
  • a specific calculation of the location of the target BLE slave device is provided.
  • the position of the acquisition target BLE slave device is made more accurate.
  • An eighth embodiment of the present invention relates to a Bluetooth BLE based positioning apparatus.
  • the eighth embodiment is substantially the same as the seventh embodiment.
  • the main difference is that in the seventh embodiment, the acquiring module at least includes: an obtaining submodule and a first calculating submodule.
  • the first calculation sub-module includes: a setting unit and a first calculation unit.
  • the Bluetooth BLE-based positioning device includes a scanning module 81, an acquisition module 82, and a calculation module 83.
  • the scanning module 81 is used to scan the BLE slave device.
  • the obtaining module 82 is configured to acquire the location Si where the terminal device itself is located in at least two locations after the scanning module 81 scans to find the target BLE slave device, and acquire the distance Ri between the terminal device and the target BLE slave device.
  • the calculation module 83 is configured to calculate the position of the target BLE slave device according to the acquired Si and Ri.
  • the obtaining module 82 includes at least an obtaining submodule 821 and a first calculating submodule 822.
  • the acquisition sub-module 821 is configured to acquire a moving direction and a distance of the terminal device relative to the initial position by using the acceleration sensor.
  • the first calculation sub-module 822 is configured to calculate the relative position of the terminal device at other locations according to the moving direction and the distance.
  • the obtaining module 82 further includes: a receiving submodule 823, a parsing submodule 824, and a second computing submodule 825.
  • the receiving submodule 823 is configured to receive a signal of the target BLE slave device.
  • the parsing sub-module 824 is configured to parse the signal strength RSSI value from the received signal.
  • the second calculation sub-module 825 is configured to calculate a distance Ri between the terminal device and the target BLE slave device according to the parsed RSSI value.
  • the second calculation sub-module 825 includes: an acquisition unit and a second calculation unit.
  • the obtaining unit is configured to obtain the RSSI value P(d).
  • a is a preset value
  • d0 is a preset distance between the terminal device and the target BLE slave device
  • P(d0) is a known number obtained according to d0.
  • the first calculation sub-module 822 includes: a setting unit 8221 and a first calculation unit 8222.
  • the setting unit 8221 is used for an equation formula in which the center of the circle Ri is the radius of the circle in the horizontal direction.
  • the first calculating unit 8222 is configured to calculate the intersection of each circle based on the coordinates of Si and the value of Ri.
  • the target BLE slave device is located in the area where the intersections shared by each circle are located.
  • the present embodiment can be implemented in cooperation with the third embodiment.
  • the technical details mentioned in the third embodiment are still effective in the present embodiment, and the technical effects that can be achieved in the third embodiment are also implemented in the present embodiment. To reduce the repetition, details are not described herein again. Accordingly, the related art details mentioned in the present embodiment can also be applied to the third embodiment.
  • the present embodiment calculates the area where the target BLE slave device is located by the equation formula of the column circle.
  • a specific calculation of the location of the target BLE slave device is provided.
  • the position of the acquisition target BLE slave device is made more accurate.
  • a ninth embodiment of the present invention relates to a Bluetooth BLE based positioning apparatus.
  • the ninth embodiment is an improvement based on the sixth, seventh or eighth embodiment, and the main improvement is that, in the ninth embodiment, the Bluetooth BLE-based positioning device further includes a first judging module.
  • the Bluetooth BLE-based positioning device includes a scanning module 81, an acquisition module 82, and a calculation module 83.
  • the scanning module 81 is used to scan the BLE slave device.
  • the obtaining module 82 is configured to acquire the location Si where the terminal device itself is located in at least two locations after the scanning module 81 scans to find the target BLE slave device, and acquire the distance Ri between the terminal device and the target BLE slave device.
  • the calculation module 83 is configured to calculate the position of the target BLE slave device according to the acquired Si and Ri.
  • the Bluetooth BLE based positioning device further includes a first determining module 84.
  • the first determining module 84 is configured to determine whether the positional accuracy of the target BLE slave device exceeds a preset value.
  • the obtaining module 82 is further configured to move the terminal device to the new location when the positional accuracy of the target BLE slave device exceeds the preset value, and re-acquire the location Si where the terminal device itself is located. Obtain the distance Ri between the terminal device and the target BLE slave device.
  • the new location is a location different from all the locations of the previous calculation target BLE slave device.
  • the calculation module is further configured to recalculate the location of the target BLE slave device according to all acquired Si and Ri.
  • the present embodiment can be implemented in cooperation with the fourth embodiment.
  • the related technical details mentioned in the fourth embodiment are still effective in the present embodiment, and the technical effects that can be achieved in the fourth embodiment are also implemented in the present embodiment. To reduce the repetition, details are not described herein again. Accordingly, the related art details mentioned in the present embodiment can also be applied to the fourth embodiment.
  • the present embodiment can make the position of the located target BLE more accurate from the device.
  • a tenth embodiment of the present invention relates to a Bluetooth BLE based positioning apparatus.
  • Tenth implementer The formula is substantially the same as the ninth embodiment, and the main improvement is that in the ninth embodiment, the Bluetooth BLE-based positioning apparatus further includes a first judging module.
  • the Bluetooth BLE-based positioning device further includes a second determining module and a display module.
  • the Bluetooth BLE-based positioning device includes a scanning module 81, an acquisition module 82, and a calculation module 83.
  • the scanning module 81 is used to scan the BLE slave device.
  • the obtaining module 82 is configured to acquire the location Si where the terminal device itself is located in at least two locations after the scanning module 81 scans to find the target BLE slave device, and acquire the distance Ri between the terminal device and the target BLE slave device.
  • the calculation module 83 is configured to calculate the position of the target BLE slave device according to the acquired Si and Ri.
  • the Bluetooth BLE based positioning device further includes a second judging module 85 and a display module 86.
  • the second determining module 85 is configured to determine whether the positional accuracy of the target BLE slave device exceeds a preset value.
  • the display module 86 is configured to display prompt information for asking the user whether to continue searching when the positional accuracy of the target BLE slave device exceeds a preset value.
  • the present embodiment can be implemented in cooperation with the fifth embodiment.
  • the related technical details mentioned in the fifth embodiment are still effective in the present embodiment, and the technical effects that can be achieved in the fifth embodiment can also be implemented in the present embodiment. To reduce the repetition, details are not described herein again. Accordingly, the related technical details mentioned in the present embodiment can also be applied to the fifth embodiment.
  • the present embodiment can make the position of the located target BLE more accurate from the device.
  • a program instructing related hardware may be completed by a program instructing related hardware, and the program is stored in a storage medium, and includes a plurality of instructions for making a device (which may be a single chip microcomputer).
  • the chip, etc. or processor executes all or part of the steps of the various embodiments of the present application.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), and a random access memory.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Position Fixing By Use Of Radio Waves (AREA)

Abstract

The present invention relates to the field of wireless communication, and discloses a positioning method and apparatus based on Bluetooth BLE. In the present invention, the positioning method based on Bluetooth BLE is used in a terminal device, and comprises: scanning for a BLE slave device; after finding a target BLE slave device, in at least two positions sequentially acquiring the position Si in which the terminal device is currently located and the distance Ri between the terminal device and the target BLE slave device; and, on the basis of the acquired Si and Ri, calculating the position of the target BLE slave device. Also disclosed in the present invention is a positioning apparatus based on Bluetooth BLE. Compared to the prior art, the present invention enables convenient discovery of the position of a target BLE slave device, greatly reducing the time for searching for a target BLE slave device. Positioning of a target BLE slave device can be implemented without the need to deploy an iBeacon or Bluetooth AP indoors, and there is also no need for complex data processing architecture, thus reducing hardware costs.

Description

基于蓝牙BLE的定位方法及装置Bluetooth BLE based positioning method and device 技术领域Technical field
本发明涉及无线通讯领域,特别涉及基于蓝牙BLE的定位方法及装置。The present invention relates to the field of wireless communications, and in particular, to a Bluetooth BLE-based positioning method and apparatus.
背景技术Background technique
目前短距离无线通讯技术,在众多电子设备,如智能手机、手环、可穿戴设备、传感器等中得到了广泛的应用。这些电子设备支持定位技术。定位是指在室内环境中实现位置定位,其主要采用无线通讯、基站定位、惯导定位等多种技术集成形成的一套室内位置定位体系。除通讯网络的蜂窝定位技术外,常见的室内无线定位技术还有:无线局域网(Wi-Fi)、蓝牙、红外线、超宽带、射频识别(RFID)、紫峰(ZigBee)和超声波等。At present, short-range wireless communication technology has been widely used in many electronic devices, such as smart phones, wristbands, wearable devices, sensors, and the like. These electronic devices support positioning technology. Positioning refers to the realization of positional positioning in an indoor environment, which mainly adopts an indoor position positioning system formed by integration of various technologies such as wireless communication, base station positioning, and inertial navigation positioning. In addition to the cellular positioning technology of communication networks, common indoor wireless positioning technologies include: wireless local area network (Wi-Fi), Bluetooth, infrared, ultra-wideband, radio frequency identification (RFID), Zifeng (ZigBee) and ultrasound.
现有技术中的定位方法,大多是基于移动设备,由蓝牙AP和服务器构成的定位系统,其定位是通过移动设备反复将广播信息通过蓝牙AP构建的传输通信网络与服务器进行通信,通过服务器计算后,得到当前移动设备的位置信息的一种发明,并发送给移动设备。或者,基于iBeacon的蓝牙定位系统,该定位系统包括iBeacon信息发布系统、iBeacon基站和移动终端组成,其中信息发布系统由后台管理系统,服务认证接口,射频天线组成;基站由数据存储模块和蓝牙射频天线组成;移动终端由数据处理模块、蓝牙收发模块、无线收发模块、蓝牙射频接收天线,无线射频收发天线组成。The positioning methods in the prior art are mostly based on mobile devices, and the positioning system consists of a Bluetooth AP and a server. The positioning is performed by the mobile device repeatedly communicating the broadcast information through the Bluetooth AP to communicate with the server, and calculating by the server. After that, an invention of the current location information of the mobile device is obtained and sent to the mobile device. Or, based on the iBeacon Bluetooth positioning system, the positioning system comprises an iBeacon information distribution system, an iBeacon base station and a mobile terminal, wherein the information distribution system is composed of a background management system, a service authentication interface, and a radio frequency antenna; the base station is composed of a data storage module and a Bluetooth radio frequency. Antenna composition; the mobile terminal is composed of a data processing module, a Bluetooth transceiver module, a wireless transceiver module, a Bluetooth RF receiving antenna, and a wireless RF transceiver antenna.
以上现有技术具有很多缺点:1、蓝牙传输通讯网络构建复杂,部署很多蓝牙AP,维护工作不便,硬件成本高。2、需要专门服务器处理由蓝牙AP发送来的数据,会出现数据网络延迟及数据带宽问题,同样也增加了系 统成本。3、发明中采用的本地定位装置是固化好的,不够灵活,因此做不到多种定位方法的升级和改动。4、发明中提到的定位,都是定位移动终端的位置,不能定位iBeacon或蓝牙AP的位置,进而在寻找物体时,不能对遗失或隐藏的物体进行定位。The above prior art has many disadvantages: 1. The Bluetooth transmission communication network is complicated to construct, and many Bluetooth APs are deployed, which is inconvenient to maintain and has high hardware cost. 2, need a special server to process the data sent by the Bluetooth AP, there will be data network delay and data bandwidth problems, also increased the system Cost. 3. The local positioning device used in the invention is solidified and not flexible enough, so it is impossible to upgrade and modify various positioning methods. 4. The positioning mentioned in the invention is to locate the location of the mobile terminal, and it is not possible to locate the position of the iBeacon or the Bluetooth AP, and thus, when searching for an object, the lost or hidden object cannot be located.
发明内容Summary of the invention
本发明实施例的目的在于提供一种基于蓝牙BLE的定位方法及装置,使得可以很方便的实现对目标BLE从设备的定位,极大缩短了寻找目标BLE从设备的时间。并且,无需在室内部署iBeacon或蓝牙AP,就可以实现对目标BLE从设备的定位,而不需要复杂的数据处理架构、降低硬件成本。An object of the present invention is to provide a Bluetooth BLE-based positioning method and apparatus, which can conveniently locate a target BLE slave device, and greatly shorten the time for finding a target BLE slave device. Moreover, the positioning of the target BLE slave device can be realized without deploying the iBeacon or the Bluetooth AP indoors, without requiring a complicated data processing architecture and reducing hardware costs.
为解决上述技术问题,本发明实施例提供了一种基于蓝牙BLE的定位方法,应用于终端设备;该基于蓝牙BLE的定位方法包括:扫描BLE从设备;在扫描找到目标BLE从设备之后,依次在终端设备位于至少两个位置上,获取终端设备本身所处的位置Si,以及终端设备与目标BLE从设备之间的距离Ri;根据获取到的Si、Ri,计算出目标BLE从设备的位置。To solve the above technical problem, the embodiment of the present invention provides a Bluetooth BLE-based positioning method, which is applied to a terminal device. The Bluetooth BLE-based positioning method includes: scanning a BLE slave device; after the scan finds the target BLE slave device, Locating at least two locations of the terminal device, obtaining a location Si where the terminal device itself is located, and a distance Ri between the terminal device and the target BLE slave device; calculating a location of the target BLE slave device according to the acquired Si and Ri .
本发明实施例还提供了一种基于蓝牙BLE的定位装置,应用于终端设备;该基于蓝牙BLE的定位装置包括:扫描模块、获取模块以及计算模块;扫描模块,用于扫描BLE从设备;获取模块,用于在扫描模块扫描找到目标BLE从设备之后,依次在终端设备位于至少两个位置上,获取终端设备本身所处的位置Si,以及终端设备与目标BLE从设备之间的距离Ri;计算模块,用于根据获取到的Si、Ri,计算出目标BLE从设备的位置。The embodiment of the present invention further provides a Bluetooth BLE-based positioning device, which is applied to a terminal device. The Bluetooth BLE-based positioning device includes: a scanning module, an acquiring module, and a computing module; and a scanning module, configured to scan the BLE slave device; a module, after the scanning module scans to find the target BLE slave device, in turn, the terminal device is located in at least two locations, obtaining the location Si where the terminal device itself is located, and the distance Ri between the terminal device and the target BLE slave device; And a calculation module, configured to calculate a location of the target BLE slave device according to the acquired Si and Ri.
本发明实施例相对于现有技术而言,通过控制终端设备在至少两个位置上,获取终端设备本身所处的位置Si,以及终端设备与目标BLE从设备之间的距离Ri。并根据获取到的Si、Ri,计算出目标BLE从设备的位置, 使得可以很方便的实现对目标BLE从设备的定位,极大缩短了寻找目标BLE从设备的时间。并且,无需在室内部署iBeacon或蓝牙AP,就可以实现对目标BLE从设备的定位,而不需要复杂的数据处理架构、降低硬件成本。Compared with the prior art, the embodiment of the present invention acquires the location Si where the terminal device itself is located and the distance Ri between the terminal device and the target BLE slave device by controlling the terminal device in at least two locations. And calculating the position of the target BLE slave device according to the obtained Si and Ri. This makes it easy to locate the target BLE slave device, greatly reducing the time to find the target BLE slave device. Moreover, the positioning of the target BLE slave device can be realized without deploying the iBeacon or the Bluetooth AP indoors, without requiring a complicated data processing architecture and reducing hardware costs.
附图说明DRAWINGS
一个或多个实施例通过与之对应的附图中的图片进行示例性说明,这些示例性说明并不构成对实施例的限定,附图中具有相同参考数字标号的元件表示为类似的元件,除非有特别申明,附图中的图不构成比例限制。The one or more embodiments are exemplified by the accompanying drawings in the accompanying drawings, and FIG. The figures in the drawings do not constitute a scale limitation unless otherwise stated.
图1是根据本发明第一实施方式中基于蓝牙BLE的定位方法的流程图;1 is a flowchart of a Bluetooth BLE-based positioning method according to a first embodiment of the present invention;
图2是根据本发明第二实施方式中基于蓝牙BLE的定位方法的流程图;2 is a flowchart of a Bluetooth BLE-based positioning method according to a second embodiment of the present invention;
图3是根据本发明第三实施方式中基于蓝牙BLE的定位方法的流程图;3 is a flowchart of a Bluetooth BLE-based positioning method according to a third embodiment of the present invention;
图4是根据本发明第三实施方式中终端设备在不同位置时获取的目标BLE从设备的示意图;4 is a schematic diagram of a target BLE slave device acquired by a terminal device in different locations according to a third embodiment of the present invention;
图5是根据本发明第三实施方式中终端设备在不同位置时获取的目标BLE从设备的另一示意图;5 is another schematic diagram of a target BLE slave device that is acquired when a terminal device is in a different location according to a third embodiment of the present invention;
图6是根据本发明第四实施方式中基于蓝牙BLE的定位方法的流程图;6 is a flowchart of a Bluetooth BLE-based positioning method according to a fourth embodiment of the present invention;
图7是根据本发明第五实施方式中基于蓝牙BLE的定位方法的流程图;7 is a flowchart of a Bluetooth BLE-based positioning method according to a fifth embodiment of the present invention;
图8是根据本发明第六实施方式中基于蓝牙BLE的定位装置的方框图;FIG. 8 is a block diagram of a Bluetooth BLE-based positioning apparatus according to a sixth embodiment of the present invention; FIG.
图9是根据本发明第七实施方式中基于蓝牙BLE的定位装置的方框图;9 is a block diagram of a Bluetooth BLE-based positioning apparatus in accordance with a seventh embodiment of the present invention;
图10是根据本发明第八实施方式中基于蓝牙BLE的定位装置的方框图;Figure 10 is a block diagram of a Bluetooth BLE based positioning apparatus in accordance with an eighth embodiment of the present invention;
图11是根据本发明第九实施方式中基于蓝牙BLE的定位装置的方框 图;11 is a block diagram of a Bluetooth BLE-based positioning device in accordance with a ninth embodiment of the present invention. Figure
图12是根据本发明第十实施方式中基于蓝牙BLE的定位装置的方框图。Figure 12 is a block diagram of a Bluetooth BLE based positioning apparatus in accordance with a tenth embodiment of the present invention.
具体实施方式detailed description
为使本发明的目的、技术方案和优点更加清楚,下面将结合附图对本发明的各实施方式进行详细的阐述。然而,本领域的普通技术人员可以理解,在本发明各实施方式中,为了使读者更好地理解本申请而提出了许多技术细节。但是,即使没有这些技术细节和基于以下各实施方式的种种变化和修改,也可以实现本申请所要求保护的技术方案。In order to make the objects, technical solutions, and advantages of the present invention more apparent, the embodiments of the present invention will be described in detail below. However, it will be apparent to those skilled in the art that, in the various embodiments of the present invention, numerous technical details are set forth in order to provide the reader with a better understanding of the present application. However, the technical solutions claimed in the present application can be implemented without these technical details and various changes and modifications based on the following embodiments.
本发明的第一实施方式涉及一种基于蓝牙BLE的定位方法,应用于终端设备。具体流程如图1所示,其包括:A first embodiment of the present invention relates to a Bluetooth BLE-based positioning method applied to a terminal device. The specific process is shown in Figure 1, which includes:
步骤101,打开终端设备的低功耗蓝牙BLE开关,扫描BLE从设备。Step 101: Turn on the low-power Bluetooth BLE switch of the terminal device to scan the BLE slave device.
值得一提的是,BLE从设备可以是具有通讯功能的智能设备,举例而言,BLE从设备可以但不限于为主动笔。并且,终端设备上的蓝牙可以支持bluetooth4.1/4.2的协议。It is worth mentioning that the BLE slave device can be a smart device with communication function. For example, the BLE slave device can be, but is not limited to, an active pen. Also, Bluetooth on the terminal device can support the protocol of bluetooth4.1/4.2.
具体地说,为终端设备的蓝牙设置开关使能键,当开关使能键被触发时,终端设备可以搜索附近的BLE从设备。终端设备搜索BLE从设备时,会将搜索结果以列表的形式列举出来。并且,列表中显示的BLE从设备可以但不限于包括以下信息:BLE从设备的名字、物理地址(MAC地址)、RSSI值(RSSI中文释义为接收的信号强度指示)等。Specifically, the switch enable key is set for the Bluetooth of the terminal device, and when the switch enable key is triggered, the terminal device can search for a nearby BLE slave device. When the terminal device searches for a BLE slave device, the search results are listed in the form of a list. Moreover, the BLE slave device displayed in the list may include, but is not limited to, the following information: the name of the BLE slave device, the physical address (MAC address), the RSSI value (the RSSI Chinese interpretation is the received signal strength indication), and the like.
步骤102,判断是否找到目标BLE从设备。如果是,则进入步骤103;否则,返回步骤101。In step 102, it is determined whether the target BLE slave device is found. If yes, go to step 103; otherwise, go back to step 101.
具体地说,用户可以根据BLE从设备的名字或MAC地址,从扫描列表 中找到需要寻找的目标BLE从设备。点击用于寻找该目标BLE从设备的虚拟按钮。终端设备在接收到对目标BLE从设备的寻找指令时,可以判定为扫描到目标BLE从设备。Specifically, the user can follow the BLE slave device name or MAC address from the scan list. Find the target BLE slave device you need to find. Click on the virtual button used to find the target BLE slave device. When receiving the seek instruction for the target BLE slave device, the terminal device may determine to scan to the target BLE slave device.
需要说明的是,于实际的设计过程中,还可以通过其它的方式找到目标BLE从设备。比如,可以预先在终端设备中存储各个BLE从设备。在扫描BLE从设备之前,先从预存的BLE从设备中选择一个目标BLE从设备。在扫描到目标BLE从设备时,可以判定为找到目标BLE从设备。It should be noted that in the actual design process, the target BLE slave device can also be found in other ways. For example, each BLE slave device can be stored in advance in the terminal device. A target BLE slave device is selected from the pre-stored BLE slave devices before scanning the BLE slave device. When scanning to the target BLE slave device, it can be determined that the target BLE slave device is found.
步骤103,获取终端设备本身所处的初始位置S1。获取终端设备与目标BLE从设备之间的距离R1。Step 103: Acquire an initial position S1 where the terminal device itself is located. Obtain the distance R1 between the terminal device and the target BLE slave device.
步骤104,控制终端设备在其它位置,再次获取终端设备本身所处的位置S2。获取终端设备与目标BLE从设备之间的距离R2。Step 104: The terminal device is controlled to acquire the location S2 where the terminal device itself is located at other locations. Obtain the distance R2 between the terminal device and the target BLE slave device.
步骤105,根据获取到的S1、R1、S2、R2,计算出目标BLE从设备的位置。Step 105: Calculate the location of the target BLE slave device according to the acquired S1, R1, S2, and R2.
需要说明的是,由于根据S1和R1可以确定目标BLE从设备所处的第一区域范围。根据S2和R2可以确定目标BLE从设备所处的第二区域范围。第一区域范围和第二区域范围的重合位置,即可确定为目标BLE从设备所处的位置。并且,于实际设计中,为了使获取目标BLE从设备的位置更为精确,还可以控制终端设备在第三个位置,获取S3、R3。最后根据S1、R1、S2、R2、S3、R3,计算出目标BLE从设备的位置。It should be noted that since the first region range in which the target BLE slave device is located can be determined according to S1 and R1. According to S2 and R2, the second area range in which the target BLE slave device is located can be determined. The coincidence position of the first area range and the second area range can be determined as the location where the target BLE slave device is located. Moreover, in the actual design, in order to make the location of the acquisition target BLE more accurate, the terminal device can also be controlled to acquire S3 and R3 in the third position. Finally, based on S1, R1, S2, R2, S3, and R3, the position of the target BLE slave device is calculated.
通过上述内容,不难发现,本实施方式使得可以很方便的实现对目标BLE从设备的定位,极大缩短了寻找目标BLE从设备的时间。并且,无需在室内部署iBeacon或蓝牙AP,就可以实现对目标BLE从设备的定位,而不需要复杂的数据处理架构、降低硬件成本。 Through the above, it is not difficult to find that the present embodiment makes it possible to conveniently locate the target BLE slave device, which greatly shortens the time for finding the target BLE slave device. Moreover, the positioning of the target BLE slave device can be realized without deploying the iBeacon or the Bluetooth AP indoors, without requiring a complicated data processing architecture and reducing hardware costs.
本发明的第二实施方式涉及一种基于蓝牙BLE的定位方法。第二实施方式是在第一实施方式的基础上做的改进。主要改进之处在于:在第二实施方式中,采用加权质心算法,计算目标BLE从设备所在的区域。A second embodiment of the present invention relates to a Bluetooth BLE based positioning method. The second embodiment is an improvement made on the basis of the first embodiment. The main improvement is that in the second embodiment, the weighted centroid algorithm is used to calculate the area where the target BLE slave device is located.
具体流程如图2所示,其包括:The specific process is shown in Figure 2, which includes:
步骤201,打开终端设备的低功耗蓝牙BLE开关,扫描BLE从设备。Step 201: Turn on the low-power Bluetooth BLE switch of the terminal device to scan the BLE slave device.
值得一提的是,BLE从设备可以是具有通讯功能的智能设备,举例而言,BLE从设备可以但不限于为主动笔。并且,终端设备上的蓝牙可以支持bluetooth4.1/4.2的协议。实际的应用中,目标BLE从设备周期性地发送广播数据包。当终端设备接收到广播数据包时。终端设备可以扫描附近的BLE从设备。It is worth mentioning that the BLE slave device can be a smart device with communication function. For example, the BLE slave device can be, but is not limited to, an active pen. Also, Bluetooth on the terminal device can support the protocol of bluetooth4.1/4.2. In an actual application, the target BLE slave device periodically transmits a broadcast data packet. When the terminal device receives the broadcast packet. The terminal device can scan nearby BLE slave devices.
具体地说,为终端设备的蓝牙设置开关使能键,当开关使能键被触发时,终端设备可以搜索附近的BLE从设备。终端设备搜索BLE从设备时,会将搜索结果以列表的形式列举出来。并且,列表中显示的BLE从设备可以但不限于包括以下信息:BLE从设备的名字、物理地址(MAC地址)、RSSI值(RSSI中文释义为接收的信号强度指示)等。Specifically, the switch enable key is set for the Bluetooth of the terminal device, and when the switch enable key is triggered, the terminal device can search for a nearby BLE slave device. When the terminal device searches for a BLE slave device, the search results are listed in the form of a list. Moreover, the BLE slave device displayed in the list may include, but is not limited to, the following information: the name of the BLE slave device, the physical address (MAC address), the RSSI value (the RSSI Chinese interpretation is the received signal strength indication), and the like.
步骤202,判断是否找到目标BLE从设备。如果是,则进入步骤203;否则,返回步骤201。Step 202: Determine whether the target BLE slave device is found. If yes, go to step 203; otherwise, go back to step 201.
具体地说,用户可以根据BLE从设备的名字或MAC地址,从扫描列表中找到需要寻找的目标BLE从设备。点击用于寻找该目标BLE从设备的虚拟按钮。终端设备在接收到对目标BLE从设备的寻找指令时,可以判定为找到目标BLE从设备。Specifically, the user can find the target BLE slave device that needs to be searched from the scan list according to the name or MAC address of the BLE slave device. Click on the virtual button used to find the target BLE slave device. When the terminal device receives the seek instruction for the target BLE slave device, it may determine that the target BLE slave device is found.
需要说明的是,于实际的设计过程中,还可以通过其它的方式找到目标BLE从设备。比如,可以预先在终端设备中存储各个BLE从设备。在扫描BLE从设备之前,先从预存的BLE从设备中选择一个目标BLE从设备。在扫描到目标BLE从设备时,可以判定为找到目标BLE从设备。 It should be noted that in the actual design process, the target BLE slave device can also be found in other ways. For example, each BLE slave device can be stored in advance in the terminal device. A target BLE slave device is selected from the pre-stored BLE slave devices before scanning the BLE slave device. When scanning to the target BLE slave device, it can be determined that the target BLE slave device is found.
步骤203,获取终端设备本身所处的初始位置S1。其中,获取的终端设备的初始位置可以为坐标原点。Step 203: Acquire an initial position S1 where the terminal device itself is located. The initial location of the obtained terminal device may be a coordinate origin.
步骤204,根据RSSI值,计算终端设备与目标BLE从设备的距离R1。Step 204: Calculate a distance R1 between the terminal device and the target BLE slave device according to the RSSI value.
本步骤中,可以首先接收目标BLE从设备的信号。并从接收到的目标BLE从设备的信号中解析得到信号强度RSSI值。In this step, the signal of the target BLE slave device may be received first. And the signal strength RSSI value is obtained from the received target BLE from the signal of the device.
值得一提的是,可以采用基于接收信号强度RSSI值得测距方法,来计算终端设备与目标BLE从设备的距离。比如:首先,终端设备接收目标BLE从设备发送的Measured Power(Measured Power是iBeacon模块与接收器之间相距1m时的参考接收信号强)和经过无线信道衰减后的RSSI值。其次,根据室内无线信号传播的模型公式,确定终端设备和目标BLE从设备的距离。It is worth mentioning that the distance based on the received signal strength RSSI can be used to calculate the distance between the terminal device and the target BLE slave device. For example, first, the terminal device receives the Measured Power sent by the target BLE from the device (Measured Power is the reference received signal when the iBeacon module is at a distance of 1 m from the receiver) and the RSSI value after the attenuation through the wireless channel. Secondly, the distance between the terminal device and the target BLE slave device is determined according to the model formula of the indoor wireless signal propagation.
具体地说,获取RSSI值P(d);根据信号的传播模型公式P(d)=P(d0)-10a㏒(Ri/d0)+m计算Ri;其中,a为预设值,d0为终端设备与目标BLE从设备之间的预设距离,P(d0)为根据d0求得的已知数。Specifically, the RSSI value P(d) is obtained; Ri is calculated according to the propagation model formula P(d)=P(d0)-10alog(Ri/d0)+m of the signal; wherein a is a preset value, and d0 is The preset distance between the terminal device and the target BLE slave device, P(d0) is the known number obtained from d0.
举例而言,公式中的d0通常为1米。P(d0)是终端设备与目标BLE从设备之间的距离为1米时,终端设备接收的功率RSSI值。功率RSSI的单位为dBm。a为无线信道衰减因子,该因子与具体的无线环境紧密相关。可以预先存储在终端设备中。m为一个均值为0,服从高斯分布的随机因子。为了简化计算,可以取m为0。即根据P(d)=P(d0)-10a㏒(R1/d0),计算R1。For example, d0 in the formula is usually 1 meter. P(d0) is the power RSSI value received by the terminal device when the distance between the terminal device and the target BLE slave device is 1 meter. The unit of power RSSI is dBm. a is the wireless channel attenuation factor, which is closely related to the specific wireless environment. It can be stored in advance in the terminal device. m is a random factor with a mean of 0 and a Gaussian distribution. To simplify the calculation, m can be taken as 0. That is, R1 is calculated from P(d)=P(d0)-10alog(R1/d0).
步骤205,控制终端设备在其它位置,再次获取终端设备本身所处的其它位置S2。获取终端设备与目标BLE从设备之间的距离R2。 Step 205, the terminal device is controlled to acquire the other location S2 where the terminal device itself is located at other locations. Obtain the distance R2 between the terminal device and the target BLE slave device.
本步骤可以首先接收目标BLE从设备的信号。并从接收到的目标BLE从设备的信号中解析得到信号强度RSSI值。根据提取的RSSI值,调整终端设备所处的位置。在移动终端设备的位置时,终端设备会显示自身的移动方向和移动距离。终端设备还会提示RSSI值。具体而言,当终端设备与目标 BLE从设备的距离发生变化时,RSSI值也会发生变化。比如:This step may first receive a signal from the target BLE slave device. And the signal strength RSSI value is obtained from the received target BLE from the signal of the device. Adjust the location of the terminal device based on the extracted RSSI value. At the location of the mobile terminal device, the terminal device displays its own moving direction and moving distance. The terminal device also prompts for the RSSI value. Specifically, when the terminal device and the target The RSSI value also changes when the distance of the BLE from the device changes. such as:
一:在终端设备移动的过程中,如果RSSI信号渐强。则表明终端设备朝向目标BLE从设备运动,目标BLE从设备位于终端设备的移动方向。可以提示用户目标BLE从设备位于终端设备的移动方向。以便于用户控制终端设备在其它位置时,获取的数据更加精确。二:如果RSSI信号渐弱。则表明终端设备远离目标BLE从设备运动,目标BLE从设备位于终端设备的移动方向的相反方向。可以提示用户目标BLE从设备位于终端设备的移动方向的相反方向。以便于用户控制终端设备在其它位置时,获取的数据更加精确。三:如果RSSI信号先渐强后渐弱。则表明目标BLE从设备位于终端设备移动路线的两侧。可以提示用户目标BLE从设备位于终端设备移动路线的两侧。以便于用户控制终端设备在其它位置时,获取的数据更加精确。One: During the movement of the terminal device, if the RSSI signal is getting stronger. It indicates that the terminal device moves toward the target BLE slave device, and the target BLE slave device is located in the moving direction of the terminal device. The user can be prompted to target the BLE slave device in the direction of movement of the terminal device. In order to facilitate the user to control the terminal device in other locations, the acquired data is more accurate. Two: If the RSSI signal is getting weaker. It indicates that the terminal device moves away from the target BLE slave device, and the target BLE slave device is located in the opposite direction of the moving direction of the terminal device. The user may be prompted that the target BLE slave device is in the opposite direction of the direction of movement of the terminal device. In order to facilitate the user to control the terminal device in other locations, the acquired data is more accurate. Three: If the RSSI signal first becomes stronger, it gradually weakens. It indicates that the target BLE slave device is located on both sides of the mobile device's moving route. The user can be prompted that the target BLE slave device is located on both sides of the terminal device moving route. In order to facilitate the user to control the terminal device in other locations, the acquired data is more accurate.
终端设备的其它位置为相对于初始位置的相对位置。可以通过以下方式获取终端设备在其它位置的相对位置:通过加速度传感器获取终端设备相对于初始位置的移动方向和距离。根据移动方向和距离计算终端设备在其它位置的相对位置。根据P(d)=P(d0)-10a㏒(R2/d0),计算R2。Other locations of the terminal device are relative positions relative to the initial position. The relative position of the terminal device at other locations can be obtained by acquiring the moving direction and distance of the terminal device relative to the initial position by the acceleration sensor. The relative position of the terminal device at other positions is calculated according to the moving direction and distance. R2 is calculated from P(d)=P(d0)-10alog(R2/d0).
步骤206,采用加权质心算法,根据Si的坐标和Ri的值计算终端设备各个位置的几何质心。In step 206, a weighted centroid algorithm is used to calculate the geometric centroid of each position of the terminal device according to the coordinates of Si and the value of Ri.
值得一提的是,可以将S1、S2定义为两个已知节点S1的坐标(X1,Y1),S2的坐标(X2,Y2),将S12定义为质心(X12,Y12)(质心大致为目标BLE从设备的位置),则S12到S1的距离为R1,则S12到S2的距离为R2。加权质心算法的原理用数学表达式大概如下:It is worth mentioning that S1 and S2 can be defined as the coordinates (X1, Y1) of two known nodes S1, the coordinates (X2, Y2) of S2, and S12 is defined as the centroid (X12, Y12) (the center of mass is roughly The position of the target BLE slave device), the distance from S12 to S1 is R1, and the distance from S12 to S2 is R2. The principle of the weighted centroid algorithm is roughly as follows:
(X12-X1)/R1=(X2-X12)/R2;(X12-X1)/R1=(X2-X12)/R2;
(Y12-Y1)/R1=(Y2-Y12)/R2。(Y12-Y1)/R1=(Y2-Y12)/R2.
解方程组可得: Solving the equations gives:
X12=(X1/R1+X2/R2)/(1/R1+1/R2);X12=(X1/R1+X2/R2)/(1/R1+1/R2);
Y12=(Y1/R1+Y2/R2)/(1/R1+1/R2)。Y12=(Y1/R1+Y2/R2)/(1/R1+1/R2).
其中,Ri分之1为Si节点的权值。因为终端设备距离目标BLE从设备的距离较近时,对目标BLE从设备位置的测量误差比较小。即Ri越小时,上述权值就越大,Ri越大时,上述权值就越小。Among them, 1 of Ri is the weight of the Si node. Since the distance of the terminal device from the device is relatively close to the target BLE, the measurement error of the target BLE slave device position is relatively small. That is, the smaller the Ri is, the larger the weight is, and the larger the Ri is, the smaller the weight is.
需要说明的是,由于目标BLE从设备位于Si的质心所处的位置。并且,于实际设计中,为了使获取目标BLE从设备的位置更为精确。还可以控制终端设备在第三个位置,获取S3、R3。最后根据S1、R1、S2、R2、S3、R3,计算出目标BLE从设备的位置。于实际的应用中,还可以控制终端设备在至少N个位置,获取S n、R n。其中N为大于3的自然数。It should be noted that since the target BLE slave device is located at the position where the center of mass of Si is located. Moreover, in the actual design, in order to make the location of the acquisition target BLE more accurate. It is also possible to control the terminal device to acquire S3, R3 in the third position. Finally, based on S1, R1, S2, R2, S3, and R3, the position of the target BLE slave device is calculated. In an actual application, the terminal device can also be controlled to acquire S n and R n in at least N locations. Where N is a natural number greater than 3.
采用加权质心算法,根据S n的坐标和R n的值计算S n的质心(X123..n,Y123..n)。Using the weighted centroid algorithm, the centroids (X123..n, Y123..n) of Sn are calculated from the coordinates of Sn and the value of Rn.
X123..n=(X1/d1+X2/d2+X3/d3+...+X n/d n)/(1/d1+1/d2+1/d3...+1/dn);X123..n=(X1/d1+X2/d2+X3/d3+...+X n/d n)/(1/d1+1/d2+1/d3...+1/dn);
Y123..n=(Y1/d1+Y2/d2+Y3/d3+...+Y n/d n)/(1/d1+1/d2+1/d3...+1/dn)。Y123..n=(Y1/d1+Y2/d2+Y3/d3+...+Y n/d n)/(1/d1+1/d2+1/d3...+1/dn).
本实施方式中目标BLE从设备位于几何质心所在的区域。其中,目标BLE从设备的位置为相对于上述初始位置的相对位置。In this embodiment, the target BLE slave device is located in the area where the geometric centroid is located. Wherein, the position of the target BLE slave device is a relative position with respect to the above initial position.
通过上述内容,不难发现,本实施方式采用加权质心算法,计算目标BLE从设备所在的区域。从而,提供了一种计算目标BLE从设备位置的具体计算方式。并且,通过这种计算方式,使得获取目标BLE从设备的位置较为精确。Through the above, it is not difficult to find that the present embodiment uses a weighted centroid algorithm to calculate the area where the target BLE slave device is located. Thus, a specific calculation of the location of the target BLE slave device is provided. Moreover, by this calculation method, the position of the acquisition target BLE slave device is made more accurate.
本发明的第三实施方式涉及一种基于蓝牙BLE的定位方法。第三实施方式与第二实施方式大致相同。主要区别之处在于:在第二实施方式中,采用加权质心算法,计算目标BLE从设备所在的区域。而在第三实施方式 中,通过列圆的方程公式,计算目标BLE从设备所在的区域。A third embodiment of the present invention relates to a Bluetooth BLE based positioning method. The third embodiment is substantially the same as the second embodiment. The main difference is that in the second embodiment, the weighted centroid algorithm is used to calculate the area where the target BLE slave device is located. And in the third embodiment In the middle, the area where the target BLE slave device is located is calculated by the equation formula of the column circle.
具体流程如图3所示,其包括:The specific process is shown in Figure 3, which includes:
步骤301,打开终端设备的低功耗蓝牙BLE开关,扫描BLE从设备。Step 301: Turn on the low power Bluetooth BLE switch of the terminal device to scan the BLE slave device.
值得一提的是,BLE从设备可以是具有通讯功能的智能设备,举例而言,BLE从设备可以但不限于为主动笔。并且,终端设备上的蓝牙可以支持bluetooth4.1/4.2的协议。It is worth mentioning that the BLE slave device can be a smart device with communication function. For example, the BLE slave device can be, but is not limited to, an active pen. Also, Bluetooth on the terminal device can support the protocol of bluetooth4.1/4.2.
具体地说,为终端设备的蓝牙设置开关使能键,当开关使能键被触发时,终端设备可以搜索附近的BLE从设备。终端设备搜索BLE从设备时,会将搜索结果以列表的形式列举出来。并且,列表中显示的BLE从设备可以但不限于包括以下信息:BLE从设备的名字、物理地址(MAC地址)、RSSI值(RSSI中文释义为接收的信号强度指示)等。Specifically, the switch enable key is set for the Bluetooth of the terminal device, and when the switch enable key is triggered, the terminal device can search for a nearby BLE slave device. When the terminal device searches for a BLE slave device, the search results are listed in the form of a list. Moreover, the BLE slave device displayed in the list may include, but is not limited to, the following information: the name of the BLE slave device, the physical address (MAC address), the RSSI value (the RSSI Chinese interpretation is the received signal strength indication), and the like.
步骤302,判断是否找到目标BLE从设备。如果是,则进入步骤303;否则,返回步骤301。In step 302, it is determined whether the target BLE slave device is found. If yes, go to step 303; otherwise, go back to step 301.
具体地说,用户可以根据BLE从设备的名字或MAC地址,从扫描列表中找到需要寻找的目标BLE从设备。点击用于寻找该目标BLE从设备的虚拟按钮。终端设备在接收到对目标BLE从设备的寻找指令时,可以判定为找到目标BLE从设备。Specifically, the user can find the target BLE slave device that needs to be searched from the scan list according to the name or MAC address of the BLE slave device. Click on the virtual button used to find the target BLE slave device. When the terminal device receives the seek instruction for the target BLE slave device, it may determine that the target BLE slave device is found.
需要说明的是,于实际的设计过程中,还可以通过其它的方式找到目标BLE从设备。比如,可以预先在终端设备中存储各个BLE从设备。在扫描BLE从设备之前,先从预存的BLE从设备中选择一个目标BLE从设备。在扫描到目标BLE从设备时,可以判定为找到目标BLE从设备。It should be noted that in the actual design process, the target BLE slave device can also be found in other ways. For example, each BLE slave device can be stored in advance in the terminal device. A target BLE slave device is selected from the pre-stored BLE slave devices before scanning the BLE slave device. When scanning to the target BLE slave device, it can be determined that the target BLE slave device is found.
步骤303,获取终端设备本身所处的初始位置S1。其中,获取的终端设备的初始位置可以为坐标原点。Step 303: Acquire an initial position S1 where the terminal device itself is located. The initial location of the obtained terminal device may be a coordinate origin.
步骤304,根据RSSI值,计算终端设备与目标BLE从设备的距离R1。 Step 304: Calculate a distance R1 between the terminal device and the target BLE slave device according to the RSSI value.
具体地说,终端设备可以接收目标BLE从设备的信号。从接收的信号中解析得到信号强度RSSI值。根据解析的RSSI值,计算终端设备与目标BLE从设备的距离R1。Specifically, the terminal device can receive a signal from the target BLE slave device. The signal strength RSSI value is obtained from the received signal. Based on the parsed RSSI value, the distance R1 between the terminal device and the target BLE slave device is calculated.
值得一提的是,可以采用基于接收信号强度RSSI值得测距方法,来计算终端设备与目标BLE从设备的距离。首先,终端设备接收目标BLE从设备发送的Measured Power(Measured Power是iBeacon模块与接收器之间相距1m时的参考接收信号强)和经过无线信道衰减后的RSSI值。其次,根据室内无线信号传播的模型公式,确定终端设备和目标BLE从设备的距离。It is worth mentioning that the distance based on the received signal strength RSSI can be used to calculate the distance between the terminal device and the target BLE slave device. First, the terminal device receives the Measured Power sent by the target BLE from the device (Measured Power is the reference received signal when the iBeacon module is at a distance of 1 m from the receiver) and the RSSI value after the attenuation through the wireless channel. Secondly, the distance between the terminal device and the target BLE slave device is determined according to the model formula of the indoor wireless signal propagation.
具体地说,获取RSSI值P(d);根据信号的传播模型公式P(d)=P(d0)-10a㏒(Ri/d0)+m计算Ri;其中,a为预设值,d0为终端设备与目标BLE从设备之间的预设距离,P(d0)为根据d0求得的已知数。Specifically, the RSSI value P(d) is obtained; Ri is calculated according to the propagation model formula P(d)=P(d0)-10alog(Ri/d0)+m of the signal; wherein a is a preset value, and d0 is The preset distance between the terminal device and the target BLE slave device, P(d0) is the known number obtained from d0.
举例而言,公式中的d0通常为1米。P(d0)是终端设备与目标BLE从设备之间的距离为1米时,终端设备接收的功率RSSI值。功率RSSI的单位为dBm。a为无线信道衰减因子,该因子与具体的无线环境紧密相关。可以预先存储在终端设备中。m为一个均值为0,服从高斯分布的随机因子。为了简化计算,可以取m为0。即根据P(d)=P(d0)-10a㏒(R1/d0),计算R1。For example, d0 in the formula is usually 1 meter. P(d0) is the power RSSI value received by the terminal device when the distance between the terminal device and the target BLE slave device is 1 meter. The unit of power RSSI is dBm. a is the wireless channel attenuation factor, which is closely related to the specific wireless environment. It can be stored in advance in the terminal device. m is a random factor with a mean of 0 and a Gaussian distribution. To simplify the calculation, m can be taken as 0. That is, R1 is calculated from P(d)=P(d0)-10alog(R1/d0).
如图4所示,由于终端设备本身所处的初始位置为S1。终端设备与目标BLE从设备的距离R1。所以,目标BLE从设备在以S1为圆心,半径为R1的圆上。As shown in FIG. 4, the initial position of the terminal device itself is S1. The distance R1 between the terminal device and the target BLE slave device. Therefore, the target BLE slave device is on a circle with a radius of R1 centered on S1.
步骤305,控制终端设备在其它位置,再次获取终端设备本身所处的其它位置S2。获取终端设备与目标BLE从设备之间的距离R2。此时,目标BLE从设备在以S2为圆心,半径为R2的圆上。In step 305, the terminal device is controlled to acquire the other location S2 where the terminal device itself is located at other locations. Obtain the distance R2 between the terminal device and the target BLE slave device. At this time, the target BLE slave device is on a circle with a radius of R2 centered on S2.
终端设备的其它位置为相对于初始位置的相对位置。可以通过以下方式获取终端设备在其它位置的相对位置:通过加速度传感器获取终端设备相对于初始位置的移动方向和距离。根据移动方向和距离计算终端设备在其它 位置的相对位置。根据P(d)=P(d0)-10a㏒(R2/d0),计算R2。Other locations of the terminal device are relative positions relative to the initial position. The relative position of the terminal device at other locations can be obtained by acquiring the moving direction and distance of the terminal device relative to the initial position by the acceleration sensor. Calculate the terminal device based on the moving direction and distance The relative position of the location. R2 is calculated from P(d)=P(d0)-10alog(R2/d0).
步骤306,在水平方向上,以Si为圆心Ri为半径列圆的方程公式。 Step 306, in the horizontal direction, taking Si as the center Ri as the equation formula of the radius column circle.
具体地说,由于目标BLE从设备位于以S1为圆心,半径为R1的圆上。同时目标BLE从设备位于以S2为圆心,半径为R2的圆上。所以目标BLE从设备位于上述两个圆的相交区域。Specifically, since the target BLE slave device is located on a circle having a radius of R1 centered on S1. At the same time, the target BLE slave device is located on a circle with a radius of R2 centered on S2. So the target BLE slave device is located in the intersection of the above two circles.
步骤307,根据Si的坐标和Ri的值,计算每个圆的交点。 Step 307, calculating the intersection of each circle based on the coordinates of Si and the value of Ri.
当上述两个圆为相切时,根据Si的坐标和Ri的值,计算两个圆的交点为一点A点(如图4所示),可以准确的实现目标BLE从设备的定位。When the above two circles are tangent, according to the coordinates of Si and the value of Ri, the intersection of the two circles is calculated as a point A (as shown in FIG. 4), and the positioning of the target BLE slave device can be accurately achieved.
值得一提的是,如图5所示,于实际的应用过程中,如果上述两个圆的交点为两点,分别是B点和C点,则目标BLE从设备位于上述两点中的一点。此时,为了使获取目标BLE从设备的位置更为精确。还可以控制终端设备在第三个位置,获取S3、R3。最后根据S1、R1、S2、R2、S3、R3,计算出目标BLE从设备的位置为B点。目标BLE从设备位于每个圆均共有的交点所在的区域,即B点所在的区域。其中,目标BLE从设备的位置为相对于上述初始位置的相对位置。It is worth mentioning that, as shown in FIG. 5, in the actual application process, if the intersection of the two circles is two points, namely, point B and point C, the target BLE slave device is located at one of the above two points. . At this time, in order to make the acquisition target BLE from the position of the device more accurate. It is also possible to control the terminal device to acquire S3, R3 in the third position. Finally, based on S1, R1, S2, R2, S3, and R3, the position of the target BLE slave device is calculated as point B. The target BLE slave device is located in the area where the intersection of each circle is common, that is, the area where point B is located. Wherein, the position of the target BLE slave device is a relative position with respect to the above initial position.
通过上述内容,不难发现,本实施方式通过列圆的方程公式,计算目标BLE从设备所在的区域。从而,提供了一种计算目标BLE从设备位置的具体计算方式。并且,通过这种计算方式,使得获取目标BLE从设备的位置较为精确。Through the above, it is not difficult to find that the present embodiment calculates the area where the target BLE slave device is located by the equation formula of the column circle. Thus, a specific calculation of the location of the target BLE slave device is provided. Moreover, by this calculation method, the position of the acquisition target BLE slave device is made more accurate.
本发明的第四实施方式涉及一种基于蓝牙BLE的定位方法。第四实施方式是在第一、第二或第三实施方式的基础上做的改进。主要改进之处在于:在第四实施方式中,如果目标BLE从设备的位置精度超出预设值,则将终端设备移动到新位置,重新获取Si、Ri,最后根据所有的Si、Ri,重新 计算出目标BLE从设备的位置。A fourth embodiment of the present invention relates to a Bluetooth BLE based positioning method. The fourth embodiment is an improvement made on the basis of the first, second or third embodiment. The main improvement is that in the fourth embodiment, if the positional accuracy of the target BLE slave device exceeds the preset value, the terminal device is moved to the new location, the Si, Ri are reacquired, and finally, according to all Si, Ri, Calculate the location of the target BLE slave device.
具体流程如图6所示,其包括:The specific process is shown in Figure 6, which includes:
步骤601,打开终端设备的低功耗蓝牙BLE开关,扫描BLE从设备。Step 601: Turn on the low power Bluetooth BLE switch of the terminal device to scan the BLE slave device.
值得一提的是,BLE从设备可以是具有通讯功能的智能设备,举例而言,BLE从设备可以但不限于为主动笔。并且,终端设备上的蓝牙可以支持bluetooth4.1/4.2的协议。It is worth mentioning that the BLE slave device can be a smart device with communication function. For example, the BLE slave device can be, but is not limited to, an active pen. Also, Bluetooth on the terminal device can support the protocol of bluetooth4.1/4.2.
具体地说,为终端设备的蓝牙设置开关使能键,当开关使能键被触发时,终端设备可以搜索附近的BLE从设备。终端设备搜索BLE从设备时,会将搜索结果以列表的形式列举出来。并且,列表中显示的BLE从设备可以但不限于包括以下信息:BLE从设备的名字、物理地址(MAC地址)、RSSI值(RSSI中文释义为接收的信号强度指示)等。Specifically, the switch enable key is set for the Bluetooth of the terminal device, and when the switch enable key is triggered, the terminal device can search for a nearby BLE slave device. When the terminal device searches for a BLE slave device, the search results are listed in the form of a list. Moreover, the BLE slave device displayed in the list may include, but is not limited to, the following information: the name of the BLE slave device, the physical address (MAC address), the RSSI value (the RSSI Chinese interpretation is the received signal strength indication), and the like.
步骤602,判断是否找到目标BLE从设备。如果是,则进入步骤603;否则,返回步骤601。Step 602: Determine whether the target BLE slave device is found. If yes, go to step 603; otherwise, go back to step 601.
具体地说,用户可以根据BLE从设备的名字或MAC地址,从扫描列表中找到需要寻找的目标BLE从设备。点击用于寻找该目标BLE从设备的虚拟按钮。终端设备在接收到对目标BLE从设备的寻找指令时,可以判定为找到目标BLE从设备。Specifically, the user can find the target BLE slave device that needs to be searched from the scan list according to the name or MAC address of the BLE slave device. Click on the virtual button used to find the target BLE slave device. When the terminal device receives the seek instruction for the target BLE slave device, it may determine that the target BLE slave device is found.
需要说明的是,于实际的设计过程中,还可以通过其它的方式找到目标BLE从设备。比如,可以预先在终端设备中存储各个BLE从设备。在扫描BLE从设备之前,先从预存的BLE从设备中选择一个目标BLE从设备。在扫描到目标BLE从设备时,可以判定为找到目标BLE从设备。It should be noted that in the actual design process, the target BLE slave device can also be found in other ways. For example, each BLE slave device can be stored in advance in the terminal device. A target BLE slave device is selected from the pre-stored BLE slave devices before scanning the BLE slave device. When scanning to the target BLE slave device, it can be determined that the target BLE slave device is found.
步骤603,获取终端设备本身所处的初始位置S1。获取终端设备与目标BLE从设备之间的距离R1。Step 603: Acquire an initial position S1 where the terminal device itself is located. Obtain the distance R1 between the terminal device and the target BLE slave device.
步骤604,控制终端设备在其它位置,再次获取终端设备本身所处的位 置S2。获取终端设备与目标BLE从设备之间的距离R2。Step 604, the terminal device is controlled to acquire the bit of the terminal device itself in another location. Set S2. Obtain the distance R2 between the terminal device and the target BLE slave device.
步骤605,根据获取到的S1、R1、S2、R2,计算出目标BLE从设备的位置。Step 605: Calculate the location of the target BLE slave device according to the acquired S1, R1, S2, and R2.
需要说明的是,由于根据S1和R1可以确定目标BLE从设备所处的第一区域范围。根据S2和R2可以确定目标BLE从设备所处的第二区域范围。第一区域范围和第二区域范围的重合位置,即可确定为目标BLE从设备所处的位置。并且,于实际设计中,为了使获取目标BLE从设备的位置更为精确,还可以控制终端设备在第三个位置,获取S3、R3。最后根据S1、R1、S2、R2、S3、R3,计算出目标BLE从设备的位置。It should be noted that since the first region range in which the target BLE slave device is located can be determined according to S1 and R1. According to S2 and R2, the second area range in which the target BLE slave device is located can be determined. The coincidence position of the first area range and the second area range can be determined as the location where the target BLE slave device is located. Moreover, in the actual design, in order to make the location of the acquisition target BLE more accurate, the terminal device can also be controlled to acquire S3 and R3 in the third position. Finally, based on S1, R1, S2, R2, S3, and R3, the position of the target BLE slave device is calculated.
步骤606,判断目标BLE从设备的位置精度是否超出预设值。如果是,则进入步骤607;否则,结束。Step 606: Determine whether the positional accuracy of the target BLE slave device exceeds a preset value. If yes, go to step 607; otherwise, end.
具体地说,由于在实际的应用中,可能计算出的目标BLE从设备的位置有误差。举例而言,可以将目标BLE从设备的位置精度设置为1平方米以内。如果目标BLE从设备的位置范围在1平方米以内,则目标BLE从设备的位置精度未超出预设值。如果目标BLE从设备的位置范围超过1平方米,则目标BLE从设备的位置精度超出预设值。并且,值得一提的是,上述精度不限于设置为1平方米以内。可以根据实际设计需求,将上述精度设计为任意值。Specifically, since in actual applications, it is possible to calculate the position of the target BLE slave device with an error. For example, the positional accuracy of the target BLE from the device can be set to within 1 square meter. If the position of the target BLE slave device is within 1 square meter, the positional accuracy of the target BLE slave device does not exceed the preset value. If the target BLE slave device's position range exceeds 1 square meter, the target BLE slave device's positional accuracy exceeds the preset value. Moreover, it is worth mentioning that the above accuracy is not limited to being set to within 1 square meter. The above precision can be designed to an arbitrary value according to actual design requirements.
步骤607,将终端设备移动到新位置,重新获取终端设备本身所处的位置Si。获取终端设备与目标BLE从设备之间的距离Ri。其中,新位置为与之前计算目标BLE从设备的所有位置不同的位置。Step 607: Move the terminal device to the new location, and re-acquire the location Si where the terminal device itself is located. Obtain the distance Ri between the terminal device and the target BLE slave device. Among them, the new location is a location different from all the locations of the previous calculation target BLE slave device.
步骤608,根据获取到的所有Si、Ri,重新计算出目标BLE从设备的位置。Step 608: Recalculate the location of the target BLE slave device according to all acquired Si and Ri.
值得一提的是,如果环境误差较大,重新计算出目标BLE从设备的位置时,目标BLE从设备的位置精度也可能会否超出预设值。此时,用户可 以手动停止上述定位流程。It is worth mentioning that if the environmental error is large and the position of the target BLE slave device is recalculated, the positional accuracy of the target BLE slave device may also exceed the preset value. At this point, the user can Manually stop the above positioning process.
通过上述内容,不难发现,本实施方式可以使定位出的目标BLE从设备的位置更加精确。Through the above, it is not difficult to find that the present embodiment can make the position of the located target BLE more accurate from the device.
本发明的第五实施方式涉及一种基于蓝牙BLE的定位方法。第五实施方式与第四实施方式大致相同。主要改进之处在于:在第四实施方式中,如果目标BLE从设备的位置精度超出预设值,则将终端设备移动到新位置,重新获取Si、Ri,最后根据所有的Si、Ri,重新计算出目标BLE从设备的位置。而在第五实施方式中,如果目标BLE从设备的位置精度超出预设值,显示用于询问用户是否继续寻找的提示信息。A fifth embodiment of the present invention relates to a Bluetooth BLE-based positioning method. The fifth embodiment is substantially the same as the fourth embodiment. The main improvement is that in the fourth embodiment, if the positional accuracy of the target BLE slave device exceeds the preset value, the terminal device is moved to the new location, the Si, Ri are reacquired, and finally, according to all Si, Ri, Calculate the location of the target BLE slave device. In the fifth embodiment, if the positional accuracy of the target BLE slave device exceeds the preset value, the prompt information for asking the user whether to continue searching is displayed.
具体流程如图7所示,其包括:The specific process is shown in Figure 7, which includes:
步骤701,打开终端设备的低功耗蓝牙BLE开关,扫描BLE从设备。Step 701: Turn on the low power Bluetooth BLE switch of the terminal device to scan the BLE slave device.
值得一提的是,BLE从设备可以是具有通讯功能的智能设备,举例而言,BLE从设备可以但不限于为主动笔。并且,终端设备上的蓝牙可以支持bluetooth4.1/4.2的协议。It is worth mentioning that the BLE slave device can be a smart device with communication function. For example, the BLE slave device can be, but is not limited to, an active pen. Also, Bluetooth on the terminal device can support the protocol of bluetooth4.1/4.2.
具体地说,为终端设备的蓝牙设置开关使能键,当开关使能键被触发时,终端设备可以搜索附近的BLE从设备。终端设备搜索BLE从设备时,会将搜索结果以列表的形式列举出来。并且,列表中显示的BLE从设备可以但不限于包括以下信息:BLE从设备的名字、物理地址(MAC地址)、RSSI值(RSSI中文释义为接收的信号强度指示)等。Specifically, the switch enable key is set for the Bluetooth of the terminal device, and when the switch enable key is triggered, the terminal device can search for a nearby BLE slave device. When the terminal device searches for a BLE slave device, the search results are listed in the form of a list. Moreover, the BLE slave device displayed in the list may include, but is not limited to, the following information: the name of the BLE slave device, the physical address (MAC address), the RSSI value (the RSSI Chinese interpretation is the received signal strength indication), and the like.
步骤702,判断是否找到目标BLE从设备。如果是,则进入步骤703;否则,返回步骤701。In step 702, it is determined whether the target BLE slave device is found. If yes, go to step 703; otherwise, go back to step 701.
具体地说,用户可以根据BLE从设备的名字或MAC地址,从扫描列表中找到需要寻找的目标BLE从设备。点击用于寻找该目标BLE从设备的 虚拟按钮。终端设备在接收到对目标BLE从设备的寻找指令时,可以判定为找到目标BLE从设备。Specifically, the user can find the target BLE slave device that needs to be searched from the scan list according to the name or MAC address of the BLE slave device. Click to find the target BLE slave device Virtual button. When the terminal device receives the seek instruction for the target BLE slave device, it may determine that the target BLE slave device is found.
需要说明的是,于实际的设计过程中,还可以通过其它的方式找到目标BLE从设备。比如,可以预先在终端设备中存储各个BLE从设备。在扫描BLE从设备之前,先从预存的BLE从设备中选择一个目标BLE从设备。在扫描到目标BLE从设备时,可以判定为找到目标BLE从设备。It should be noted that in the actual design process, the target BLE slave device can also be found in other ways. For example, each BLE slave device can be stored in advance in the terminal device. A target BLE slave device is selected from the pre-stored BLE slave devices before scanning the BLE slave device. When scanning to the target BLE slave device, it can be determined that the target BLE slave device is found.
步骤703,获取终端设备本身所处的初始位置S1。获取终端设备与目标BLE从设备之间的距离R1。Step 703: Acquire an initial position S1 where the terminal device itself is located. Obtain the distance R1 between the terminal device and the target BLE slave device.
步骤704,控制终端设备在其它位置,再次获取终端设备本身所处的位置S2。获取终端设备与目标BLE从设备之间的距离R2。Step 704, the terminal device is controlled to acquire the location S2 where the terminal device itself is located at other locations. Obtain the distance R2 between the terminal device and the target BLE slave device.
步骤705,根据获取到的S1、R1、S2、R2,计算出目标BLE从设备的位置。Step 705: Calculate the location of the target BLE slave device according to the acquired S1, R1, S2, and R2.
需要说明的是,由于根据S1和R1可以确定目标BLE从设备所处的第一区域范围。根据S2和R2可以确定目标BLE从设备所处的第二区域范围。第一区域范围和第二区域范围的重合位置,即可确定为目标BLE从设备所处的位置。并且,于实际设计中,为了使获取目标BLE从设备的位置更为精确,还可以控制终端设备在第三个位置,获取S3、R3。最后根据S1、R1、S2、R2、S3、R3,计算出目标BLE从设备的位置。It should be noted that since the first region range in which the target BLE slave device is located can be determined according to S1 and R1. According to S2 and R2, the second area range in which the target BLE slave device is located can be determined. The coincidence position of the first area range and the second area range can be determined as the location where the target BLE slave device is located. Moreover, in the actual design, in order to make the location of the acquisition target BLE more accurate, the terminal device can also be controlled to acquire S3 and R3 in the third position. Finally, based on S1, R1, S2, R2, S3, and R3, the position of the target BLE slave device is calculated.
步骤706,判断目标BLE从设备的位置精度是否超出预设值。如果是,则进入步骤707;否则,结束。Step 706: Determine whether the positional accuracy of the target BLE slave device exceeds a preset value. If yes, go to step 707; otherwise, end.
具体地说,由于在实际的应用中,可能计算出的目标BLE从设备的位置有误差。举例而言,可以将目标BLE从设备的位置精度设置为1平方米以内。如果目标BLE从设备的位置范围在1平方米以内,则目标BLE从设备的位置精度未超出预设值。如果目标BLE从设备的位置范围超过1平方米,则目标BLE从设备的位置精度超出预设值。并且,值得一提的是,上 述精度不限于设置为1平方米以内。可以根据实际设计需求,将上述精度设计为任意值。Specifically, since in actual applications, it is possible to calculate the position of the target BLE slave device with an error. For example, the positional accuracy of the target BLE from the device can be set to within 1 square meter. If the position of the target BLE slave device is within 1 square meter, the positional accuracy of the target BLE slave device does not exceed the preset value. If the target BLE slave device's position range exceeds 1 square meter, the target BLE slave device's positional accuracy exceeds the preset value. And, it is worth mentioning that The accuracy is not limited to being set to within 1 square meter. The above precision can be designed to an arbitrary value according to actual design requirements.
步骤707,显示用于询问用户是否继续寻找的提示信息。Step 707, displaying prompt information for asking the user whether to continue searching.
需要说明的是,当目标BLE从设备的位置精度超出预设值时,用户可能无法根据计算得出的目标BLE从设备的位置找到目标BLE从设备。此时,用户可以根据显示的信息,控制终端设备移动到一个新的位置,继续获取Si、Ri。然后根据所有的Si、Ri,计算目标BLE从设备的位置。It should be noted that when the positional accuracy of the target BLE slave device exceeds the preset value, the user may not be able to find the target BLE slave device from the location of the device according to the calculated target BLE. At this time, the user can control the terminal device to move to a new location according to the displayed information, and continue to acquire Si and Ri. Then calculate the position of the target BLE slave device based on all Si, Ri.
通过上述内容,不难发现,本实施方式可以使定位出的目标BLE从设备的位置更加精确。Through the above, it is not difficult to find that the present embodiment can make the position of the located target BLE more accurate from the device.
上面各种方法的步骤划分,只是为了描述清楚,实现时可以合并为一个步骤或者对某些步骤进行拆分,分解为多个步骤,只要包括相同的逻辑关系,都在本专利的保护范围内;对算法中或者流程中添加无关紧要的修改或者引入无关紧要的设计,但不改变其算法和流程的核心设计都在该专利的保护范围内。The steps of the above various methods are divided for the sake of clear description. The implementation may be combined into one step or split into certain steps and decomposed into multiple steps. As long as the same logical relationship is included, it is within the protection scope of this patent. The addition of insignificant modifications to an algorithm or process, or the introduction of an insignificant design, without changing the core design of its algorithms and processes, is covered by this patent.
本发明第六实施方式涉及一种基于蓝牙BLE的定位装置,应用于终端设备。如图8所示,基于蓝牙BLE的定位装置包括:扫描模块81、获取模块82以及计算模块83。扫描模块81用于扫描BLE从设备。获取模块82用于在扫描模块81扫描找到目标BLE从设备之后,依次在至少两个位置上,获取终端设备本身所处的位置Si,获取终端设备与目标BLE从设备之间的距离Ri。计算模块83用于根据获取到的Si、Ri,计算出目标BLE从设备的位置。A sixth embodiment of the present invention relates to a Bluetooth BLE-based positioning apparatus that is applied to a terminal device. As shown in FIG. 8, the Bluetooth BLE-based positioning device includes a scanning module 81, an acquisition module 82, and a calculation module 83. The scanning module 81 is used to scan the BLE slave device. The obtaining module 82 is configured to acquire the location Si where the terminal device itself is located in at least two locations after the scanning module 81 scans to find the target BLE slave device, and acquire the distance Ri between the terminal device and the target BLE slave device. The calculation module 83 is configured to calculate the position of the target BLE slave device according to the acquired Si and Ri.
不难发现,本实施方式为与第一实施方式相对应的装置实施例,本实施方式可与第一实施方式互相配合实施。第一实施方式中提到的相关技术细节在本实施方式中依然有效,为了减少重复,这里不再赘述。相应地,本实 施方式中提到的相关技术细节也可应用在第一实施方式中。It is not difficult to find that the present embodiment is an apparatus embodiment corresponding to the first embodiment, and the present embodiment can be implemented in cooperation with the first embodiment. The related technical details mentioned in the first embodiment are still effective in the present embodiment, and are not described herein again in order to reduce repetition. Correspondingly, this The relevant technical details mentioned in the embodiment can also be applied in the first embodiment.
值得一提的是,本实施方式中所涉及到的各模块均为逻辑模块,在实际应用中,一个逻辑单元可以是一个物理单元,也可以是一个物理单元的一部分,还可以以多个物理单元的组合实现。此外,为了突出本发明的创新部分,本实施方式中并没有将与解决本发明所提出的技术问题关系不太密切的单元引入,但这并不表明本实施方式中不存在其它的单元。It is worth mentioning that each module involved in this embodiment is a logic module. In practical applications, a logical unit may be a physical unit, a part of a physical unit, or multiple physical entities. A combination of units is implemented. In addition, in order to highlight the innovative part of the present invention, the present embodiment does not introduce a unit that is not closely related to solving the technical problem proposed by the present invention, but this does not mean that there are no other units in the present embodiment.
通过上述内容,不难发现,本实施方式使得可以很方便的实现对目标BLE从设备的定位,极大缩短了寻找目标BLE从设备的时间。并且,无需在室内部署iBeacon或蓝牙AP,就可以实现对目标BLE从设备的定位,而不需要复杂的数据处理架构、降低硬件成本。Through the above, it is not difficult to find that the present embodiment makes it possible to conveniently locate the target BLE slave device, which greatly shortens the time for finding the target BLE slave device. Moreover, the positioning of the target BLE slave device can be realized without deploying the iBeacon or the Bluetooth AP indoors, without requiring a complicated data processing architecture and reducing hardware costs.
本发明第七实施方式涉及一种基于蓝牙BLE的定位装置。第七实施方式是在第六实施方式的基础上做的改进。主要改进之处在于:在第七实施方式中,获取模块至少包括:获取子模块和第一计算子模块。第一计算子模块,用于采用加权质心算法,计算目标BLE从设备的位置。A seventh embodiment of the present invention relates to a Bluetooth BLE based positioning apparatus. The seventh embodiment is an improvement made on the basis of the sixth embodiment. The main improvement is that in the seventh embodiment, the obtaining module at least includes: an obtaining submodule and a first calculating submodule. The first calculation sub-module is configured to calculate the position of the target BLE slave device by using a weighted centroid algorithm.
如图9所示,基于蓝牙BLE的定位装置包括:扫描模块81、获取模块82以及计算模块83。扫描模块81用于扫描BLE从设备。获取模块82用于在扫描模块81扫描找到目标BLE从设备之后,依次在至少两个位置上,获取终端设备本身所处的位置Si,获取终端设备与目标BLE从设备之间的距离Ri。计算模块83用于根据获取到的Si、Ri,计算出目标BLE从设备的位置。As shown in FIG. 9, the Bluetooth BLE-based positioning device includes a scanning module 81, an acquisition module 82, and a calculation module 83. The scanning module 81 is used to scan the BLE slave device. The obtaining module 82 is configured to acquire the location Si where the terminal device itself is located in at least two locations after the scanning module 81 scans to find the target BLE slave device, and acquire the distance Ri between the terminal device and the target BLE slave device. The calculation module 83 is configured to calculate the position of the target BLE slave device according to the acquired Si and Ri.
值得一提的是,终端设备的初始位置为坐标原点,其它位置为相对于初始位置的相对位置。目标BLE从设备的位置为相对于初始位置的相对位置。It is worth mentioning that the initial position of the terminal device is the coordinate origin, and the other positions are relative positions with respect to the initial position. The position of the target BLE slave device is a relative position with respect to the initial position.
其中,获取模块82至少包括:获取子模块821和第一计算子模块822。 获取子模块821用于通过加速度传感器获取终端设备相对于初始位置的移动方向和距离。第一计算子模块822用于根据移动方向和距离计算终端设备在其它位置的相对位置。The obtaining module 82 includes at least an obtaining submodule 821 and a first calculating submodule 822. The acquisition sub-module 821 is configured to acquire a moving direction and a distance of the terminal device relative to the initial position by using the acceleration sensor. The first calculation sub-module 822 is configured to calculate the relative position of the terminal device at other locations according to the moving direction and the distance.
另外,基于蓝牙BLE的定位装置还包括接收模块、解析模块和调整模块。接收模块,用于接收目标BLE从设备的信号。解析模块,用于从接收的信号中解析得到信号强度RSSI值。调整模块(接收模块、解析模块和调整模块未在图中标示出),用于根据解析的RSSI值,调整终端设备所处的其它位置。值得一提的是,举例而言,一:在终端设备移动的过程中,如果RSSI信号渐强。则表明终端设备朝向目标BLE从设备运动,目标BLE从设备位于终端设备的移动方向。可以提示用户目标BLE从设备位于终端设备的移动方向。以便于用户控制终端设备在其它位置时,获取的数据更加精确。二:如果RSSI信号渐弱。则表明终端设备远离目标BLE从设备运动,目标BLE从设备位于终端设备的移动方向的相反方向。可以提示用户目标BLE从设备位于终端设备的移动方向的相反方向。以便于用户控制终端设备在其它位置时,获取的数据更加精确。三:如果RSSI信号先渐强后渐弱。则表明目标BLE从设备位于终端设备移动路线的两侧。可以提示用户目标BLE从设备位于终端设备移动路线的两侧。以便于用户控制终端设备在其它位置时,获取的数据更加精确。In addition, the Bluetooth BLE-based positioning device further includes a receiving module, a parsing module, and an adjusting module. And a receiving module, configured to receive a signal of the target BLE slave device. A parsing module is configured to parse the signal strength RSSI value from the received signal. The adjustment module (the receiving module, the parsing module, and the adjustment module are not shown in the figure) are used to adjust other locations where the terminal device is located according to the parsed RSSI value. It is worth mentioning, for example, one: during the movement of the terminal device, if the RSSI signal is getting stronger. It indicates that the terminal device moves toward the target BLE slave device, and the target BLE slave device is located in the moving direction of the terminal device. The user can be prompted to target the BLE slave device in the direction of movement of the terminal device. In order to facilitate the user to control the terminal device in other locations, the acquired data is more accurate. Two: If the RSSI signal is getting weaker. It indicates that the terminal device moves away from the target BLE slave device, and the target BLE slave device is located in the opposite direction of the moving direction of the terminal device. The user may be prompted that the target BLE slave device is in the opposite direction of the direction of movement of the terminal device. In order to facilitate the user to control the terminal device in other locations, the acquired data is more accurate. Three: If the RSSI signal first becomes stronger, it gradually weakens. It indicates that the target BLE slave device is located on both sides of the mobile device's moving route. The user can be prompted that the target BLE slave device is located on both sides of the terminal device moving route. In order to facilitate the user to control the terminal device in other locations, the acquired data is more accurate.
另外,第一计算子模块822还用于采用加权质心算法,根据Si的坐标和Ri的值计算终端设备各个位置的几何质心,目标BLE从设备位于几何质心所在的区域。In addition, the first calculation sub-module 822 is further configured to calculate a geometric centroid of each position of the terminal device according to the coordinates of Si and the value of Ri using a weighted centroid algorithm, and the target BLE slave device is located in an area where the geometric centroid is located.
另外,获取模块82还包括:接收子模块823、解析子模块824和第二计算子模块825。接收子模块823,用于接收目标BLE从设备的信号。解析子模块824,用于从接收的信号中解析得到信号强度RSSI值。第二计算子模块825用于根据解析的RSSI值,计算终端设备与目标BLE从设备的距离Ri。 In addition, the obtaining module 82 further includes: a receiving submodule 823, a parsing submodule 824, and a second computing submodule 825. The receiving submodule 823 is configured to receive a signal of the target BLE slave device. The parsing sub-module 824 is configured to parse the signal strength RSSI value from the received signal. The second calculation sub-module 825 is configured to calculate a distance Ri between the terminal device and the target BLE slave device according to the parsed RSSI value.
另外,第二计算子模块825包括:获取单元和第二计算单元。获取单元,用于获取RSSI值P(d)。第二计算单元,用于根据信号的传播模型公式P(d)=P(d0)-10a㏒(Ri/d0)计算Ri。其中,a为预设值,d0为终端设备与目标BLE从设备之间的预设距离,P(d0)为根据d0求得的已知数。In addition, the second calculation sub-module 825 includes: an acquisition unit and a second calculation unit. The obtaining unit is configured to obtain the RSSI value P(d). And a second calculating unit, configured to calculate Ri according to a propagation model formula P(d)=P(d0)-10alog(Ri/d0) of the signal. Where a is a preset value, d0 is a preset distance between the terminal device and the target BLE slave device, and P(d0) is a known number obtained according to d0.
由于第二实施方式与本实施方式相互对应,因此本实施方式可与第二实施方式互相配合实施。第二实施方式中提到的相关技术细节在本实施方式中依然有效,在第二实施方式中所能达到的技术效果在本实施方式中也同样可以实现,为了减少重复,这里不再赘述。相应地,本实施方式中提到的相关技术细节也可应用在第二实施方式中。Since the second embodiment and the present embodiment correspond to each other, the present embodiment can be implemented in cooperation with the second embodiment. The related technical details mentioned in the second embodiment are still effective in the present embodiment, and the technical effects that can be achieved in the second embodiment can also be implemented in the present embodiment. To reduce the repetition, details are not described herein again. Accordingly, the related art details mentioned in the present embodiment can also be applied to the second embodiment.
通过上述内容,不难发现,本实施方式采用加权质心算法,计算目标BLE从设备所在的区域。从而,提供了一种计算目标BLE从设备位置的具体计算方式。并且,通过这种计算方式,使得获取目标BLE从设备的位置较为精确。Through the above, it is not difficult to find that the present embodiment uses a weighted centroid algorithm to calculate the area where the target BLE slave device is located. Thus, a specific calculation of the location of the target BLE slave device is provided. Moreover, by this calculation method, the position of the acquisition target BLE slave device is made more accurate.
本发明第八实施方式涉及一种基于蓝牙BLE的定位装置。第八实施方式与第七实施方式大致相同,主要区别之处在于:在第七实施方式中,获取模块至少包括:获取子模块和第一计算子模块。而在第八实施方式中,第一计算子模块包括:设置单元和第一计算单元。An eighth embodiment of the present invention relates to a Bluetooth BLE based positioning apparatus. The eighth embodiment is substantially the same as the seventh embodiment. The main difference is that in the seventh embodiment, the acquiring module at least includes: an obtaining submodule and a first calculating submodule. In the eighth embodiment, the first calculation sub-module includes: a setting unit and a first calculation unit.
如图10所示,基于蓝牙BLE的定位装置包括:扫描模块81、获取模块82以及计算模块83。扫描模块81用于扫描BLE从设备。获取模块82用于在扫描模块81扫描找到目标BLE从设备之后,依次在至少两个位置上,获取终端设备本身所处的位置Si,获取终端设备与目标BLE从设备之间的距离Ri。计算模块83用于根据获取到的Si、Ri,计算出目标BLE从设备的位置。As shown in FIG. 10, the Bluetooth BLE-based positioning device includes a scanning module 81, an acquisition module 82, and a calculation module 83. The scanning module 81 is used to scan the BLE slave device. The obtaining module 82 is configured to acquire the location Si where the terminal device itself is located in at least two locations after the scanning module 81 scans to find the target BLE slave device, and acquire the distance Ri between the terminal device and the target BLE slave device. The calculation module 83 is configured to calculate the position of the target BLE slave device according to the acquired Si and Ri.
其中,获取模块82至少包括:获取子模块821和第一计算子模块822。 获取子模块821用于通过加速度传感器获取终端设备相对于初始位置的移动方向和距离。第一计算子模块822用于根据移动方向和距离计算终端设备在其它位置的相对位置。The obtaining module 82 includes at least an obtaining submodule 821 and a first calculating submodule 822. The acquisition sub-module 821 is configured to acquire a moving direction and a distance of the terminal device relative to the initial position by using the acceleration sensor. The first calculation sub-module 822 is configured to calculate the relative position of the terminal device at other locations according to the moving direction and the distance.
另外,获取模块82还包括:接收子模块823、解析子模块824和第二计算子模块825。接收子模块823用于接收目标BLE从设备的信号。解析子模块824,用于从接收的信号中解析得到信号强度RSSI值。第二计算子模块825用于根据解析的RSSI值,计算终端设备与目标BLE从设备的距离Ri。In addition, the obtaining module 82 further includes: a receiving submodule 823, a parsing submodule 824, and a second computing submodule 825. The receiving submodule 823 is configured to receive a signal of the target BLE slave device. The parsing sub-module 824 is configured to parse the signal strength RSSI value from the received signal. The second calculation sub-module 825 is configured to calculate a distance Ri between the terminal device and the target BLE slave device according to the parsed RSSI value.
另外,第二计算子模块825包括:获取单元和第二计算单元。获取单元,用于获取RSSI值P(d)。第二计算单元,用于根据信号的传播模型公式P(d)=P(d0)-10a㏒(Ri/d0)计算Ri。其中,a为预设值,d0为终端设备与目标BLE从设备之间的预设距离,P(d0)为根据d0求得的已知数。In addition, the second calculation sub-module 825 includes: an acquisition unit and a second calculation unit. The obtaining unit is configured to obtain the RSSI value P(d). And a second calculating unit, configured to calculate Ri according to a propagation model formula P(d)=P(d0)-10alog(Ri/d0) of the signal. Where a is a preset value, d0 is a preset distance between the terminal device and the target BLE slave device, and P(d0) is a known number obtained according to d0.
另外,第一计算子模块822包括:设置单元8221和第一计算单元8222。设置单元8221用于在水平方向上,以Si为圆心Ri为半径列圆的方程公式。第一计算单元8222用于根据Si的坐标和Ri的值,计算每个圆的交点。目标BLE从设备位于每个圆均共有的交点所在的区域。In addition, the first calculation sub-module 822 includes: a setting unit 8221 and a first calculation unit 8222. The setting unit 8221 is used for an equation formula in which the center of the circle Ri is the radius of the circle in the horizontal direction. The first calculating unit 8222 is configured to calculate the intersection of each circle based on the coordinates of Si and the value of Ri. The target BLE slave device is located in the area where the intersections shared by each circle are located.
由于第三实施方式与本实施方式相互对应,因此本实施方式可与第三实施方式互相配合实施。第三实施方式中提到的相关技术细节在本实施方式中依然有效,在第三实施方式中所能达到的技术效果在本实施方式中也同样可以实现,为了减少重复,这里不再赘述。相应地,本实施方式中提到的相关技术细节也可应用在第三实施方式中。Since the third embodiment and the present embodiment correspond to each other, the present embodiment can be implemented in cooperation with the third embodiment. The technical details mentioned in the third embodiment are still effective in the present embodiment, and the technical effects that can be achieved in the third embodiment are also implemented in the present embodiment. To reduce the repetition, details are not described herein again. Accordingly, the related art details mentioned in the present embodiment can also be applied to the third embodiment.
通过上述内容,不难发现,本实施方式通过列圆的方程公式,计算目标BLE从设备所在的区域。从而,提供了一种计算目标BLE从设备位置的具体计算方式。并且,通过这种计算方式,使得获取目标BLE从设备的位置较为精确。 Through the above, it is not difficult to find that the present embodiment calculates the area where the target BLE slave device is located by the equation formula of the column circle. Thus, a specific calculation of the location of the target BLE slave device is provided. Moreover, by this calculation method, the position of the acquisition target BLE slave device is made more accurate.
本发明第九实施方式涉及一种基于蓝牙BLE的定位装置。第九实施方式是在第六、第七或第八实施方式的基础上做的改进,主要改进之处在于:在第九实施方式中,基于蓝牙BLE的定位装置还包括第一判断模块。A ninth embodiment of the present invention relates to a Bluetooth BLE based positioning apparatus. The ninth embodiment is an improvement based on the sixth, seventh or eighth embodiment, and the main improvement is that, in the ninth embodiment, the Bluetooth BLE-based positioning device further includes a first judging module.
如图11所示,基于蓝牙BLE的定位装置包括:扫描模块81、获取模块82以及计算模块83。扫描模块81用于扫描BLE从设备。获取模块82用于在扫描模块81扫描找到目标BLE从设备之后,依次在至少两个位置上,获取终端设备本身所处的位置Si,获取终端设备与目标BLE从设备之间的距离Ri。计算模块83用于根据获取到的Si、Ri,计算出目标BLE从设备的位置。As shown in FIG. 11, the Bluetooth BLE-based positioning device includes a scanning module 81, an acquisition module 82, and a calculation module 83. The scanning module 81 is used to scan the BLE slave device. The obtaining module 82 is configured to acquire the location Si where the terminal device itself is located in at least two locations after the scanning module 81 scans to find the target BLE slave device, and acquire the distance Ri between the terminal device and the target BLE slave device. The calculation module 83 is configured to calculate the position of the target BLE slave device according to the acquired Si and Ri.
另外,基于蓝牙BLE的定位装置还包括第一判断模块84。第一判断模块84用于判断目标BLE从设备的位置精度是否超出预设值。获取模块82还用于在目标BLE从设备的位置精度超出预设值时,将终端设备移动到新位置,重新获取终端设备本身所处的位置Si。获取终端设备与目标BLE从设备之间的距离Ri。其中,新位置为与之前计算目标BLE从设备的所有位置不同的位置。计算模块,还用于根据获取到的所有Si、Ri,重新计算出目标BLE从设备的位置。In addition, the Bluetooth BLE based positioning device further includes a first determining module 84. The first determining module 84 is configured to determine whether the positional accuracy of the target BLE slave device exceeds a preset value. The obtaining module 82 is further configured to move the terminal device to the new location when the positional accuracy of the target BLE slave device exceeds the preset value, and re-acquire the location Si where the terminal device itself is located. Obtain the distance Ri between the terminal device and the target BLE slave device. Among them, the new location is a location different from all the locations of the previous calculation target BLE slave device. The calculation module is further configured to recalculate the location of the target BLE slave device according to all acquired Si and Ri.
由于第四实施方式与本实施方式相互对应,因此本实施方式可与第四实施方式互相配合实施。第四实施方式中提到的相关技术细节在本实施方式中依然有效,在第四实施方式中所能达到的技术效果在本实施方式中也同样可以实现,为了减少重复,这里不再赘述。相应地,本实施方式中提到的相关技术细节也可应用在第四实施方式中。Since the fourth embodiment and the present embodiment correspond to each other, the present embodiment can be implemented in cooperation with the fourth embodiment. The related technical details mentioned in the fourth embodiment are still effective in the present embodiment, and the technical effects that can be achieved in the fourth embodiment are also implemented in the present embodiment. To reduce the repetition, details are not described herein again. Accordingly, the related art details mentioned in the present embodiment can also be applied to the fourth embodiment.
通过上述内容,不难发现,本实施方式可以使定位出的目标BLE从设备的位置更加精确。Through the above, it is not difficult to find that the present embodiment can make the position of the located target BLE more accurate from the device.
本发明第十实施方式涉及一种基于蓝牙BLE的定位装置。第十实施方 式与第九实施方式大致相同,主要改进之处在于:在第九实施方式中,基于蓝牙BLE的定位装置还包括第一判断模块。而在第十实施方式中,基于蓝牙BLE的定位装置还包括第二判断模块和显示模块。A tenth embodiment of the present invention relates to a Bluetooth BLE based positioning apparatus. Tenth implementer The formula is substantially the same as the ninth embodiment, and the main improvement is that in the ninth embodiment, the Bluetooth BLE-based positioning apparatus further includes a first judging module. In the tenth embodiment, the Bluetooth BLE-based positioning device further includes a second determining module and a display module.
如图12所示,基于蓝牙BLE的定位装置包括:扫描模块81、获取模块82以及计算模块83。扫描模块81用于扫描BLE从设备。获取模块82用于在扫描模块81扫描找到目标BLE从设备之后,依次在至少两个位置上,获取终端设备本身所处的位置Si,获取终端设备与目标BLE从设备之间的距离Ri。计算模块83用于根据获取到的Si、Ri,计算出目标BLE从设备的位置。As shown in FIG. 12, the Bluetooth BLE-based positioning device includes a scanning module 81, an acquisition module 82, and a calculation module 83. The scanning module 81 is used to scan the BLE slave device. The obtaining module 82 is configured to acquire the location Si where the terminal device itself is located in at least two locations after the scanning module 81 scans to find the target BLE slave device, and acquire the distance Ri between the terminal device and the target BLE slave device. The calculation module 83 is configured to calculate the position of the target BLE slave device according to the acquired Si and Ri.
另外,基于蓝牙BLE的定位装置还包括第二判断模块85和显示模块86。第二判断模块85用于判断目标BLE从设备的位置精度是否超出预设值。显示模块86用于在目标BLE从设备的位置精度超出预设值时,显示用于询问用户是否继续寻找的提示信息。In addition, the Bluetooth BLE based positioning device further includes a second judging module 85 and a display module 86. The second determining module 85 is configured to determine whether the positional accuracy of the target BLE slave device exceeds a preset value. The display module 86 is configured to display prompt information for asking the user whether to continue searching when the positional accuracy of the target BLE slave device exceeds a preset value.
由于第五实施方式与本实施方式相互对应,因此本实施方式可与第五实施方式互相配合实施。第五实施方式中提到的相关技术细节在本实施方式中依然有效,在第五实施方式中所能达到的技术效果在本实施方式中也同样可以实现,为了减少重复,这里不再赘述。相应地,本实施方式中提到的相关技术细节也可应用在第五实施方式中。Since the fifth embodiment and the present embodiment correspond to each other, the present embodiment can be implemented in cooperation with the fifth embodiment. The related technical details mentioned in the fifth embodiment are still effective in the present embodiment, and the technical effects that can be achieved in the fifth embodiment can also be implemented in the present embodiment. To reduce the repetition, details are not described herein again. Accordingly, the related technical details mentioned in the present embodiment can also be applied to the fifth embodiment.
通过上述内容,不难发现,本实施方式可以使定位出的目标BLE从设备的位置更加精确。Through the above, it is not difficult to find that the present embodiment can make the position of the located target BLE more accurate from the device.
本领域技术人员可以理解实现上述实施例方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储 器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。Those skilled in the art can understand that all or part of the steps of implementing the above embodiments may be completed by a program instructing related hardware, and the program is stored in a storage medium, and includes a plurality of instructions for making a device (which may be a single chip microcomputer). The chip, etc. or processor executes all or part of the steps of the various embodiments of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), and a random access memory. A variety of media that can store program code, such as RAM (Random Access Memory), disk, or optical disk.
本领域的普通技术人员可以理解,上述各实施方式是实现本发明的具体实施例,而在实际应用中,可以在形式上和细节上对其作各种改变,而不偏离本发明的精神和范围。 A person skilled in the art can understand that the above embodiments are specific embodiments for implementing the present invention, and various changes can be made in the form and details without departing from the spirit and scope of the present invention. range.

Claims (16)

  1. 一种基于蓝牙BLE的定位方法,其特征在于,应用于终端设备;A Bluetooth BLE-based positioning method, which is characterized in that it is applied to a terminal device;
    所述基于蓝牙BLE的定位方法包括:The Bluetooth BLE-based positioning method includes:
    扫描BLE从设备;Scan the BLE slave device;
    在扫描到目标BLE从设备之后,依次在终端设备位于至少两个位置处,获取所述终端设备当前所处的位置Si,以及所述终端设备与所述目标BLE从设备之间的距离Ri;After scanning to the target BLE slave device, in turn, the terminal device is located at at least two locations, acquiring the location Si where the terminal device is currently located, and the distance Ri between the terminal device and the target BLE slave device;
    根据获取到的所述Si、Ri,计算出所述目标BLE从设备的位置。Calculating the location of the target BLE slave device according to the acquired Si, Ri.
  2. 根据权利要求1所述的基于蓝牙BLE的定位方法,其特征在于,所述终端设备的初始位置为坐标原点,所述终端设备的其它位置为相对于所述初始位置的相对位置;The Bluetooth BLE-based positioning method according to claim 1, wherein an initial position of the terminal device is a coordinate origin, and other positions of the terminal device are relative positions with respect to the initial position;
    所述目标BLE从设备的位置为相对于所述初始位置的相对位置。The position of the target BLE slave device is a relative position relative to the initial position.
  3. 根据权利要求2所述的基于蓝牙BLE的定位方法,其特征在于,在扫描到目标BLE从设备之后,所述基于蓝牙BLE的定位方法还包括:The Bluetooth BLE-based positioning method according to claim 2, wherein after the scanning to the target BLE slave device, the Bluetooth BLE-based positioning method further comprises:
    接收所述目标BLE从设备的信号;Receiving a signal of the target BLE slave device;
    从接收的所述信号中解析得到信号强度RSSI值;Extracting a signal strength RSSI value from the received signal;
    根据解析的所述RSSI值,调整所述终端设备所处的位置。Adjusting the location of the terminal device according to the parsed RSSI value.
  4. 根据权利要求2所述的基于蓝牙BLE的定位方法,其特征在于,通过以下方式获取所述终端设备在所述其它位置的相对位置;The Bluetooth BLE-based positioning method according to claim 2, wherein the relative position of the terminal device at the other location is obtained by:
    通过加速度传感器获取所述终端设备相对于所述初始位置的移动方向和距离;Acquiring, by the acceleration sensor, a moving direction and a distance of the terminal device relative to the initial position;
    根据所述移动方向和距离计算所述终端设备相对于所述初始位置的相 对位置。Calculating a phase of the terminal device relative to the initial position according to the moving direction and distance For the location.
  5. 根据权利要求4所述的基于蓝牙BLE的定位方法,其特征在于,所述根据获取到的所述Si、Ri,计算出所述目标BLE从设备的位置,具体包括:采用加权质心算法,根据Si的坐标和Ri的值计算终端设备各个位置的几何质心,所述目标BLE从设备位于所述几何质心所在的区域;The Bluetooth BLE-based positioning method according to claim 4, wherein the calculating the location of the target BLE slave device according to the acquired Si, Ri includes: using a weighted centroid algorithm, according to Calculating the geometric centroid of each position of the terminal device by the coordinates of Si and the value of Ri, the target BLE slave device being located in the region where the geometric centroid is located;
    或者,所述根据获取到的所述Si、Ri,计算出所述目标BLE从设备的位置,具体包括:在水平方向上,以Si为圆心,且以Ri为半径列圆的方程公式,根据所述Si的坐标和Ri的值,计算每个圆的交点,所述目标BLE从设备位于所述每个圆均共有的交点所在的区域。Alternatively, the calculating the position of the target BLE slave device according to the obtained Si, Ri includes: an equation formula in which the center of Si is in the horizontal direction and the radius is a circle with Ri as a radius, according to The coordinates of the Si and the value of Ri calculate the intersection of each circle, and the target BLE slave device is located in the region where the intersections common to each of the circles are located.
  6. 根据权利要求1所述的基于蓝牙BLE的定位方法,其特征在于,所述计算出所述目标BLE从设备的位置之后,所述基于蓝牙BLE的定位方法还包括:The Bluetooth BLE-based positioning method according to claim 1, wherein after the calculating the location of the target BLE slave device, the Bluetooth BLE-based positioning method further includes:
    判断所述目标BLE从设备的位置精度是否超出预设值;Determining whether the positional accuracy of the target BLE slave device exceeds a preset value;
    在所述目标BLE从设备的位置精度超出预设值时,将所述终端设备移动到新位置,重新获取所述终端设备当前所处的位置Si,以及重新获取所述终端设备与所述目标BLE从设备之间的距离Ri;其中,所述新位置与所述至少两个位置均不同;When the location accuracy of the target BLE slave device exceeds a preset value, move the terminal device to a new location, re-acquire the location Si where the terminal device is currently located, and re-acquire the terminal device and the target a distance Ri between the BLE slave devices; wherein the new location is different from the at least two locations;
    根据获取到的所有所述Si、Ri,重新计算出所述目标BLE从设备的位置。Recalculating the location of the target BLE slave device based on all the acquired Si, Ri.
  7. 根据权利要求1所述的基于蓝牙BLE的定位方法,其特征在于,所述计算出所述目标BLE从设备的位置之后,所述基于蓝牙BLE的定位方法还包括:The Bluetooth BLE-based positioning method according to claim 1, wherein after the calculating the location of the target BLE slave device, the Bluetooth BLE-based positioning method further includes:
    判断所述目标BLE从设备的位置精度是否超出预设值;Determining whether the positional accuracy of the target BLE slave device exceeds a preset value;
    在所述目标BLE从设备的位置精度超出预设值时,显示用于询问用户 是否继续寻找的提示信息。Displaying the user for inquiry when the positional accuracy of the target BLE slave device exceeds a preset value Whether to continue to look for tips.
  8. 根据权利要求1所述的基于蓝牙BLE的定位方法,其特征在于,获取所述终端设备与所述目标BLE从设备之间的距离Ri,具体包括:The Bluetooth BLE-based positioning method according to claim 1, wherein the obtaining a distance Ri between the terminal device and the target BLE slave device comprises:
    接收所述目标BLE从设备的信号;Receiving a signal of the target BLE slave device;
    从接收的所述信号中解析得到信号强度RSSI值;Extracting a signal strength RSSI value from the received signal;
    根据解析的所述RSSI值,计算所述终端设备与所述目标BLE从设备的距离Ri。Calculating a distance Ri between the terminal device and the target BLE slave device according to the parsed RSSI value.
  9. 一种基于蓝牙BLE的定位装置,其特征在于,应用于终端设备;A Bluetooth BLE-based positioning device, which is characterized in that it is applied to a terminal device;
    所述基于蓝牙BLE的定位装置包括:扫描模块、获取模块以及计算模块;The Bluetooth BLE-based positioning device includes: a scanning module, an obtaining module, and a computing module;
    所述扫描模块,用于扫描BLE从设备;The scanning module is configured to scan a BLE slave device;
    所述获取模块,用于在所述扫描模块扫描找到目标BLE从设备之后,依次在终端设备位于至少两个位置处,获取所述终端设备本身所处的位置Si,以及所述终端设备与所述目标BLE从设备之间的距离Ri;The acquiring module is configured to: after the scanning module scans to find the target BLE slave device, sequentially locate the terminal device at at least two locations, acquire the location Si where the terminal device itself is located, and the terminal device and the location Describe the distance Ri between the target BLE slave devices;
    所述计算模块,用于根据获取到的所述Si、Ri,计算出所述目标BLE从设备的位置。The calculating module is configured to calculate a location of the target BLE slave device according to the acquired Si, Ri.
  10. 根据权利要求9所述的基于蓝牙BLE的定位装置,其特征在于,所述终端设备的初始位置为坐标原点,所述终端设备的其它位置为相对于所述初始位置的相对位置;The Bluetooth BLE-based positioning device according to claim 9, wherein the initial position of the terminal device is a coordinate origin, and the other positions of the terminal device are relative positions with respect to the initial position;
    所述目标BLE从设备的位置为相对于所述初始位置的相对位置。The position of the target BLE slave device is a relative position relative to the initial position.
  11. 根据权利要求10所述的基于蓝牙BLE的定位装置,其特征在于,所述基于蓝牙BLE的定位装置还包括接收模块、解析模块和调整模块;The Bluetooth BLE-based positioning device according to claim 10, wherein the Bluetooth BLE-based positioning device further comprises a receiving module, a parsing module and an adjusting module;
    所述接收模块,用于接收所述目标BLE从设备的信号; The receiving module is configured to receive a signal of the target BLE slave device;
    所述解析模块,用于从接收的所述信号中解析得到信号强度RSSI值;The parsing module is configured to parse the signal strength RSSI value from the received signal;
    所述调整模块,用于根据解析的所述RSSI值,调整所述终端设备所处的位置。The adjusting module is configured to adjust a location where the terminal device is located according to the parsed RSSI value.
  12. 根据权利要求10所述的基于蓝牙BLE的定位装置,其特征在于,所述获取模块至少包括:获取子模块和第一计算子模块;The Bluetooth BLE-based locating device according to claim 10, wherein the obtaining module comprises at least: an obtaining sub-module and a first computing sub-module;
    所述获取子模块,用于通过加速度传感器获取所述终端设备相对于所述初始位置的移动方向和距离;The acquiring submodule is configured to acquire, by using an acceleration sensor, a moving direction and a distance of the terminal device relative to the initial position;
    所述第一计算子模块,用于根据所述移动方向和距离计算所述终端设备相对于所述初始位置的相对位置。The first calculating submodule is configured to calculate a relative position of the terminal device relative to the initial position according to the moving direction and a distance.
  13. 根据权利要求12所述的基于蓝牙BLE的定位装置,其特征在于,所述第一计算子模块,还用于采用加权质心算法,根据Si的坐标和Ri的值计算终端设备各个位置的几何质心,所述目标BLE从设备位于所述几何质心所在的区域;The Bluetooth BLE-based positioning device according to claim 12, wherein the first calculating sub-module is further configured to calculate a geometric centroid of each position of the terminal device according to the coordinates of the Si and the value of Ri using a weighted centroid algorithm. The target BLE slave device is located in an area where the geometric centroid is located;
    或者,所述第一计算子模块,用于在水平方向上,以Si为圆心,且以Ri为半径列圆的方程公式,并用于根据所述Si的坐标和Ri的值,计算每个圆的交点,所述目标BLE从设备位于每个圆均共有的交点所在的区域。Alternatively, the first calculation sub-module is used for formulating an equation in which the center of Si is in the horizontal direction and Ri is a radius, and is used to calculate each circle according to the coordinates of the Si and the value of Ri. The intersection point of the target BLE slave device is located in the area where the intersection of each circle is common.
  14. 根据权利要求9所述的基于蓝牙BLE的定位装置,其特征在于,所述基于蓝牙BLE的定位装置还包括第一判断模块;The Bluetooth BLE-based positioning device according to claim 9, wherein the Bluetooth BLE-based positioning device further comprises a first determining module;
    所述第一判断模块,用于判断所述目标BLE从设备的位置精度是否超出预设值;The first determining module is configured to determine whether a location accuracy of the target BLE slave device exceeds a preset value;
    所述获取模块,还用于在所述目标BLE从设备的位置精度超出预设值时,将所述终端设备移动到新位置,重新获取所述终端设备本身所处的位置Si,以及所述终端设备与所述目标BLE从设备之间的距离Ri;其中,所述新位置为与之前计算所述目标BLE从设备的所有位置不同的位置; The acquiring module is further configured to: when the location accuracy of the target BLE slave device exceeds a preset value, move the terminal device to a new location, re-acquire a location Si where the terminal device itself is located, and the a distance Ri between the terminal device and the target BLE slave device; wherein the new location is a location different from all locations where the target BLE slave device was previously calculated;
    所述计算模块,还用于根据获取到的所有所述Si、Ri,重新计算出所述目标BLE从设备的位置。The calculation module is further configured to recalculate the location of the target BLE slave device according to all the acquired Si, Ri.
  15. 根据权利要求9所述的基于蓝牙BLE的定位装置,其特征在于,所述基于蓝牙BLE的定位装置还包括第二判断模块和显示模块;The Bluetooth BLE-based positioning device according to claim 9, wherein the Bluetooth BLE-based positioning device further comprises a second determining module and a display module;
    所述第二判断模块,用于判断所述目标BLE从设备的位置精度是否超出预设值;The second determining module is configured to determine whether the location accuracy of the target BLE slave device exceeds a preset value;
    所述显示模块,用于在所述目标BLE从设备的位置精度超出预设值时,显示用于询问用户是否继续寻找的提示信息。The display module is configured to display prompt information for asking the user whether to continue searching when the positional accuracy of the target BLE slave device exceeds a preset value.
  16. 根据权利要求9所述的基于蓝牙BLE的定位装置,其特征在于,所述获取模块还包括:接收子模块、解析子模块和第二计算子模块;The Bluetooth BLE-based positioning device according to claim 9, wherein the obtaining module further comprises: a receiving sub-module, a parsing sub-module and a second computing sub-module;
    所述接收子模块,用于接收所述目标BLE从设备的信号;The receiving submodule is configured to receive a signal of the target BLE slave device;
    所述解析子模块,用于从接收的所述信号中解析得到信号强度RSSI值;The parsing submodule is configured to parse the signal strength RSSI value from the received signal;
    所述第二计算子模块,用于根据解析的所述RSSI值,计算所述终端设备与所述目标BLE从设备的距离Ri。 The second calculating submodule is configured to calculate a distance Ri between the terminal device and the target BLE slave device according to the parsed RSSI value.
PCT/CN2017/073192 2017-02-09 2017-02-09 Positioning method and apparatus based on bluetooth ble WO2018145289A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2017/073192 WO2018145289A1 (en) 2017-02-09 2017-02-09 Positioning method and apparatus based on bluetooth ble
CN201780000077.0A CN107079257A (en) 2017-02-09 2017-02-09 Localization method and device based on bluetooth BLE

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/073192 WO2018145289A1 (en) 2017-02-09 2017-02-09 Positioning method and apparatus based on bluetooth ble

Publications (1)

Publication Number Publication Date
WO2018145289A1 true WO2018145289A1 (en) 2018-08-16

Family

ID=59613512

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/073192 WO2018145289A1 (en) 2017-02-09 2017-02-09 Positioning method and apparatus based on bluetooth ble

Country Status (2)

Country Link
CN (1) CN107079257A (en)
WO (1) WO2018145289A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109782322A (en) * 2019-03-07 2019-05-21 辽宁北斗卫星位置信息服务有限公司 A kind of inspection terminal of patrolling railway
CN113490271A (en) * 2021-07-07 2021-10-08 苏州统创贸易有限公司 Positioning searching method based on Bluetooth and GPS linkage
CN114268901A (en) * 2021-12-24 2022-04-01 国网福建省电力有限公司 Method and terminal for improving indoor positioning accuracy

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109996220A (en) * 2017-12-28 2019-07-09 深圳Tcl新技术有限公司 The method, apparatus and storage medium of mobile terminal are found based on bluetooth
CN110018508A (en) * 2018-01-10 2019-07-16 西安中兴新软件有限责任公司 A kind of localization method and device
CN110045378B (en) * 2018-01-17 2022-06-21 中兴通讯股份有限公司 Method and device for searching terminal equipment and related equipment
CN108419206A (en) * 2018-02-28 2018-08-17 北京邮电大学 A kind of target homing system and method
CN109444814A (en) * 2018-09-20 2019-03-08 桂林电子科技大学 A kind of indoor orientation method based on bluetooth and RFID fusion positioning
CN111757245B (en) * 2019-06-26 2022-07-08 广东小天才科技有限公司 Positioning method of wearable device and service device
CN110470300B (en) * 2019-08-08 2024-01-26 厦门大学嘉庚学院 Indoor positioning method and system for Bluetooth5.0 beacon
WO2021120110A1 (en) * 2019-12-19 2021-06-24 深圳市汇顶科技股份有限公司 Positioning method and apparatus, and positioning system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020055362A1 (en) * 2000-11-07 2002-05-09 Nec Corporation Positioning method using mobile terminal and mobile terminal having positioning function
CN103018715A (en) * 2012-11-22 2013-04-03 无锡中星微电子有限公司 Positioning method and device based on Bluetooth
CN103957594A (en) * 2014-04-30 2014-07-30 深圳市金立通信设备有限公司 Method and device for positioning terminal
CN106330843A (en) * 2015-07-02 2017-01-11 株式会社理光 System and method for region limited access

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102497666B (en) * 2011-12-13 2014-07-02 中国测绘科学研究院 Positioning method
CN105303790A (en) * 2015-08-07 2016-02-03 北京自在科技有限责任公司 Tap-to-pair type Bluetooth loss-prevention device and tap-to-pair method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020055362A1 (en) * 2000-11-07 2002-05-09 Nec Corporation Positioning method using mobile terminal and mobile terminal having positioning function
CN103018715A (en) * 2012-11-22 2013-04-03 无锡中星微电子有限公司 Positioning method and device based on Bluetooth
CN103957594A (en) * 2014-04-30 2014-07-30 深圳市金立通信设备有限公司 Method and device for positioning terminal
CN106330843A (en) * 2015-07-02 2017-01-11 株式会社理光 System and method for region limited access

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109782322A (en) * 2019-03-07 2019-05-21 辽宁北斗卫星位置信息服务有限公司 A kind of inspection terminal of patrolling railway
CN113490271A (en) * 2021-07-07 2021-10-08 苏州统创贸易有限公司 Positioning searching method based on Bluetooth and GPS linkage
CN113490271B (en) * 2021-07-07 2024-03-26 苏州统创信息科技有限公司 Positioning searching method based on Bluetooth and GPS linkage
CN114268901A (en) * 2021-12-24 2022-04-01 国网福建省电力有限公司 Method and terminal for improving indoor positioning accuracy
CN114268901B (en) * 2021-12-24 2024-01-26 国网福建省电力有限公司 Method and terminal for improving indoor positioning accuracy

Also Published As

Publication number Publication date
CN107079257A (en) 2017-08-18

Similar Documents

Publication Publication Date Title
WO2018145289A1 (en) Positioning method and apparatus based on bluetooth ble
WO2018205112A1 (en) Positioning method and apparatus based on bluetooth (ble)
US7783302B2 (en) Apparatus and method for determining a current position of a mobile device
CN106662453B (en) For being carried out according to sensor and radio-frequency measurement based on the mobile method and apparatus positioned in real time
US9832615B2 (en) Mobile device sensor and radio frequency reporting techniques
US9686649B2 (en) Determination of device location in crowded indoor environments
US20160183057A1 (en) Method and system for hybrid location detection
US20090262673A1 (en) Automated mode change for wireless devices during inactivity
EP3092830B2 (en) Feedback in a positioning system
WO2018145290A1 (en) Terminal device, ble slave device, and searching method and system based on ble
JP6059607B2 (en) Wireless tag search method and apparatus
US20130172005A1 (en) Calculating wi-fi access point locations using wave of discovery
US20150181381A1 (en) Method and apparatus for time of flight fingerprint and geo-location
KR101297483B1 (en) A method for tracking position and a position tracking system
KR101814698B1 (en) Method for simultaneously setting coordinates of anchor and tag using wireless transmission / reception and communication system thereof
WO2018063533A1 (en) Positioning system configuration with round trip time
CN108450060A (en) Localization method, equipment based on WI-FI access points
WO2021252415A1 (en) Devices, systems and methods for detecting locations of wireless communication devices
CN112799014A (en) Ultra-wideband positioning system and method based on ellipsoid intersection, wireless terminal and server
US20090170526A1 (en) Determining position of a node and representing the position as a position probability space
CN107809797A (en) A kind of method and device positioned to terminal
EP3229534A1 (en) Position estimation
KR101849542B1 (en) System for location determination using fingerprinting and location determination method of the same
WO2022179526A1 (en) Positioning method, gateway, and positioning device
Khilari Fingerprinting Based Indoor Positioning System using RSSI Bluetooth

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17896215

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17896215

Country of ref document: EP

Kind code of ref document: A1