WAPI indoor positioning method of Stacking combination model based on UMAP dimension reduction
By adopting the combined method of UMAP dimensionality reduction and Stacking model in indoor positioning technology, the problems of insufficient privacy protection, low accuracy, high cost and poor adaptability in the existing technology are solved, and the indoor positioning effect with higher accuracy, higher efficiency and stronger adaptability are achieved.
Patent Information
- Application Number
- CN202510033182.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-09
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2045-01-09
AI Technical Summary
The existing indoor positioning technology faces the problems of insufficient privacy protection, low accuracy, high cost and poor adaptability.
The WAPI indoor positioning method based on UMAP dimensionality reduction is adopted. Data dimensionality reduction is performed through UMAP algorithm, and Stacking combinatorial model is built to improve positioning accuracy and adaptability, while enhancing privacy protection.
It significantly improves the accuracy, efficiency and adaptability of indoor positioning, reduces the risk of location privacy leakage, and reduces the cost of positioning system.
Smart Images

Figure CN119835757A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of indoor positioning, and in particular relates to a WAPI indoor positioning method based on a Stacking combination model of UMAP dimensionality reduction. Background Art
[0002] There are many existing indoor positioning methods, including inertial, Bluetooth, WIFI, ultrasound, visible light, etc. At present, indoor positioning based on WIFI signals is the main positioning method, which is inseparable from the large-scale coverage of wireless local area networks (WLAN) in a large number of buildings in recent years, laying a hardware foundation for indoor positioning based on WLAN.
[0003] Experts and scholars at home and abroad have made significant progress in the field of wireless indoor positioning technology, especially in the field of indoor and outdoor positioning applications based on traditional machine learning. But overall, the existing indoor positioning technology mainly faces the following problems: most positioning systems do not consider privacy protection and the accuracy needs to be improved; some solutions require additional deployment of dedicated hardware, which is costly; the model has poor adaptability and is easily affected by changes in the indoor environment. Summary of the invention
[0004] In order to solve the shortcomings of the above-mentioned existing methods, the present invention provides a WAPI indoor positioning method based on the Stacking combination model of UMAP dimensionality reduction, so as to effectively improve the privacy protection level of indoor positioning and significantly improve the accuracy, efficiency and adaptability of indoor positioning.
[0005] In order to achieve the above object, the technical solution adopted by the present invention is:
[0006] The WAPI indoor positioning method based on the Stacking combination model of UMAP dimensionality reduction of the present invention is characterized in that it is performed according to the following steps:
[0007] Step 1: Collect WiFi signal strength information at multiple locations in the target building and pre-process missing values and negative values to obtain the initial fingerprint database ;in, Represents the initial fingerprint database Middle location sample points, and , Represents the initial fingerprint database Middle WiFi signal strength information of sample locations, Represents the initial fingerprint database Middle The two-dimensional position coordinates of the position sample points; Indicates the total number of location sample points; The true label is recorded as ;
[0008] Step 2: Use the uniform manifold approximate projection algorithm to Perform feature extraction to obtain a fingerprint database after dimensionality reduction ;in, Represents the i-th position sample point after dimensionality reduction;
[0009] Step 3: Build Primary Learner , and Process and obtain The predicted value of , so we can use formula (9) to Primary Learner Parameters Update and get the updated Primary Learner :
[0010] (9)
[0011] In formula (9), L is the Primary Learner The loss function of
[0012] Step 4: Use the updated Primary Learner Initial fingerprint database The WiFi signal strength information in is used to predict, and then the formula (10) is used to obtain the Prediction Matrix :
[0013] (10)
[0014] Step 5: Combine the prediction matrices of all primary learners with After splicing, we get the stacked layer feature matrix ;
[0015] Step 6: Stack the layer feature matrix Input secondary learner The original target variable is obtained by processing , so as to use formula (11) to Parameters Update and get the updated secondary learner :
[0016] (11)
[0017] In formula (11), is the stacked layer feature matrix The i-th eigenvector of Represents the i-th position sample point in the original target variable;
[0018] Step 7: Get new samples to be predicted And enter the Primary Learner Make a prediction and get The predicted value of , so that after splicing all the prediction results, the stacked layer feature matrix is obtained , and then input the updated secondary learner The final prediction result is obtained .
[0019] The WAPI indoor positioning method based on the Stacking combination model of UMAP dimensionality reduction described in the present invention is also characterized in that step 2 is performed according to the following steps:
[0020] Step 2.1: Calculation The k nearest neighbors of ;in, express The jth nearest neighbor of The number of nearest neighbors of ;
[0021] Step 2.2: Calculate using formula (1) The minimum distance to the k nearest neighbors :
[0022] (1)
[0023] In formula (1), express and the jth nearest neighbor The Euclidean distance of
[0024] Step 2.3: Calculate using formula (2) The local scale :
[0025] = (2)
[0026] Step 2.4: Calculate the normalization constant K using formula (3):
[0027] (3)
[0028] Step 2.5: Use formula (4) to get and The positive weight between :
[0029] (4)
[0030] Step 2.6: Use formula (5) to obtain and Symmetric global topology between :
[0031] (5)
[0032] In formula (5), express and The reverse weight between ;
[0033] Step 2.7: Use formula (6) to obtain and Embedding similarity :
[0034] (6)
[0035] In formula (6), Mapping in low-dimensional space, express In the mapping of low-dimensional space, a and b are two control parameters;
[0036] Step 2.8: Use equation (7) to adjust a and b to obtain the updated embedding similarity ;
[0037] (7)
[0038] In formula (7), min_dist is the set minimum embedding distance;
[0039] Step 2.9: Use formula (8) to construct the cross entropy loss function CE:
[0040] (8)
[0041] Step 2.10: Use the stochastic gradient descent algorithm to optimize the cross entropy loss function CE to obtain the reduced-dimensional fingerprint database ;in, Represents the i-th position sample point after dimensionality reduction.
[0042] An electronic device of the present invention includes a memory and a processor, wherein the memory is used to store a program that supports the processor to execute the WAPI indoor positioning method, and the processor is configured to execute the program stored in the memory.
[0043] The present invention provides a computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and the computer program executes the steps of the WAPI indoor positioning method when the computer program is executed by a processor.
[0044] Compared with the prior art, the present invention has the following beneficial effects:
[0045] 1. The present invention is based on WAPI, and its high-strength encryption and identity authentication mechanism can provide crucial protection for data, provide stable and reliable signals, and achieve higher-precision indoor positioning, reducing the risk of location privacy leakage.
[0046] 2. The present invention automatically constructs a fingerprint database: by collecting RSSI data between APs, the fingerprint database can be constructed and dynamically updated without human intervention, which greatly increases the adaptability to environmental changes.
[0047] 3. The present invention introduces the UMAP algorithm and uses the UMAP feature extraction algorithm to reduce data dimension, thereby maintaining the local and global structure of the data and improving positioning accuracy.
[0048] 4. The present invention adopts the Stacking method to integrate multiple single positioning models, construct a combined model for optimization, and maximize the prediction performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] Figure 1 This is a framework diagram of the Stacking combination model of the present invention;
[0050] Figure 2 This is an offline flow chart of the WAPI indoor positioning method based on the Stacking combination model of UMAP dimensionality reduction according to the present invention;
[0051] Figure 3 This is an online flow chart of the WAPI indoor positioning method based on the Stacking combination model of UMAP dimensionality reduction of the present invention;
[0052] Figure 4 This is a rendering of the WAPI indoor positioning method based on the Stacking combination model of UMAP dimensionality reduction in the present invention. DETAILED DESCRIPTION
[0053] In this embodiment, a flowchart of a stacking combination model WAPI indoor positioning method based on UMAP dimension reduction is as follows: Figure 2 , Figure 3As shown in the figure, the UMAP algorithm is used to extract features and reduce the dimension of WAPI information in the building, and a Stacking combination model is constructed to reduce overfitting and improve model accuracy, so as to complete the high-precision prediction of indoor positions with this model. This method is suitable for indoor positioning scenarios that require high positioning accuracy, such as indoor navigation. Specifically, the indoor positioning method includes two stages: offline stage and online stage; Figure 2 As shown, the following steps are included;
[0054] Step 1, offline phase 1: data preprocessing;
[0055] Step 1.1, data collection;
[0056] Deploy WLAN routers in the target building, and collect WiFi signal strength information at multiple locations in the target building by measuring the received signal strength indicator (RSSI) data between wireless access points (APs), and upload it to the positioning platform. The platform is used to store fingerprint data, perform feature extraction and positioning calculations. User devices are used to scan WLAN signals and receive positioning results. Among them, each AP records the signal strength RSSI by detecting the broadcast signals released by other APs.
[0057] Step 1.2: Data preprocessing;
[0058] The platform obtains the initial fingerprint database after processing missing values and negative values of the data. ;in, Represents the initial fingerprint database Middle location sample points, and , Represents the initial fingerprint database Middle WiFi signal strength information of sample locations, Represents the initial fingerprint database Middle The two-dimensional position coordinates of the position sample points; Indicates the total number of location sample points; The true label is recorded as .
[0059] Step 2, Offline Phase 2: Use the Uniform Manifold Approximation Projection Algorithm (UMAP) to Perform feature extraction and build a fingerprint database; UMAP (Uniform Manifold Approximation and Projection) is a nonlinear technique for dimensionality reduction that can map high-dimensional data to a low-dimensional space while trying to maintain the original structure and topological relationship of the data. UMAP is particularly suitable for data visualization because it can effectively reveal structures and patterns in complex data sets.
[0060] Step 2: Use the uniform manifold approximate projection algorithm to Perform feature extraction and build fingerprint database;
[0061] Step 2.1: Calculation The k nearest neighbors of ;in, express The jth nearest neighbor of The number of nearest neighbors of ;
[0062] Step 2.2: Calculate using formula (1) The minimum distance to the k nearest neighbors :
[0063] (1)
[0064] In formula (1), express and the jth nearest neighbor The Euclidean distance of .
[0065] Step 2.3: Calculate using formula (2) The local scale :
[0066] = (2)
[0067] Step 2.4: Calculate the normalization constant K using formula (3):
[0068] (3)
[0069] Step 2.5: Use formula (4) to get and The positive weight between :
[0070] (4)
[0071] Step 2.6: In order to effectively deal with the noise and outliers in the adjacency graph and obtain a more accurate symmetric global topological structure, so as to better reflect the topological structure of the original data in the high-dimensional space and finally achieve more effective dimensionality reduction and visualization, the symmetric rule of t distribution is adopted, the fuzzy sets are merged, and formula (5) is used to obtain and Symmetric global topology between :
[0072] (5)
[0073] In formula (5), express and The reverse weight between .
[0074] Step 2.7: Use formula (6) to obtain and Embedding similarity :
[0075] (6)
[0076] In formula (6), Mapping in low-dimensional space, express In the mapping of low-dimensional space, a and b are two control parameters;
[0077] Step 2.8: Use equation (7) to adjust a and b and fit Make it approximately equal to the piecewise function in formula (7), and get the updated embedding similarity ;
[0078] (7)
[0079] In formula (7), min_dist is the set minimum embedding distance.
[0080] Step 2.9: Use formula (8) to construct the cross entropy loss function CE:
[0081] (8)
[0082] Step 2.10: Use the stochastic gradient descent algorithm to optimize the cross entropy loss function CE to obtain the reduced-dimensional fingerprint database .
[0083] Step 2.11: Dynamic update; the platform regularly updates the fingerprint library to ensure that the data remains valid as the environment changes.
[0084] Step 3, offline phase 3: build the stacking combination model;
[0085] The Stacking ensemble learning framework is a multi-layer model integration technology that generates meta-features by training multiple different basic models, and then passes these meta-features as input to a secondary model (meta-model) for final prediction, thereby integrating the prediction capabilities of multiple models to improve the accuracy and robustness of the overall prediction. This patent uses this framework for positioning prediction, such as Figure 1 As shown, the Stacking combination model framework diagram.
[0086] Step 3.1: Select Six models are used as primary learners to construct the Primary Learner , , and Process and get the i-th sample The predicted value of , so we can use formula (9) to Primary Learner Parameters Update and get the updated Primary Learner :
[0087] (9)
[0088] In formula (9), L is the Primary Learner The loss function of .
[0089] Step 3.2: Utilize the updated Primary Learner Initial fingerprint database The WiFi signal strength information in is used to predict, and then the formula (10) is used to obtain the Prediction Matrix :
[0090] (10)
[0091] Step 3.3: Construct the stacked layer feature matrix.
[0092] Step 3.4: Combine the prediction matrices of all primary learners with After splicing, we get the stacked layer feature matrix ;
[0093] Step 3.5: Stack the layer feature matrix Input secondary learner The original target variable is obtained by processing , so as to use formula (11) to Parameters Update and get the updated secondary learner , and then get the Stacking combination model;
[0094] (11)
[0095] In formula (11), is the stacked layer feature matrix The i-th eigenvector of .
[0096] Step 4: Figure 3 As shown, real-time positioning;
[0097] Step 4.1: Real-time data acquisition;
[0098] When a user enters an indoor environment, he sends a WIFI signal request to the surrounding wireless access points (AP) through a terminal device (such as a smartphone or other WIFI device). The device connects to the WLAN to scan the AP signal. After the AP receives the signal from the user device, it records the signal strength (RSSI) of each device, that is, .
[0099] Step 4.2: Use the Stacking combination model to complete the location prediction;
[0100] Each new sample Input into the Stacking combination model for prediction, that is, use the Primary Learner ,get After concatenating all the prediction results, we get the stacked layer feature matrix , and then input the updated secondary learner The final prediction result is obtained .
[0101] In this embodiment, an electronic device includes a memory and a processor, wherein the memory is used to store a program that supports the processor to execute the above 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 on the computer-readable storage medium, and the computer program executes the steps of the above method when executed by a processor.
[0103] Experimental Results
[0104] This experiment preprocesses the fingerprint data of the Sahkotalo building on the University of Tampere, including 9291 pieces of WiFi signal strength (Received Signal Strength Indicator, RSSI) information at different locations and the three-dimensional reference coordinates of the ground truth location.
[0105] After data processing, feature extraction was performed on 5293 sample information. Four algorithms, namely Uniform Manifold Approximation and Projection (UMAP), Linear Discriminant Analysis (LDA), Principal Component Analysis (PCA) and Singular Value Decomposition (SVD), were used to complete dimensionality reduction. Six single positioning models, namely 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), were constructed. The effect was reflected by the average error, and the influence of the average positioning error of each model under different extraction algorithms was explored. The results are shown in Table 1.
[0106] Table 1 Average positioning error of each model under different extraction algorithms (unit: m)
[0107]
[0108] Compared with the three feature extraction methods of LDA, PCA, and SVD, the prediction error of UMAP modeling after dimensionality reduction is small and the positioning accuracy is high.
[0109] The average positioning error of the best single positioning model XgBoost is 1.808m. Since the ANN model always performs poorly in single positioning, it is not used as a secondary learner in the Stacking method for combined optimization. GBDT, KNN, RF, SVM, XgBoost, and ANN are used as primary learners, and GBDT, KNN, RF, SVM, and XgBoost are used as secondary learners to train the Stacking model. The model evaluation and comparison are completed through the three evaluation indicators of average positioning error Error, determination coefficient R2, and accuracy index Acc. The results are shown in Table 2.
[0110] Table 2 Statistics of various stacking combination models based on UMAP dimensionality reduction
[0111]
[0112] From the above table, we can see that the Stacking combination model with RF as the secondary learner performs best, with an average positioning error of 1.482m, a determination coefficient of 0.974, and an accuracy of 97.5%.
[0113] Finally, UMAP is used to reduce the data dimension to obtain the fingerprint database Y, and the result is input into the primary learner ( ) for training, and then the prediction results of all primary learners are combined with the fingerprint database Y and input into the secondary learner (RF) for training to obtain the final positioning model. The experimental results show an accuracy of 1.48 meters. Figure 4 As shown, the predicted position point is closer to the actual position point, which shows that the prediction effect of the method of the present invention is better.
Claims
1. A WAPI indoor positioning method based on the Stacking combination model of UMAP dimensionality reduction, characterized in that: The steps are as follows: Step 1: Collect WiFi signal strength information at multiple locations in the target building and pre-process missing values and negative values to obtain the initial fingerprint database ;in, Represents the initial fingerprint database Middle location sample points, and , Represents the initial fingerprint database Middle WiFi signal strength information of sample locations, Represents the initial fingerprint database Middle The two-dimensional position coordinates of the position sample points; Indicates the total number of location sample points; The true label is recorded as ; Step 2: Use the uniform manifold approximate projection algorithm to Perform feature extraction to obtain a fingerprint database after dimensionality reduction ;in, Represents the i-th position sample point after dimensionality reduction; Step 3: Build Primary Learner , and Process and obtain The predicted value of , so we can use formula (9) to Primary Learner Parameters Update and get the updated Primary Learner : (9) In formula (9), L is the Primary Learner The loss function of Step 4: Use the updated Primary Learner Initial fingerprint database The WiFi signal strength information in is used to predict, and then the formula (10) is used to obtain the Prediction Matrix : (10) Step 5: Combine the prediction matrices of all primary learners with After splicing, we get the stacked layer feature matrix ; Step 6: Stack the layer feature matrix Input secondary learner The original target variable is obtained by processing , so as to use formula (11) to Parameters Update and get the updated secondary learner : (11) In formula (11), is the stacked layer feature matrix The i-th eigenvector of Represents the i-th position sample point in the original target variable; Step 7: Get new samples to be predicted And enter the Primary Learner Make a prediction and get The predicted value of , so that after splicing all the prediction results, the stacked layer feature matrix is obtained , and then input the updated secondary learner The final prediction result is obtained .
2. According to claim 1, a WAPI indoor positioning method based on the Stacking combination model of UMAP dimensionality reduction is characterized in that: Described step 2 is carried out as follows: Step 2.1: Calculation The k nearest neighbors of ;in, express The jth nearest neighbor of The number of nearest neighbors of ; Step 2.2: Calculate using formula (1) The minimum distance to the k nearest neighbors : (1) In formula (1), express and the jth nearest neighbor The Euclidean distance of Step 2.3: Calculate using formula (2) The local scale : = (2) Step 2.4: Calculate the normalization constant K using formula (3): (3) Step 2.5: Use formula (4) to get and The positive weight between : (4) Step 2.6: Use formula (5) to obtain and Symmetric global topology between : (5) In formula (5), express and The reverse weight between ; Step 2.7: Use formula (6) to obtain and Embedding similarity : (6) In formula (6), Mapping in low-dimensional space, express In the mapping of low-dimensional space, a and b are two control parameters; Step 2.8: Use formula (7) to adjust a and b to obtain the updated embedding similarity ; (7) In formula (7), min_dist is the set minimum embedding distance; Step 2.9: Use formula (8) to construct the cross entropy loss function CE: (8) Step 2.10: Use the stochastic gradient descent algorithm to optimize the cross entropy loss function CE to obtain the reduced-dimensional fingerprint database ;in, Represents the i-th position sample point after dimensionality reduction.
3. An electronic device, comprising a memory and a processor, characterized in that: The memory is used to store a program that supports the processor to execute the WAPI indoor positioning method according to claim 1 or 2, and the processor is configured to execute the program stored in the memory.
4. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the WAPI indoor positioning method according to claim 1 or 2 are executed.
Citation Information
Patent Citations
Behavior recognition and positioning method based on multi-task joint learning
CN108830185A
Android malicious software detection method based on improved stacking algorithm
CN111310185A
WiFi fingerprint indoor positioning method based on random forest and auto-encoder
CN111461251A
Network loan returned customer prediction method based on Stacking ensemble learning
CN112700325A
Large venue indoor positioning model construction method, system and device and storage medium
CN116193353A