Wapi indoor positioning method based on stacking combination model of umap dimension reduction
By combining UMAP dimensionality reduction and Stacking models, indoor positioning is achieved using WiFi signal strength information, which solves the problems of insufficient privacy protection, high cost and poor adaptability in existing technologies, and realizes high-precision and efficient indoor positioning.
Patent Information
- Application Number
- CN202510033182.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-09
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2045-01-09
AI Technical Summary
Existing indoor positioning technologies suffer from insufficient privacy protection, high costs, poor model adaptability, and a need to improve positioning accuracy.
A Stacking ensemble model based on UMAP dimensionality reduction is adopted. By collecting WiFi signal strength information and using the uniform manifold approximate projection algorithm for feature extraction, a Stacking ensemble model is constructed. Multiple primary learners and secondary learners are combined for prediction to achieve high-precision positioning.
It improves the accuracy and adaptability of indoor positioning, reduces the risk of location privacy leakage, reduces sensitivity to environmental changes, and achieves high-efficiency positioning performance.
Smart Images

Figure CN119835757B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of indoor positioning, specifically relating to a WAPI indoor positioning method based on a Stacking combined model with UMAP dimensionality reduction. Background Technology
[0002] There are various existing indoor positioning methods, mainly including inertial, Bluetooth, Wi-Fi, ultrasonic, and visible light methods. Currently, Wi-Fi-based indoor positioning is the primary method, which is inseparable from the extensive coverage of Wireless Local Area Networks (WLANs) in numerous buildings in recent years, laying the hardware foundation for WLAN-based indoor positioning.
[0003] Domestic and international experts and scholars have made significant progress in the field of wireless indoor positioning technology, especially in indoor and outdoor positioning applications based on traditional machine learning. However, in general, existing indoor positioning technologies mainly face the following problems: most positioning systems do not consider privacy protection and their accuracy needs to be improved; some solutions require additional dedicated hardware, which is costly; and the models have poor adaptability and are easily affected by changes in the indoor environment. Summary of the Invention
[0004] To address the shortcomings of existing methods, this invention provides a WAPI indoor positioning method based on UMAP dimensionality reduction and a Stacking combined model, aiming to effectively improve the privacy protection level of indoor positioning and significantly enhance its accuracy, efficiency, and adaptability.
[0005] To achieve the above objectives, the technical solution adopted by the present invention is as follows:
[0006] The WAPI indoor positioning method based on the UMAP dimensionality reduction Stacking combined model of this invention is characterized by the following steps:
[0007] Step 1: Collect WiFi signal strength information from multiple locations within the target building and preprocess for missing and negative values to obtain an initial fingerprint database. ;in, Indicates the initial fingerprint database The Middle 100 sample points at each location, and , Indicates the initial fingerprint database The Middle WiFi signal strength information at each location sample point Indicates the initial fingerprint database The Middle Two-dimensional position coordinates of each location sample point; This represents the total number of location sample points; The real label is recorded as ;
[0008] Step 2: Use the uniform manifold approximate projection algorithm to... Feature extraction is performed to obtain a dimensionality-reduced fingerprint database. ;in, This represents the i-th sample point after dimensionality reduction;
[0009] Step 3: Construct the first A primary learner and to Processing is performed to obtain Predicted value Thus, using equation (9) to apply the first... A primary learner parameters Perform an update to obtain the updated version. A primary learner :
[0010] (9)
[0011] In equation (9), L is the first... A primary learner The loss function;
[0012] Step 4: Utilize the updated first A primary learner For the initial fingerprint database The WiFi signal strength information in the data is used to predict the signal strength, and then the result is obtained using equation (10). Prediction matrices :
[0013] (10)
[0014] Step 5: Combine the prediction matrices of all primary learners with... After concatenation, the stacked layer feature matrix is obtained. ;
[0015] Step 6: Combine the feature matrices of the stacked layers Input secondary learner The process is performed to obtain the original target variable. Thus, equation (11) is used to train the secondary learner. parameters The process is updated to obtain the updated secondary learner. :
[0016] (11)
[0017] In equation (11), It is the feature matrix of the stacked layers. The i-th eigenvector, This represents the i-th sample point in the original target variable;
[0018] Step 7: Obtain new samples to be predicted And enter the number A primary learner Make a prediction and obtain The predicted values are then concatenated to obtain the stacked layer feature matrix. Then input the updated secondary learner. The data is processed to obtain the final prediction result. .
[0019] The WAPI indoor positioning method based on the Stacking combined model with UMAP dimensionality reduction described in this invention is characterized in that step 2 is performed as follows:
[0020] Step 2.1: Calculation k nearest neighbors ;in, express The j-th nearest neighbor; k represents The number of nearest neighbors;
[0021] Step 2.2: Calculate using equation (1) Minimum distance between k nearest neighbors :
[0022] (1)
[0023] In equation (1), express With the j-th nearest neighbor The Euclidean distance;
[0024] Step 2.3: Calculate using equation (2) Local scale :
[0025] = (2)
[0026] Step 2.4: Calculate the normalization constant K using equation (3):
[0027] (3)
[0028] Step 2.5: Obtain using equation (4) and Positive weights between :
[0029] (4)
[0030] Step 2.6: Obtain using equation (5) and Symmetric global topology between :
[0031] (5)
[0032] In equation (5), express and The inverse weights between them;
[0033] Step 2.7: Obtain using equation (6) and Embedded similarity :
[0034] (6)
[0035] In equation (6), Mapping in low-dimensional space, express In the mapping of the low-dimensional space, a and b are two control parameters;
[0036] Step 2.8: Adjust a and b using equation (7) to obtain the updated embedding similarity. ;
[0037] (7)
[0038] In equation (7), min_dist is the set minimum embedding spacing;
[0039] Step 2.9: Construct the cross-entropy loss function CE using equation (8):
[0040] (8)
[0041] Step 2.10: Optimize the cross-entropy loss function CE using the stochastic gradient descent algorithm to obtain the dimensionality-reduced fingerprint database. ;in, This represents the i-th sample point after dimensionality reduction.
[0042] The present invention provides an electronic device, including a memory and a processor, wherein the memory is used to store a program that supports the processor in executing the WAPI indoor positioning method, and the processor is configured to execute the program stored in the memory.
[0043] The present invention discloses a computer-readable storage medium on which a computer program is stored, wherein the computer program, when executed by a processor, performs the steps of the WAPI indoor positioning method.
[0044] Compared with existing technologies, the beneficial effects of this invention are as follows:
[0045] 1. This invention is based on WAPI, whose high-strength encryption and authentication mechanisms can provide crucial protection for data, provide stable and reliable signals, and achieve higher-precision indoor positioning, thereby reducing the risk of location privacy leakage.
[0046] 2. This invention automates the construction of a fingerprint database: By collecting RSSI data between APs, a fingerprint database can be built and dynamically updated without manual intervention, greatly increasing the adaptability to environmental changes.
[0047] 3. This invention introduces the UMAP algorithm and uses the UMAP feature extraction algorithm to reduce the dimensionality of the data, thus preserving the local and global structure of the data and improving the positioning accuracy.
[0048] 4. This invention uses the Stacking method to integrate multiple single localization models, construct a combined model for optimization, and maximizes prediction performance. Attached Figure Description
[0049] Figure 1 This is a framework diagram of the Stacking combination model of the present invention;
[0050] Figure 2 This is an offline flowchart of the WAPI indoor positioning method based on UMAP dimensionality reduction and stacking combined model according to the present invention.
[0051] Figure 3 This is an online flowchart of the WAPI indoor positioning method based on the Stacking combined model with UMAP dimensionality reduction according to the present invention;
[0052] Figure 4 The image shows the effect of the WAPI indoor positioning method based on UMAP dimensionality reduction and stacking combined model according to the present invention. Detailed Implementation
[0053] In this embodiment, a flowchart of a stacking combined model WAPI indoor positioning method based on UMAP dimensionality reduction is shown below. Figure 2 , Figure 3As shown, the UMAP algorithm is used to extract features and reduce the dimensionality of WAPI information within a building, and a Stacking combined model is constructed to reduce overfitting and improve model accuracy, thereby achieving high-precision prediction of indoor location. This method is suitable for indoor positioning scenarios requiring high positioning accuracy, such as indoor navigation. Specifically, this indoor positioning method includes two stages: an offline stage and an online stage; as shown... Figure 2 As shown, it includes the following steps;
[0054] Step 1, Offline Stage 1: Data Preprocessing;
[0055] Step 1.1: Data Acquisition;
[0056] WLAN routers are deployed within the target building. WiFi signal strength information is collected from multiple locations within the building by measuring Received Signal Strength Indicator (RSSI) data between wireless access points (APs), and this information is uploaded to a positioning platform. The platform stores the fingerprint data and performs feature extraction and positioning calculations. User equipment (UE) scans for WLAN signals and receives the positioning results. Each AP records its RSSI signal strength by detecting broadcast signals emitted by other APs.
[0057] Step 1.2: Data preprocessing;
[0058] The platform obtains an initial fingerprint database by processing the data for missing and negative values. ;in, Indicates the initial fingerprint database The Middle 100 sample points at each location, and , Indicates the initial fingerprint database The Middle WiFi signal strength information at each location sample point Indicates the initial fingerprint database The Middle Two-dimensional position coordinates of each location sample point; This represents the total number of location sample points; The real label is recorded as .
[0059] Step 2, Offline Phase 2: Using the Uniform Manifold Approximate Projection Algorithm (UMAP) to process the library Feature extraction is performed to construct a fingerprint database. UMAP (Uniform Manifold Approximation and Projection) is a non-linear technique for dimensionality reduction that maps high-dimensional data to a low-dimensional space while attempting to preserve the original structure and topological relationships of the data. UMAP is particularly suitable for data visualization because it can effectively reveal the structure and patterns in complex datasets.
[0060] Step 2: Apply the uniform manifold approximate projection algorithm to the library. Perform feature extraction and construct a fingerprint database;
[0061] Step 2.1: Calculation k nearest neighbors ;in, express The j-th nearest neighbor; k represents The number of nearest neighbors;
[0062] Step 2.2: Calculate using equation (1) Minimum distance between k nearest neighbors :
[0063] (1)
[0064] In equation (1), express With the j-th nearest neighbor The Euclidean distance.
[0065] Step 2.3: Calculate using equation (2) Local scale :
[0066] = (2)
[0067] Step 2.4: Calculate the normalization constant K using equation (3):
[0068] (3)
[0069] Step 2.5: Obtain using equation (4) and Positive weights between :
[0070] (4)
[0071] Step 2.6: In order to effectively handle noise and outliers in the adjacency graph and obtain a more accurate symmetric global topology, thereby better reflecting the topology of the original data in high-dimensional space, and ultimately achieving more effective dimensionality reduction and visualization, the symmetry rule of the t-distribution is adopted, fuzzy sets are merged, and equation (5) is used to obtain... and Symmetric global topology between :
[0072] (5)
[0073] In equation (5), express and The inverse weights between them.
[0074] Step 2.7: Obtain using equation (6) and Embedded similarity :
[0075] (6)
[0076] In equation (6), Mapping in low-dimensional space, express In the mapping of the low-dimensional space, a and b are two control parameters;
[0077] Step 2.8: Adjust a and b using equation (7) to fit the result. Approximate it to the piecewise function in equation (7) to obtain the updated embedding similarity. ;
[0078] (7)
[0079] In equation (7), min_dist is the set minimum embedding spacing.
[0080] Step 2.9: Construct the cross-entropy loss function CE using equation (8):
[0081] (8)
[0082] Step 2.10: Optimize the cross-entropy loss function CE using the stochastic gradient descent algorithm to obtain the dimensionality-reduced fingerprint database. .
[0083] Step 2.11: Dynamic Update; The platform regularly updates the fingerprint database to ensure that the data remains valid as the environment changes.
[0084] Step 3, Offline Phase 3: Constructing the Stacking composite model;
[0085] Stacking, an ensemble learning framework, is a multi-layered model ensemble technique. It generates meta-features by training multiple different base models, then passes these meta-features as input to a secondary model (meta-model) for final prediction. This fusion of the predictive capabilities of multiple models aims to improve the overall accuracy and robustness of predictions. This patent uses this framework for localization prediction, such as... Figure 1 The diagram shows the framework of the Stacking composite model.
[0086] Step 3.1: Select Six models were used as primary learners to construct the first... A primary learner , and to Processing is performed to obtain the i-th sample. Predicted value Thus, using equation (9) to apply the first... A primary learner parameters Perform an update to obtain the updated version. A primary learner :
[0087] (9)
[0088] In equation (9), L is the first... A primary learner The loss function.
[0089] Step 3.2: Utilize the updated first A primary learner For the initial fingerprint database The WiFi signal strength information in the data is used to predict the signal strength, and then the result is obtained using equation (10). Prediction matrices :
[0090] (10)
[0091] Step 3.3: Construct the feature matrix of the stacked layers.
[0092] Step 3.4: Combine the prediction matrices of all primary learners with... After concatenation, the stacked layer feature matrix is obtained. ;
[0093] Step 3.5: Combine the feature matrices of the stacked layers Input secondary learner The process is performed to obtain the original target variable. Thus, equation (11) is used to train the secondary learner. parameters The process is updated to obtain the updated secondary learner. This leads to the Stacking combinatorial model;
[0094] (11)
[0095] In equation (11), It is the feature matrix of the stacked layers. The i-th eigenvector.
[0096] Step 4, as follows Figure 3 As shown, real-time positioning;
[0097] Step 4.1: Real-time data acquisition;
[0098] When a user enters an indoor environment, they send a Wi-Fi signal request to nearby wireless access points (APs) via a terminal device (such as a smartphone or other Wi-Fi device). The device connects to the WLAN and scans for AP signals. After receiving the signal from the user's device, the AP records the signal strength (RSSI) of each device. .
[0099] Step 4.2: Use the Stacking combined model to complete the location prediction;
[0100] Each new sample Inputting the data into the Stacking combined model for prediction, i.e., using the first... A primary learner ,get The predicted values are then concatenated to obtain the stacked layer feature matrix. Then input the updated secondary learner. The data is processed to obtain the final prediction result. .
[0101] In this embodiment, an electronic device includes a memory and a processor. The memory stores a program that supports the processor in executing the above-described method, and the processor is configured to execute the program stored in the memory.
[0102] In this embodiment, a computer-readable storage medium stores a computer program, which is executed by a processor to perform the steps of the above method.
[0103] Experimental results
[0104] This experiment preprocesses fingerprint data of the Sahkotalo building on the campus of the University of Tampere, WiFi signal strength (Received Signal Strength Indicator, RSSI) information of 9291 different locations, and three-dimensional reference coordinates of the actual ground location.
[0105] Feature extraction was performed on 5293 sample data after data processing. Four algorithms were used for dimensionality reduction: Uniform Manifold Approximation and Projection (UMAP), Linear Discriminant Analysis (LDA), Principal Component Analysis (PCA), and Singular Value Decomposition (SVD). Six single localization models were constructed: K-Nearest Neighbors (KNN), Support Vector Machine (SVM), Gradient Boosting Decision Tree (GBDT), Random Forest (RF), Artificial Neuron Network (ANN), and eXtreme Gradient Boosting (XgBoost). The average error was used to reflect the effect, and the influence of different extraction algorithms on the average localization error of each model was explored. The results are shown in Table 1.
[0106] Table 1. Average localization error of each model under different extraction algorithms (unit: m)
[0107]
[0108] Compared to the three feature extraction methods LDA, PCA, and SVD, UMAP modeling after dimensionality reduction has smaller prediction errors and higher positioning accuracy.
[0109] The optimal single-model localization approach, XgBoost, has an average localization error of 1.808m. Since ANN models consistently perform poorly in single-model localization, they are not used as secondary learners in the Stacking method for combinatorial optimization. Using GBDT, KNN, RF, SVM, XgBoost, and ANN as primary learners, and GBDT, KNN, RF, SVM, and XgBoost as secondary learners, the Stacking model was trained. The models were evaluated and compared using three metrics: average localization error (Error), coefficient of determination (R²), and accuracy (Accc). The results are shown in Table 2.
[0110] Table 2. Statistics of various Stacking combined models based on UMAP dimensionality reduction
[0111]
[0112] As shown in the table above, the Stacking combined model with RF as the secondary learner performs best, with an average localization error of 1.482m, a coefficient of determination of 0.974, and an accuracy of 97.5%.
[0113] Finally, UMAP is used to perform dimensionality reduction to obtain the fingerprint database Y, and the result is input into the primary learner ( The model is trained using a primary learner (RF), and then the predictions from all the primary learners are combined with the fingerprint database Y and input into a secondary learner (RF) for further training to obtain the final localization model. Experimental results show an accuracy of 1.48 meters. Figure 4 As shown, the predicted location is quite close to the actual location, indicating that the method of the present invention has a good prediction effect.
Claims
1. A WAPI indoor positioning method based on a Stacking combined model with UMAP dimensionality reduction, characterized in that, The procedure is as follows: Step 1: Collect WiFi signal strength information from multiple locations within the target building and preprocess for missing and negative values to obtain an initial fingerprint database. ;in, Indicates the initial fingerprint database The Middle 100 sample points at each location, and , Indicates the initial fingerprint database The Middle WiFi signal strength information at each location sample point Indicates the initial fingerprint database The Middle Two-dimensional position coordinates of each location sample point; This represents the total number of location sample points; The real label is recorded as ; Step 2: Use the uniform manifold approximate projection algorithm to... Feature extraction is performed to obtain a dimensionality-reduced fingerprint database. ;in, This represents the i-th sample point after dimensionality reduction; Step 2.1: Calculation k nearest neighbors ;in, express The j-th nearest neighbor; k represents The number of nearest neighbors; Step 2.2: Calculate using equation (1) Minimum distance between k nearest neighbors : (1) In equation (1), express With the j-th nearest neighbor The Euclidean distance; Step 2.3: Calculate using equation (2) Local scale : = (2) Step 2.4: Calculate the normalization constant K using equation (3): (3) Step 2.5: Obtain using equation (4) and Positive weights between : (4) Step 2.6: Obtain using equation (5) and Symmetric global topology between : (5) In equation (5), express and The inverse weights between them; Step 2.7: Obtain using equation (6) and Embedded similarity : (6) In equation (6), Mapping in low-dimensional space, express In the mapping of the low-dimensional space, a and b are two control parameters; Step 2.8: Adjust a and b using equation (7) to obtain the updated embedding similarity. ; (7) In equation (7), min_dist The minimum embedding spacing is set; Step 2.9: Construct the cross-entropy loss function CE using equation (8): (8) Step 2.10: Optimize the cross-entropy loss function CE using the stochastic gradient descent algorithm to obtain the dimensionality-reduced fingerprint database. ;in, This represents the i-th sample point after dimensionality reduction; Step 3: Construct the first A primary learner and to Processing is performed to obtain Predicted value Thus, using equation (9) to apply the first... A primary learner parameters Perform an update to obtain the updated version. A primary learner : (9) In equation (9), L is the first... A primary learner The loss function; Step 4: Utilize the updated first A primary learner For the initial fingerprint database The WiFi signal strength information in the data is used to predict the signal strength, and then the result is obtained using equation (10). Prediction matrices : (10) Step 5: Combine the prediction matrices of all primary learners with... After concatenation, the stacked layer feature matrix is obtained. ; Step 6: Combine the feature matrices of the stacked layers Input secondary learner The process is performed to obtain the original target variable. Thus, equation (11) is used to train the secondary learner. parameters The process is updated to obtain the updated secondary learner. : (11) In equation (11), It is the feature matrix of the stacked layers. The i-th eigenvector, This represents the i-th sample point in the original target variable; Step 7: Obtain new samples to be predicted And enter the number A primary learner Make a prediction and obtain The predicted values are then concatenated to obtain the stacked layer feature matrix. Then input the updated secondary learner. The data is processed to obtain the final prediction result. .
2. An electronic device, comprising a memory and a processor, characterized in that, The memory is used to store a program that supports the processor in executing the WAPI indoor positioning method of claim 1, the processor being configured to execute the program stored in the memory.
3. A computer-readable storage medium storing a computer program, characterized in that, The computer program is executed by the processor to perform the steps of the WAPI indoor positioning method according to claim 1.
Citation Information
Patent Citations
WiFi fingerprint indoor positioning method based on random forest and auto-encoder
CN111461251A