A bluetooth indoor positioning method based on virtual fingerprints and region segmentation
Patent Information
- Application Number
- CN202611299832.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-26
- Publication Date
- 2026-09-25
AI Technical Summary
其一,该方案在对数距离路径损耗模型中采用固定的经验参数进行插值,未根据不同子区域在建筑结构、遮挡条件及信号传播特性上的差异,对影响信号衰减的关键环境因子进行优化求解,也未建立针对插值误差的评估与反馈修正机制,导致在信号非均匀区域生成的虚拟指纹与实际信号分布偏离较大,难以在降低现场采样工作量的同时充分保证虚拟指纹精度
1.传统方案多依赖经验常数或大量人工采样。本方案利用遗传算法对对数距离路径损耗模型中的环境因子(如:路径损耗指数和墙体衰减因子)进行数据驱动的反向迭代优化。这一机制使生成的虚拟指纹能够高度贴合特定建筑结构与遮挡条件下的真实信号空间分布,在仅需极少量现场采样点的条件下,即可生成高精度全区域虚拟指纹库,有效降低了部署勘测成本。
Smart Images

Figure CN122825218A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of positioning and wireless signal processing, and in particular to a Bluetooth indoor positioning method based on virtual fingerprints and region segmentation. Background Technology
[0002] With the rapid growth in demand for indoor location services, fingerprint positioning methods based on Bluetooth signal strength indication have gained widespread attention due to their moderate hardware cost and flexible deployment. These methods typically involve two stages: offline fingerprint database construction and online location matching. The accuracy of the fingerprint database and the online matching strategy directly affect the final positioning performance.
[0003] Chinese patent CN114710742B discloses an indoor positioning method based on multi-chain interpolation to construct a fingerprint map. In the offline stage, this method generates a complete fingerprint map from a small number of field sampling points using a multi-chain interpolation algorithm, and optimizes the interpolation weights using a logarithmic distance path loss model to reduce the manpower required for fingerprint database construction. In the online stage, the target area is divided into several sub-regions. Based on the real-time signal strength data collected by the terminal to be positioned, its corresponding sub-region is first determined, and then neighboring reference points are searched within each sub-region. Location estimation is completed using a weighted centroid method or nearest neighbor matching. This method reduces the workload of field sampling to a certain extent and narrows the search range for online matching through sub-region division.
[0004] However, the above-mentioned existing technical solutions still have the following technical problems: First, the scheme uses fixed empirical parameters for interpolation in the logarithmic distance path loss model. It does not optimize the solution for key environmental factors affecting signal attenuation based on the differences in building structure, obstruction conditions and signal propagation characteristics in different sub-regions. It also does not establish an evaluation and feedback correction mechanism for interpolation errors. As a result, the virtual fingerprint generated in the non-uniform signal region deviates significantly from the actual signal distribution, making it difficult to fully guarantee the accuracy of the virtual fingerprint while reducing the workload of on-site sampling.
[0005] Secondly, the online matching of this scheme relies solely on sub-region division and single nearest neighbor matching or weighted centroid calculation, without introducing a two-level cooperative positioning link from coarse positioning to fine correction. When the sub-region range expands or the fingerprint density increases, the matching search space remains large, and the computational efficiency decreases. Furthermore, the single matching method cannot simultaneously achieve both fast response and high-precision position calculation, resulting in a clear contradiction between real-time performance and positioning accuracy.
[0006] Third, the solution relies entirely on pre-deployed physical Bluetooth beacons, which are prone to signal coverage blind spots in areas where beacons are sparse or severely obstructed. Furthermore, it does not utilize mobile terminal collaboration or other radio frequency signals for dynamic coverage compensation, resulting in insufficient system positioning continuity and environmental adaptability. Simply increasing the density of physical beacons to compensate for this would lead to a significant increase in deployment costs. Summary of the Invention
[0007] This invention aims to at least solve one of the technical problems existing in related technologies. To this end, this invention provides a Bluetooth indoor positioning method based on virtual fingerprinting and region segmentation.
[0008] A Bluetooth indoor positioning method based on virtual fingerprint and region segmentation includes the following steps: Obtain the measured fingerprint dataset from the on-site sampling points; Based on the measured fingerprint dataset, the path loss exponent and wall attenuation factor of the logarithmic distance path loss model are optimized. Using the optimized path loss index and wall attenuation factor, the received signal strength at preset grid points is calculated to generate a virtual fingerprint, and a virtual reference point fingerprint database is constructed by combining the measured fingerprint dataset. The positioning space is divided into multiple sub-regions, and the representative fingerprints of each sub-region are determined using the virtual reference point fingerprint database. Using virtual fingerprint data within each sub-region of the virtual reference point fingerprint database, a feedforward neural network regression model corresponding to each sub-region is trained; Obtain the real-time received signal strength indication vector of the terminal to be located, and calculate its distance to each of the representative fingerprints to determine the target sub-region; In the virtual reference point fingerprint database, the virtual fingerprint data of the target sub-region is matched with the real-time received signal strength indication vector to obtain a preliminary physical coordinate estimate; Based on the preliminary physical coordinate estimation, the three closest virtual reference points are retrieved from the virtual reference points corresponding to the target sub-region, the received signal strength indication vectors of the three virtual reference points are extracted, and the extracted received signal strength indication vectors of the three virtual reference points are concatenated with the real-time received signal strength indication vector to form a feature vector; The feature vector is input into the feedforward neural network regression model corresponding to the target sub-region, and the final positioning coordinates are output.
[0009] Furthermore, the optimization of the path loss exponent and wall attenuation factor of the logarithmic distance path loss model based on the measured fingerprint dataset includes: The path loss index and the wall attenuation factor are solved iteratively as individuals. The error between the model-predicted received signal strength vector output by the logarithmic distance path loss model and the corresponding measured vector in the measured fingerprint dataset is calculated, and the fitness is calculated with the goal of minimizing the error. After the genetic algorithm converges, the path loss index and the wall attenuation factor with the highest fitness are extracted and output. The formula for calculating fitness is as follows: In the formula, For the fitness of the genetic algorithm; This refers to the number of on-site sampling points; The sampling point number; For the first One sampling point; For the model in The predicted RSSI vector at the location; This corresponds to the measured RSSI vector; This represents the L2 norm.
[0010] Further, the step of calculating the received signal strength at preset grid points using the optimized path loss exponent and wall attenuation factor to generate a virtual fingerprint includes: For each virtual reference point on the preset grid, obtain its distance from the preset beacon and the number of walls it passes through; Substitute the distance, the number of walls penetrated, the path loss exponent, and the wall attenuation factor into the logarithmic distance path loss model to calculate the corresponding received signal strength indication vector as the virtual fingerprint. The expression of the logarithmic distance path loss model for: In the formula, Distance Predicted received signal strength at the location, For reference distance Reference received signal strength at the location, in dBm; This is the path loss index, with values ranging from 1.5 to 3.0; The value represents the average attenuation of a single wall surface, expressed in dB; the value ranges from 3.0 to 10.0 dB. This represents the number of walls that can be penetrated.
[0011] Further, the step of dividing the positioning space into multiple sub-regions and using the virtual reference point fingerprint database to determine the representative fingerprints of each sub-region includes: For each sub-region, select the virtual reference point closest to the geometric center of that sub-region from the virtual reference point fingerprint database; Extract the received signal strength indication vector of the selected virtual reference point and output it as the representative fingerprint of the sub-region.
[0012] Further, the step of training a feedforward neural network regression model corresponding to each of the sub-regions using virtual fingerprint data in the virtual reference point fingerprint database includes: For each virtual reference point in the sub-region, a first feature is extracted, where the first feature is the received signal strength indication vector of the virtual reference point itself. Select the three nearest neighbor virtual reference points centered on the coordinates of the virtual reference point, and extract the second feature, which is the received signal strength indication vector corresponding to the three nearest neighbor virtual reference points; The first feature and the second feature are concatenated into a training input vector, and the two-dimensional coordinates of the virtual reference point are used as the training label vector to perform model training and output the feedforward neural network regression model.
[0013] Furthermore, before obtaining the real-time received signal strength indication vector of the terminal to be located, the method further includes: The offline hash index value corresponding to each virtual reference point in the virtual reference point fingerprint database is calculated using a preset location-sensitive hash function. The step of matching the real-time received signal strength indication vector with the virtual fingerprint data of the target sub-region to obtain a preliminary physical coordinate estimate includes: The location-sensitive hash function is used to map the real-time received signal strength indication vector to the target hash index value; Among the virtual reference points within the target sub-region, virtual reference points whose offline hash index values are the same as the target hash index values are extracted to form a candidate subset; Nearest neighbor matching is performed within the candidate subset to calculate the preliminary physical coordinate estimate.
[0014] Furthermore, after outputting the final positioning coordinates, a multi-source fusion positioning step is also included, specifically including: Acquire signal strength characteristic data of mobile analog beacons collected by a pre-deployed gateway; the signal strength characteristic data includes the mean, variance, and kurtosis of the received signal strength indication; Acquire the accelerometer and gyroscope data of the moving analog beacon; Based on the signal strength characteristic data, the accelerometer data, and the gyroscope data, the mean position and variance of the moving simulated beacon are calculated. By combining the received signal strength data of the mobile analog beacon received by the terminal to be located, as well as the mean position and the variance position, a dynamic position constraint corresponding to the mobile analog beacon is generated. Based on the dynamic position constraint, the final positioning coordinates are fused and corrected to obtain the updated positioning coordinates.
[0015] Further, the step of calculating the mean position and variance of the moving analog beacon based on the signal strength characteristic data, the accelerometer data, and the gyroscope data includes: The signal strength feature data is concatenated with the accelerometer data and gyroscope data, and then input into a pre-trained fully connected neural network model; Obtain the position mean and position variance output by the fully connected neural network model.
[0016] Furthermore, it also includes: Obtain channel status information data of the wireless local area network access point collected by the terminal to be located; Extract the time-domain and frequency-domain features of multipath reflection from the channel state information data; The time-domain features and the frequency-domain features are input into a pre-trained convolutional neural network model to obtain passive localization coordinates.
[0017] Furthermore, after obtaining the passive positioning coordinates, the method further includes: The final positioning coordinates and the passive positioning coordinates are used as two-dimensional coordinate observation values; the distance information determined according to the dynamic position constraints is used as the distance observation value. The extended Kalman filter algorithm is used to perform state fusion on the two-dimensional coordinate observations and the distance observations to obtain the fused two-dimensional position of the terminal. When using the extended Kalman filter algorithm for state fusion The variance of the observations corresponding to the final positioning coordinates in the two-dimensional coordinate observations is obtained by training the variance of the residuals using the feedforward neural network regression model. The observation variance of the passive positioning coordinates in the two-dimensional coordinate observations is the prediction variance of the test set of the convolutional neural network model. The observation variance corresponding to the distance observation value is determined by the location variance and the corresponding interval width of the signal strength-distance lookup table.
[0018] The above-described one or more technical solutions in the embodiments of the present invention have at least one of the following technical effects: 1. Traditional solutions often rely on empirical constants or extensive manual sampling. This solution utilizes a genetic algorithm to perform data-driven reverse iterative optimization of environmental factors (such as the path loss exponent and wall attenuation factor) in the logarithmic distance path loss model. This mechanism enables the generated virtual fingerprint to closely match the real signal spatial distribution under specific building structures and occlusion conditions. A high-precision, full-area virtual fingerprint database can be generated with only a very small number of on-site sampling points, effectively reducing deployment and surveying costs.
[0019] 2. This scheme overcomes the contradiction between search space and accuracy inherent in single matching algorithms. In the online phase, it first performs a "sub-region coarse screening" by calculating the representative fingerprint distance of the region. Then, it utilizes position-sensitive hashing to further converge the search range to an extremely small candidate subset. Finally, it feeds the preliminary physical coordinates and real-time signal features into a single hidden-layer feedforward neural network for fine-tuning. This cascaded mechanism has extremely low computational overhead, successfully controlling the system latency of meter-level high-precision calculation to an extremely low millisecond level (approximately 12ms under the test conditions of the example), significantly improving matching efficiency.
[0020] 3. To address the blind zone problem caused by Bluetooth signal attenuation through walls, the solution innovatively utilizes some mobile terminals within the area to temporarily simulate Bluetooth beacons, and uses a customized fully connected neural network to evaluate their location uncertainty in real time. Furthermore, it combines the multipath characteristics of existing passive wireless LAN signals with extended Kalman filtering for fusion positioning. This fusion mechanism eliminates the need for additional fixed hardware deployment costs, effectively enhancing signal coverage and the system's dynamic robustness in complex and non-uniform environments.
[0021] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0022] To more clearly illustrate the technical solutions in this 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 some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0023] Figure 1 This is a flowchart of the Bluetooth indoor positioning method based on virtual fingerprint and region segmentation in this invention; Figure 2 This is a comparison chart of the positioning errors of the genetic algorithm-optimized parameter scheme and the empirical parameter scheme in this embodiment of the invention; Figure 3 This is a comparison chart of the average positioning time for different matching strategies in the embodiments of the present invention. Detailed Implementation
[0024] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention. The following embodiments are used to illustrate this invention but cannot be used to limit the scope of this invention.
[0025] like Figure 1 The diagram illustrates the flowchart of the Bluetooth indoor positioning method based on virtual fingerprint and region segmentation in this invention.
[0026] Example 1: This embodiment mainly describes the virtual fingerprint positioning process optimized based on genetic algorithm.
[0027] Bluetooth beacons and gateways were deployed in an indoor station hall measuring 80 meters long and 40 meters wide. Five Bluetooth broadcast beacons, labeled A through E, were sparsely deployed on the ceiling, walls, and pillars of the hall, with a uniform transmission power of -12dBm and a broadcast interval of 200ms. Two Bluetooth gateways were deployed diagonally across the hall to collect Received Signal Strength Indication (RSSI) data from on-site sampling points.
[0028] The operation process during the offline phase is as follows.
[0029] Thirty on-site sampling points were selected in an irregular distribution within the hall, and the two-dimensional coordinates of each sampling point were precisely marked (with the southwest corner of the hall as the origin). At each sampling point, RSSI values from five beacons were collected via a Bluetooth gateway for 60 seconds, and the average value was calculated to obtain the RSSI vector for each sampling point. The coordinates of the 30 on-site sampling points and their corresponding RSSI vectors constitute the measured fingerprint dataset.
[0030] The logarithmic distance path loss model is used in conjunction with the measured fingerprint dataset to optimize environmental factors. After obtaining the optimized environmental factors, RSSI prediction is performed on preset grid points to generate virtual fingerprints. The expression for the logarithmic distance path loss model is as follows: for: (1) In the formula, Distance Predicted received signal strength at the location, For reference distance Reference received signal strength at the location, in dBm; This is the path loss index, with values ranging from 1.5 to 3.0; This represents the average attenuation of a single wall surface, expressed in dB; the value typically ranges from 3.0 to 10.0 dB. This represents the number of walls that can be penetrated.
[0031] and The result is obtained by a genetic algorithm with the objective of minimizing the error between the predicted RSSI vector and the measured RSSI vector at the sampling points; exist The calibration is performed at 1m, which is the average reference received signal strength of each beacon obtained through actual measurements. This value is treated as a constant and is not used in optimization. Determined based on the number of physical walls traversed by the connection between the virtual reference grid point and the Bluetooth beacon.
[0032] Freeze after genetic algorithm convergence and Recalibrate when the beacon is redeployed or when there are significant changes in the environmental structure.
[0033] The RSSI components are used to generate virtual reference points and are then used for subsequent sub-region partitioning and regression model training.
[0034] In this embodiment, the path loss index and wall attenuation factor As environmental factors, instead of using fixed empirical values, a genetic algorithm iteratively solves the problem with the goal of minimizing the model's prediction error. and Each group of values constitutes an individual, and the population size is set to 80; fitness Calculated according to formula (2); using roulette wheel selection, single-point crossover (crossover probability 0.7) and uniform mutation (mutation probability 0.08); the optimal fitness change is less than 10 over 20 consecutive generations. -4 The process may terminate when the total number of generations reaches 200. The final result is... =2.31、 =5.8dB.
[0035] (2) In the formula, For the fitness of the genetic algorithm; This refers to the number of on-site sampling points; The sampling point number; For the first One sampling point; For the model in The predicted RSSI vector at the location; This corresponds to the measured RSSI vector; This represents the L2 norm.
[0036] For each candidate and In all The predicted RSSI vector is calculated for each on-site sampling point and compared with the measured RSSI vector. The negative mean squared residual is taken as the result. .
[0037] Updated only during the genetic algorithm iteration; retained after convergence. The largest parameter group is frozen.
[0038] The genetic algorithm is used to select, crossover, and mutate individuals, and then sort them to determine the environmental factors to be used by the path loss model.
[0039] After optimization and Subsequently, the hall space was divided into prediction grids with a 1-meter grid spacing, and the coordinates of 500 virtual reference points were selected and retained within the reachable area. For each virtual reference point, based on its distance to the five beacons and the number of walls it passed through, the corresponding 5-dimensional RSSI vector was calculated using the logarithmic distance path loss model, generating a total of 500 virtual fingerprints. The 30 measured fingerprints were then merged with the 500 virtual fingerprints to form a virtual reference point fingerprint database covering the entire area.
[0040] After establishing a virtual reference point fingerprint database, the positioning space is divided into multiple sub-regions based on building layout and signal attenuation characteristics. In this embodiment, based on the wall distribution of the station hall and the statistical clustering results of measured signal attenuation, the space is divided into three sub-regions: waiting area, commercial area, and passageway area. Each sub-region contains several virtual reference points, and the RSSI vector of the virtual reference point closest to the geometric center within that sub-region is selected as the representative fingerprint of that sub-region.
[0041] After completing the sub-region division and determining the representative fingerprints, before proceeding with the step of obtaining the real-time received signal strength indication vector of the terminal to be located, it is necessary to establish a hash inverted index table in the offline stage to support fast retrieval in the online stage. Specifically, for the virtual reference point fingerprint database of each sub-region, a preset position-sensitive hash function (such as the position-sensitive hash function group based on random projection used in this embodiment) is used to calculate the offline hash index value of the received signal strength indication vector corresponding to each virtual reference point in the virtual reference point fingerprint database, and then associates and stores it with the corresponding virtual reference point.
[0042] After dividing the sub-regions, the hash index value corresponding to each virtual reference point in the virtual reference point fingerprint database of each sub-region is pre-calculated using a preset location-sensitive hash function, and a hash index table is established for fast online retrieval.
[0043] For each sub-region, a feedforward neural network regression model with a single hidden layer is trained using the virtual fingerprint data corresponding to that sub-region.
[0044] Training sample construction: For each virtual reference point, the RSSI vector of the virtual reference point is concatenated with the RSSI vectors of the three nearest neighbor virtual reference points selected with the coordinates of the virtual reference point as the center; each RSSI vector is 5-dimensional, so the concatenation results in a 20-dimensional training input, and the two-dimensional coordinates of the virtual reference point are used as the training label.
[0045] Extreme learning machine was selected, with 20 neurons in the hidden layer and a modified linear unit activation function; the output layer has 2 neurons, corresponding to two-dimensional coordinates. L2 regularization was used during training, with a regularization coefficient of 0.001, and the training objective was to minimize the mean squared error between the predicted coordinates and the training labels.
[0046] As an optional implementation, a multilayer perceptron regression model can also be used, with 20 hidden layer neurons, using the Adam optimizer, a learning rate of 0.001, a batch size of 32, and 500 iterations.
[0047] The online operation process is as follows: Once the mobile terminal to be located enters the hall, it scans and receives broadcasts from five Bluetooth beacons in real time to obtain the real-time RSSI vector.
[0048] Taking a certain moment as an example, the real-time RSSI vector collected is [-68, -72, -55, -60, -75] dBm.
[0049] Perform the first level of coarse positioning.
[0050] The Euclidean distance between the real-time RSSI vector and the representative fingerprints of the three sub-regions is calculated according to equation (3). Each representative fingerprint is composed of RSSI components corresponding to the current 5 beacons; the calculated distances are 9.3 for the waiting area, 7.8 for the commercial area, and 3.1 for the passage area. The passage area with the smallest distance is selected as the target sub-region.
[0051] (3) In the formula, For the real-time RSSI vector and the first Euclidean distance of representative fingerprints in each sub-region; The first real-time RSSI vector One component; For the first The first representative fingerprint of each sub-region One component; The beacon component number; The sub-region number; The number of Bluetooth beacons participating in the location.
[0052] Obtained by online scanning via mobile terminal, and updated in real time during online positioning. ; Provided by representative fingerprints from sub-regions of an offline virtual fingerprint database. Determined by the beacon configuration available for positioning on the current floor.
[0053] and This fingerprint database will be frozen under the current offline database configuration and updated when the fingerprint database is rebuilt or the beacon configuration is changed.
[0054] Select The smallest sub-region is taken as the target sub-region. Within the virtual fingerprint range of the target sub-region, a position-sensitive hash function is used for mapping to extract candidate subsets.
[0055] This embodiment uses a location-sensitive hash function group based on random projection, which contains 4 hash functions. Each hash function maps a 5-dimensional RSSI vector to a 1-bit hash code, generating a total of 4-bit index values.
[0056] Among the virtual reference points contained in the target sub-region, those virtual reference points that map to the same hash index value as the real-time RSSI vector are extracted to form the final candidate subset. Through the serial filtering mechanism of first defining the sub-region and then performing hash mapping, the search range for nearest neighbor matching is greatly reduced compared to the global reference points.
[0057] Nearest neighbor matching is performed within the candidate subset. Using Euclidean distance as a metric, the top 3 virtual reference points that are closest to the real-time RSSI vector are found, and the average of their coordinates is taken as the preliminary physical coordinate estimate. The result is (32.5, 18.7).
[0058] Second-level fine-grained position calculation.
[0059] The feedforward neural network regression model corresponding to the target sub-region is invoked, i.e., the trained feedforward neural network regression model corresponding to the channel region. Based on the preliminary physical coordinate estimate (32.5, 18.7) obtained from the first-level localization, the three virtual reference points closest in physical space distance are retrieved from the virtual fingerprint database of the target sub-region. The current real-time RSSI vector (5-dimensional) and the extracted RSSI vectors (15-dimensional) of these three reference points are concatenated to form a 20-dimensional feature as the input of the model. It should be noted that the initial position estimate (32.5, 18.7) is only used to determine the three virtual reference points closest in spatial Euclidean distance from the virtual reference point fingerprint database to obtain their RSSI vectors. The coordinate values of the initial position estimate are not directly used as the input feature components of the feedforward neural network regression model.
[0060] The model outputs finely corrected positioning coordinates, which are (33.1, 19.4). This output is the final positioning coordinate.
[0061] During the same online location session, the virtual fingerprint database, environmental factors, and regression model are kept frozen; when the Bluetooth beacon configuration or indoor partition structure changes, the virtual fingerprint database is resampled, rebuilt, and the regression model is retrained before replacing the offline model.
[0062] To verify the technical effect of this embodiment, under the same test environment, it was compared with that using fixed empirical parameters ( =2.0、 This study compares the traditional method of grid prediction with a value of 3.5dB. A total of 50 test points were set up on the test trajectory, and the actual coordinates were calibrated using a wheeled odometer as a reference.
[0063] Test results show that the average positioning error of this embodiment is 1.8 meters, and the 90th percentile error is 2.9 meters; the average positioning error of the traditional solution is 3.2 meters, and the 90th percentile error is 5.1 meters; the average positioning accuracy is improved by about 43.8%.
[0064] Example 2: Based on the final Bluetooth-based positioning coordinates obtained in Example 1, this example introduces multi-source fusion positioning to further optimize and improve positioning robustness in complex environments.
[0065] Based on the physical beacon deployment in Example 1, this example further utilizes the mobile terminal devices of some users in the area to temporarily simulate Bluetooth beacons to enhance signal coverage, and integrates existing wireless LAN access point signals for collaborative positioning.
[0066] In the offline phase, in addition to completing the virtual reference point fingerprint database generation, sub-region division, and feedforward neural network regression model training as described in Example 1, the following operations were also performed.
[0067] Firstly, training is conducted to address the uncertainty of beacon location on mobile terminals.
[0068] A mobile terminal broadcasts a simulated beacon signal at a transmission power of -8dBm from multiple fixed locations with known coordinates. Simultaneously, a Bluetooth gateway records the RSSI value of the simulated beacon, and the mobile terminal records accelerometer and gyroscope data. For each 500ms short-time window, three features (mean, variance, and kurtosis) of the RSSI are extracted, along with twelve features (mean and variance of the three-axis accelerometer and three-axis gyroscope data), forming a complete 15-dimensional input vector. This vector is then fed into a pre-trained fully connected neural network model.
[0069] Using the real 2D coordinates of a simulated beacon as location labels, a 3-layer fully connected neural network is trained. Each of the two hidden layers contains 64 neurons and employs modified linear units. The output layer contains 4 neurons, sequentially outputting the x-coordinate and y-coordinate of the mean location, as well as the variances of the x-coordinate and y-coordinate locations. During training, the loss is calculated using the Gaussian negative log-likelihood of the real coordinates relative to the predicted mean location, and the output variance is used as the location uncertainty.
[0070] Secondly, a passive positioning reference system is constructed.
[0071] Using the three existing wireless LAN access points in the hall, channel state information data was collected at each virtual reference point during the offline phase. Subcarrier amplitude and phase were extracted from each data packet, and converted to the time domain using inverse fast Fourier transform. The time domain features (arrival time and amplitude of the first five paths) and frequency domain features (amplitude variance of adjacent subcarriers) of multipath reflection were then extracted.
[0072] A convolutional neural network model is constructed, comprising two one-dimensional convolutional layers (kernel sizes of 5 and 3, and the number of kernels of 32 and 64, respectively) and two fully connected layers (with 128 and 2 neurons, respectively). This convolutional neural network model takes the aforementioned time-domain and frequency-domain features as input and outputs the two-dimensional coordinates of the location in a passive localization reference frame. Supervised training is performed using the coordinates of the virtual reference point as labels to obtain a passive localization regression model.
[0073] During the online phase, fixed beacons A to E maintain the same deployment, identification, and order as in Example 1. Simultaneously, mobile terminals acting as mobile analog beacons M1 and M2 within the area, while broadcasting analog beacon signals, collect their own accelerometer and gyroscope data in real time, extracting 12 features including the mean and variance of the three-axis accelerometer and gyroscope data, and reporting them to the positioning server in real time via the wireless network.
[0074] The mobile terminal to be located can receive broadcasts from fixed beacons A to E and two mobile simulated beacons M1 and M2 within the same scanning window. The original observations are saved as a 7-dimensional vector according to [fixed A, fixed B, fixed C, fixed D, fixed E, simulated M1, simulated M2].
[0075] The positioning program extracts the first five fixed components according to the beacon identifier to form a 5-dimensional fixed RSSI subvector; only this subvector is fed into the sub-region Euclidean distance calculation, location-sensitive hashing, nearest neighbor matching and 20-dimensional feedforward neural network input construction in Example 1, and the two simulated beacon components do not enter the above fingerprint matching and regression model.
[0076] For each simulated beacon, the dynamic position constraints of the mobile simulated beacon need to be obtained. Specifically, the location server obtains the signal strength feature data of the mobile simulated beacon collected in real time by a pre-deployed Bluetooth gateway (extracting three features: RSSI mean, variance, and kurtosis). This data is then combined with the simulated beacon's own synchronous three-axis accelerometer and three-axis gyroscope data (mean and variance, a total of 12 features) to form a complete 15-dimensional input to a pre-trained fully connected neural network model (i.e., the aforementioned 3-layer fully connected neural network). This fully connected neural network model outputs the position mean and position variance of the mobile simulated beacon. Then, based on a preset signal strength-distance lookup table, and combined with the received signal strength data of the mobile simulated beacon received by the terminal to be located, the position mean, and the position variance, a dynamic position constraint is generated with the position mean as the center and the corresponding RSSI distance interval as the radius.
[0077] If the location variance exceeds the threshold, the RSSI falls outside the lookup table range, or a complete fixed RSSI subvector is not received, the dynamic location constraint is discarded; if a complete fixed RSSI subvector is not received, the fixed fingerprint library and 20-dimensional regression model of Example 1 are not invoked.
[0078] Simultaneously, the mobile terminal collects channel state information from three wireless local area network access points, extracts the time and frequency domain features of multipath reflection, inputs them into the trained convolutional neural network model, and obtains coordinate estimates under the passive positioning reference system.
[0079] Upon obtaining the complete 5-dimensional fixed RSSI subvector, the first-level localization, location-sensitive hash mapping candidate subset, nearest neighbor matching, and target sub-region feedforward neural network regression of Example 1 are performed to obtain the Bluetooth positioning coordinates. The input to this feedforward neural network is still a 20-dimensional feature concatenated from a 5-dimensional fixed RSSI subvector and three 5-dimensional nearest neighbor fixed fingerprint vectors. The training weights and input dimensions do not need to be changed due to the presence of the simulated beacon.
[0080] The passive positioning reference coordinates, the Bluetooth positioning coordinates, and the dynamic position constraints that have passed the validity screening are fed into the extended Kalman filter fusion stage. The state is the terminal's two-dimensional position; the Bluetooth positioning coordinates and the passive positioning coordinates are used as two-dimensional coordinate observations, and the dynamic position constraints are used as distance observations based on the simulated beacon position mean and RSSI-distance interval.
[0081] The variance of Bluetooth positioning observations is taken from the statistical value of the training residuals of the feedforward neural network, while the variance of passive positioning observations is taken from the prediction variance of the test set of the convolutional neural network. The variance of dynamic position constraints is determined by the simulated beacon position variance and the corresponding interval width of the RSSI-distance lookup table. Dynamic position constraints only participate in this fusion update and are not written back to the 5-dimensional fixed RSSI sub-vector, virtual fingerprint database, or feedforward neural network; when they do not meet the validity conditions, only Bluetooth positioning coordinates and passive positioning coordinates are fused.
[0082] The fixed fingerprint localization link in this embodiment is applicable under the condition of the complete 5-dimensional sub-vectors of fixed beacons A to E. If the set is changed to reduce the number of fixed beacons, the fixed fingerprints corresponding to the new set must be re-collected, the representative fingerprints of the sub-regions and the hash index must be reconstructed, and the regression model must be retrained according to the new fixed dimensions; the original 5-dimensional fingerprint database or the original 20-dimensional regression model must not be directly called after supplementing the fixed beacon components with moving simulated beacons.
[0083] Example 3: Comparative Example – Verification of Model Parameter Optimization Effect and Two-Level Matching Efficiency This embodiment uses comparative experiments to verify the effectiveness of the genetic algorithm in optimizing environmental factors and the time efficiency of the two-level matching mechanism. The environment and experimental conditions of the comparative experiments are consistent with those of Embodiment 1.
[0084] Comparative Experiment 1 was used to verify the effectiveness of the genetic algorithm for optimizing environmental factors.
[0085] Under the same trajectory conditions of 30 on-site sampling points and 50 test points, two virtual reference point fingerprint databases were constructed for positioning tests.
[0086] Scheme A uses the genetic algorithm of this invention to optimize parameters, and the process is the same as in Example 1, ultimately obtaining the optimized result. =2.31、 =5.8dB, thereby generating 500 virtual reference points to form a fingerprint database.
[0087] Option B uses traditional empirical parameters, taking... =2.0、 =3.5dB, thereby generating 500 virtual reference points to form a fingerprint database.
[0088] Both schemes use the same online matching process: first-level sub-region localization, location-sensitive hash candidate selection, nearest neighbor initial estimation, and fine-tuning using a feedforward neural network regression model. The localization error statistics at 50 test points are as follows: Scheme A has an average error of 1.8 meters and a 90th percentile error of 2.9 meters; Scheme B has an average error of 2.9 meters and a 90th percentile error of 4.8 meters. Scheme A improves the average localization accuracy by 38.0% compared to Scheme B. The data shows that the genetic algorithm, through its global search mechanism of population evolution, obtains a better combination of environmental factors compared to manually set empirical values, making the virtual fingerprints predicted by the model closer to the real signal spatial distribution.
[0089] Table 1. Comparison of parameters and errors of different schemes
[0090] Both schemes used the same 30 field sampling points, 50 test points, and online matching process; the average error of the genetic algorithm-optimized parameter scheme was reduced by 38.0% compared to the empirical parameter scheme.
[0091] Comparative Experiment 2 was used to verify the time efficiency of the two-level matching mechanism.
[0092] Under the same virtual reference point fingerprint database (500 reference points), and for the same 50 real-time RSSI vector inputs, three matching strategies were compared. Strategy 1 is direct global nearest neighbor matching, which iterates through and calculates the Euclidean distance between the RSSI vector and all 500 reference point fingerprints, selecting the top 3 nearest neighbors for position estimation. Strategy 2 is sub-region matching only, which first determines the target sub-region through first-level sub-region similarity comparison, and then performs nearest neighbor matching only within that sub-region, without going through position-sensitive hash candidate filtering and neural network fine-tuning. Strategy 3 is the complete two-level matching of this invention: position-sensitive hash candidate filtering, nearest neighbor matching within the candidate subset to obtain initial position estimation, and fine-tuning using a feedforward neural network regression model for the target sub-region.
[0093] The test hardware environment consisted of an Intel Core i7-13700H processor, 16GB of RAM, and Python 3.10. The Bluetooth fingerprint positioning algorithm was executed and timed using a single main thread. The statistical results of the total time taken for a single positioning operation from RSSI vector input to output were as follows: Strategy 1: 85 milliseconds on average; Strategy 2: 18 milliseconds on average; Strategy 3: 12 milliseconds on average.
[0094] Regarding positioning accuracy, Strategy 2, by omitting the fine-tuning stage of the neural network, had an average error of 2.5 meters across the 50 points tested, while Strategy 3 had an average error of 1.8 meters. Strategy 3 of this invention reduces the time consumption by 85.9% compared to global matching and by approximately 33.3% compared to sub-region matching only; simultaneously, compared to sub-region matching only, it achieves an accuracy gain of 0.7 meters with an extremely low latency of 12ms.
[0095] Table 2 Comparison of time and positioning error for different matching strategies
[0096] The test used the same 500 virtual reference point fingerprint database and the same 50 real-time RSSI vector inputs, and was timed under the conditions of Intel Core i7-13700H processor, 16GB memory, Python 3.10 and a single main thread; "-" indicates that the independent average error value of global nearest neighbor matching was not given in the example.
[0097] Figure 2 The average error and 90th percentile error of the two environmental factor schemes were compared based on the test data of Example 3. Figure 3 The processing efficiency of global matching, sub-region matching only, and the complete two-level matching of the present invention is compared based on the average time consumption under the same test conditions.
[0098] Compared with the prior art, the present invention has the following beneficial effects: By using a genetic algorithm to perform data-driven reverse optimization of the environmental factors of the path loss model, the virtual fingerprint database can adapt to the real signal propagation characteristics of different regions. It can obtain location estimation with near-high-density measured fingerprint accuracy with only a small number of field sampling points, significantly reducing the cost of field surveys.
[0099] The dual screening mechanism, which combines coarse sub-region localization and hash indexing in the online phase, quickly narrows the search scope of fingerprint matching from the global to the candidate subset, and only activates the single hidden layer neural network of the corresponding sub-region for fine regression. The model has a simple structure and low forward computation overhead, which enables the system to control the online solution latency to the order of milliseconds with meter-level localization accuracy, effectively balancing localization accuracy and real-time performance.
[0100] By leveraging the fusion of terminal temporary simulated beacons and wireless LAN multipath features, signal coverage and positioning robustness can be enhanced without significantly increasing fixed hardware deployment, achieving high-precision real-time positioning at extremely low sampling cost.
[0101] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A Bluetooth indoor positioning method based on virtual fingerprint and region segmentation, characterized in that the steps include... include: Obtain the measured fingerprint dataset from the on-site sampling points; Based on the measured fingerprint dataset, the path loss exponent and wall attenuation factor of the logarithmic distance path loss model are optimized. Using the optimized path loss index and wall attenuation factor, the received signal strength at preset grid points is calculated to generate a virtual fingerprint, and a virtual reference point fingerprint database is constructed by combining the measured fingerprint dataset. The positioning space is divided into multiple sub-regions, and the representative fingerprints of each sub-region are determined using the virtual reference point fingerprint database. Using virtual fingerprint data within each sub-region of the virtual reference point fingerprint database, a feedforward neural network regression model corresponding to each sub-region is trained; Obtain the real-time received signal strength indication vector of the terminal to be located, and calculate its distance to each of the representative fingerprints to determine the target sub-region; In the virtual reference point fingerprint database, the virtual fingerprint data of the target sub-region is matched with the real-time received signal strength indication vector to obtain a preliminary physical coordinate estimate; Based on the preliminary physical coordinate estimation, the three closest virtual reference points are retrieved from the virtual reference points corresponding to the target sub-region, the received signal strength indication vectors of the three virtual reference points are extracted, and the extracted received signal strength indication vectors of the three virtual reference points are concatenated with the real-time received signal strength indication vector to form a feature vector; The feature vector is input into the feedforward neural network regression model corresponding to the target sub-region, and the final positioning coordinates are output.
2. The Bluetooth indoor positioning method based on virtual fingerprint and region segmentation according to claim 1, characterized in that, The optimization of the path loss exponent and wall attenuation factor of the logarithmic distance path loss model based on the measured fingerprint dataset includes: The path loss index and the wall attenuation factor are solved iteratively as individuals. The error between the model-predicted received signal strength vector output by the logarithmic distance path loss model and the corresponding measured vector in the measured fingerprint dataset is calculated, and the fitness is calculated with the goal of minimizing the error. After the genetic algorithm converges, the path loss index and the wall attenuation factor with the highest fitness are extracted and output. The formula for calculating fitness is as follows: In the formula, For the fitness of the genetic algorithm; This refers to the number of on-site sampling points; The sampling point number; For the first One sampling point; For the model in The predicted RSSI vector at the location; This corresponds to the measured RSSI vector; This represents the L2 norm.
3. The Bluetooth indoor positioning method based on virtual fingerprint and region segmentation according to claim 1, characterized in that, The step of calculating the received signal strength at preset grid points using the optimized path loss index and wall attenuation factor to generate a virtual fingerprint includes: For each virtual reference point on the preset grid, obtain its distance from the preset beacon and the number of walls it passes through; Substitute the distance, the number of walls penetrated, the path loss exponent, and the wall attenuation factor into the logarithmic distance path loss model to calculate the corresponding received signal strength indication vector as the virtual fingerprint. The expression of the logarithmic distance path loss model for: In the formula, Distance Predicted received signal strength at the location, For reference distance Reference received signal strength at the location, in dBm; This is the path loss index, with values ranging from 1.5 to 3.0; The value represents the average attenuation of a single wall surface, expressed in dB; the value ranges from 3.0 to 10.0 dB. This represents the number of walls that can be penetrated.
4. The Bluetooth indoor positioning method based on virtual fingerprint and region segmentation according to claim 1, characterized in that, The step of dividing the positioning space into multiple sub-regions and using the virtual reference point fingerprint database to determine the representative fingerprints of each sub-region includes: For each sub-region, select the virtual reference point closest to the geometric center of that sub-region from the virtual reference point fingerprint database; Extract the received signal strength indication vector of the selected virtual reference point and output it as the representative fingerprint of the sub-region.
5. The Bluetooth indoor positioning method based on virtual fingerprint and region segmentation according to claim 1, characterized in that, The step of training a feedforward neural network regression model corresponding to each of the sub-regions using virtual fingerprint data in the virtual reference point fingerprint database includes: For each virtual reference point in the sub-region, a first feature is extracted, where the first feature is the received signal strength indication vector of the virtual reference point itself. Select the three nearest neighbor virtual reference points centered on the coordinates of the virtual reference point, and extract the second feature, which is the received signal strength indication vector corresponding to the three nearest neighbor virtual reference points; The first feature and the second feature are concatenated into a training input vector, and the two-dimensional coordinates of the virtual reference point are used as the training label vector to perform model training and output the feedforward neural network regression model.
6. The Bluetooth indoor positioning method based on virtual fingerprint and region segmentation according to claim 1, characterized in that, Before obtaining the real-time received signal strength indication vector of the terminal to be located, the method further includes: The offline hash index value corresponding to each virtual reference point in the virtual reference point fingerprint database is calculated using a preset location-sensitive hash function. The step of matching the real-time received signal strength indication vector with the virtual fingerprint data of the target sub-region to obtain a preliminary physical coordinate estimate includes: The location-sensitive hash function is used to map the real-time received signal strength indication vector to the target hash index value; Among the virtual reference points within the target sub-region, virtual reference points whose offline hash index values are the same as the target hash index values are extracted to form a candidate subset; Nearest neighbor matching is performed within the candidate subset to calculate the preliminary physical coordinate estimate.
7. The Bluetooth indoor positioning method based on virtual fingerprint and region segmentation according to claim 1, characterized in that, After outputting the final positioning coordinates, a multi-source fusion positioning step is also included, specifically: Acquire signal strength characteristic data of mobile analog beacons collected by a pre-deployed gateway; the signal strength characteristic data includes the mean, variance, and kurtosis of the received signal strength indication; Acquire the accelerometer and gyroscope data of the moving analog beacon; Based on the signal strength characteristic data, the accelerometer data, and the gyroscope data, the mean position and variance of the moving simulated beacon are calculated. By combining the received signal strength data of the mobile analog beacon received by the terminal to be located, as well as the mean position and the variance position, a dynamic position constraint corresponding to the mobile analog beacon is generated. Based on the dynamic position constraint, the final positioning coordinates are fused and corrected to obtain the updated positioning coordinates.
8. The Bluetooth indoor positioning method based on virtual fingerprint and region segmentation according to claim 7, characterized in that, The step of calculating the mean and variance of the position of the moving simulated beacon based on the signal strength characteristic data, the accelerometer data, and the gyroscope data includes: The signal strength feature data is concatenated with the accelerometer data and gyroscope data, and then input into a pre-trained fully connected neural network model; Obtain the position mean and position variance output by the fully connected neural network model.
9. The Bluetooth indoor positioning method based on virtual fingerprint and region segmentation according to claim 7, characterized in that, Also includes: Obtain channel status information data of the wireless local area network access point collected by the terminal to be located; Extract the time-domain and frequency-domain features of multipath reflection from the channel state information data; The time-domain features and the frequency-domain features are input into a pre-trained convolutional neural network model to obtain passive localization coordinates.
10. The Bluetooth indoor positioning method based on virtual fingerprint and region segmentation according to claim 9, characterized in that, After obtaining the passive positioning coordinates, the method further includes: The final positioning coordinates and the passive positioning coordinates are used as two-dimensional coordinate observation values; the distance information determined according to the dynamic position constraints is used as the distance observation value. The extended Kalman filter algorithm is used to perform state fusion on the two-dimensional coordinate observations and the distance observations to obtain the fused two-dimensional position of the terminal. When using the extended Kalman filter algorithm for state fusion The variance of the observations corresponding to the final positioning coordinates in the two-dimensional coordinate observations is obtained by training the variance of the residuals using the feedforward neural network regression model. The observation variance of the passive positioning coordinates in the two-dimensional coordinate observations is the prediction variance of the test set of the convolutional neural network model. The observation variance corresponding to the distance observation value is determined by the location variance and the corresponding interval width of the signal strength-distance lookup table.
Citation Information
Patent Citations
An indoor positioning method based on multi-chain interpolation to construct fingerprint map
CN114710742B