A Wi-Fi fingerprint indoor positioning method and system based on random forest

Through the Wi-Fi fingerprint indoor positioning method based on random forest, the random forest regression model is used to train the RSSI fingerprint and coordinate data, which solves the problem of low positioning accuracy of the Wi-Fi fingerprint matching algorithm in large indoor environments and achieves a better Accurate indoor positioning.

CN118590989BActive Publication Date: 2024-10-18WUHAN UNIV OF SCI & TECH +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411067709.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-06
Publication Date
2024-10-18
Estimated Expiration
2044-08-06

AI Technical Summary

Technical Problem

Existing Wi-Fi fingerprint matching algorithms have low positioning accuracy in indoor positioning, especially in large indoor environments. Since RSSI signals are sensitive to the external environment, it is difficult to build a stable signal strength attenuation model, making the matching error difficult to predict. .

Method used

The Wi-Fi fingerprint indoor positioning method based on random forest is used to construct a fingerprint data set and use the random forest regression model to train the RSSI fingerprint and coordinate data, determine the fingerprint distance similarity measure and coordinate estimation error, and perform correction and correction to Improve positioning accuracy.

Benefits of technology

The positioning accuracy is significantly improved in large indoor environments by fully utilizing the data set information to correct the fingerprint distance, reflecting the position relationship between nodes, and improving the positioning performance through error correction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118590989B_ABST
    Figure CN118590989B_ABST
Patent Text Reader

Abstract

The present invention discloses a Wi-Fi fingerprint indoor positioning method and system based on random forest, which is applied to the field of indoor positioning technology, constructs a fingerprint data set; corrects the RSSI fingerprint distance by the number of detected Wi-Fi access points, obtains a correction relationship, and obtains reference point estimation coordinate data by correction; inputs the reference point estimation error and the reference RSSI fingerprint into a random forest regression model for training, and determines the mapping relationship between the reference RSSI fingerprint and the estimation error of the reference point coordinate data; performs coordinate estimation for a test RSSI fingerprint, inputs the test RSSI fingerprint into a trained random forest regression model, determines the coordinate estimation error, and corrects the test point estimation coordinate data by the coordinate estimation error to obtain the test point coordinate data. Fully mine the useful information in the offline fingerprint database, and provide higher positioning accuracy when the offline fingerprint density is low.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of indoor positioning technology, and more specifically to a Wi-Fi fingerprint indoor positioning method and system based on random forest. Background Art

[0002] With the rapid development of wireless communication technology, large-scale coverage of communication networks, and the widespread popularity of mobile devices such as smartphones, Wireless Sensor Networks (WSN) have been widely used in various fields. In particular, the breakthrough of 5G network technology and the deployment of base stations have brought the development of related technologies in the field of WSN into a golden period. In the context of the inseparable connection between people and things, people's demand for location services is becoming more and more urgent. Location-based services, such as industrial monitoring, indoor navigation, smart homes, etc., are gradually integrated into people's daily work and life.

[0003] Indoor location services mainly rely on wireless communication technologies, such as Wi-Fi, Bluetooth, and ultra-wideband. Due to the complexity and diversity of indoor environments, differences in wireless communication technology standards, and differences in positioning methods, a universally applicable indoor positioning technology has not yet been formed. However, with the popularization of mobile smart devices, fingerprint matching positioning methods based on Wi-Fi received signal strength indication (RSSI) have received widespread attention. On the one hand, most devices have the function of measuring signal strength. Compared with technologies such as arrival time, no additional hardware equipment is required, which reduces hardware costs. In addition, in indoor environments, due to factors such as non-line-of-sight and multipath effects, it is difficult to build a stable signal strength attenuation model. In contrast, the positioning method based on fingerprint matching has better adaptability to the environment. On the other hand, since Wi-Fi uses free communication frequency bands, anyone can deploy a Wi-Fi network. Its signal coverage is large, the transmission power is small, and the spatial distribution of Wi-Fi signals is very different. It has the ability to distinguish different locations, so it is very suitable for application in fingerprint matching-based positioning. A suitable algorithm can be used to match the Wi-Fi fingerprint database built in the offline stage with the Wi-Fi signal strength detected online to predict the target location.

[0004] There are currently two bottlenecks that limit the large-scale application of Wi-Fi fingerprint matching algorithms. The first is the collection of preliminary data. In order to ensure high positioning accuracy, it is necessary to collect fingerprint data of sufficient density in the test area in the offline stage. When the area to be tested is large, it takes a lot of time and labor costs, and when the density of collected fingerprints is low, there is still a lack of accurate fingerprint matching algorithms. The second is the matching error between RSSI fingerprints and actual coordinates. Since RSSI signals are very sensitive to the external environment, whether offline or online, when multipath effects, personnel flow and other factors occur, signal fluctuations will inevitably occur, resulting in a non-one-to-one correspondence between RSSI fingerprints and actual coordinates. Due to differences in the actual environment and noise, this fixed matching error is often difficult to predict.

[0005] Therefore, how to provide a Wi-Fi fingerprint indoor positioning method and system with accurate positioning is a problem that technical personnel in this field need to solve urgently. Summary of the invention

[0006] In view of this, the present invention provides a Wi-Fi fingerprint indoor positioning method and system based on random forest to solve the problems in the background technology.

[0007] In order to achieve the above object, the present invention adopts the following technical solution:

[0008] On the one hand, the present invention discloses a Wi-Fi fingerprint indoor positioning method based on random forest, comprising the following specific steps:

[0009] Constructing a fingerprint data set, wherein the fingerprint data set includes a reference RSSI fingerprint, a test RSSI fingerprint, and reference point coordinate data;

[0010] Using the reference RSSI fingerprint and the reference point coordinate data, the RSSI fingerprint distance is corrected by the number of detected Wi-Fi access points to obtain a corresponding correction relationship, and the reference point estimated coordinate data is obtained using the correction relationship;

[0011] The estimated error between the reference point coordinate data and the reference point estimated coordinate data and the reference RSSI fingerprint are input into the random forest regression model for training to determine the mapping relationship between the reference RSSI fingerprint and the estimated error of the reference point coordinate data;

[0012] Coordinate estimation is performed for the test RSSI fingerprint based on the correction relationship to obtain estimated coordinate data of the test point, the test RSSI fingerprint is input into the trained random forest regression model, the coordinate estimation error is determined, and the estimated coordinates are corrected by the coordinate estimation error to obtain the test point coordinate data.

[0013] Preferably, in the above-mentioned Wi-Fi fingerprint indoor positioning method based on random forest, the specific steps of obtaining the corresponding correction relationship are as follows:

[0014] The Euclidean distance is used to characterize the difference in fingerprints between reference points and test points at different locations to reflect the coordinate difference between nodes;

[0015] According to the AP distribution in the test area, the ratio between the number of common APs and different APs between the test point and the i-th reference point is used as an indicator to reflect the node position relationship;

[0016] Determine the fingerprint distance similarity metric.

[0017] Preferably, in the above-mentioned Wi-Fi fingerprint indoor positioning method based on random forest, the Euclidean distance is used to characterize the difference in fingerprints of reference points and test points at different locations to reflect the coordinate difference between nodes. The specific formula is:

[0018]

[0019] in, represents the signal strength vector of the reference point at position u; Represents the signal strength vector of the test point at position v; n represents the nth element in the signal strength vector.

[0020] Preferably, in the above-mentioned Wi-Fi fingerprint indoor positioning method based on random forest, according to the AP distribution of the area to be tested, the ratio between the number of common APs and different APs of the test point and the i-th reference point is used as an indicator reflecting the node position relationship, and the specific formula is as follows:

[0021] Assuming that there are several APs in the area to be tested, if two nodes detect the signal of the same AP, then this AP is called the common AP of the two nodes; if only one node detects the AP signal, then this AP is called the different AP of the two nodes; the Euclidean distance between fingerprints is corrected by using the number of common APs and different APs between the test point and the reference point. The number of common APs and the number of different APs between the test point and the reference point are shown in the following formulas respectively;

[0022]

[0023] In the formula, same_num i with diff_num i are the number of common APs and different APs between the test point and the i-th reference point respectively; the same_num and diff_num vectors of the test point are normalized respectively, the normalization interval is set to (1,2), and the ratio of the two is used as an indicator reflecting the node position relationship, as shown in the following formula;

[0024]

[0025] In the formula, α i ∈(0.5,2), indicating the probability that the test point and the i-th reference point are in the same area, α i The larger the value, the closer the reference point is to the actual coordinates of the test point, and vice versa.

[0026] Preferably, in the above-mentioned Wi-Fi fingerprint indoor positioning method based on random forest, the fingerprint distance similarity metric is determined, and the specific formula is as follows:

[0027] Based on the original received signal strength fingerprint Euclidean distance, the fingerprint distance similarity metric is defined as shown in the following formula:

[0028] new dis =euc dis / α S ;

[0029] Where S>0, reflecting the degree of correction of α to the Euclidean distance of the fingerprint; for different network environments and AP point densities, S needs to take different values ​​to achieve a better correction effect; under the same network environment and AP point deployment, the fingerprints of the reference point and the test point should have the same correction value S.

[0030] Preferably, in the above-mentioned Wi-Fi fingerprint indoor positioning method based on random forest, the mapping relationship between the reference RSSI fingerprint and the estimated error of the reference point coordinate data is determined, and the specific steps are as follows:

[0031] The reference RSSI fingerprint is used as the model input, and the corresponding coordinate estimation error is used as the model output. The random forest regression model is used to find the nonlinear mapping relationship between the received signal strength and the positioning error, and the positioning coordinates are corrected by the model prediction value.

[0032] Preferably, in the above-mentioned Wi-Fi fingerprint indoor positioning method based on random forest, the coordinate estimation error in the model is shown in the following formula:

[0033]

[0034] error i ={error i (x),error i (y)};

[0035] In the formula, error i (x) and error i (y) represents the error of the i-th reference point in the horizontal and vertical directions respectively.

[0036] Preferably, in the above-mentioned Wi-Fi fingerprint indoor positioning method based on random forest, the nonlinear mapping relationship calculation steps are as follows:

[0037] The received signal strength vector rssi of the reference point is rssi = {rssi1, rssi2, ... rssi N} is used as the model input. For the errors in the horizontal and vertical coordinate directions, two random forest regression models are used for training respectively to find the nonlinear mapping relationship F between the received signal strength vector and the error. The nonlinear mapping relationship is shown in the following formula;

[0038]

[0039] Where N represents the number of Wi-Fi access points; rssi n Represents the signal strength vector of 1 row and n columns at the nth reference point, rssi i(n) Indicates the signal strength of the nth access point detected by the ith reference point.

[0040] On the other hand, the present invention discloses a Wi-Fi fingerprint indoor positioning system based on random forest, applying the above method, including:

[0041] A fingerprint data set construction module, wherein the fingerprint data set includes a reference RSSI fingerprint, a test RSSI fingerprint and reference point coordinate data;

[0042] The distance similarity measurement determination module uses the reference RSSI fingerprint and the reference point coordinate data to correct the RSSI fingerprint distance by the number of detected Wi-Fi access points to obtain a corresponding correction relationship, and uses the correction relationship to obtain the reference point estimated coordinate data;

[0043] A training module, inputting the estimated error between the reference point coordinate data and the reference point estimated coordinate data and the reference RSSI fingerprint into the random forest regression model for training, and determining the mapping relationship between the reference RSSI fingerprint and the estimated error of the reference point coordinate data;

[0044] The output module performs coordinate estimation on the test RSSI fingerprint based on the correction relationship to obtain the estimated coordinate data of the test point, inputs the test RSSI fingerprint into the trained random forest regression model, determines the coordinate estimation error, and corrects the estimated coordinates by the coordinate estimation error to obtain the test point coordinate data.

[0045] Preferably, in the above-mentioned Wi-Fi fingerprint indoor positioning system based on random forest, the distance similarity measurement determination module includes:

[0046] The Euclidean distance calculation unit uses the Euclidean distance to characterize the difference in fingerprints between reference points and test points at different locations to reflect the coordinate difference between nodes;

[0047] The node position relationship characterization unit uses the ratio of the number of common APs and different APs between the test point and the i-th reference point as an indicator reflecting the node position relationship according to the AP distribution in the test area;

[0048] A determination unit determines a fingerprint distance similarity measure according to the results of the Euclidean distance calculation unit and the node position relationship representation unit.

[0049] Through the above technical solutions, it can be seen that compared with the prior art, the present invention discloses a Wi-Fi fingerprint indoor positioning method and system based on random forests. Aiming at the problem that the original fingerprint Euclidean distance is difficult to reflect the actual distance between nodes and the positioning accuracy is not high, the useful information of the data set is fully utilized to correct the fingerprint distance similarity metric, so as to better reflect the position relationship between nodes. Subsequently, from the perspective of error correction, the random forest regression model is trained using offline fingerprint data and coordinate estimation errors, and the estimated coordinates in the online stage are corrected using the trained model, which can show better positioning performance in large indoor environments. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0051] Figure 1 This is a flow chart of the Wi-Fi fingerprint indoor positioning method based on random forest;

[0052] Figure 2 This is a schematic diagram of the fingerprint matching positioning principle;

[0053] Figure 3 It is a schematic diagram of fingerprint distribution;

[0054] Figure 4 This is a schematic diagram of positioning error comparison under different parameter values ​​of equation 1;

[0055] Figure 5 This is a schematic diagram of positioning error comparison under different parameter values ​​of equation 2;

[0056] Figure 6 This is a schematic diagram of positioning error comparison under different parameter values ​​of equation 3;

[0057] Figure 7It is a schematic diagram comparing different fingerprint distance similarity metrics;

[0058] Figure 8 is a schematic diagram of the error cumulative distribution curve;

[0059] Fig. 9 This is a schematic diagram of the average error comparison under different scale reference fingerprints;

[0060] Fig.10 It is a schematic diagram of the comparison of average error variance under different ratios of reference fingerprints. DETAILED DESCRIPTION

[0061] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0062] The embodiment of the present invention discloses a Wi-Fi fingerprint indoor positioning method based on random forest, comprising the following specific steps:

[0063] Constructing a fingerprint data set, wherein the fingerprint data set includes a reference RSSI fingerprint, a test RSSI fingerprint, and reference point coordinate data;

[0064] Using the reference RSSI fingerprint and the reference point coordinate data, the RSSI fingerprint distance is corrected by the number of detected Wi-Fi access points to obtain a corresponding correction relationship, and the reference point estimated coordinate data is obtained using the correction relationship;

[0065] The estimated error between the reference point coordinate data and the reference point estimated coordinate data and the reference RSSI fingerprint are input into the random forest regression model for training to determine the mapping relationship between the reference RSSI fingerprint and the estimated error of the reference point coordinate data;

[0066] Coordinate estimation is performed for the test RSSI fingerprint based on the correction relationship to obtain estimated coordinate data of the test point, the test RSSI fingerprint is input into the trained random forest regression model, the coordinate estimation error is determined, and the estimated coordinates are corrected by the coordinate estimation error to obtain the test point coordinate data.

[0067] Specifically, Figure 1 As shown in the figure, based on real-world datasets, the method is roughly divided into two stages: offline and online. The method includes the following points:

[0068] Step 1: Model the indoor positioning method based on Wi-Fi received signal strength fingerprint matching, such as Figure 2As shown in the figure. In this network, N Wi-Fi signal access points (APs) are detected. Each AP has its own independent MAC address identifier. Different APs have different signal distribution characteristics and signal coverage. According to the law of radio signal propagation, different grid points in the test area receive different signal strengths from the same AP.

[0069] Step 2: Fingerprint distance similarity measure (FDS) correction. The positioning algorithm based on fingerprint matching relies heavily on the correct mapping relationship between fingerprints and real coordinates. The difference between fingerprints collected at different locations is used to reflect the location difference between nodes, and the difference between fingerprints is often evaluated by Euclidean distance.

[0070] Step 3: Random Forest (RF) error correction. Considering that the mapping error between RSSI fingerprints and coordinates always exists and is difficult to predict in the actual environment, the received signal strength of the reference point is used as the model input, and the corresponding coordinate estimation error is used as the model output. The random forest regression model is used to find the nonlinear mapping relationship between the received signal strength and the positioning error, and the positioning coordinates are corrected by the model prediction value.

[0071] Step 4: Online coordinate estimation. After correcting the fingerprint Euclidean distance in step 2, the value of parameter S in the corresponding network environment is obtained. Then, the signal strength vector of the detected test point is used as the input of the trained regression model, and the positioning errors in the horizontal and vertical coordinate directions are output respectively, so as to correct the positioning result.

[0072] Furthermore, the specific steps to construct the fingerprint dataset are as follows:

[0073] S11, in the offline stage, the received signal strength vector (fingerprint) and coordinate data of a series of reference points are collected in the test area. Assume that the number of these reference points is M train , where the signal strength vector and coordinates of the i-th reference point are expressed as RP i train = {RP i train (x),RP i train (y)}.

[0074] After all reference point information is collected, the fingerprint information rssi of the offline database train and coordinate information RP train They can be expressed as

[0075]

[0076] The entire offline database is represented as {rssi train , RP train}.

[0077] S12, in the online positioning stage, the terminal device is used to collect a series of test point receiving signal strength vectors (fingerprints) at different locations. Assume that the number of these test points is M test , then these test points can be expressed as in

[0078]

[0079] The information of these test points is uploaded to the server through the network and matched with the fingerprint database. The estimated coordinate data of the test points obtained by the corresponding matching algorithm is expressed as in Represents the estimated coordinates of the i-th test point.

[0080] In order to further optimize the above technical solution, the specific steps to obtain the corresponding correction relationship are as follows:

[0081] The Euclidean distance is used to characterize the difference in fingerprints between reference points and test points at different locations to reflect the coordinate difference between nodes;

[0082] According to the AP distribution in the test area, the ratio between the number of common APs and different APs between the test point and the i-th reference point is used as an indicator to reflect the node position relationship;

[0083] Determine the fingerprint distance similarity metric.

[0084] In order to further optimize the above technical solution, the Euclidean distance is used to characterize the difference in fingerprints between reference points and test points at different locations to reflect the coordinate difference between nodes. The specific formula (1) is:

[0085]

[0086] in, represents the signal strength vector of the reference point at position u; Represents the signal strength vector of the test point at position v; n represents the nth element in the signal strength vector.

[0087] In order to further optimize the above technical solution, Figure 3As shown, it is assumed that there are several APs in the area to be tested. Due to the heterogeneity of Wi-Fi devices and the differences in the environments in which they are located, the signal strength and coverage range of different APs are quite different. Normally, the AP signal strength detected by the device is in the range of (0dBm, -100dBm). If the signal of a certain AP is not detected, the signal is set to -103dBm. If two nodes detect the signal of the same AP, this AP is called the common AP of the two nodes; if only one node detects the AP signal, this AP is called the different AP of the two nodes. When calculating the similarity of fingerprint data, the Euclidean distance between fingerprints is corrected using the number of common APs and different APs between the test point and the reference point. The number of common APs and the number of different APs between the test point and the reference point are shown in formulas (2) and (3), respectively.

[0088]

[0089] In the formula, same_num i with diff_num i are the number of common APs and different APs between the test point and the i-th reference point, respectively. Considering that the same_num and diff_num vectors between different test points have large numerical differences, the same_num and diff_num vectors of the test points are normalized respectively, and the normalization interval is set to (1,2). The ratio of the two is used as an indicator to reflect the node position relationship, as shown in formula (4).

[0090]

[0091] In the formula, α i ∈(0.5, 2), indicating the probability that the test point and the i-th reference point are in the same area, α i The larger the value, the closer the reference point is to the actual coordinates of the test point, and vice versa.

[0092] Based on the original received signal strength fingerprint Euclidean distance, the fingerprint distance similarity metric is defined as shown in formula (5).

[0093] new dis =euc dis / α S (5);

[0094] In the formula, S>0, which reflects the degree of correction of α to the Euclidean distance of the fingerprint. For different network environments and AP point densities, S needs to take different values ​​to achieve a better correction effect. Under the same network environment and AP point deployment, the fingerprints of the reference point and the test point should have the same correction value S. Therefore, in the stage of establishing the offline fingerprint library, the value of S can be estimated by the fingerprint and coordinate information of the reference point.

[0095] The coordinate estimation error in the model is shown in formulas (6) and (7).

[0096]

[0097] error i ={error i (x), error i (y)} (7);

[0098] In the formula, errori(x) and errori(y) represent the error of the i-th reference point in the horizontal and vertical directions respectively. In the offline stage, the received signal strength vector rssi of the reference point is rssi = {rssi1, rssi2, ... rssi N} as the model input, for the errors in the horizontal and vertical coordinate directions, two random forest regression models are used for training respectively to find the nonlinear mapping relationship F between the received signal strength vector and the error, and the nonlinear mapping relationship is shown in formula (8). Table 1 shows the relevant parameters of the random forest regression model used in the present invention.

[0099]

[0100] Where N represents the number of Wi-Fi access points; rssi n Represents the signal strength vector of 1 row and n columns at the nth reference point, rssi i(n) Indicates the signal strength of the nth access point detected by the ith reference point.

[0101] Table 1 Random forest parameters

[0102]

[0103] Step S4, online coordinate estimation. After correcting the fingerprint Euclidean distance by formula (5), the value of parameter S under the corresponding network environment is obtained. Then the signal strength vector of the detected test point is used as the input of the trained regression model, and the positioning error in the horizontal and vertical coordinate directions is output respectively, so as to correct the positioning result. The actual coordinates of the test point are expressed as

[0104] in Respectively represent the actual coordinates of the i-th test point.

[0105] On the other hand, another embodiment of the present invention discloses a Wi-Fi fingerprint indoor positioning system based on random forest, applying the above method, including:

[0106] A fingerprint data set construction module, wherein the fingerprint data set includes a reference RSSI fingerprint, a test RSSI fingerprint and reference point coordinate data;

[0107] The distance similarity measurement determination module uses the reference RSSI fingerprint and the reference point coordinate data to correct the RSSI fingerprint distance by the number of detected Wi-Fi access points to obtain a corresponding correction relationship, and uses the correction relationship to obtain the reference point estimated coordinate data;

[0108] A training module, inputting the estimated error between the reference point coordinate data and the reference point estimated coordinate data and the reference RSSI fingerprint into the random forest regression model for training, and determining the mapping relationship between the reference RSSI fingerprint and the estimated error of the reference point coordinate data;

[0109] The output module performs coordinate estimation on the test RSSI fingerprint based on the correction relationship to obtain the estimated coordinate data of the test point, inputs the test RSSI fingerprint into the trained random forest regression model, determines the coordinate estimation error, and corrects the estimated coordinates by the coordinate estimation error to obtain the test point coordinate data.

[0110] In order to further optimize the above technical solution, the distance similarity measurement determination module includes:

[0111] The Euclidean distance calculation unit uses the Euclidean distance to characterize the difference in fingerprints between reference points and test points at different locations to reflect the coordinate difference between nodes;

[0112] The node position relationship characterization unit uses the ratio of the number of common APs and different APs between the test point and the i-th reference point as an indicator reflecting the node position relationship according to the AP distribution in the test area;

[0113] A determination unit determines a fingerprint distance similarity measure according to the results of the Euclidean distance calculation unit and the node position relationship representation unit.

[0114] The following specific practical cases are analyzed to prove the effect of the present invention.

[0115] 1. Database Introduction

[0116] In order to verify the effectiveness of the present invention, experiments are conducted based on a real-world Wi-Fi fingerprint dataset. The dataset consists of 4648 points, of which reference points account for 15% (697 points) and test points account for 85% (3951 points). The number of reference points and test points on different floors is shown in Table 2. The fingerprint collection location is a building with an area of ​​about 22,570 m2. 2 A five-story building (reference fingerprint density is about 0.03 / m 2 ), there are many obstacles inside the building that hinder the propagation of Wi-Fi signals, so most AP signals cannot be obtained, and the effective signals account for a small part. In these fingerprint data, if the signal of a certain AP is not detected, this signal is set to -103dBm. No dedicated Wi-Fi access points were deployed in advance, but 992 APs (including occasional mobile hotspots, APs near buildings, etc.) were detected during the data collection phase, and the accurate locations of these APs are not available.

[0117] Table 2 Number of fingerprints on each floor

[0118] floor F1 F2 F3 F4 F5 Number of reference fingerprints 226 197 139 118 17 Test fingerprint number 1265 1106 770 699 109

[0119] 2. Relational Correction

[0120] In order to better reflect the positional relationship between nodes, the embodiment of the present invention proposes two other fingerprint distance correction relationship equations based on equation (5). The parameters of the relationship equations are shown in Table 3.

[0121] Table 3 Relationship Correction

[0122]

[0123] In order to determine the parameters (S, P, R) of the relationship in Table 3, experiments were conducted based on some reference point data in the data set. Taking the positioning error of the traditional WKNN algorithm based on Euclidean distance as the benchmark, for different relationship and parameter values, when the number of nearest fingerprints K changes, the error curves are as follows: Figure 4 , 5 , 6. As shown in the figure, for different parameter values, the three equations significantly improve the positioning accuracy compared to WKNN. This is because FDS fully exploits the useful information in the fingerprint database. When the number of nearest fingerprints K changes, it can be seen that the error curves of equations 1 and 3 are more consistent with the changing trend of positioning error. Since the average positioning error of equation 1 is relatively small when parameter S=3, the new dis =euc dis / α 3 As a new fingerprint distance similarity measure.

[0124] 3. Comparison of different fingerprint distance similarity metrics.

[0125] Analyze new from the perspective of fingerprint data statistics dis The improvement effect on positioning accuracy. Randomly select 25 test points from the above data set, assuming that the total number of reference points is M train , for each test point there is a fingerprint distance vector and a real-coordinate distance vector Among them, Δrssi i represents the fingerprint distance between the test point and the i-th reference point, Δd i Represents the actual coordinate distance between the test point and the i-th reference point.

[0126] In order to better analyze the relationship between Δrssi and Δd, the 10 reference points closest to the test point are selected according to the fingerprint distance Δrssi, and the actual coordinate distance Δd from these 10 reference points to the test point is recorded. Considering the different actual conditions of different test points (the order of magnitude of Δrssi and Δd), the fingerprint distance vector Δrssi and the actual coordinate distance vector Δd of each test point are normalized respectively, and the normalization interval is determined according to the actual numerical interval of Δrssi and Δd, as shown in formula (9). For different fingerprint distance similarity metrics, the selected reference points are different. Figure 7 The mapping relationship between the fingerprint distances of 250 reference points and the actual coordinate distances obtained by using different fingerprint distance similarity metrics for 25 test points is shown.

[0127]

[0128] exist Figure 7 Middle (upper left) fingerprint Euclidean distance euc dis ; (upper right) cosine distance cos dis ; (lower left) weighted average of Euclidean and cosine distances euc_cos dis ; (lower right) new dis Comparative analysis is performed. Since the inverse of the fingerprint distance is used as the weight of the reference point coordinates in positioning, the fingerprint distance and the actual coordinate distance need to satisfy the proportional relationship of y = kx. For the above four fingerprint distance similarity metrics, a proportional relationship fitting function is made within the allowable error range. Table 4 lists the relevant parameters. It can be found that using new dis The obtained scatter plot is better distributed around the y=kx fitting function, showing a better positive correlation. Compared with other fingerprint distance similarity metrics, new dis The minimum mean deviation of the fitting function is 6.8 meters, and the minimum average positioning error is 8.4 meters.

[0129] Table 4 Comparison of different fingerprint distance similarity metrics for positioning

[0130]

[0131] 4. Comparison of positioning errors.

[0132] The positioning errors are compared using the WKNN algorithm and the coordinate correction method based on support vector regression (SVR). Table 5 lists the average positioning error and error variance obtained for each floor. It can be seen that FDS-RF has significant improvements in positioning accuracy for deployment environments on different floors. After positioning all 3951 test points, the positioning accuracy of WKNN and SVR were 9.81 and 9.40 meters respectively, while the accuracy of FDS-RF reached 7.98 meters, which is 18% and 15% higher than that of WKNN and SVR respectively.

[0133] Table 5 Comparison of positioning errors

[0134]

[0135] Figure 8 The error cumulative distribution curve of the algorithm is plotted. It can be seen that for WKNN, 36% of the test samples have positioning errors within 5 meters, while the proportions of FDS and FDS-RF test samples within 5 meters are 40% and 43%, respectively, an increase of 276 compared to WKNN. Within the error range of 15 meters, the proportions of test samples for WKNN, SVR, FDS, and FDS-RF are 80%, 84%, 87%, and 89%, respectively. This is because FDS-RF can fully extract the information of the fingerprint data set and perform corresponding transformations, and more accurately find the correspondence between the fingerprint data and the actual coordinates.

[0136] In order to fully explore the positioning performance of FDS-RF under different fingerprint densities, the proportion of reference fingerprints and test fingerprints is changed, and the average error and error variance curves of the above algorithms are obtained as shown in the figure. Fig. 9 , 10 As shown. As can be seen from the figure, as the density of reference fingerprints increases, the positioning accuracy of the algorithm is significantly improved, but FDS-RF has always maintained the highest positioning accuracy. When the number of reference fingerprints accounts for 15% (697), compared with WKNN, the positioning accuracy of FDS-RF is improved by 1.8 meters, and when the number of reference fingerprints accounts for 45% (2092), the accuracy of FDS-RF can reach within 6 meters, which is still about 1 meter higher than that of WKNN. In summary, the performance of the FDS-RF algorithm proposed in the present invention is better than WKNN, and it has better positioning effect in large indoor environments.

[0137] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0138] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A Wi-Fi fingerprint indoor positioning method based on random forest, characterized in that: The specific steps include: Constructing a fingerprint data set, wherein the fingerprint data set includes a reference RSSI fingerprint, a test RSSI fingerprint, reference point coordinate data, and test point estimated coordinate data; The RSSI fingerprint distance is corrected by using the reference RSSI fingerprint and the reference point coordinate data according to the number of detected Wi-Fi access points to obtain a corresponding correction relationship, and the reference point estimated coordinate data is obtained by using the correction relationship; the specific steps of obtaining the corresponding correction relationship are as follows: using the Euclidean distance to characterize the difference in fingerprints of reference points and test points at different locations to reflect the coordinate difference between nodes; according to the AP distribution in the area to be tested, using the test point and the first i The ratio between the number of common APs and different APs of the reference points is used as an indicator to reflect the node position relationship; the fingerprint distance similarity metric is determined; among them, according to the AP distribution of the test area, the test point and the first i The ratio between the number of common APs and different APs of the reference points is used as an indicator to reflect the node position relationship. The specific steps are as follows: Assuming that there are several APs in the area to be tested, if two nodes detect the signal of the same AP, then this AP is called the common AP of the two nodes; if only one node detects the AP signal, then this AP is called the different AP of the two nodes; the Euclidean distance between the fingerprints is corrected by using the number of common APs and different APs between the test point and the reference point. The number of common APs and the number of different APs between the test point and the reference point are shown in the following formulas respectively; In the formula, same_num i and diff_num i The test point and i The number of common APs and different APs at the reference points; same_num and diff_num The vectors are normalized respectively, the normalization interval is set to (1,2), and the ratio of the two is used as an indicator reflecting the node position relationship, as shown in the following formula; ; In the formula, , indicating that the test point is i The probability that the reference points are in the same area is The larger the value, the closer the actual coordinates of the reference point and the test point are, and vice versa. The fingerprint distance similarity metric is determined by the following formula: Based on the original received signal strength fingerprint Euclidean distance, the fingerprint distance similarity metric is defined as shown in the following formula; ; In the formula, S >0, reflects Correction degree of fingerprint Euclidean distance; for different network environments and AP point densities, S Different values ​​are needed to achieve a better correction effect; under the same network environment and AP point deployment, the fingerprints of the reference point and the test point should have the same correction value S; The difference between the fingerprints of the reference points and the test points at different positions is used to reflect the coordinate difference between the nodes; the estimated error between the reference point coordinate data and the reference point estimated coordinate data and the reference RSSI fingerprint are input into the random forest regression model for training to determine the mapping relationship between the reference RSSI fingerprint and the estimated error of the reference point coordinate data; the mapping relationship between the reference RSSI fingerprint and the estimated error of the reference point coordinate data is determined, and the specific steps are as follows: The reference RSSI fingerprint is used as the model input, and the corresponding coordinate estimation error is used as the model output. The random forest regression model is used to find the nonlinear mapping relationship between the received signal strength and the positioning error, and the positioning coordinates are corrected by the model prediction value; the coordinate estimation error in the model is shown in the following formula; ; ; In the formula, error i ( x )and error i ( y ) represent the i The error of the reference point in the horizontal and vertical coordinate directions; the calculation steps of the nonlinear mapping relationship are as follows: The received signal strength vector at the reference point rssi ={ rssi 1, rssi 2,…… rssi N } is used as the model input. For the errors in the horizontal and vertical coordinate directions, two random forest regression models are used for training respectively to find the nonlinear mapping relationship between the received signal strength vector and the error. F , the nonlinear mapping relationship is shown in the following formula; ;in, N Indicates the number of Wi-Fi access points; rssi n Indicates n 1 row of reference points n The signal strength vector of the columns, Indicates i The first reference point detected n The test RSSI fingerprint is input into a trained random forest regression model to determine the coordinate estimation error, and the estimated coordinate data of the test point is corrected by the coordinate estimation error to obtain the coordinate data of the test point.

2. According to the random forest based Wi-Fi fingerprint indoor positioning method of claim 1, it is characterized in that: The Euclidean distance is used to characterize the difference in fingerprints between reference points and test points at different locations to reflect the coordinate difference between nodes. The specific formula is: ;in, Indicates the location u The signal strength vector of the reference point; Indicates the location The signal strength vector of the test point; n Represents the first n elements.

3. A Wi-Fi fingerprint indoor positioning system based on random forest, applying the Wi-Fi fingerprint indoor positioning method based on random forest as described in any one of claims 1-2, characterized in that: include: A fingerprint data set construction module, wherein the fingerprint data set includes a reference RSSI fingerprint, a test RSSI fingerprint and reference point coordinate data; The distance similarity measurement determination module uses the reference RSSI fingerprint and the reference point coordinate data to correct the RSSI fingerprint distance by the number of detected Wi-Fi access points to obtain a corresponding correction relationship, and uses the correction relationship to obtain the reference point estimated coordinate data; A training module, inputting the estimated error between the reference point coordinate data and the reference point estimated coordinate data and the reference RSSI fingerprint into the random forest regression model for training, and determining the mapping relationship between the reference RSSI fingerprint and the estimated error of the reference point coordinate data; The output module performs coordinate estimation on the test RSSI fingerprint based on the correction relationship to obtain the estimated coordinate data of the test point, inputs the test RSSI fingerprint into the trained random forest regression model, determines the coordinate estimation error, and corrects the estimated coordinates by the coordinate estimation error to obtain the test point coordinate data.

4. According to the random forest based Wi-Fi fingerprint indoor positioning system of claim 3, it is characterized in that: The distance similarity measurement determination module includes: The Euclidean distance calculation unit uses the Euclidean distance to characterize the difference in fingerprints between reference points and test points at different locations to reflect the coordinate difference between nodes; The node position relationship representation unit uses the test point and the first i The ratio between the number of common APs and different APs of the reference points is used as an indicator to reflect the node location relationship; A determination unit determines a fingerprint distance similarity measure according to the results of the Euclidean distance calculation unit and the node position relationship representation unit.

Citation Information

Patent Citations

  • Phase difference based kNN fingerprint localization algorithm

    CN108710121A

  • Method for estimating indoor pedestrian combination poses based on multi-particle swarm optimized

    CN109298389A