A positioning method, system, medium, and device
By classifying Bluetooth beacon information and matching motion paths, the movement direction and positioning area of the receiving device are calculated, solving the problems of Bluetooth indoor positioning accuracy and cost, and realizing a high-precision, low-cost positioning method.
Patent Information
- Application Number
- CN202310691719.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-12
- Publication Date
- 2025-12-30
- Estimated Expiration
- 2043-06-12
AI Technical Summary
Existing Bluetooth indoor positioning methods suffer from low accuracy and high cost. Especially in complex indoor environments, triangulation methods are inaccurate, and fingerprint-based positioning methods have high initial data collection costs and are difficult to maintain, and cannot adapt to environmental changes.
By acquiring Bluetooth beacon information received by the receiving device, the beacon is divided into those approaching and those moving away from it. The segmentation plane and direction of motion are calculated. By combining the beacon's receptive area with the motion path, candidate positioning areas are determined. The target positioning coordinates are calculated using the positioning coordinates and velocity from the previous moment, reducing the reliance on the fingerprint database.
It improves positioning accuracy, reduces calculation errors and implementation costs, enhances the practicality of positioning methods, and avoids the construction and maintenance of complex databases.
Smart Images

Figure CN116736222B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of positioning and navigation technology, and in particular to a positioning method, system, medium, and device. Background Technology
[0002] Existing positioning methods mainly include two types: RSSI-based triangulation algorithms and signal fingerprint-based methods.
[0003] Among them, triangulation is the most typical method of positioning using RSSI values.
[0004] RSSI (Received Signal Strength Indicator) refers to the strength of the received signal. The closer the receiving device is to the signal source, the higher the received signal strength; the farther the receiving device is from the signal source, the lower the received signal strength. This establishes a correlation between RSSI values and the distance between devices.
[0005] Bluetooth beacons are devices that periodically broadcast their own unique codes via Bluetooth, providing reference location information for Bluetooth signal receiving devices. By receiving signals from multiple Bluetooth beacons (typically the top three with the highest signal strength), the Bluetooth signal receiving device can estimate the distances from the location node to these three beacon nodes. Using the known beacon coordinates and the distances to the three beacon nodes, the coordinates of the location node can be calculated, thus enabling the location calculation of unknown nodes. A schematic diagram illustrating the triangulation principle is attached. Figure 1 As shown.
[0006] However, triangulation has significant drawbacks in practical indoor positioning applications. Indoor environments are complex, and the 2.4GHz Bluetooth high-frequency signal is subject to considerable interference. Furthermore, various reflections and refractions indoors lead to severe multipath propagation, making the relationship between RSSI values and node distances impossible to accurately express mathematically. In the same indoor environment, the same RSSI value can correspond to vastly different node distances. Similarly, even when the distance between a beacon node and a receiving node is the same, the RSSI will differ. This results in low accuracy and limited practicality for methods that calculate distances and unknown node locations using RSSI values.
[0007] Bluetooth indoor positioning systems based on fingerprint technology determine the actual location of Bluetooth devices by comparing the measured data of the Bluetooth multipath signals with the location fingerprint database. Its implementation generally involves two phases: an offline phase and an online positioning phase.
[0008] (1) The offline stage is also known as the data acquisition stage. The main task of this stage is to collect the Bluetooth signal strength of each location in the required positioning area to form a location fingerprint database. Each fingerprint information corresponds to a specific location.
[0009] The offline database establishment requires data collection devices to collect data within the location area. After the data collection is completed, the data is stored in the collection devices, and the database is established.
[0010] Anchor nodes (beacons) are typically placed at known coordinate points. The acquisition device collects signals at several specified coordinate points for a certain period of time and processes the signals to establish a fingerprint database that corresponds the coordinates to the location of the Bluetooth signal.
[0011] (2) The online positioning phase includes signal strength acquisition, data processing, zone determination, distance estimation, and location calculation. When the system is in the online positioning phase, the location of the terminal device is determined by using the information obtained in the offline phase and the signal strength of each test point collected online.
[0012] However, fingerprint-based positioning methods incur significant manpower and time costs in acquiring fingerprint data upfront, and the database is difficult to maintain. While some teams have proposed methods based on data mining (K-nearest neighbors) and neural networks to reduce the workload of fingerprint data entry and improve algorithms for location estimation, these improvements still cannot adequately address changes in environment, population movement, and vehicle parking. Furthermore, adding new base stations or making other modifications indoors may render the original fingerprint data unusable.
[0013] Therefore, how to balance positioning accuracy and cost has become the core issue of Bluetooth positioning. Summary of the Invention
[0014] Based on this, and in response to the above problems, the present invention proposes a positioning method, system, medium, and device.
[0015] In a first aspect, the present invention discloses a positioning method, the method comprising:
[0016] Acquire beacon information received by the receiving device from several Bluetooth beacons at several times;
[0017] Based on the beacon information of each Bluetooth beacon at each time, the Bluetooth beacons are divided into nearby beacons and distant beacons;
[0018] In the spatial coordinate system, the dividing planes near and far from the beacon are calculated, and the direction perpendicular to the dividing plane and pointing from the far beacon to the near beacon is taken as the motion direction of the receiving device;
[0019] The positioning coordinates of the receiving device at the previous moment are obtained, and the movement path of the receiving device is determined based on the positioning coordinates of the receiving device at the previous moment and the direction of movement.
[0020] Based on the beacon information of each Bluetooth beacon at the current moment, the receptive area of each Bluetooth beacon at the current moment is determined, and the receptive area is matched with the motion path to obtain the candidate positioning area of the receiving device at the current moment;
[0021] Based on the positioning coordinates of the receiving device at the previous moment and the speed of the receiving device, the target positioning coordinates of the receiving device at the current moment are determined in the candidate positioning area.
[0022] Furthermore, the beacon information includes at least: beacon number and signal strength;
[0023] Based on the beacon information of each Bluetooth beacon at each time point, the Bluetooth beacons are divided into nearby beacons and distant beacons, including:
[0024] Based on the beacon number of each Bluetooth beacon and the signal strength at each time, determine the times when the signal strength of each Bluetooth beacon does not overlap, and filter out the beacon information of each Bluetooth beacon at the times when the signal strength does not overlap.
[0025] Based on the beacon information of each Bluetooth beacon at a time when their signal strengths do not overlap, the Bluetooth beacons are divided into nearby beacons and distant beacons.
[0026] Furthermore, based on the beacon information at moments when the signal strengths of each Bluetooth beacon do not overlap, the Bluetooth beacons are divided into nearby beacons and distant beacons, including:
[0027] The signal strengths of each Bluetooth beacon at times when their signal strengths do not overlap are sorted in chronological order. Bluetooth beacons with weakening signal strength are classified as distant beacons, and Bluetooth beacons with strengthening signal strength are classified as nearby beacons.
[0028] Furthermore, the step of calculating the dividing planes near and far from the beacon in a spatial coordinate system, and taking the direction perpendicular to the dividing planes and pointing from the far-from-the-beacon to the near-the-beacon as the motion direction of the receiving device, includes:
[0029] In a spatial coordinate system, using a support vector machine, the position coordinates of the near and far beacons are taken as input, and the segmentation planes of the near and far beacons are calculated and output. The direction of the support vector perpendicular to the segmentation plane and pointing from the far beacon to the near beacon is taken as the motion direction of the receiving device.
[0030] Furthermore, the step of determining the receptive area of each Bluetooth beacon at the current moment based on the beacon information of each Bluetooth beacon at the current moment, and matching the receptive area with the motion path to obtain the candidate positioning area of the receiving device at the current moment, includes:
[0031] Based on the signal strength of each Bluetooth beacon at the current moment, determine the receptive area of each Bluetooth beacon at the current moment;
[0032] The receptive area of each Bluetooth beacon at the current moment is intersected with the motion path to obtain the initial positioning area of the receiving device corresponding to each Bluetooth beacon;
[0033] The candidate positioning area of the receiving device at the current moment is obtained by intersecting the initial positioning areas of all Bluetooth beacons corresponding to the receiving devices.
[0034] Furthermore, determining the target positioning coordinates of the receiving device at the current moment within the candidate positioning region based on the positioning coordinates of the receiving device at the previous moment and the movement speed of the receiving device includes:
[0035] Determine whether the candidate location region is an empty set;
[0036] If the candidate location region is a non-empty set.
[0037] Based on the speed of the receiving device and the time difference between the current moment and the previous moment, the displacement of the receiving device is calculated, and the position coordinates along the direction of motion and the distance from the positioning coordinates of the receiving device at the previous moment are determined as the target positioning coordinates of the receiving device at the current moment.
[0038] If the candidate location region is an empty set.
[0039] The Bluetooth beacon with the strongest signal strength at the current moment is selected as a candidate beacon. The receptive area of the candidate beacon is determined, and it is judged whether the maximum threshold of the receptive area of the candidate beacon is less than a preset positioning error.
[0040] If the coordinates are less than the target coordinates of the candidate beacon, then the coordinates of the candidate beacon will be used as the target positioning coordinates of the receiving device at the current moment.
[0041] If it is not less than, then based on the movement speed of the receiving device and the time difference between the current time and the previous time, the movement displacement of the receiving device is calculated, and the position coordinates along the movement direction and the distance from the positioning coordinates of the receiving device at the previous time are determined as the position coordinates of the movement displacement, which are the target positioning coordinates of the receiving device at the current time.
[0042] Furthermore, determining the target positioning coordinates of the receiving device at the current moment within the candidate positioning region based on the positioning coordinates of the receiving device at the previous moment and the movement speed of the receiving device includes:
[0043] Determine whether the candidate location region is an empty set;
[0044] If the candidate location region is a non-empty set.
[0045] Based on the speed of the receiving device and the time difference between the current moment and the previous moment, the displacement of the receiving device is calculated, and the position coordinates along the direction of motion and the distance from the positioning coordinates of the receiving device at the previous moment are determined as the target positioning coordinates of the receiving device at the current moment.
[0046] If the candidate location region is an empty set.
[0047] The motion path is gradually translated in a first or second direction perpendicular to the motion path at preset unit distance intervals. New candidate positioning regions for the current and previous moments are recalculated based on the translated motion path until both new candidate positioning regions for the current and previous moments are no longer empty sets, at which point the translation stops. Specifically, if the new candidate positioning region for the current or previous moment is an empty set during the translation of the motion path in the first or second direction, the translation of the motion path in the first or second direction is stopped.
[0048] After stopping the translation, determine whether both the current and previous candidate localization regions are non-empty sets.
[0049] If both the current and previous candidate positioning regions are non-empty sets, then the distance between the centroids of the current and previous candidate positioning regions is calculated. Based on the receiving device's speed and the time difference between the current and previous times, the displacement of the receiving device is calculated. Finally, it is determined whether the distance between the centroids is greater than the displacement.
[0050] If the difference is greater than the distance between the centers of gravity and the difference between the motion displacement, then half of the difference is taken as the back displacement. The position coordinates of the back displacement, which are the distances from the center of gravity coordinates of the candidate positioning area at the current moment in the opposite direction of the motion direction, are determined as the target positioning coordinates of the receiving device at the current moment.
[0051] If the value is not greater than the target value, then the centroid coordinates of the new candidate positioning area at the current moment are determined as the target positioning coordinates of the receiving device at the current moment.
[0052] If the new candidate localization regions at the current time and the previous time are not both non-empty sets, continue to determine whether the new candidate localization region at the current time is an empty set.
[0053] If the new candidate positioning area at the current moment is an empty set, then the Bluetooth beacon with the strongest signal strength at the current moment is selected as the candidate beacon. The receptive area of the candidate beacon is determined, and it is judged whether the maximum threshold of the receptive area of the candidate beacon is less than the preset positioning error.
[0054] If the coordinates are less than the target coordinates of the candidate beacon, then the coordinates of the candidate beacon will be used as the target positioning coordinates of the receiving device at the current moment.
[0055] If it is not less than, then the motion displacement of the receiving device is calculated based on the motion speed of the receiving device and the time difference between the current time and the previous time. The position coordinate of the motion displacement along the motion direction and the distance from the positioning coordinate of the receiving device at the previous time is determined as the target positioning coordinate of the receiving device at the current time.
[0056] If the new candidate positioning area at the current moment is a non-empty set, then the motion displacement of the receiving device is calculated based on the motion speed of the receiving device and the time difference between the current moment and the previous moment. The position coordinates along the motion direction and the distance from the positioning coordinates of the receiving device at the previous moment are determined as the position coordinates of the motion displacement, which are the target positioning coordinates of the receiving device at the current moment.
[0057] On the other hand, the present invention also discloses a positioning system, the system comprising:
[0058] The beacon information acquisition module is used to acquire beacon information received by the receiving device from several Bluetooth beacons at several times.
[0059] The beacon segmentation module is used to segment the Bluetooth beacons into nearby beacons and distant beacons based on the beacon information of each Bluetooth beacon at each time.
[0060] The segmentation plane and motion direction determination module is used to calculate the segmentation planes near the beacon and far from the beacon in a spatial coordinate system, and to take the direction perpendicular to the segmentation plane and pointing from the far-from the beacon to the near-from the beacon as the motion direction of the receiving device;
[0061] The motion path determination module is used to obtain the positioning coordinates of the receiving device at the previous moment, and determine the motion path of the receiving device based on the positioning coordinates of the receiving device at the previous moment and the motion direction.
[0062] The candidate positioning area determination module is used to determine the receptive area of each Bluetooth beacon at the current time based on the beacon information of each Bluetooth beacon at the current time, and match the receptive area with the motion path to obtain the candidate positioning area of the receiving device at the current time.
[0063] The target positioning coordinate determination module is used to determine the target positioning coordinates of the receiving device at the current moment in the candidate positioning area based on the positioning coordinates of the receiving device at the previous moment and the movement speed of the receiving device.
[0064] On the other hand, the present invention also discloses a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the steps of any of the above-described positioning methods.
[0065] On the other hand, the present invention also discloses a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to perform the steps of any of the above-described positioning methods.
[0066] The technical solution of this invention has the following beneficial effects:
[0067] The positioning method disclosed in this invention utilizes beacon information from multiple Bluetooth beacons at multiple times to classify the Bluetooth beacons, calculate the motion direction and path of the receiving device, and then determine the candidate positioning area of the receiving device by matching constraints between the receivable areas of multiple Bluetooth beacons and the motion paths. Finally, based on the positioning coordinates and motion speed of the previous moment, the target positioning coordinates of the receiving device at each moment are determined. By using multiple calculation constraints of graphics and data, the most accurate positioning coordinates are obtained, rather than simply fitting the relationship between signal strength and distance through mathematical formulas. This greatly reduces calculation errors and improves positioning accuracy. At the same time, it eliminates the need to collect fingerprint information to build a complex database, significantly reducing implementation costs and improving the practicality of the positioning method. Attached Figure Description
[0068] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0069] in:
[0070] Figure 1 This is a schematic diagram of the triangulation principle in existing technology;
[0071] Figure 2 Here is an overall flowchart of the localization method in one embodiment;
[0072] Figure 3 Here is a detailed flowchart of step S600 of the positioning method in one embodiment;
[0073] Figure 4 Here is a detailed flowchart of step S600 of the positioning method in another embodiment;
[0074] Figure 5 This is a structural block diagram of a positioning system in one embodiment;
[0075] Figure 6 This is a structural block diagram of a computer device in one embodiment.
[0076] Explanation of reference numerals in the attached diagram: Beacon information acquisition module 100, beacon segmentation module 200, segmentation plane and motion direction determination module 300, motion path determination module 400, candidate positioning area determination module 500, target positioning coordinate determination module 600. Detailed Implementation
[0077] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0078] In practical applications, due to the time interval of Bluetooth beacon transmission and the complexity of the environment, even if the receiving device remains stationary, the signal strength received from the Bluetooth beacon will vary. Furthermore, due to the limitations of the receiving device's processing power, it cannot successfully receive signals from all surrounding beacons every time. Additionally, each signal strength does not correspond to a fixed distance value but rather a range of distances. This means that simply using mathematical formulas to fit the relationship between signal strength and distance introduces significant calculation errors. Furthermore, estimating the distance between the receiving device and the beacon using the signal strengths of multiple beacons, and then calculating the position based on this distance, will generate even greater cumulative errors, severely impacting the accuracy of positioning and navigation.
[0079] Therefore, as Figure 2 As shown, in one embodiment, a positioning method is provided, which specifically includes the following steps:
[0080] S100: Obtain beacon information received by the receiving device from several Bluetooth beacons at several times.
[0081] In practice, beacon information from multiple Bluetooth beacons at multiple times can be recorded as follows:
[0082] (idt0_0,RSSIt0_0,t0), (idt0_1,RSSIt0_1,t0)...(idt0_n,RSSIt0_n,t0);
[0083] (idt1_0,RSSIt1_0,t1), (idt1_1,RSSIt1_1,t1)...(idt1_n,RSSIt1_n,t1); ...
[0085] (idtk_0,RSSItk_0,tk), (idtk_1,RSSItk_1,tk)...(idtk_n,RSSItk_n,tk)
[0086] Where t0 to tk represent the k+1 consecutive moments preceding the current moment t0, idt0_i represents the beacon number of Bluetooth beacon i, and RSSItj_i represents the signal strength of Bluetooth beacon i at moment tj. That is, the beacon information includes at least the beacon number and signal strength.
[0087] S200: Based on the beacon information of each Bluetooth beacon at each time, the Bluetooth beacons are divided into nearby beacons and distant beacons.
[0088] Specifically, step S200 includes:
[0089] Based on the beacon number of each Bluetooth beacon and the signal strength at each time, determine the times when the signal strength of each Bluetooth beacon does not overlap, and filter out the beacon information of each Bluetooth beacon at the times when the signal strength does not overlap.
[0090] The signal strengths of each Bluetooth beacon at times when their signal strengths do not overlap are sorted in chronological order. Bluetooth beacons with weakening signal strength are classified as distant beacons, and Bluetooth beacons with strengthening signal strength are classified as nearby beacons.
[0091] In the specific implementation process, assume that the signal strengths of two signals from a certain beacon are RSSI1 and RSSI2 respectively, where RSSI1 > RSSI2, and the corresponding receivable area distance ranges of the signal strengths are [d1min, d1max] and [d2min, d2max]. If d1max < d2min, it means that the possible receivable areas corresponding to the two signal strengths have no intersection, and it must be the signals received by the receiving device at two different positions. And when the received signal strength is RSSI1, the distance from the beacon is closer, indicating that the receiving device has moved. Then, such two signal strengths are considered to have "no intersection of signal strengths", and the "distance" is d2min - d1max. Otherwise, it is considered that the two signal strengths have an intersection, and the distance is 0.
[0092] Therefore, in this embodiment, according to the beacon numbers in the beacon information, the beacon information of each Bluetooth beacon can be screened out. Then, according to the signal strengths at each moment in the beacon information, in accordance with the above comparison method, the moments when the signal strengths of each Bluetooth beacon have no intersection can be determined. Furthermore, the beacon information of each Bluetooth beacon at the moments when the signal strengths have no intersection can be screened out, so as to screen out in advance the moments when the receiving device is in different positions, that is, the moments when the receiving device has moved. Then, the beacon information at these screened moments can be obtained, reducing the interference of useless noise in subsequent calculations and further improving the positioning accuracy.
[0093] Meanwhile, usually, the closer the receiving device is to the beacon, the greater the signal strength it receives, and the farther away from the beacon, the smaller the signal strength it receives. And within a period of time, if the signal strength received by the receiving device gradually weakens, it can be regarded that the receiving device is gradually moving away from the beacon, and vice versa.
[0094] Therefore, the signal strengths of each Bluetooth beacon at each moment can be sorted in the order from far to near in time. The Bluetooth beacons with weakened signal strengths are classified as moving away from the beacon, and the Bluetooth beacons with enhanced signal strengths are classified as approaching the beacon.
[0095] For a certain Bluetooth beacon, if its signal strength first becomes stronger and then weaker, or first becomes weaker and then stronger, it is possible that the receiving device is interfered. It can be selected to discard the beacon information of this beacon that is far from the current moment, and then classify this beacon into approaching the beacon and moving away from the beacon.
[0096] S300. In the space coordinate system, calculate the segmentation plane of the approaching beacon and the moving - away beacon, and take the direction perpendicular to the segmentation plane and pointing from the moving - away beacon to the approaching beacon as the movement direction of the receiving device.
[0097] Specifically, in one embodiment, in a spatial coordinate system, a support vector machine can be used to calculate and output the segmentation planes of the near and far beacons as input, using the position coordinates of the near and far beacons as input, and the direction of the support vector perpendicular to the segmentation plane and pointing from the far beacon to the near beacon as the motion direction of the receiving device.
[0098] During the movement of the receiving device, its direction of movement must be from away from a certain beacon to closer to a certain beacon. Therefore, the direction perpendicular to the segmentation plane and from away from the beacon to closer to the beacon can be taken as the direction of movement of the receiving device.
[0099] In addition, before performing the segmentation plane calculation, the positioning coordinates of the receiving device at the previous time t1 can also be included as remote sample points for calculation. This is because, for the current time, if the receiving device moves at any other time, it will inevitably be located far away from the current position. Therefore, it is not a problem to include it as a remote sample point for calculation. This can increase the number of remote sample points, thereby improving the accuracy of the segmentation plane calculation and the accuracy of subsequent positioning.
[0100] S400: Obtain the positioning coordinates of the receiving device at the previous moment, and determine the movement path of the receiving device based on the positioning coordinates of the receiving device at the previous moment and the direction of movement.
[0101] In practice, the receiving device's location at the previous moment is usually also on its movement path. Therefore, the movement path of the receiving device can be determined by combining the positioning coordinates of the receiving device at the previous moment with the direction of movement.
[0102] S500: Based on the beacon information of each Bluetooth beacon at the current moment, determine the receptive area of each Bluetooth beacon at the current moment, and match the receptive area with the motion path to obtain the candidate positioning area of the receiving device at the current moment.
[0103] Specifically, step S500 includes:
[0104] Based on the signal strength of each Bluetooth beacon at the current moment, determine the receptive area of each Bluetooth beacon at the current moment;
[0105] The receptive area of each Bluetooth beacon at the current moment is intersected with the motion path to obtain the initial positioning area of the receiving device corresponding to each Bluetooth beacon;
[0106] The candidate positioning area of the receiving device at the current moment is obtained by intersecting the initial positioning areas of all Bluetooth beacons corresponding to the receiving devices.
[0107] In practice, if the receiving device can receive beacon information from the Bluetooth beacon, it means that the receiving device is within the receptive area of the Bluetooth beacon. At the same time, the receiving device is moving along its own movement path. Therefore, by intersecting the receptive area of the Bluetooth beacon with the movement path of the receiving device, the possible movement area of the receiving device can be narrowed down, and the possible location of the receiving device at the current moment can be obtained, which is the candidate positioning area.
[0108] S600. Based on the positioning coordinates of the receiving device at the previous moment and the movement speed of the receiving device, determine the target positioning coordinates of the receiving device at the current moment in the candidate positioning area.
[0109] Furthermore, in one embodiment, such as Figure 3 As shown, step S600 specifically includes:
[0110] S610. Determine whether the candidate positioning region is an empty set. If the candidate positioning region is a non-empty set, execute step S611. If the candidate positioning region is an empty set, execute step S612.
[0111] S611. Based on the movement speed of the receiving device and the time difference between the current moment and the previous moment, calculate the movement displacement of the receiving device, and determine the position coordinates along the movement direction and the distance from the positioning coordinates of the receiving device at the previous moment as the movement displacement as the target positioning coordinates of the receiving device at the current moment.
[0112] S612. Select the Bluetooth beacon with the strongest signal strength at the current moment as a candidate beacon, determine the receptive area of the candidate beacon, and continue to execute step S613.
[0113] S613. Determine whether the maximum threshold of the receivable area of the candidate beacon is less than the preset positioning error. If it is less, proceed to step S614. If it is not less, return to step S611.
[0114] S614. The coordinates of the candidate beacon are used as the target positioning coordinates of the receiving device at the current moment.
[0115] In a real indoor environment, the actual correspondence between signal strength and distance (between the beacon and the receiving device) is as follows:
[0116] For a specific signal strength S, the corresponding distance is a range [dSmin, dSmax]. That is, when the signal strength is S, the minimum distance between the beacon and the receiving device is dSmin, and the maximum distance is dSmax. The larger S is, the smaller the range [dSmin, dSmax] is, and the smaller the values of dSmin and dSmax are. When S is large enough, we can consider the receiving device and the beacon to be in the same location.
[0117] For an acceptable positioning error D, there exists a distance range [dSmin, dSmax], where dSmax = D, and the corresponding signal strength is S. When the signal strength is greater than S, the distance from the beacon point is no greater than dSmax, and the beacon position can be taken as the location of the receiving device, with a positioning error no greater than D.
[0118] In the specific implementation process, when the candidate positioning area is an empty set, since the candidate positioning area is obtained by the intersection of the receptive area of the Bluetooth beacon and the movement path of the receiving device, and the movement path of the receiving device cannot be an empty set, the only possibility is that the receptive area of the Bluetooth beacon is an empty set. When the receptive area of the Bluetooth beacon is an empty set, it means that at the current moment, the receiving device is very likely to be in the same position as a certain Bluetooth beacon, and the signal strength it receives is strong enough.
[0119] Therefore, when the candidate positioning area is an empty set, the Bluetooth beacon with the strongest signal strength at the current moment can be selected as the candidate beacon, and the receptive area [dSmin, dSmax] of the candidate beacon can be determined. The maximum threshold dSmax of the receptive area is compared with the preset receptive positioning error D. When it is less than the positioning error D, it means that it is within the allowable error range, and the coordinate position of the candidate beacon can be used as the target positioning coordinate of the receiving device at the current moment.
[0120] When the candidate positioning area is a non-empty set, that is, the receptive area of each Bluetooth beacon is a non-empty set, it means that the receiving device will not be in the same position as a certain Bluetooth beacon. It can only be in its own movement path. Therefore, the target positioning coordinates of the receiving device at the current moment can be determined directly in the candidate positioning area by combining the positioning coordinates of the previous moment with the movement displacement of the receiving device from the previous moment to the current moment. The movement displacement of the receiving device from the previous moment to the current moment (t0-t1)*speed can be calculated by multiplying the movement speed of the receiving device by the time difference (t0-t1) between the current moment and the previous moment.
[0121] Furthermore, in another embodiment, such as Figure 4 As shown, step S600 specifically includes:
[0122] S620. Determine whether the candidate positioning region is an empty set. If the candidate positioning region is a non-empty set, execute step S621. If the candidate positioning region is an empty set, execute step S622.
[0123] S621. Based on the movement speed of the receiving device and the time difference between the current moment and the previous moment, calculate the movement displacement of the receiving device, and determine the position coordinates along the movement direction and the distance from the positioning coordinates of the receiving device at the previous moment as the movement displacement as the target positioning coordinates of the receiving device at the current moment.
[0124] S622. With a preset unit distance as the interval, the motion path is gradually translated in a first direction or a second direction perpendicular to the motion path, and the new candidate positioning area at the current time and the previous time is recalculated based on the translated motion path until the new candidate positioning area at the current time and the previous time are not empty sets, and the translation is stopped. In the process of translating the motion path in the first direction or the second direction, if the new candidate positioning area at the current time or the previous time is an empty set, the translation of the motion path in the first direction or the second direction is stopped, and step S623 is continued.
[0125] S623. Determine whether the new candidate positioning regions at the current time and the previous time are both non-empty sets after the translation stops. If the new candidate positioning regions at the current time and the previous time are both non-empty sets, proceed to step S624. If the new candidate positioning regions at the current time and the previous time are not both non-empty sets, proceed to step S628.
[0126] S624. Calculate the distance between the center of gravity of the new candidate positioning area at the current moment and the center of gravity of the new candidate positioning area at the previous moment, and calculate the displacement of the receiving device based on the speed of the receiving device and the time difference between the current moment and the previous moment, and continue to execute step S625.
[0127] S625. Determine whether the distance between the centers of gravity is greater than the displacement. If it is greater, proceed to step S626; if it is not greater, proceed to step S627.
[0128] S626. Take half of the difference between the distance between the centers of gravity and the movement displacement as the back displacement, and determine the position coordinates of the back displacement as the distance from the center of gravity coordinates of the new candidate positioning area at the current moment in the opposite direction of the movement direction as the target positioning coordinates of the receiving device at the current moment.
[0129] S627. Determine the centroid coordinates of the new candidate positioning area at the current moment as the target positioning coordinates of the receiving device at the current moment;
[0130] S628. Determine whether the new candidate location region at the current time is an empty set. If the new candidate location region at the current time is an empty set, proceed to step S629. If the new candidate location region at the current time is not an empty set, return to step S621.
[0131] S629. Select the Bluetooth beacon with the strongest signal strength at the current moment as a candidate beacon, determine the receptive area of the candidate beacon, and continue to execute step S630.
[0132] S630. Determine whether the maximum threshold of the receivable area of the candidate beacon is less than the preset positioning error. If it is less, execute step S631. If it is not less, return to execute step S621.
[0133] S631. The coordinates of the candidate beacon are used as the target positioning coordinates of the receiving device at the current moment.
[0134] In specific implementation, when the candidate positioning area is an empty set, it may be due to the receiving device and the Bluetooth beacon being in the same position, resulting in an empty receptive area. It may also be due to an error in the motion path determined by the positioning coordinates of the receiving device at the previous moment. Therefore, in order to further reduce errors, optimize the position of the motion path, and ensure the accuracy of the motion path, in this embodiment, when the candidate positioning area is an empty set, the previously determined motion path can be translated in the first or second direction. Based on the translated motion path, the new candidate positioning areas at the current moment and the previous moment are recalculated. The order in which the motion path is translated in the first or second direction is not limited. The new candidate positioning areas at the current moment and the previous moment are then re-determined to see if they are both non-empty sets. If they are both non-empty sets, it means that the moved motion path and the receptive area of the Bluetooth beacon intersect at both the current moment and the previous moment. Therefore, the position of the motion path is relatively accurate, which is beneficial for determining the subsequent positioning coordinates.
[0135] When both the current and previous candidate positioning regions are non-empty sets, the distance Dheart between the centroids of the two candidate positioning regions can be compared with the motion displacement (t0-t1)*speed. If Dheart > (t0-t1)*speed, 1 / 2*[Dheart-(t0-t1)*speed] can be used as the backoff displacement. In the current candidate positioning region, the position coordinates along the opposite direction of the motion direction, at a distance of 1 / 2*[Dheart-(t0-t1)*speed] from the centroid coordinates of the current candidate positioning region, are determined as the target positioning coordinates of the receiving device at the current moment.
[0136] However, if the new candidate positioning areas at the current time and the previous time are not both non-empty sets, and the new candidate positioning area at the current time is still an empty set, then it is still possible for the receiving device and the Bluetooth beacon to be in the same location. Therefore, the same processing can be performed as in the above embodiment where the candidate positioning area is an empty set.
[0137] It is understandable that the positioning method described above, which determines the positioning coordinates of the next moment based on the positioning coordinates of the previous moment, can be a continuously iterative process. The initial positioning coordinates of the first moment can be a preset position or a position determined by existing technical methods. Then, based on this position, steps S100 to S600 are used to calculate the target positioning coordinates of the second moment. These target positioning coordinates can then be used as the positioning coordinates of the previous moment to determine the target positioning coordinates of the third moment, and so on.
[0138] The positioning method described in the above embodiments utilizes beacon information from multiple Bluetooth beacons at multiple times to classify the Bluetooth beacons, calculate the motion direction and path of the receiving device, and then determine the candidate positioning area of the receiving device by matching constraints between the receivable areas of multiple Bluetooth beacons and the motion path. Finally, based on the positioning coordinates and motion speed of the previous moment, the target positioning coordinates of the receiving device at each moment are determined. By using multiple calculation constraints of graphics and data, the most accurate positioning coordinates are obtained, rather than simply fitting the relationship between signal strength and distance through mathematical formulas. This greatly reduces calculation errors and improves positioning accuracy. At the same time, it eliminates the need to collect fingerprint information to build a complex database, greatly reducing implementation costs and improving the practicality of the positioning method.
[0139] On the other hand, such as Figure 5 As shown, in one embodiment, a positioning system is also provided, the system comprising:
[0140] The beacon information acquisition module 100 is used to acquire beacon information received by the receiving device from several Bluetooth beacons at several times.
[0141] The beacon segmentation module 200 is used to segment the Bluetooth beacons into nearby beacons and distant beacons based on the beacon information of each Bluetooth beacon at each time.
[0142] The motion direction determination module 300 is used to calculate the dividing planes near the beacon and far from the beacon in a spatial coordinate system, and to take the direction perpendicular to the dividing plane and pointing from the far-from the beacon to the near-from the beacon as the motion direction of the receiving device;
[0143] The motion path determination module 400 is used to obtain the positioning coordinates of the receiving device at the previous moment, and determine the motion path of the receiving device based on the positioning coordinates of the receiving device at the previous moment and the motion direction.
[0144] The candidate positioning area determination module 500 is used to determine the receptive area of each Bluetooth beacon at the current time based on the beacon information of each Bluetooth beacon at the current time, and match the receptive area with the motion path to obtain the candidate positioning area of the receiving device at the current time.
[0145] The target positioning coordinate determination module 600 is used to determine the target positioning coordinates of the receiving device at the current moment in the candidate positioning area based on the positioning coordinates of the receiving device at the previous moment and the movement speed of the receiving device.
[0146] It should be noted that other corresponding descriptions of the various functional modules involved in the positioning system provided in this embodiment can be found in the corresponding descriptions of the methods in the above embodiments, and will not be repeated here.
[0147] On the other hand, in one embodiment, a computer device is also provided, including a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of the positioning method described in any of the above embodiments.
[0148] On the other hand, in one embodiment, a computer-readable storage medium is also provided, storing a computer program that, when executed by a processor, causes the processor to perform the steps of the positioning method described in any of the above embodiments.
[0149] Figure 6 An internal structural diagram of a computer device in one embodiment is shown. This computer device can specifically be a terminal or a server. Figure 6 As shown, the computer device includes a processor, a memory, and a network interface connected via a system bus. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and may also store a computer program. When executed by the processor, this computer program causes the processor to perform the steps of the positioning method described in any of the above embodiments. The internal memory may also store a computer program, which, when executed by the processor, causes the processor to perform the steps of the positioning method described in any of the above embodiments. Those skilled in the art will understand that... Figure 6 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0150] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments described above. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.
[0151] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0152] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A positioning method, characterized by, The method comprises: Obtaining beacon information of several Bluetooth beacons at several time points received by a receiving device; dividing the Bluetooth beacons into close beacons and far beacons according to the beacon information of each Bluetooth beacon at each time point; In a spatial coordinate system, calculating a partition plane of the close beacons and the far beacons, and taking a direction perpendicular to the partition plane and pointing from the far beacons to the close beacons as a motion direction of the receiving device; Obtaining a positioning coordinate of the receiving device at a previous time point, and determining a motion path of the receiving device according to the positioning coordinate of the receiving device at the previous time point and the motion direction; Determining a receivable area of each Bluetooth beacon at a current time point according to the beacon information of each Bluetooth beacon at the current time point, and matching the receivable area with the motion path to obtain a candidate positioning area of the receiving device at the current time point; Determining a target positioning coordinate of the receiving device at the current time point in the candidate positioning area according to the positioning coordinate of the receiving device at the previous time point and a motion speed of the receiving device, comprising: Judging whether the candidate positioning area is an empty set; If the candidate positioning area is a non-empty set, performing a first operation; the first operation is: calculating a motion displacement of the receiving device according to the motion speed of the receiving device and a time difference between the current time point and the previous time point, and determining a position coordinate with a distance of the motion displacement from the positioning coordinate of the receiving device at the previous time point along the motion direction as the target positioning coordinate of the receiving device at the current time point; If the candidate positioning area is an empty set, performing a first strategy or a second strategy; The first strategy is: taking a Bluetooth beacon with the maximum signal strength at the current time point as a candidate beacon, determining a receivable area of the candidate beacon, and judging whether a maximum threshold of the receivable area of the candidate beacon is less than a preset positioning error; if yes, taking a coordinate of the candidate beacon as the target positioning coordinate of the receiving device at the current time point; if no, performing the first operation. The second strategy is: taking a preset unit distance as a distance, gradually translating the motion path to a first direction or a second direction perpendicular to the motion path, and recalculating new candidate positioning areas of the current time and the last time based on the translated motion path until the new candidate positioning areas of the current time and the last time are both empty sets, and stopping the translation, wherein, during the translation of the motion path to the first direction or the second direction, if the new candidate positioning area of the current time or the last time is an empty set, the translation of the motion path to the first direction or the second direction is stopped; after stopping the translation, it is judged whether the new candidate positioning areas of the current time and the last time are both non-empty sets, and a first judgment result is obtained; if the first judgment result is yes, the distance between the new candidate positioning area of the current time and the new candidate positioning area of the last time is calculated, and the motion displacement of the receiving device is calculated according to the motion speed of the receiving device and the time difference between the current time and the last time, and it is further judged whether the distance between the centers of gravity is greater than the motion displacement, and a second judgment result is obtained; if the second judgment result is yes, the distance between the centers of gravity and half of the difference between the motion displacement are taken as a rollback displacement, and a position coordinate with a distance of the rollback displacement from the center of gravity coordinate of the candidate positioning area of the current time in the opposite direction of the motion direction is determined as the target positioning coordinate of the receiving device at the current time; if the second judgment result is no, the center of gravity coordinate of the new candidate positioning area of the current time is determined as the target positioning coordinate of the receiving device at the current time; if the first judgment result is no, it is further judged whether the new candidate positioning area of the current time is an empty set, if the new candidate positioning area of the current time is an empty set, the first strategy is executed; if the new candidate positioning area of the current time is a non-empty set, the first operation is executed.
2. The positioning method according to claim 1, characterized in that, The beacon information at least includes: beacon number, signal strength; The beacon information at each time of each Bluetooth beacon is obtained, and the Bluetooth beacon is divided into a close beacon and a far beacon according to the beacon information at each time of each Bluetooth beacon. The signal strength of each Bluetooth beacon at each time when the signal strength of each Bluetooth beacon has no intersection is determined, and the beacon information of each Bluetooth beacon at the time when the signal strength has no intersection is screened out. The Bluetooth beacon is divided into a close beacon and a far beacon according to the beacon information of each Bluetooth beacon at the time when the signal strength has no intersection.
3. The positioning method according to claim 2, characterized in that, The signal strength of each Bluetooth beacon at each time when the signal strength of each Bluetooth beacon has no intersection is sorted in time sequence, and the Bluetooth beacon with weakened signal strength is divided into a far beacon, and the Bluetooth beacon with enhanced signal strength is divided into a close beacon. The dividing plane of the close beacon and the far beacon is calculated under the spatial coordinate system, and the direction of the vector perpendicular to the dividing plane and pointing from the far beacon to the close beacon is taken as the motion direction of the receiving device.
4. The positioning method of claim 1, wherein, In a spatial coordinate system, the positions of the beacon-approaching and beacon-avoiding Bluetooth beacons are taken as inputs, and the support vector machine is used to calculate the dividing plane of the beacon-approaching and beacon-avoiding Bluetooth beacons, and the direction of the support vector perpendicular to the dividing plane and pointing from the beacon-avoiding Bluetooth beacon to the beacon-approaching Bluetooth beacon is taken as the motion direction of the receiving device.
5. The positioning method of claim 2, wherein, The method for determining the candidate positioning area of the receiving device at the current time point according to the beacon information of each Bluetooth beacon at the current time point and matching the receiving area with the motion path comprises the following steps: The method for determining the candidate positioning area of the receiving device at the current time point according to the beacon information of each Bluetooth beacon at the current time point and matching the receiving area with the motion path comprises the following steps: The method for determining the candidate positioning area of the receiving device at the current time point according to the beacon information of each Bluetooth beacon at the current time point and matching the receiving area with the motion path comprises the following steps: The method for determining the candidate positioning area of the receiving device at the current time point according to the beacon information of each Bluetooth beacon at the current time point and matching the receiving area with the motion path comprises the following steps.
6. A positioning system characterized by, The positioning system applied to the positioning method in any one of claims 1 to 5 comprises: a beacon information acquisition module configured to acquire beacon information of Bluetooth beacons received by a receiving device at a plurality of time points; a beacon division module configured to divide the Bluetooth beacons into beacon-approaching and beacon-avoiding Bluetooth beacons according to the beacon information of each Bluetooth beacon at each time point; a dividing plane and motion direction determination module configured to calculate the dividing plane of the beacon-approaching and beacon-avoiding Bluetooth beacons in a spatial coordinate system, and take the direction perpendicular to the dividing plane and pointing from the beacon-avoiding Bluetooth beacon to the beacon-approaching Bluetooth beacon as the motion direction of the receiving device; a motion path determination module configured to acquire the positioning coordinates of the receiving device at a previous time point, and determine the motion path of the receiving device according to the positioning coordinates of the receiving device at the previous time point and the motion direction; a candidate positioning area determination module configured to determine the receiving area of each Bluetooth beacon at the current time point according to the beacon information of each Bluetooth beacon at the current time point, and match the receiving area with the motion path to obtain the candidate positioning area of the receiving device at the current time point; a target positioning coordinate determination module configured to determine the target positioning coordinates of the receiving device at the current time point in the candidate positioning area according to the positioning coordinates of the receiving device at the previous time point and the motion speed of the receiving device.
7. A computer-readable storage medium storing a computer program, characterized in that, The computer program is executed by the processor to make the processor execute the steps of the method in any one of claims 1 to 5. 8.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is configured to perform the method according to any one of claims 1-7. The computer program is executed by the processor to make the processor execute the steps of the method in any one of claims 1 to 5.
Citation Information
Patent Citations
Electronic equipment, relative position relation detection method and device, and storage medium
CN113777621A
Method and system for locating objects within a master space using machine learning on RF radiolocation
US20230129589A1