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 indoor positioning and achieves large-scale More accurate position estimation and environmental adaptability in indoor environments.

CN118590989AActive Publication Date: 2024-09-03WUHAN UNIV OF SCI & TECH +1

Patent Information

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

AI Technical Summary

Technical Problem

The existing Wi-Fi fingerprint matching algorithm has the problem of 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, and the cost of early data collection is High, and the matching error is 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 correction relationship and error mapping relationship, correct the coordinate estimation of the test point, and improve Positioning accuracy.

Benefits of technology

Significantly improves positioning accuracy in large indoor environments, reduces early data collection costs, enhances adaptability to environmental noise and signal fluctuations, and achieves more accurate position estimation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118590989A
    Figure CN118590989A
Patent Text Reader

Abstract

The invention discloses a Wi-Fi fingerprint indoor positioning method and system based on a random forest, and is applied to the technical field of indoor positioning. Correcting the RSSI fingerprint distance through the detected number of Wi-Fi access points to obtain a correction relational expression, and obtaining reference point estimation coordinate data through correction; inputting the reference point estimation error and the reference RSSI fingerprint into a random forest regression model for training, and determining a mapping relation between the reference RSSI fingerprint and the estimation error of the reference point coordinate data; and carrying out coordinate estimation on the tested RSSI fingerprint, inputting the tested RSSI fingerprint into the trained random forest regression model, determining a coordinate estimation error, and correcting the estimated coordinate data of the test point through the coordinate estimation error to obtain coordinate data of the test point. Useful information in an offline fingerprint database is fully mined, and higher positioning precision is provided under the condition of low offline fingerprint density.
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 (WSNs) 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: On the one hand, the present invention discloses a Wi-Fi fingerprint indoor positioning method based on random forest, comprising the following specific steps: Constructing a fingerprint data set, wherein the fingerprint data set includes a reference RSSI fingerprint, a test RSSI fingerprint, and reference point coordinate data; 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; 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; 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.

[0008] 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: 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; According to the AP distribution in the test area, use the test point and the 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; Determine the fingerprint distance similarity metric.

[0009] 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: ; 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 The first n elements.

[0010] Preferably, in the above-mentioned Wi-Fi fingerprint indoor positioning method based on random forest, according to the AP distribution in the area to be tested, the test point and the first i The ratio between the number of common APs and the number of different APs of the reference points is used as an indicator to reflect the node position relationship. The specific formula is 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 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 isi The probability that the reference points are in the same area is The larger the value, the closer the reference point is to the actual coordinates of the test point, and vice versa.

[0011] 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: 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; in 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 .

[0012] 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: 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.

[0013] 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: ; ; In the formula, error i ( x )and error i ( y ) represent the i The error of the reference point in the horizontal and vertical directions.

[0014] Preferably, in the above-mentioned Wi-Fi fingerprint indoor positioning method based on random forest, the nonlinear mapping relationship calculation steps are as follows: The received signal strength vector at the reference point rssi ={ rssi 1, rssi 2,…… rssiN} 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; ; Where N represents the number of Wi-Fi access points; rssi n represents the 1-row and n-column signal strength vector of the nth reference point, Indicates the signal strength of the nth access point detected by the ith reference point.

[0015] On the other hand, the present invention discloses a Wi-Fi fingerprint indoor positioning system based on random forest, applying the above method, including: 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.

[0016] Preferably, in the above-mentioned Wi-Fi fingerprint indoor positioning system based on random forest, 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.

[0017] 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

[0018] 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.

[0019] Figure 1 This is a flow chart of the Wi-Fi fingerprint indoor positioning method based on random forest; Figure 2 This is a schematic diagram of the fingerprint matching positioning principle; Figure 3 It is a schematic diagram of fingerprint distribution; Figure 4 This is a schematic diagram of positioning error comparison under different parameter values ​​of equation 1; Figure 5 This is a schematic diagram of positioning error comparison under different parameter values ​​of equation 2; Figure 6 This is a schematic diagram of positioning error comparison under different parameter values ​​of equation 3; Figure 7 It is a schematic diagram comparing different fingerprint distance similarity metrics; Figure 8 is a schematic diagram of the error cumulative distribution curve; Fig. 9 This is a schematic diagram of the average error comparison under different scale reference fingerprints; Fig.10 It is a schematic diagram of the comparison of average error variance under different ratios of reference fingerprints. DETAILED DESCRIPTION

[0020] 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.

[0021] The embodiment of the present invention discloses a Wi-Fi fingerprint indoor positioning method based on random forest, comprising the following specific steps: Constructing a fingerprint data set, wherein the fingerprint data set includes a reference RSSI fingerprint, a test RSSI fingerprint, and reference point coordinate data; 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; 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; 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.

[0022] 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: Step 1: Model the indoor positioning method based on Wi-Fi received signal strength fingerprint matching, such as Figure 2 As shown. N Wi-Fi signal access points (APs), each with its own independent MAC address identifier, 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.

[0023] 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.

[0024] 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.

[0025] Step 4: Online coordinate estimation. After correcting the fingerprint Euclidean distance in step 2, the corresponding network environment parameters are obtained. S 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.

[0026] Furthermore, the specific steps to construct the fingerprint dataset are as follows: 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 , among which i The signal strength vector and coordinates of the reference points are expressed as , .

[0027] After all reference point information is collected, the fingerprint information of the offline database and coordinate information They can be expressed as , The entire offline database is represented as .

[0028] 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 , then these test points can be expressed as ,in .

[0029] 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 Indicates i Estimated coordinates of the test points.

[0030] In order to further optimize the above technical solution, the specific steps to obtain the corresponding correction relationship are as follows: 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; According to the AP distribution in the test area, use the test point and the 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; Determine the fingerprint distance similarity metric.

[0031] 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: ; 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 The first n elements.

[0032] In order to further optimize the above technical solution, Figure 3 As 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, the AP is called the common AP of the two nodes; if only one node detects the AP signal, the 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.

[0033] (2); (3); 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 as well as diff_num The vectors have large differences in value, respectively for the test points same_num and diff_numThe 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 formula (4).

[0034] (4); 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 reference point is to the actual coordinates of the test point, and vice versa.

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

[0036] (5); In the formula, S >0, reflects The degree of correction of the fingerprint Euclidean distance. For different network environments and AP point densities, S Different values ​​are needed to achieve a better correction effect. In 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 establishment stage of the offline fingerprint database, the fingerprint and coordinate information of the reference point can be used to S The value of is estimated.

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

[0038] (6); (7); 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. In the offline phase, the received signal strength vector of 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 formula (8). Table 1 shows the relevant parameters of the random forest regression model used in the present invention.

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

[0040] Table 1 Random Forest Parameters Step S4: Online coordinate estimation. After correcting the fingerprint Euclidean distance using formula (5), the corresponding network environment parameters are obtained. S The signal strength vector of the detected test point is then used as the input of the trained regression model to output the positioning error in the horizontal and vertical coordinate directions, thereby correcting the positioning result. The actual coordinates of the test point are expressed as ,in Respectively represent i The actual coordinates of the test points.

[0041] 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: 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.

[0042] In order to further optimize the above technical solution, 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.

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

[0044] 1. Database Introduction 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 15% (697) are reference points and 85% (3951) are test 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.

[0045] Table 2 Number of fingerprints on each floor 2. Relational Correction 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.

[0046] Table 3 Relationship correction To determine the parameters of the relationship in Table 3 ( S , P , R ), experiments were conducted based on some reference point data in the dataset. Taking the positioning error of the traditional WKNN algorithm based on Euclidean distance as the benchmark, for different relationship equations and parameter values, when the number of nearest fingerprints K When changes, the error curves obtained are as follows Figure 4 , 5As shown in Figure 6, 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. K When the error curves of equations 1 and 3 are changed, it can be seen that the error curves of equations 1 and 3 are more consistent with the changing trend of positioning error. S =3, the average positioning error is relatively small, so As a new fingerprint distance similarity measure.

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

[0048] Analysis from the perspective of fingerprint data statistics new dis The improvement effect on positioning accuracy. 25 test points are randomly selected 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 , where Δ rssi i Indicates the test point and i The fingerprint distance between reference points, Δ d i Indicates the test point and i The actual coordinate distance between the reference points.

[0049] In order to better analyze Δ rssi With Δ d According to the fingerprint distance Δ rssi Select the 10 reference points closest to the test point and record the actual coordinate distance Δ from these 10 reference points to the test point d Considering the actual situation of different test points (Δ rssi and Δ d The order of magnitude is different, so the fingerprint distance vector Δ for each test point rssi and the actual coordinate distance vector Δ d Normalization is performed separately, and the normalization interval is based on Δ rssi and Δ d The actual value range of is determined by, 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.

[0050] (9); 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) the present invention new dis 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 meet y = kx For the above four fingerprint distance similarity measures, a proportional relationship fitting function is made within the allowable error range. Table 4 lists the relevant parameters. It can be found that new dis The resulting scatter plot is better distributed in y = kx Around the fitting function, it shows 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.

[0051] Table 4 Comparison of different fingerprint distance similarity measurement positioning 4. Comparison of positioning errors.

[0052] 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.

[0053] Table 5 Comparison of positioning errors

[0054] Figure 8The 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, which is 276 more than that of WKNN. Within the error range of 15 meters, the proportions of WKNN, SVR, FDS, and FDS-RF test samples 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.

[0055] 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 that of WKNN, and it has better positioning effect in large indoor environments.

[0056] 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.

[0057] 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, It is 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; 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; 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; Coordinate estimation is performed on 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 coordinate data of the test point is corrected by the coordinate estimation error to obtain the test point coordinate data.

2. According to the random forest based Wi-Fi fingerprint indoor positioning method of claim 1, It is characterized in that The specific steps to obtain the corresponding correction relationship are as follows: 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; According to the AP distribution in the test area, use the test point and the 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; Determine the fingerprint distance similarity metric.

3. According to the random forest based Wi-Fi fingerprint indoor positioning method of claim 2, 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.

4. According to the random forest based Wi-Fi fingerprint indoor positioning method of claim 2, It is characterized in that According to the AP distribution in the test area, use the test point and the 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 formula is 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 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 reference point is to the actual coordinates of the test point, and vice versa.

5. According to the random forest based Wi-Fi fingerprint indoor positioning method of claim 2, It is characterized in that Determine the fingerprint distance similarity metric, the specific formula is as follows: 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; in 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 .

6. According to the random forest based Wi-Fi fingerprint indoor positioning method of claim 1, It is characterized in that Determine the mapping relationship between the reference RSSI fingerprint and the estimated error of the reference point coordinate data. 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.

7. According to claim 6, a Wi-Fi fingerprint indoor positioning method based on random forest, It is characterized in that 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 directions.

8. According to claim 6, a Wi-Fi fingerprint indoor positioning method based on random forest, It is characterized in that The calculation steps of nonlinear mapping relationship are as follows: The received signal strength vector of 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 signal strength of each Wi-Fi access point.

9. 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 to 8 above, It is 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.

10. A Wi-Fi fingerprint indoor positioning system based on random forest according to claim 9, 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

  • Wireless indoor positioning method for signal selection and position correction

    CN110493867A

  • Indoor fusion positioning method based on improved PDR algorithm

    CN112637762A

  • Indoor positioning method, device and system based on AOA and RSSI weighted fingerprint feature matching

    CN114364016A

Cited By

  • Indoor positioning method and device based on WiFi and visual fusion

    CN119364517A

  • Indoor positioning method and device based on fusion of wifi and vision

    CN119364517B