A high-precision indoor positioning method and system fusing WiFi signals and geomagnetic features

By integrating WiFi signals and geomagnetic features, a high-precision indoor positioning method is developed. This method utilizes a convolutional autoencoder (CAE), an XGBoost classification model, and a deep convolutional neural network to achieve high-precision positioning across floors in complex indoor environments, thus solving the problem of insufficient accuracy of existing WiFi positioning methods in complex environments.

CN121384040BActive Publication Date: 2026-03-31CHINA UNIV OF MINING & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-12-23
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

Existing WiFi positioning methods have limited positioning accuracy in complex indoor environments, and their practicality and reliability in cross-floor positioning scenarios are not ideal. CSI positioning schemes have low vertical positioning accuracy in cross-floor scenarios and cannot fully utilize WiFi signals and geomagnetic features, resulting in limited indoor positioning accuracy.

Method used

A hierarchical processing architecture consisting of floor identification, router optimization, and high-precision planar positioning is adopted. Floor identification is performed through convolutional autoencoder (CAE) and XGBoost classification model. CSI feature analysis and KNN classification router optimization are combined, and deep convolutional neural network is used to perform multi-source data feature fusion and attention mechanism to improve positioning accuracy.

Benefits of technology

It achieves high-precision indoor positioning across floors, improves the robustness and positioning accuracy of floor identification, and significantly enhances the positioning stability and adaptability in complex multi-floor environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121384040B_ABST
    Figure CN121384040B_ABST
Patent Text Reader

Abstract

The application discloses a kind of high-precision indoor positioning method and system of fusion WiFi signal and geomagnetic characteristics, first in positioning area to WiFi wireless access point AP is scanned and obtains WiFi scanning detection result, then based on WiFi scanning detection result constructs first feature vector, then first feature vector is extracted using convolution auto-encoder CAE and obtains second feature vector;The application realizes the function of high-precision indoor positioning across floor with hierarchical processing architecture of adopting floor identification, router optimization and high-precision plane positioning, and the high precision and high robustness of floor identification task are guaranteed through convolution auto-encoder CAE and XGBoost classification model, while through the introduction of CSI feature analysis and KNN classification router optimization mechanism can accurately distinguish the line-of-sight propagation router, and the plane positioning model of fusion multi-source data and attention mechanism CNN can significantly improve positioning accuracy and environmental adaptability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of indoor high-precision positioning technology, specifically to a high-precision indoor positioning method and system that integrates WiFi signals and geomagnetic features. Background Technology

[0002] With the widespread adoption of smart devices and the continuous development of wireless communication technologies, indoor positioning technology has gradually become an important research area. In recent years, indoor positioning technology has developed rapidly. Based on whether it relies on positioning base stations, it can be divided into active positioning technologies, represented by WiFi, Bluetooth, and UWB, and passive positioning technologies, represented by inertial navigation, vision, and LiDAR. Among these, WiFi positioning technology has low power consumption, a moderate sensing range, and low deployment costs. It can directly use the widely distributed WiFi signals indoors for positioning without modifying commercial routers, and is considered one of the most promising indoor positioning technologies.

[0003] Currently, most existing WiFi positioning methods rely on Received Signal Strength Indicator (RSSI). However, RSSI signals fluctuate significantly and are easily affected by environmental interference, resulting in limited positioning accuracy in complex indoor environments. Furthermore, in large-scale positioning scenarios, the inherent high-dimensional sparsity of RSSI data makes it difficult for existing classification models to reliably extract effective features. This makes the practicality and reliability of existing solutions unsatisfactory in cross-floor positioning scenarios. While CSI-based positioning schemes are generally concentrated on two-dimensional positioning on a single floor, and although CSI data provides rich channel information, its quality is highly dependent on the propagation path, leading to low vertical positioning accuracy in cross-floor scenarios. In real-world environments with significant non-line-of-sight propagation and multipath effects, there is a lack of effective signal quality assessment and filtering mechanisms, making the positioning model highly susceptible to interference from low-quality CSI data. Moreover, existing methods struggle to fully utilize the complementary characteristics inherent in the environment, such as WiFi signals and geomagnetic features, further limiting indoor positioning accuracy. Therefore, a high-precision indoor positioning method and system that integrates WiFi signal and geomagnetic features is needed. Summary of the Invention

[0004] The purpose of this invention is to overcome the shortcomings of existing technologies. Existing WiFi positioning methods largely rely on Received Signal Strength Indicator (RSSI), but RSSI signals are prone to large fluctuations and environmental interference, resulting in limited positioning accuracy in complex indoor environments. Furthermore, in large-scale positioning scenarios, the inherent high-dimensional sparsity of RSSI data makes it difficult for existing classification models to reliably extract effective features. This makes existing solutions less practical and reliable in cross-floor positioning scenarios. While CSI-based positioning schemes are generally concentrated on two-dimensional positioning on a single floor, and although CSI data provides rich channel information, its quality is highly dependent on the propagation path, leading to low vertical positioning accuracy in cross-floor scenarios. This is particularly problematic in real-world scenarios with significant non-line-of-sight propagation and multipath effects. The lack of effective signal quality assessment and filtering mechanisms in the environment makes the positioning model highly susceptible to interference from low-quality CSI data. Furthermore, existing methods struggle to fully leverage the inherent complementary features of the environment, such as WiFi signals and geomagnetism, further limiting indoor positioning accuracy. This paper proposes a high-precision indoor positioning method and system that integrates WiFi signal and geomagnetic features. This system achieves cross-floor high-precision indoor positioning using a hierarchical processing architecture comprised of floor identification, router optimization, and high-precision planar positioning. The high accuracy and robustness of floor identification are ensured through a convolutional autoencoder (CAE) and XGBoost classification model. The introduction of CSI feature analysis and a KNN classification router optimization mechanism enables accurate identification of line-of-sight routers. Finally, the use of a planar positioning model that integrates multi-source data and an attention mechanism (CNN) significantly improves positioning accuracy and environmental adaptability.

[0005] To achieve the above objectives, the technical solution adopted by the present invention is as follows:

[0006] A high-precision indoor positioning method that integrates WiFi signals and geomagnetic features includes the following steps:

[0007] Step A: Scan and detect WiFi access points (APs) within the location area and obtain WiFi scanning and detection results; then construct the first feature vector based on the WiFi scanning and detection results.

[0008] Step B: Use a convolutional autoencoder (CAE) to perform deep feature extraction on the first feature vector and obtain the second feature vector.

[0009] Step C: Use the XGBoost classification model to classify the second feature vector and obtain the probability distribution of each floor. Then, based on the probability distribution of each floor, determine the final floor and obtain the floor recognition result.

[0010] Step D: Based on the floor identification results, filter the WiFi wireless access points (APs) on the same floor and obtain a sorted list of WiFi wireless access points (APs) on the same floor.

[0011] Step E: Collect WiFi CSI data of each WiFi access point AP in the same layer according to the sorting list of WiFi access points APs and extract CSI features to obtain the third feature vector.

[0012] Step F: Use the KNN binary classification model to perform distance state discrimination on the third feature vector and obtain the distance state discrimination result;

[0013] Step G: Based on the line-of-sight status discrimination result, perform data preprocessing on WiFi RSSI data, geomagnetic data and WiFi CSI data respectively to obtain preprocessed data;

[0014] Step H involves fusing multimodal features into the preprocessed data to obtain fused data, and then concatenating the fused data to obtain the fused feature tensor.

[0015] Step I involves using a deep convolutional neural network to perform coordinate transformation on the fused feature tensor and obtain two-dimensional planar coordinates, thereby completing the high-precision indoor positioning operation across floors.

[0016] The aforementioned high-precision indoor positioning method that integrates WiFi signals and geomagnetic features includes step A, which involves scanning and detecting WiFi access points (APs) within the positioning area and obtaining the WiFi scanning results. A first feature vector is then constructed based on the WiFi scanning results. The specific steps are as follows.

[0017] Step A1: Scan and detect WiFi access points (APs) within the location area and obtain the WiFi scan results. Specifically, the set of all potential WiFi access points (APs) to be scanned within the location area is defined as follows: ,in , and These are the various WiFi access points (APs). The total number of WiFi access points (APs) is denoted as , and the WiFi scanning results generated for each scan are denoted as a scan result list, which includes the MAC address and RSSI value of each WiFi access point (AP).

[0018] Step A2: Construct a first feature vector based on the WiFi scanning detection results. If a WiFi access point (AP) in set A belongs to the scan result list, record the measured RSSI value of that WiFi access point AP. If a WiFi access point AP in set A does not belong to the scan result list, record the RSSI value of that WiFi access point AP as -100dBm, as shown in formula (1).

[0019] (1)

[0020] in, The first eigenvector, , and Let be the RSSI values ​​of each WiFi access point (AP) in set A, and T be the matrix transpose.

[0021] In the aforementioned high-precision indoor positioning method that integrates WiFi signals and geomagnetic features, step B involves using a convolutional autoencoder (CAE) to extract deep features from a first feature vector and obtain a second feature vector. The CAE includes an encoder. and decoder The specific steps are as follows:

[0022] Step B1, using an encoder For the first eigenvector A nonlinear transformation is performed to obtain the second eigenvector, as shown in formula (2).

[0023] (2)

[0024] in, This is the second feature vector. For encoder parameter;

[0025] Step B2, using the decoder For the second eigenvector Reconstruction is performed to obtain the reconstructed feature vector, as shown in formula (3).

[0026] (3)

[0027] in, To reconstruct the feature vector, For decoder parameter;

[0028] Step B3, calculate the first eigenvector With reconstructing feature vectors The reconstruction error between them is then used to optimize the encoder. parameter and decoder parameter The reconstruction error calculation process is shown in formula (4).

[0029] (4)

[0030] in, This represents the reconstruction error.

[0031] The aforementioned high-precision indoor positioning method that integrates WiFi signals and geomagnetic features, in step C, uses an XGBoost classification model to classify the second feature vector and obtain the probability distribution of each floor. Then, based on the probability distribution of each floor, the final floor is determined and the floor identification result is obtained. The specific steps are as follows.

[0032] Step C1: Use the XGBoost classification model to classify the second feature vector. The probability distribution of each floor is then classified and obtained, as shown in formula (5).

[0033] (5)

[0034] in, For XGBoost classification models, For the corresponding floor probability, , and Each floor is represented by a separate floor. Total number of floors;

[0035] Step C2 involves determining the final floor based on the probability distribution of each floor and obtaining the floor identification result. The final floor has the highest probability, as shown in formula (6).

[0036] (6)

[0037] in, For the floor identification results, For floors, The set of floors, and the set of floors .

[0038] The aforementioned high-precision indoor positioning method integrating WiFi signals and geomagnetic features includes step D, which involves filtering WiFi access points (APs) on the same floor based on floor identification results and obtaining a ranked list of WiFi APs on the same floor. Specifically, this involves filtering WiFi APs on the same floor based on floor identification results to obtain a candidate set of WiFi APs on the same floor, and then filtering and ranking these candidate sets based on WiFi scanning detection results to obtain the ranked list of WiFi APs on the same floor. The specific steps are as follows.

[0039] Step D1: Based on the floor identification results, filter the WiFi access points (APs) on the same floor and obtain a candidate set of WiFi access points on the same floor. Specifically, this is done based on the floor identification results. Query the router floor distribution map and filter out all WiFi wireless access points (APs) located on that floor to obtain a candidate set of WiFi wireless access points (APs) on the same floor.

[0040] Step D2: Based on the candidate set of WiFi wireless access points (APs) on the same floor, filter and sort the WiFi scanning and detection results to obtain the sorted list of WiFi wireless access points (APs) on the same floor. Specifically, extract the WiFi wireless access point (AP) signals belonging to the candidate set of WiFi wireless access points (APs) on the same floor from the WiFi scanning and detection results and sort them in descending order according to their RSSI values ​​to form the sorted list of WiFi wireless access points (APs) on the same floor.

[0041] Step E: Collect WiFi CSI data for each WiFi access point (AP) in sequence according to the same-floor WiFi access point (AP) sorting list and perform CSI feature extraction to obtain the third feature vector. Specifically, collect WiFi CSI data for each WiFi access point (AP) in sequence according to the same-floor WiFi access point (AP) sorting list and obtain WiFi CSI collection results. Then, perform CSI feature extraction on the WiFi CSI collection results to obtain the third feature vector. The CSI feature extraction specifically involves extracting quantized features that characterize the signal propagation path and constructing the third feature vector. Furthermore, the quantization features characterizing the signal propagation path include average delay spread features, channel gain amplitude variance features, peak-to-average power ratio features, and phase standard deviation features.

[0042] The aforementioned high-precision indoor positioning method that integrates WiFi signals and geomagnetic features, step F, involves using a KNN binary classification model to determine the line-of-sight (LOS) state of the third feature vector and obtaining the LOS state determination result. The specific steps are as follows.

[0043] Step F1: Calculate the Euclidean distance between the third feature vector and the feature vectors of all samples in the training set, as shown in formula (7).

[0044] (7)

[0045] in, The third eigenvector With the training set Feature vector of each sample The Euclidean distance between them The index of the training set samples;

[0046] Step F2: After calculating all samples, select the one with the smallest distance. Each sample is used as the nearest neighbor, and then based on The nearest neighbor categories are used to determine the line-of-sight status. If the line-of-sight status of the WiFi access point (AP) is determined to be line-of-sight, then the WiFi access point AP is marked as the preferred target and its corresponding MAC address is recorded.

[0047] The aforementioned high-precision indoor positioning method integrating WiFi signals and geomagnetic features, step G, involves preprocessing WiFi RSSI data, geomagnetic data, and WiFi CSI data based on line-of-sight status discrimination results to obtain preprocessed data. The preprocessed data includes preprocessed WiFi RSSI data, preprocessed geomagnetic data, and preprocessed WiFi CSI data. The specific steps are as follows.

[0048] Step G1: Perform data preprocessing on the WiFi RSSI data to obtain preprocessed WiFi RSSI data. Specifically, use a Hampel filter to identify and replace outliers in the received RSSI sequence to obtain preprocessed WiFi RSSI data.

[0049] Step G2 involves preprocessing the geomagnetic data to obtain preprocessed geomagnetic data. The specific steps are as follows:

[0050] Step G21: Calculate the modulus of the geomagnetic data, as shown in formula (8).

[0051] (8)

[0052] in, This is the geomagnetic modulus. , and The magnetometers are respectively at Three-axis geomagnetic components;

[0053] Step G22: Apply mean filtering to the modulus sequence to obtain preprocessed geomagnetic data;

[0054] Step G3: Perform data preprocessing on the WiFi CSI data to obtain preprocessed WiFi CSI data, wherein the preprocessed WiFi CSI data includes preprocessed CSI amplitude data and preprocessed CSI phase data, specifically by performing format conversion, amplitude processing and phase processing on the WiFi CSI data;

[0055] The format conversion specifically involves calculating the magnitude and phase of the complex CSI data to obtain the amplitude and phase information of the dual antennas, thereby obtaining CSI amplitude data and CSI phase data respectively.

[0056] The amplitude processing specifically involves correcting the CSI amplitude data by removing the automatic gain control (AGC) effect, and then sequentially applying Hampel filtering and mean filtering to obtain the preprocessed CSI amplitude data.

[0057] The phase processing specifically involves performing a phase unwinding operation on the CSI phase data and eliminating the 2π jump to restore the true continuous phase. Then, a linear transformation calibration is performed on the true continuous phase to compensate for the linear phase error caused by carrier frequency offset and sampling frequency offset, thereby obtaining the calibrated phase. Next, Hampel and mean filtering are performed on the calibrated phase, and the phase difference between adjacent antennas is calculated to obtain the preprocessed CSI phase data.

[0058] The aforementioned high-precision indoor positioning method that fuses WiFi signals and geomagnetic features includes step H, which involves fusing multimodal features from the preprocessed data to obtain fused data, and then stitching the fused data together to obtain a fused feature tensor. The specific steps are as follows:

[0059] Step H1 involves fusing multimodal features from the preprocessed data to obtain the fused data. The specific steps are as follows:

[0060] Step H11: Collect continuous time frame data, crop the preprocessed data according to the set size, and obtain cropped CSI amplitude data, cropped CSI phase difference data, cropped RSSI data, and cropped geomagnetic data respectively.

[0061] Step H12 involves normalizing and mapping the cropped CSI amplitude data, cropped CSI phase difference data, cropped RSSI data, and cropped geomagnetic data to... between;

[0062] Step H2 involves concatenating the fused data to obtain a fused feature tensor, wherein the fused feature tensor... Used as a location fingerprint feature.

[0063] The aforementioned high-precision indoor positioning method that integrates WiFi signals and geomagnetic features includes step I, which uses a deep convolutional neural network to perform coordinate transformation on the fused feature tensor and obtain two-dimensional planar coordinates, thereby completing the high-precision indoor positioning operation across floors. The specific steps are as follows.

[0064] Step I1: Use a deep convolutional neural network to fuse the feature tensor. Feature extraction is performed to obtain the basic feature tensor, wherein the deep convolutional neural network is composed of multiple convolutional layers and pooling layers stacked alternately.

[0065] (9)

[0066] in, Basic feature tensor It is a composite function of convolution and pooling operations;

[0067] Step I2: Add an attention mechanism to the deep convolutional neural network and obtain the deep convolutional neural network with the attention mechanism introduced. Then, use the deep convolutional neural network with the attention mechanism introduced to process the basic feature tensor. Attention weighting is performed to obtain the attention-weighted feature tensor, wherein the attention mechanism includes a channel attention component and a spatial attention component. The specific steps are as follows.

[0068] Step I21, apply the channel attention component to the basic feature tensor The process involves performing channel attention weighting to obtain channel weight tensors, and then using these channel weight tensors to construct weighted channel feature tensors. The specific steps are as follows:

[0069] Step I211, apply the channel attention component to the basic feature tensor Channel attention weighting is performed to obtain the channel weight tensor, as shown in formula (10).

[0070] (10)

[0071] in, For channel weight tensors, It is the Sigmoid activation function. It is the ReLU activation function. , , and For the weights of each fully connected layer, This is a global average pooling operation. This is a global max pooling operation;

[0072] Step I212, using the channel weight tensor Constructing the weighted channel feature tensor Specifically, as shown in formula (11),

[0073] (11)

[0074] in, This is channel-by-channel multiplication;

[0075] Step I22, apply spatial attention components to the weighted channel feature tensor Spatial attention weighting is performed to obtain the spatial weight tensor, as shown in formula (12).

[0076] (12)

[0077] in, For the space weight tensor, This is a tensor splicing operation along the channel dimension. This is a 7x7 convolution operation;

[0078] Step I23, convert the channel feature tensor With spatial weight tensor The features are weighted and attention-weighted, as shown in formula (13).

[0079] (13)

[0080] in, For the attention-weighted feature tensor, For space-wise multiplication;

[0081] Step I3: Perform coordinate regression on the attention-weighted feature tensor to obtain two-dimensional planar coordinates. Specifically, this involves regressing the attention-weighted feature tensor... Expand it into a one-dimensional vector, and then input the one-dimensional vector into a coordinate regressor composed of fully connected layers, as shown in formula (14).

[0082] (14)

[0083] in, Two-dimensional plane coordinates, To map high-dimensional features to a two-dimensional coordinate space, a regression network... For flattening operation.

[0084] A high-precision indoor positioning system integrating WiFi signals and geomagnetic features includes a scanning and detection module, a depth feature extraction module, a floor identification module, a same-floor filtering module, a CSI feature extraction module, a line-of-sight status discrimination module, a data preprocessing module, a feature fusion module, and a coordinate transformation module. The scanning and detection module scans and detects WiFi access points (APs) within the positioning area and obtains WiFi scanning results, then constructs a first feature vector based on the WiFi scanning results. The depth feature extraction module uses a convolutional autoencoder (CAE) to extract depth features from the first feature vector and obtain a second feature vector. The floor identification module uses an XGBoost classification model to classify the second feature vector and obtain the probability distribution of each floor, then determines the final floor based on the probability distribution and obtains the floor identification result. The same-floor filtering module filters the same-floor WiFi access points (APs) according to the floor identification result and obtains a sorted list of same-floor WiFi access points (APs). The CSI feature extraction module sequentially collects WiFi signals from each WiFi access point (AP) according to the sorted list of same-floor WiFi access points (APs). The CSI data is processed and CSI features are extracted to obtain a third feature vector; the line-of-sight state discrimination module is used to use a KNN binary classification model to discriminate the line-of-sight state of the third feature vector and obtain the line-of-sight state discrimination result; the data preprocessing module is used to preprocess WiFi RSSI data, geomagnetic data and WiFi CSI data based on the line-of-sight state discrimination result and obtain preprocessed data; the feature fusion module is used to perform multimodal feature fusion on the preprocessed data and obtain fused data, and then the fused data is spliced ​​to obtain a fused feature tensor; the coordinate transformation module is used to perform coordinate transformation on the fused feature tensor using a deep convolutional neural network and obtain two-dimensional planar coordinates, thereby completing the high-precision indoor positioning operation across floors.

[0085] The beneficial effects of this invention are as follows: This invention provides a high-precision indoor positioning method and system that integrates WiFi signals and geomagnetic features. First, it scans and detects WiFi access points (APs) within the positioning area to obtain WiFi scanning results. Then, it constructs a first feature vector based on the WiFi scanning results. Next, it uses a convolutional autoencoder (CAE) to extract deep features from the first feature vector to obtain a second feature vector. Subsequently, it uses an XGBoost classification model to classify the second feature vector and obtain the probability distribution of each floor. Based on the probability distribution of each floor, it determines the final floor and obtains the floor identification result. Then, based on the floor identification result, it filters the WiFi access points (APs) on the same floor to obtain a sorted list of WiFi access points on the same floor. Next, it collects WiFi CSI data for each WiFi access point (AP) according to the sorted list and extracts CSI features to obtain a third feature vector. Then, it uses a KNN binary classification model to determine the line-of-sight (LOS) status of the third feature vector and obtains the LOS status determination result. Finally, based on the LOS status determination result, it analyzes the WiFi RSSI data, geomagnetic data, and WiFi... The CSI data undergoes preprocessing to obtain preprocessed data. Subsequently, multimodal feature fusion is performed on the preprocessed data to obtain fused data. The fused data is then concatenated to obtain a fused feature tensor. Finally, a deep convolutional neural network is used to perform coordinate transformation on the fused feature tensor to obtain two-dimensional planar coordinates, thus completing the high-precision indoor positioning operation across floors. This effectively realizes that the high-precision indoor positioning method and system has the function of performing high-precision indoor positioning across floors using a hierarchical processing architecture consisting of floor identification, router optimization, and high-precision planar positioning. Furthermore, the convolutional autoencoder (CAE) can identify and retain the most representative data essence from high-dimensional sparse input data. The key information of the structure is ignored while random fluctuations and redundant noise. The XGBoost classification model can efficiently integrate the deep feature learning representation capability and the ensemble learning decision advantage, ensuring high accuracy and robustness of the floor identification task. At the same time, by introducing CSI feature analysis and KNN classification router optimization mechanism, the line-of-sight propagation router can be accurately identified. Furthermore, by adopting a planar localization model that integrates multi-source data and attention mechanism CNN, the localization accuracy and environmental adaptability can be significantly improved. This invention can closely coordinate and complement the advantages of floor identification, router optimization and high-precision planar localization to form a complete technical solution that can achieve stable and accurate localization in complex multi-story environments. Attached Figure Description

[0086] Figure 1 This is an overall flowchart of a high-precision indoor positioning method that integrates WiFi signals and geomagnetic features according to the present invention;

[0087] Figure 2This is a schematic diagram illustrating the positioning principle of a high-precision indoor positioning system that integrates WiFi signals and geomagnetic features, according to the present invention.

[0088] Figure 3 This is a comparison diagram of WiFi RSSI acquired signal and CAE reconstructed signal in an embodiment of the present invention;

[0089] Figure 4 This is a floor identification confusion matrix diagram in an embodiment of the present invention;

[0090] Figure 5 This is a comparison chart of the positioning error CDF curves in an embodiment of the present invention. Detailed Implementation

[0091] The present invention will now be further described with reference to the accompanying drawings.

[0092] like Figure 1 As shown, the present invention provides a high-precision indoor positioning method that integrates WiFi signals and geomagnetic features, comprising the following steps:

[0093] Step A: Scan and detect WiFi access points (APs) within the location area and obtain WiFi scanning results. Then, construct the first feature vector based on the WiFi scanning results. The specific steps are as follows.

[0094] Step A1: Scan and detect WiFi access points (APs) within the location area and obtain the WiFi scan results. Specifically, the set of all potential WiFi access points (APs) to be scanned within the location area is defined as follows: ,in , and These are the various WiFi access points (APs). The total number of WiFi access points (APs) is denoted as , and the WiFi scanning results generated for each scan are denoted as a scan result list, which includes the MAC address and RSSI value of each WiFi access point (AP).

[0095] Step A2: Construct a first feature vector based on the WiFi scanning detection results. If a WiFi access point (AP) in set A belongs to the scan result list, record the measured RSSI value of that WiFi access point AP. If a WiFi access point AP in set A does not belong to the scan result list, record the RSSI value of that WiFi access point AP as -100dBm, as shown in formula (1).

[0096] (1)

[0097] in, The first eigenvector, , and Let be the RSSI values ​​of each WiFi access point (AP) in set A, and T be the matrix transpose.

[0098] Step B involves using a convolutional autoencoder (CAE) to perform deep feature extraction on the first feature vector and obtain a second feature vector, wherein the CAE includes an encoder. and decoder The specific steps are as follows:

[0099] Among them, since the total number of potential WiFi access points (APs) to be scanned is much greater than the number of WiFi access points that can be acquired in a single signal acquisition, the first feature vector... This data contains a large number of invalid values ​​representing missing signals and exhibits significant high-dimensional sparsity. To automatically learn core features from this high-dimensional sparse data that are effective for floor discrimination and can withstand environmental signal fluctuations, a convolutional autoencoder (CAE) is introduced for processing. The CAE uses convolution operations to capture the first feature vector. The dependencies within a local range are gradually constructed into a hierarchical feature representation through pooling operations, thereby starting from the first feature vector. It automatically learns the essential characteristics of robustness.

[0100] Step B1, using an encoder For the first eigenvector A nonlinear transformation is performed to obtain the second eigenvector, as shown in formula (2).

[0101] (2)

[0102] in, This is the second feature vector. For encoder parameter;

[0103] encoder The first eigenvector of the original signal space, which contains a lot of redundancy and noise, can be used to... Project it into a low-dimensional feature space that can reflect the inherent distribution pattern.

[0104] Step B2, using the decoder For the second eigenvector Reconstruction is performed to obtain the reconstructed feature vector, as shown in formula (3).

[0105] (3)

[0106] in, To reconstruct the feature vector, For decoder parameter;

[0107] Step B3, calculate the first eigenvector With reconstructing feature vectors The reconstruction error between them is then used to optimize the encoder. parameter and decoder parameter The reconstruction error calculation process is shown in formula (4).

[0108] (4)

[0109] in, This represents the reconstruction error.

[0110] Reconstruction error Used for excitation encoder From the high-dimensional sparse first eigenvector It identifies and retains the key information that best characterizes the essential structure of the data while ignoring random fluctuations and redundant noise.

[0111] encoder Ultimately, it learns to generate a highly refined, low-dimensional second feature vector. The second feature vector Not only is the dimensionality significantly reduced, but it also contains a stable pattern of signal spatial distribution and provides higher quality and more discriminative input for subsequent floor classification.

[0112] Step C involves using the XGBoost classification model to classify the second feature vector and obtain the probability distribution of each floor. Then, based on the probability distribution of each floor, the final floor is determined, and the floor identification result is obtained. The specific steps are as follows:

[0113] XGBoost, a gradient boosting framework, is a powerful ensemble model that iteratively generates a series of decision trees, each of which corrects the prediction error of the previous tree. XGBoost exhibits excellent prediction accuracy, high computational speed, and good overfitting suppression in classification tasks involving structured data.

[0114] Step C1: Use the XGBoost classification model to classify the second feature vector. The probability distribution of each floor is then classified and obtained, as shown in formula (5).

[0115] (5)

[0116] in, For XGBoost classification models, For the corresponding floor probability, , and Each floor is represented by a separate floor. Total number of floors;

[0117] The XGBoost classification model uses multiple decision trees integrated internally to make hierarchical judgments and votes, and finally summarizes the outputs of all trees.

[0118] Step C2 involves determining the final floor based on the probability distribution of each floor and obtaining the floor identification result. The final floor has the highest probability, as shown in formula (6).

[0119] (6)

[0120] in, For the floor identification results, For floors, The set of floors, and the set of floors .

[0121] Step D involves filtering the WiFi access points (APs) on the same floor based on the floor identification results and obtaining a ranked list of these APs. Specifically, this involves filtering the APs on the same floor based on the floor identification results to obtain a candidate set of WiFi access points. Then, based on this candidate set, the WiFi scanning and detection results are further filtered and ranked to obtain the ranked list of WiFi access points on the same floor. The specific steps are as follows:

[0122] Step D1: Based on the floor identification results, filter the WiFi access points (APs) on the same floor and obtain a candidate set of WiFi access points on the same floor. Specifically, this is done based on the floor identification results. Query the router floor distribution map and filter out all WiFi wireless access points (APs) located on that floor to obtain a candidate set of WiFi wireless access points (APs) on the same floor.

[0123] Step D2: Based on the candidate set of WiFi wireless access points (APs) on the same floor, filter and sort the WiFi scanning and detection results to obtain the sorted list of WiFi wireless access points (APs) on the same floor. Specifically, extract the WiFi wireless access point (AP) signals belonging to the candidate set of WiFi wireless access points (APs) on the same floor from the WiFi scanning and detection results and sort them in descending order according to their RSSI values ​​to form the sorted list of WiFi wireless access points (APs) on the same floor.

[0124] Step E: Collect WiFi CSI data for each WiFi access point (AP) in sequence according to the same-floor WiFi access point (AP) sorting list and perform CSI feature extraction to obtain the third feature vector. Specifically, collect WiFi CSI data for each WiFi access point (AP) in sequence according to the same-floor WiFi access point (AP) sorting list and obtain WiFi CSI collection results. Then, perform CSI feature extraction on the WiFi CSI collection results to obtain the third feature vector. The CSI feature extraction specifically involves extracting quantized features that characterize the signal propagation path and constructing the third feature vector. Furthermore, the quantization features characterizing the signal propagation path include average delay spread features, channel gain amplitude variance features, peak-to-average power ratio features, and phase standard deviation features.

[0125] The average delay spread feature is used to characterize the delay of signal multipath propagation, the channel gain amplitude variance feature is used to reflect the stability of channel amplitude, the peak-to-average power ratio is used to reflect the ratio of peak to average signal power, and the phase standard deviation is used to describe the dispersion of channel phase information.

[0126] Step F involves using a KNN binary classification model to determine the view distance state of the third feature vector and obtaining the view distance state determination result. The specific steps are as follows.

[0127] Step F1: Calculate the Euclidean distance between the third feature vector and the feature vectors of all samples in the training set, as shown in formula (7).

[0128] (7)

[0129] in, The third eigenvector With the training set Feature vector of each sample The Euclidean distance between them The index of the training set samples;

[0130] Step F2: After calculating all samples, select the one with the smallest distance. Each sample is used as the nearest neighbor, and then based on The nearest neighbor categories are used to determine the line-of-sight status. If the line-of-sight status of the WiFi access point (AP) is determined to be line-of-sight, then the WiFi access point AP is marked as the preferred target and its corresponding MAC address is recorded.

[0131] Step G involves preprocessing the WiFi RSSI data, geomagnetic data, and WiFi CSI data based on the line-of-sight status determination results to obtain preprocessed data. The preprocessed data includes preprocessed WiFi RSSI data, preprocessed geomagnetic data, and preprocessed WiFi CSI data. The specific steps are as follows.

[0132] Step G1: Perform data preprocessing on the WiFi RSSI data to obtain preprocessed WiFi RSSI data. Specifically, use a Hampel filter to identify and replace outliers in the received RSSI sequence to obtain preprocessed WiFi RSSI data.

[0133] Step G2 involves preprocessing the geomagnetic data to obtain preprocessed geomagnetic data. The specific steps are as follows:

[0134] Step G21: Calculate the modulus of the geomagnetic data, as shown in formula (8).

[0135] (8)

[0136] in, This is the geomagnetic modulus. , and The magnetometers are respectively at Three-axis geomagnetic components;

[0137] Step G22: Apply mean filtering to the modulus sequence to obtain preprocessed geomagnetic data;

[0138] Step G3: Perform data preprocessing on the WiFi CSI data to obtain preprocessed WiFi CSI data, wherein the preprocessed WiFi CSI data includes preprocessed CSI amplitude data and preprocessed CSI phase data, specifically by performing format conversion, amplitude processing and phase processing on the WiFi CSI data;

[0139] The format conversion specifically involves calculating the magnitude and phase of the complex CSI data to obtain the amplitude and phase information of the dual antennas, thereby obtaining CSI amplitude data and CSI phase data respectively.

[0140] The amplitude processing specifically involves correcting the CSI amplitude data by removing the automatic gain control (AGC) effect, and then sequentially applying Hampel filtering and mean filtering to obtain the preprocessed CSI amplitude data.

[0141] The phase processing specifically involves performing a phase unwinding operation on the CSI phase data and eliminating the 2π jump to restore the true continuous phase. Then, a linear transformation calibration is performed on the true continuous phase to compensate for the linear phase error caused by carrier frequency offset and sampling frequency offset, thereby obtaining the calibrated phase. Next, Hampel and mean filtering are performed on the calibrated phase, and the phase difference between adjacent antennas is calculated to obtain the preprocessed CSI phase data.

[0142] Step H involves fusing multimodal features from the preprocessed data to obtain fused data, and then concatenating the fused data to obtain the fused feature tensor. The specific steps are as follows.

[0143] Step H1 involves fusing multimodal features from the preprocessed data to obtain the fused data. The specific steps are as follows:

[0144] Step H11: Collect continuous time frame data, crop the preprocessed data according to the set size, and obtain cropped CSI amplitude data, cropped CSI phase difference data, cropped RSSI data, and cropped geomagnetic data respectively.

[0145] Step H12 involves normalizing and mapping the cropped CSI amplitude data, cropped CSI phase difference data, cropped RSSI data, and cropped geomagnetic data to... between;

[0146] Step H2 involves concatenating the fused data to obtain a fused feature tensor, wherein the fused feature tensor... Used as a location fingerprint feature.

[0147] Step I involves using a deep convolutional neural network to perform coordinate transformation on the fused feature tensor and obtain two-dimensional planar coordinates, thereby completing the high-precision indoor positioning operation across floors. The specific steps are as follows.

[0148] Step I1: Use a deep convolutional neural network to fuse the feature tensor. Feature extraction is performed to obtain the basic feature tensor, wherein the deep convolutional neural network is composed of multiple convolutional layers and pooling layers stacked alternately.

[0149] (9)

[0150] in, Basic feature tensor It is a composite function of convolution and pooling operations;

[0151] Step I2: Add an attention mechanism to the deep convolutional neural network and obtain the deep convolutional neural network with the attention mechanism introduced. Then, use the deep convolutional neural network with the attention mechanism introduced to process the basic feature tensor. Attention weighting is performed to obtain the attention-weighted feature tensor, wherein the attention mechanism includes a channel attention component and a spatial attention component. The specific steps are as follows.

[0152] Step I21, apply the channel attention component to the basic feature tensor The process involves performing channel attention weighting to obtain channel weight tensors, and then using these channel weight tensors to construct weighted channel feature tensors. The specific steps are as follows:

[0153] Step I211, apply the channel attention component to the basic feature tensor Channel attention weighting is performed to obtain the channel weight tensor, as shown in formula (10).

[0154] (10)

[0155] in, For channel weight tensors, It is the Sigmoid activation function. It is the ReLU activation function. , , and For the weights of each fully connected layer, This is a global average pooling operation. This is a global max pooling operation;

[0156] Step I212, using the channel weight tensor Constructing the weighted channel feature tensor Specifically, as shown in formula (11),

[0157] (11)

[0158] in, This is channel-by-channel multiplication;

[0159] Step I22, apply spatial attention components to the weighted channel feature tensor Spatial attention weighting is performed to obtain the spatial weight tensor, as shown in formula (12).

[0160] (12)

[0161] in, For the space weight tensor, This is a tensor splicing operation along the channel dimension. This is a 7x7 convolution operation;

[0162] Step I23, convert the channel feature tensor With spatial weight tensor The features are weighted and attention-weighted, as shown in formula (13).

[0163] (13)

[0164] in, For the attention-weighted feature tensor, For space-wise multiplication;

[0165] Step I3: Perform coordinate regression on the attention-weighted feature tensor to obtain two-dimensional planar coordinates. Specifically, this involves regressing the attention-weighted feature tensor... Expand it into a one-dimensional vector, and then input the one-dimensional vector into a coordinate regressor composed of fully connected layers, as shown in formula (14).

[0166] (14)

[0167] in, Two-dimensional plane coordinates, To map high-dimensional features to a two-dimensional coordinate space, a regression network... For flattening operation.

[0168] like Figure 2As shown, a high-precision indoor positioning system integrating WiFi signals and geomagnetic features includes a scanning detection module, a depth feature extraction module, a floor identification module, a same-floor filtering module, a CSI feature extraction module, a line-of-sight status discrimination module, a data preprocessing module, a feature fusion module, and a coordinate transformation module. The scanning detection module scans and detects WiFi access points (APs) within the positioning area and obtains WiFi scanning results, then constructs a first feature vector based on the WiFi scanning results. The depth feature extraction module uses a convolutional autoencoder (CAE) to extract depth features from the first feature vector and obtain a second feature vector. The floor identification module uses an XGBoost classification model to classify the second feature vector and obtain the probability distribution of each floor, then determines the final floor based on the probability distribution and obtains the floor identification result. The same-floor filtering module filters the same-floor WiFi access points (APs) according to the floor identification result and obtains a sorted list of same-floor WiFi access points (APs). The CSI feature extraction module sequentially collects WiFi signals from each WiFi access point (AP) according to the sorted list of same-floor WiFi access points (APs). The CSI data is processed and CSI features are extracted to obtain a third feature vector; the line-of-sight state discrimination module is used to use a KNN binary classification model to discriminate the line-of-sight state of the third feature vector and obtain the line-of-sight state discrimination result; the data preprocessing module is used to preprocess WiFi RSSI data, geomagnetic data and WiFi CSI data based on the line-of-sight state discrimination result and obtain preprocessed data; the feature fusion module is used to perform multimodal feature fusion on the preprocessed data and obtain fused data, and then the fused data is spliced ​​to obtain a fused feature tensor; the coordinate transformation module is used to perform coordinate transformation on the fused feature tensor using a deep convolutional neural network and obtain two-dimensional planar coordinates, thereby completing the high-precision indoor positioning operation across floors.

[0169] To better illustrate the effectiveness of the present invention, a specific embodiment of high-precision indoor positioning across floors using the method of the present invention and existing methods is described below.

[0170] This embodiment conducted a WiFi RSSI floor localization experiment on a multi-floor dataset containing data from four floors. For example... Figure 3 As shown, the comparison results between the original RSSI acquired signal and the CAE reconstructed signal are presented. It can be seen that the CAE reconstructed signal is highly consistent with the original signal in terms of temporal structure and overall distribution, verifying the good reproduction effect of the convolutional autoencoder CAE model. Based on this, this embodiment uses the second feature vector extracted by the convolutional autoencoder CAE... Input the data into the XGBoost classification model for floor identification. For example... Figure 4As shown, the confusion matrix for floor localization is presented, and the overall classification accuracy reaches 94.2%. The results indicate that the CAE–XGBoost classification model framework, which combines deep feature compression and gradient boosting classification, can achieve good floor localization performance in multi-story indoor environments.

[0171] This embodiment conducted a planar positioning experiment in an office environment containing obstacles such as tables, chairs, and partitions to verify the performance of the WiFi and geomagnetic multi-source fusion positioning model proposed in this invention. Figure 5 As shown in Table 1, the cumulative distribution function (CDF) of positioning errors for two feature types is presented. The comparison results of four quantitative indicators, namely maximum error, mean absolute error, 75th percentile error, and root mean square error, are shown in Table 1.

[0172] Table 1. Comparison of error quantification results for planar positioning algorithms.

[0173]

[0174] As shown in Table 1, the model using the multi-source fusion features proposed in this invention outperforms the model using only CSI features in all indicators. Specifically, the mean absolute error and root mean square error of the multi-source fusion features proposed in this invention are reduced by 11.9% and 16.3%, respectively, indicating that the method of this invention, combined with WiFi and geomagnetic data, has stronger robustness and higher positioning stability in complex indoor environments with non-line-of-sight interference and multipath effects. This invention effectively solves the problems of insufficient accuracy and poor stability of the single CSI method in complex multi-story environments by having three components—floor identification, router optimization, and multi-source fusion planar positioning—work collaboratively. Verification shows that the method proposed in this invention significantly suppresses non-line-of-sight and multipath interference, reduces the probability of extreme errors, and achieves sub-meter positioning accuracy while balancing real-time performance and computational efficiency. The technical solution proposed in this invention has good engineering feasibility and can be widely applied to complex indoor scenarios such as smart cities, warehousing and logistics, underground parking lots, and emergency rescue, providing reliable technical support and theoretical backing for high-precision positioning services.

[0175] In summary, the high-precision indoor positioning method and system of the present invention, which integrates WiFi signals and geomagnetic features, firstly scans and detects WiFi access points (APs) within the positioning area to obtain WiFi scanning results. Then, a first feature vector is constructed based on the WiFi scanning results. Next, a convolutional autoencoder (CAE) is used to extract deep features from the first feature vector to obtain a second feature vector. Subsequently, an XGBoost classification model is used to classify the second feature vector and obtain the probability distribution of each floor. Based on the probability distribution of each floor, the final floor is determined, and a floor identification result is obtained. Then, based on the floor identification result, WiFi access points (APs) on the same floor are filtered to obtain a sorted list of WiFi access points on the same floor. Next, according to the sorted list of WiFi access points on the same floor, WiFi CSI data of each WiFi access point (AP) is collected sequentially, and CSI feature extraction is performed to obtain a third feature vector. Then, a KNN binary classification model is used to determine the line-of-sight (LOS) state of the third feature vector, and the LOS state determination result is obtained. Finally, based on the LOS state determination result, WiFi RSSI data, geomagnetic data, and WiFi... The CSI data undergoes preprocessing to obtain preprocessed data. Subsequently, multimodal feature fusion is performed on the preprocessed data to obtain fused data. The fused data is then concatenated to obtain a fused feature tensor. Finally, a deep convolutional neural network is used to perform coordinate transformation on the fused feature tensor to obtain two-dimensional planar coordinates, thus completing the high-precision indoor positioning operation across floors. This effectively realizes that the high-precision indoor positioning method and system has the function of performing high-precision indoor positioning across floors using a hierarchical processing architecture consisting of floor identification, router optimization, and high-precision planar positioning. Furthermore, the convolutional autoencoder (CAE) can identify and retain the most representative data essence from high-dimensional sparse input data. The key information of the structure is ignored while random fluctuations and redundant noise. The XGBoost classification model can efficiently integrate the deep feature learning representation capability and the ensemble learning decision advantage, ensuring high accuracy and robustness of the floor identification task. At the same time, by introducing CSI feature analysis and KNN classification router optimization mechanism, the line-of-sight propagation router can be accurately identified. Furthermore, by adopting a planar localization model that integrates multi-source data and attention mechanism CNN, the localization accuracy and environmental adaptability can be significantly improved. This invention can closely coordinate and complement the advantages of floor identification, router optimization and high-precision planar localization to form a complete technical solution that can achieve stable and accurate localization in complex multi-story environments.

[0176] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of the present invention is defined by the appended claims and their equivalents.

Claims

1. A high-precision indoor positioning method fusing WiFi signals and geomagnetic features, characterized in that: The method comprises the following steps, Step A, scanning and detecting WiFi wireless access points AP in a positioning area to obtain WiFi scanning and detection results, and constructing a first feature vector based on the WiFi scanning and detection results; Step B, performing deep feature extraction on the first feature vector by using a convolutional autoencoder CAE to obtain a second feature vector; Step C, classifying the second feature vector by using an XGBoost classification model to obtain probability distributions of each floor, and determining a final floor based on the probability distributions of each floor to obtain a floor recognition result; Step D, screening same-floor WiFi wireless access points AP according to the floor recognition result to obtain a same-floor WiFi wireless access point AP ranking list; Step E, sequentially collecting WiFi CSI data of each WiFi wireless access point AP according to the same-floor WiFi wireless access point AP ranking list and performing CSI feature extraction to obtain a third feature vector; Step F, performing line-of-sight state discrimination on the third feature vector by using a KNN binary classification model to obtain a line-of-sight state discrimination result; Step G, performing data preprocessing on WiFi RSSI data, geomagnetic data and WiFi CSI data based on the line-of-sight state discrimination result to obtain preprocessed data; Step H, performing multi-modal feature fusion on the preprocessed data to obtain fused data, and performing splicing processing on the fused data to obtain a fusion feature tensor; Step I, performing coordinate conversion on the fusion feature tensor by using a deep convolutional neural network to obtain a two-dimensional plane coordinate, thereby completing the cross-floor high-precision indoor positioning operation.

2. The method of claim 1, wherein the method further comprises: Step A, scanning and detecting WiFi wireless access points AP in a positioning area to obtain WiFi scanning and detection results, and constructing a first feature vector based on the WiFi scanning and detection results, and the specific steps are as follows, Step A1, scanning and probing WiFi wireless access points AP in the positioning area and obtaining WiFi scanning and probing results, wherein the set of all potential WiFi wireless access points AP to be scanned in the positioning area is wherein , and are respectively each WiFi wireless access point AP, is the total number of WiFi wireless access points AP, and the WiFi scanning and probing result generated each time is a scanning result list, which contains the MAC address and signal strength RSSI value of each WiFi wireless access point AP; Step A2, constructing the first feature vector based on the WiFi scanning and detection results, wherein if the WiFi wireless access points AP contained in set A belong to the scanning result list, the measured RSSI value of the WiFi wireless access points AP is recorded, and if the WiFi wireless access points AP contained in set A do not belong to the scanning result list, the WiFi wireless access points AP is recorded as an RSSI value of -100 dBm, and the specific formula is shown in formula (1), (1) wherein, is a first eigenvector, , and are RSSI values of each WiFi access point AP in the set A, and T is a matrix transpose.

3. The method of claim 2, wherein the method further comprises: Step B, deep feature extraction on the first feature vector and obtaining a second feature vector using a convolutional autoencoder CAE, wherein the convolutional autoencoder CAE comprises an encoder and a decoder , in particular as follows, Step B1, using an encoder for the first feature vector performing a non-linear transformation and obtaining a second feature vector, as shown in equation (2), (2) wherein, is a second feature vector, is an encoder parameter; Step B2, using the decoder to the second feature vector reconstructing and obtaining a reconstructed feature vector as shown in equation (3), (3) wherein, is a reconstructed feature vector, is a decoder parameters; Step B3, computing the first eigenvector with the reconstruction error between the reconstructed eigenvector and the original eigenvector, the encoder is optimized by the reconstruction error parameters and the decoder parameters where the reconstruction error is calculated as shown in equation (4), (4) wherein, is the reconstruction error.

4. The method of claim 3, wherein the method further comprises: Step C, classifying the second feature vector by using an XGBoost classification model to obtain probability distributions of each floor, and determining a final floor based on the probability distributions of each floor to obtain a floor recognition result, and the specific steps are as follows, Step C1, classifying the second feature vector using an XGBoost classification model and obtaining the probability distribution of each floor, as shown in equation (5), (5) wherein, is the XGBoost classification model, is the corresponding floor probability, , and are each a respective floor, is the total number of floors; Step C2, determining the final floor based on the probability distributions of each floor to obtain a floor recognition result, wherein the floor probability of the final floor is the highest, and the specific formula is shown in formula (6), (6) wherein, is a floor identification result, is a floor, is a set of floors, and the set of floors .

5. The method of claim 4, wherein the WiFi signal and geomagnetic features are fused to improve the indoor positioning accuracy. Step D, filtering the same-floor WiFi wireless access point AP according to the floor identification result and obtaining a same-floor WiFi wireless access point AP ranking list, specifically filtering the same-floor WiFi wireless access point AP according to the floor identification result and obtaining a same-floor WiFi wireless access point AP candidate set, and then filtering and ranking in the WiFi scanning detection result based on the same-floor WiFi wireless access point AP candidate set to obtain the same-floor WiFi wireless access point AP ranking list, the specific steps are as follows, Step D1, filtering WiFi wireless access points APs on the same floor according to the floor identification result and obtaining a candidate set of WiFi wireless access points APs on the same floor, specifically filtering WiFi wireless access points APs on the same floor according to the floor identification result querying a router floor distribution map and filtering out all WiFi wireless access points APs located on the floor, thereby obtaining a candidate set of WiFi wireless access points APs on the same floor; Step D2, filtering and ranking in the WiFi scanning detection result based on the same-floor WiFi wireless access point AP candidate set to obtain the same-floor WiFi wireless access point AP ranking list, specifically extracting the WiFi wireless access point AP signal belonging to the same-floor WiFi wireless access point AP candidate set from the WiFi scanning detection result and ranking in descending order according to the RSSI value to form the same-floor WiFi wireless access point AP ranking list; In step E, the WiFi CSI data of each WiFi wireless access point AP is collected in sequence according to the same-layer WiFi wireless access point AP sorting list, and CSI feature extraction is performed to obtain a third feature vector, specifically, the WiFi CSI data of each WiFi wireless access point AP is collected in sequence according to the same-layer WiFi wireless access point AP sorting list to obtain a WiFi CSI collection result, and then CSI feature extraction is performed on the WiFi CSI collection result to obtain a third feature vector, wherein the CSI feature extraction specifically extracts quantified features representing signal propagation paths to form the third feature vector , and the quantified features representing signal propagation paths include average time delay spread features, channel gain amplitude variance features, peak-to-average power ratio features, and phase standard deviation features.

6. The high-precision indoor positioning method of fusing WiFi signals and geomagnetic features according to claim 5, characterized in that: Step F, using the KNN binary classification model to determine the line-of-sight state of the third feature vector and obtaining a line-of-sight state determination result, the specific steps are as follows, Step F1, calculating the Euclidean distance between the third feature vector and all sample feature vectors in the training set, as shown in formula (7), (7) wherein, is a third feature vector is a Euclidean distance between the feature vector of the i-th sample in the training set and the feature vector of the j-th sample in the training set is an index of the training set sample;​ Step F2: After calculating all samples, select the one with the smallest distance. Each sample is used as the nearest neighbor, and then based on The nearest neighbor categories are used to determine the line-of-sight status. If the line-of-sight status of the WiFi access point (AP) is determined to be line-of-sight, then the WiFi access point AP is marked as the preferred target and its corresponding MAC address is recorded.

7. The method of claim 6, wherein the WiFi signal and geomagnetic features are fused. Step G, based on the line-of-sight state determination result, respectively pre-processing the WiFi RSSI data, the geomagnetic data and the WiFi CSI data to obtain pre-processed data, wherein the pre-processed data includes pre-processed WiFi RSSI data, pre-processed geomagnetic data and pre-processed WiFi CSI data, the specific steps are as follows, Step G1, pre-processing the WiFi RSSI data to obtain pre-processed WiFi RSSI data, specifically using a Hampel filter to identify and replace outliers in the received RSSI sequence to obtain pre-processed WiFi RSSI data; Step G2, pre-processing the geomagnetic data to obtain pre-processed geomagnetic data, the specific steps are as follows, Step G21, calculating the modulus of the geomagnetic data, as shown in formula (8), (8) wherein, is a magnetic module value, , and are the magnetic components of the magnetometer in three axes, respectively. Step G22, applying mean filtering to the modulus sequence to obtain pre-processed geomagnetic data; Step G3, pre-processing the WiFi CSI data to obtain pre-processed WiFi CSI data, wherein the pre-processed WiFi CSI data includes pre-processed CSI amplitude data and pre-processed CSI phase data, specifically format conversion, amplitude processing and phase processing are performed on the WiFi CSI data; The format conversion specifically calculates the modulus and amplitude angle of the complex form CSI data to obtain the amplitude and phase information of the dual antenna, thereby obtaining the CSI amplitude data and the CSI phase data respectively; The amplitude processing specifically corrects the CSI amplitude data to remove the automatic gain control AGC effect, and then sequentially applies Hampel filtering and mean filtering for filtering processing to obtain pre-processed CSI amplitude data; The phase processing specifically is to perform phase unwrapping operation on the CSI phase data, eliminate 2π jump to recover the real continuous phase, perform linear transformation calibration on the real continuous phase, and compensate linear phase error caused by carrier frequency offset and sampling frequency offset to obtain calibrated phase, then perform Hampel and mean filtering on the calibrated phase, and calculate the phase difference between adjacent antennas to obtain preprocessed CSI phase data.

8. The method of claim 7, wherein the WiFi signal and geomagnetic features are fused. In step H, the preprocessed data is subjected to multi-modal feature fusion to obtain fused data, and the fused data is subjected to splicing processing to obtain a fusion feature tensor. In step H1, the preprocessed data is subjected to multi-modal feature fusion to obtain fused data, and the fused data is subjected to splicing processing to obtain a fusion feature tensor. In step H11, the preprocessed data is cropped according to a set size to obtain cropped CSI amplitude data, cropped CSI phase difference data, cropped RSSI data, and cropped geomagnetic data. Step H12, the post-trimmed CSI magnitude data, the post-trimmed CSI phase difference data, the post-trimmed RSSI data, and the post-trimmed geomagnetic data are normalized and mapped to between 0 and 1. Step H2, performing stitching on the fused data and obtaining a fused feature tensor, wherein the fused feature tensor for use as a location fingerprint feature.

9. The method of claim 8, wherein the WiFi signal and geomagnetic features are fused to improve the accuracy of indoor positioning. In step I, a deep convolutional neural network is used to perform coordinate conversion on the fusion feature tensor to obtain a two-dimensional plane coordinate, thereby completing the cross-floor high-precision indoor positioning operation, and the specific steps are as follows. Step I1: Use a deep convolutional neural network to fuse the feature tensor. Feature extraction is performed to obtain the basic feature tensor, wherein the deep convolutional neural network is composed of multiple convolutional layers and pooling layers stacked alternately. (9) wherein, is the base feature tensor, is a composite function of convolution and pooling operations; Step I2, adding an attention mechanism to the deep convolutional neural network and obtaining a deep convolutional neural network after introducing the attention mechanism, and then using the deep convolutional neural network after introducing the attention mechanism to process the basic feature tensor performing attention weighting and obtaining an attention-weighted feature tensor, wherein the attention mechanism includes a channel attention component and a spatial attention component, and the specific steps are as follows, Step I21, applying a channel attention component to the base feature tensor The channel attention weight tensor is obtained by performing channel attention weighting, and the weighted channel feature tensor is constructed using the channel attention weight tensor. The specific steps are as follows, Step I211, applying a channel attention component to the base feature tensor Channel attention weighting is performed and a channel weight tensor is obtained, as shown in equation (10). (10) wherein, is a channel weight tensor, is a Sigmoid activation function, is a ReLU activation function, , , and are weights of respective fully connected layers, is a global average pooling operation, is a global max pooling operation; Step I212, utilizing the channel weight tensor constructing the weighted channel feature tensor as shown in equation (11), (11) wherein, is a per-channel multiplication; Step I22, applying spatial attention component to weighted channel feature tensor Spatial attention weighting is performed and a spatial weight tensor is obtained, as shown in equation (12). (12) wherein, is a spatial weight tensor, is a tensor concatenation operation along the channel dimension, is a 7x7 convolution operation; Step I23, weighting between channel feature tensor and spatial weight tensor and obtaining attention weighted feature tensor, as shown in formula (13), (13) wherein, is the attention weighted feature tensor, is the spatial-wise multiplication; Step I3, coordinate regression is performed on the attention-weighted feature tensor to obtain two-dimensional plane coordinates, specifically, the attention-weighted feature tensor is unfolded into a one-dimensional vector, and the one-dimensional vector is input into a coordinate regressor composed of a fully connected layer, specifically as shown in equation (14), Step I3, coordinate regression is performed on the attention-weighted feature tensor to obtain two-dimensional plane coordinates, specifically, the attention-weighted feature tensor (14) wherein, is a two-dimensional plane coordinate, is a regression network that maps high-dimensional features to a two-dimensional coordinate space, is a flattening operation.

10. A high-precision indoor positioning system fusing WiFi signals and geomagnetic features, the specific positioning process of the high-precision indoor positioning system being based on the high-precision indoor positioning method of any one of claims 1-9, characterized in that: The scanning detection module is used to scan and detect WiFi wireless access points AP in the positioning area to obtain WiFi scanning detection results, and a first feature vector is constructed based on the WiFi scanning detection results. The deep feature extraction module is used to perform deep feature extraction on the first feature vector by using a convolutional autoencoder (CAE) to obtain a second feature vector. The floor identification module is used to classify the second feature vector by using an XGBoost classification model to obtain the probability distribution of each floor, and then determine the final floor based on the probability distribution of each floor to obtain a floor identification result. The same floor screening module is used to screen the same floor WiFi wireless access points AP according to the floor identification result to obtain a same floor WiFi wireless access point AP ranking list. The CSI feature extraction module is used to sequentially collect WiFi CSI data of each WiFi wireless access point AP according to the same floor WiFi wireless access point AP ranking list and perform CSI feature extraction to obtain a third feature vector. The line-of-sight state discrimination module is used to discriminate the line-of-sight state of the third feature vector by using a KNN binary classification model to obtain a line-of-sight state discrimination result. The data preprocessing module is used to perform data preprocessing on WiFi RSSI data, geomagnetic data, and WiFi CSI data based on the line-of-sight state discrimination result to obtain preprocessed data. The feature fusion module is used to perform multi-modal feature fusion on the preprocessed data to obtain fused data, and then perform splicing processing on the fused data to obtain a fusion feature tensor. The feature fusion module is used to perform multi-modal feature fusion on the preprocessed data to obtain fused data, and then perform splicing processing on the fused data to obtain a fusion feature tensor. The coordinate conversion module is configured to convert the fused feature tensor by using a deep convolutional neural network and obtain two-dimensional plane coordinates, thereby completing the cross-floor high-precision indoor positioning operation.

Citation Information

Patent Citations

  • Double-scale positioning algorithm based on ensemble learning and relative positioning

    CN110691336A

  • Partition fusion positioning method based on WiFi and geomagnetic fingerprints

    CN113411741A