Dynamic environment robust indoor positioning method based on multi-source unsupervised domain adaptation
Through the multi-source unsupervised domain adaptation method, channel state information data is used for preprocessing and feature extraction to construct a multi-source unsupervised domain adaptation positioning model, which solves the problem of decreased accuracy of traditional positioning technology in dynamic environments, achieves highly robust and high-precision indoor positioning, and reduces dependence on labeled data.
Patent Information
- Application Number
- CN202510881057.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-27
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2045-06-27
AI Technical Summary
Traditional wireless positioning technology faces the problem of reduced positioning accuracy due to signal fluctuations and environmental changes in dynamic environments, especially under NLOS conditions. It also requires a large amount of labeled data annotation and model recalibration, which is time-consuming and labor-intensive.
A multi-source unsupervised domain adaptation method is adopted. By preprocessing the received channel state information data, a multi-source unsupervised domain adaptation positioning model is constructed. The general feature extractor and the domain-specific feature extractor are used to align the edges and conditional distributions, learn domain-invariant features, combine multi-scale convolution and attention mechanism for feature fusion, and finally calculate the position estimate by weighted average.
It improves the robustness and accuracy of the positioning system in dynamic environments, reduces dependence on labeled data, reduces the cost of frequent calibration and data labeling in dynamic environments, and can effectively deal with distribution drift.
Smart Images

Figure CN120676313A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of wireless communication and indoor positioning, and in particular to a dynamic environment robust indoor positioning method based on multi-source unsupervised domain adaptation. Background Art
[0002] With the development of wireless communication technologies such as 5G, accurate and reliable indoor positioning services are becoming increasingly important in applications such as indoor navigation and asset tracking. Traditional wireless positioning technologies, such as geometric positioning methods like time of arrival (ToA) and angle of arrival (AoA), offer high accuracy in line-of-sight (LOS) conditions. However, in non-line-of-sight (NLOS) and complex indoor environments, performance degrades significantly due to multipath propagation and signal attenuation. Furthermore, these technologies typically rely on precise base station deployment and complex hardware, resulting in high deployment costs. Fingerprint positioning technology has become a research hotspot for indoor positioning due to its robustness in NLOS conditions, minimized hardware requirements, and ability to leverage existing wireless infrastructure. This method typically involves the offline construction of a database of signal features (such as received signal strength (RSS) or channel state information (CSI)) and an online measurement and matching phase.
[0003] However, traditional fingerprint positioning methods face severe challenges in dynamic environments. Factors such as signal fluctuations, changes in multipath effects, personnel movement, and rearrangement of obstacles cause the signal propagation path to constantly change, and key signal features such as CSI amplitude and phase show temporal differences, making it difficult for models trained on outdated data to generalize to new environments, resulting in reduced positioning accuracy. In addition, these methods usually require a large amount of labeled training data. In large-scale or rapidly changing environments, data labeling and model recalibration are time-consuming and labor-intensive. To this end, the present invention proposes a robust indoor positioning method in dynamic environments based on multi-source unsupervised domain adaptation. Summary of the Invention
[0004] The purpose of the present invention is to provide a robust indoor positioning method in dynamic environments based on multi-source unsupervised domain adaptation, which can effectively utilize diversified data from multiple historical time scales, extract domain-invariant features, enhance the generalization ability of the model in the target domain, and reduce the dependence on labeled data in the target domain, thereby achieving high-precision and high-robustness indoor positioning in dynamically changing environments.
[0005] According to a first aspect of the present invention, in order to achieve the above-mentioned purpose, the present invention provides the following technical solution: a dynamic environment robust indoor positioning method based on multi-source unsupervised domain adaptation, comprising the following steps:
[0006] S1. Receive channel state information data obtained from a wireless access point and perform preprocessing, wherein the preprocessing includes filtering based on a Hampel identifier and an improved wavelet threshold, as well as linear calibration for phase information, and construct a fingerprint image based on the preprocessed channel state information amplitude and phase information;
[0007] S2. Construct and train a multi-source unsupervised domain adaptation localization model to obtain a trained multi-source unsupervised domain adaptation localization model, wherein the multi-source unsupervised domain adaptation localization model includes a general feature extractor, N domain-specific feature extractors, and N domain-specific regressors;
[0008] A two-stage alignment strategy is adopted. N domain-specific feature extractors are used to align the marginal distribution and conditional distribution between each source domain and the target domain. N domain-specific regressors are then used to align the regressor outputs for target domain samples to learn domain-invariant feature representations.
[0009] The universal feature extractor is a feature learning backbone network that integrates multi-scale convolution, multi-scale channel attention mechanism and attention feature fusion, which is used to extract features from fingerprint images of multiple source domains and fingerprint images of target domains;
[0010] S3. Input the fingerprint image to be located after online collection and preprocessing into the trained multi-source unsupervised domain adaptation localization model, and obtain the final location estimate by performing weighted average calculation on the output results of N domain-specific regressors.
[0011] Furthermore, in step S1, the channel state information data obtained from the wireless access point is received and preprocessed, wherein the preprocessing includes filtering based on the Hampel identifier and the improved wavelet threshold and linear calibration for the phase information, specifically as follows:
[0012] (21) Using Hampel identifiers to remove outliers in the channel state information data subcarrier time series;
[0013] (22) Use a wavelet filter based on an improved wavelet threshold function to smooth each subcarrier sequence, as follows:
[0014] An improved wavelet threshold function is used to smooth each subcarrier sequence to reduce time jitter. The improved wavelet threshold function is expressed as:
[0015]
[0016] Where X is the original wavelet coefficient, T is the threshold;
[0017] (23) Using a Butterworth low-pass filter to attenuate high-frequency noise in the subcarrier channel state information data sequence is achieved by adjusting the cutoff frequency and the filter order;
[0018] (24) The linear calibration of phase information is as follows:
[0019] The phase response after unwrapping is processed using least squares optimization and linear regression, and the formula is as follows:
[0020]
[0021] where ψ i (m,n) is the unwrapping phase of the ith data packet, m is the antenna index, n is the subcarrier index, τ s,i For STO, f δ is the frequency spacing between adjacent subcarriers, ρ and β are the least squares coefficients, is the phase after transformation, Indicates the phase after STO cleaning.
[0022] Furthermore, in step S1, a fingerprint image is constructed based on the pre-processed channel state information amplitude and phase information, specifically as follows:
[0023] (31) Based on the WiFi AP’s OFDM receiver, the channel state information data is extracted, which includes the amplitude and phase information of each subcarrier.
[0024] (32) The amplitude and phase information of the collected multiple channel state information data packets are preprocessed to construct a two-dimensional fingerprint image.
[0025] Furthermore, in step S2, a two-stage alignment strategy is adopted to align the marginal distribution and conditional distribution between each source domain and the target domain using N domain-specific feature extractors, and to align the regressor output for target domain samples using N domain-specific regressors to learn domain-invariant feature representations, as follows:
[0026] (41) Using N domain-specific feature extractors to align the marginal distribution and conditional distribution between each source domain and target domain:
[0027] (41.1) The goal of distribution adaptation in domain adaptation is to align the marginal distribution P and the conditional distribution Q. The distribution alignment term Defined as:
[0028]
[0029] where c∈{1,…,C} is the category indicator, D f (P S ,P T ) represents the alignment of marginal distributions between the source and target domains, represents the alignment of the conditional distribution of each category c;
[0030] Based on formula (6), the learning objective of the multi-source unsupervised domain adaptation localization model is expressed as follows:
[0031]
[0032] where J(·,·) represents the mean squared error loss function, Θ = {w,b} represents the network parameter set, including weights and biases;
[0033] Position prediction is formulated as a regression problem, where the conditional distribution alignment is approximated by minimizing the maximum mean difference between the source and target domains in the regressor:
[0034] (41.2) The maximum mean difference unbiased linear time approximation method is used to reduce the computational complexity:
[0035]
[0036] In the formula h l is a quadruple defined in z i The operator on is defined as follows:
[0037]
[0038] Where k represents the feature kernel, so the sum of formula (11) and formula (12) is approximately applicable to the gradient calculation using a small batch process;
[0039] The gradient of the parameters is defined as follows:
[0040]
[0041] According to formula (11), each domain-specific feature extractor aligns the marginal distribution of each pair of source-target domains by minimizing the following formula:
[0042]
[0043] Again, the alignment of the conditional distributions is achieved by minimizing the following maximum mean difference loss:
[0044]
[0045] (42) Use N domain-specific regressors to align the regressor output for target domain samples
[0046] The Euclidean distance between the outputs of the regressor on the target domain data is used as the loss function:
[0047]
[0048] By minimizing formula (16), the outputs of the regression models are aligned;
[0049] In addition, for each regressor, the prediction loss is calculated using the mean squared error, which is defined by the following equation:
[0050]
[0051] Where i represents the sample index.
[0052] Furthermore, the universal feature extractor is a feature learning backbone network that integrates multi-scale convolution, multi-scale channel attention mechanism, and attention feature fusion, which is used to extract features from fingerprint images of multiple source domains and fingerprint images of target domains, as follows:
[0053] (51) Multi-scale convolutional feature learning:
[0054] The feature learning backbone network is constructed by combining parallel multi-scale feature extraction with MC-CAM design to focus on detailed features while capturing global context information.
[0055] Therefore, the feature learning backbone network achieves a balance between network depth and width, which is the dimension The reconstructed amplitude and phase features are input into a parallel two-dimensional convolutional neural network for feature extraction;
[0056] (52) Multi-scale channel attention mechanism
[0057] The multi-scale channel attention mechanism aggregates multi-scale context features along the channel dimension, enabling it to simultaneously highlight the global distribution features of large objects and the local distribution features of small objects. Given the global channel context and local channel context Use Sigmoid function to calculate the attention weight M(X)∈R C×H×W , and generate optimized features according to the following formula
[0058]
[0059] Where σ represents the sigmoid function, represents element-wise multiplication, while ⊕ represents broadcast addition;
[0060] (53) Attention-based feature fusion
[0061] Attention-based feature fusion, the feature learning backbone network can integrate contextual information beyond the simple initial fusion while fusing amplitude fingerprint information and phase fingerprint information. The attention-based feature fusion formula is as follows:
[0062]
[0063] Among the features Figure X ,Y∈R C×H×W , and Z∈R C×H×W represents the fused features, represents the initial feature fusion;
[0064] (54) Fully connected regression positioning
[0065] Regression-based localization is achieved by integrating the output of the domain-specific feature extractor through a fully connected network. Specifically, the downsampled output χ is flattened into a one-dimensional tensor And as the input of the fully connected network, the final predicted coordinates are expressed as follows:
[0066]
[0067] The function f(·) constitutes the linear regression part of the fully connected neural network, W χl and b l Represent their weights and biases respectively. In addition, the mean square error is used as the loss function, which is formulated as follows:
[0068]
[0069] where ||·||2 represents the Euclidean norm, L g (x,y) represents the real coordinates of the g-th reference point (RP).
[0070] Furthermore, the training method of the multi-source unsupervised domain adaptation positioning model includes the following steps:
[0071] (61) The stochastic gradient descent algorithm is used to improve the model performance by iteratively optimizing the feature extraction and domain adaptation steps, and balancing the empirical risk and regularization term according to the principle of structural risk minimization;
[0072] (62) Configure model hyperparameters including learning rate, convolution kernel size, batch size, and number of filters to adjust model complexity and generalization ability:
[0073] (62.1) Use the Adam optimizer to optimize the model and set the learning rate decay strategy, that is, the learning rate is decayed by 0.1 times every 30 epochs;
[0074] (62.2) Set the training cycle and termination conditions: the maximum number of training rounds is 100 epochs, and the early stopping strategy is enabled. When the validation loss does not improve for 10 consecutive epochs, the training is stopped.
[0075] (62.3) Using a batch processing approach, each training batch contains samples from multiple source and target domains;
[0076] (62.4) Establish a validation strategy: Split a validation set from the source domain data to evaluate the source domain performance and domain adaptation loss to indirectly verify the model's ability to generalize to the target domain;
[0077] (63) Sample balance: Ensure balanced samples across domains through uniform sampling to avoid bias towards a specific source domain;
[0078] (64) The overall loss function of the multi-source unsupervised domain adaptation localization model is the sum of the prediction loss, marginal distribution difference loss, conditional distribution difference loss, and regressor alignment loss, which is specifically expressed as follows:
[0079]
[0080] In the formula represents the prediction loss calculated using the mean squared error (MSE), Marginal distribution alignment loss for each source-target domain pair in each domain-specific feature extractor; Achieve maximum mean difference loss for conditional distribution alignment, Euclidean distance between all regressor outputs on target domain data.
[0081] Furthermore, the final position estimate is obtained by performing a weighted average calculation on the output results of N domain-specific regressors, as follows:
[0082]
[0083] Where j represents the index of the regression model and N is the number of regression models.
[0084] According to a second aspect of the present invention, the present invention provides a dynamic environment robust indoor positioning system based on multi-source unsupervised domain adaptation, which is used to implement the dynamic environment robust indoor positioning method based on multi-source unsupervised domain adaptation described in the first aspect, comprising:
[0085] a preprocessing module, configured to receive and preprocess the channel state information data obtained from the wireless access point, wherein the preprocessing includes filtering based on a Hampel identifier and an improved wavelet threshold, as well as linear calibration for phase information, and constructing a fingerprint image based on the amplitude and phase information of the preprocessed channel state information;
[0086] A construction module is used to construct and train a multi-source unsupervised domain adaptation positioning model to obtain a trained multi-source unsupervised domain adaptation positioning model, wherein the multi-source unsupervised domain adaptation positioning model includes a general feature extractor, N domain-specific feature extractors, and N domain-specific regressors;
[0087] A two-stage alignment strategy is adopted. N domain-specific feature extractors are used to align the marginal distribution and conditional distribution between each source domain and the target domain. N domain-specific regressors are then used to align the regressor outputs for target domain samples to learn domain-invariant feature representations.
[0088] The universal feature extractor is a feature learning backbone network that integrates multi-scale convolution, multi-scale channel attention mechanism and attention feature fusion, which is used to extract features from fingerprint images of multiple source domains and fingerprint images of target domains;
[0089] The prediction output module is used to input the fingerprint image to be located, which is constructed after online collection and preprocessing, into the trained multi-source unsupervised domain adaptation positioning model, and obtain the final position estimate by performing weighted average calculation on the output results of N domain-specific regressors.
[0090] According to a third aspect of the present invention, the present invention provides a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to execute the dynamic environment robust indoor positioning method based on multi-source unsupervised domain adaptation described in the first aspect.
[0091] According to a fourth aspect of the present invention, the present invention provides a computer program product, which includes a computer program. When the computer program is executed by a processor, it is used to load and execute the dynamic environment robust indoor positioning method based on multi-source unsupervised domain adaptation described in the first aspect.
[0092] The present invention has at least the following beneficial effects:
[0093] 1. Strong robustness and high precision: This paper adopts a multi-source unsupervised domain adaptation framework and a two-stage alignment strategy to effectively integrate multi-source historical data and extract domain-invariant features, significantly improving the robustness and positioning accuracy of the positioning system in dynamic environments (such as signal feature changes caused by personnel movement and layout changes).
[0094] 2. Reduced reliance on labeled data: The positioning method of the present invention aims to reduce the need for labeled calibration data in the target domain. By adapting to the target domain in an unsupervised manner, it greatly reduces the cost and workload of frequent recalibration and data annotation in dynamic environments.
[0095] 3. Enhanced feature extraction capability: The carefully designed QC preprocessing modules (HWF and LC) in this paper effectively improve the quality of the original CSI fingerprint. The MS-ConvBlock, MS-CAM, and AFF mechanisms in the feature learning backbone network can extract more discriminative and transferable multi-scale features from CSI fingerprint images to adapt to environmental changes.
[0096] 4. Effectively deal with distribution drift: This invention can overcome the performance degradation problem caused by data distribution drift in traditional methods and is more suitable for the ever-changing indoor scenes in the real world.
[0097] Of course, any product implementing the present invention does not necessarily need to achieve all of the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS
[0098] Figure 1 Schematic diagram of the architecture principle of the positioning method of the present invention;
[0099] Figure 2 Figure 1 is a schematic diagram of the preprocessing process of CSI amplitude data based on the QC module of the present invention, wherein (a) shows the effect of the Hampel identifier to remove large outliers, (b) shows the effect of the wavelet filter to smooth the sequence, and (c) shows the effect of the Butterworth low-pass filter to remove high-frequency noise;
[0100] Figure 3 Figure 1 is a schematic diagram of the calibration process of CSI phase data based on the LC module of the present invention, wherein (a) shows the measured original phase, (b) shows the phase after detangling, and (c) shows the phase after linear transformation;
[0101] Figure 4 Schematic diagram of the CSI fingerprint image construction mechanism of the present invention;
[0102] Figure 5 These are example diagrams of the newly designed CSI fingerprint images at different locations, where (a) represents the amplitude fingerprint image at location 1, (b) represents the amplitude fingerprint image at location 2, (c) represents the phase fingerprint image at location 1, and (d) represents the phase fingerprint image at location 2.
[0103] Figure 6 This is a schematic diagram of the traditional positioning framework based on transfer learning;
[0104] Figure 7 is a schematic diagram of the two-stage alignment strategy of the positioning method of the present invention;
[0105] Figure 8 Schematic diagram of the DF-LocNet fingerprint positioning network structure and its components of the present invention, where (a) is the overall architecture of DF-LocNet, (b) is the structure of MS-ConvBlock, and (c) is the structure of MS-CAM;
[0106] Figure 9 Schematic diagram of the layout of the experimental scene (office and classroom) of the present invention, (a) is the location of the reference points (RPs) in the office, (b) is the location of the reference points (RPs) in the classroom, and (c) is a photo of the classroom scene;
[0107] Figure 10 This is a curve diagram of the training loss change of the multi-source unsupervised domain adaptation positioning model in the office and classroom experiments of the present invention;
[0108] Figure 11This is a CDF comparison chart of the positioning performance of the present invention in different office areas, where (a) is the test of all points in the office at the same time, and (b) is the test of all points in the office at different times;
[0109] Figure 12 The following is a comparison chart of the positioning performance of the present invention under different postures, where (a) is a test of all points in the office at different times, and (b) is a test of all points in the classroom at different times;
[0110] Figure 13 This is a visualization diagram of the attention mechanism weights of the present invention, where (a) is the contextual attention weight output by CNN, and (b) is the attention weight of the dual information stream fusion;
[0111] Figure 14 Schematic diagram of the DF-Loc domain adaptation effect of the present invention (different ellipses represent different categories), where (a) is no domain adaptation, (b) is domain adaptation using source domain 1 data, (c) is domain adaptation using source domain 2 data, and (d) is domain adaptation using source domain 3 data;
[0112] Figure 15 The CDF graphs of the positioning errors of the DF-Loc positioning method of the present invention and other algorithms under different test cases are shown, where (a) is the OST algorithm case, tested at different training points and test points in the office at the same time; (b) is the CST algorithm case, tested at different training points and test points in the classroom at the same time; (c) is the ODT algorithm case, tested at different training points and test points in the office at different times; (d) is the CDT algorithm case, tested at different training points and test points in the classroom at different times.
[0113] Figure 16 Schematic diagram of the CSI amplitude fingerprint preprocessing performance based on HWF of the present invention, where (a) is the original amplitude, (b) is after Hampel filtering, (c) is after wavelet filtering, and (d) is after Butterworth low-pass filtering;
[0114] Figure 17 Schematic diagram of the CSI amplitude and phase fingerprint characteristics of 1000 samples at three different locations in the classroom scene of the present invention, where (a) is the original amplitude, (b) is the original phase after LC, (c) is the amplitude after HWF, and (d) is the phase after linear calibration and HWF;
[0115] Figure 18 This is a comparison chart of the positioning accuracy of six different model configurations in the present invention under different test cases, where (a) is the test point test at different training points in the office at the same time, (b) is the test point test at different training points in the office at different times, (c) is the test point test at different training points in the classroom at the same time, and (d) is the test point test at different training points in the classroom at different times;
[0116] Figure 19 This is a test diagram of the generalization ability of the DF-Loc positioning method of the present invention to locate MED in the DT case, where (a) is different test reference point ratios and (b) is different training sample sizes;
[0117] Figure 20 Figure 1 is an example of the challenges faced by the DF-Loc positioning method of the present invention in locating the MED, where (a) is the p5 posture in the ODT case, (b) is the p'2 posture in the CDT case, (c) is the p5 posture in the OWT-2 case, and (d) is the p5 posture in the OWT-1 case;
[0118] Figure 21 It is a flowchart of the positioning method of the present invention. DETAILED DESCRIPTION
[0119] The following will be combined with the accompanying drawings in the embodiments of the present disclosure to clearly and completely describe the technical solutions in the embodiments of the present disclosure. Obviously, the embodiments described are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in this field without making any creative efforts are within the scope of protection of the present disclosure.
[0120] Example 1:
[0121] See also Figures 1-21 The present invention provides a technical solution: a dynamic environment robust indoor positioning method based on multi-source unsupervised domain adaptation, comprising the following steps:
[0122] S1. Receive channel state information data obtained from a wireless access point and perform preprocessing, wherein the preprocessing includes filtering based on a Hampel identifier and an improved wavelet threshold, as well as linear calibration for phase information, and construct a fingerprint image based on the preprocessed channel state information amplitude and phase information;
[0123] S2. Construct and train a multi-source unsupervised domain adaptation localization model to obtain a trained multi-source unsupervised domain adaptation localization model, wherein the multi-source unsupervised domain adaptation localization model includes a general feature extractor, N domain-specific feature extractors, and N domain-specific regressors;
[0124] A two-stage alignment strategy is adopted. N domain-specific feature extractors are used to align the marginal distribution and conditional distribution between each source domain and the target domain. N domain-specific regressors are then used to align the regressor outputs for target domain samples to learn domain-invariant feature representations.
[0125] The universal feature extractor is a feature learning backbone network that integrates multi-scale convolution, multi-scale channel attention mechanism and attention feature fusion, which is used to extract features from fingerprint images of multiple source domains and fingerprint images of target domains;
[0126] S3. Input the fingerprint image to be located after online collection and preprocessing into the trained multi-source unsupervised domain adaptation localization model, and obtain the final location estimate by performing weighted average calculation on the output results of N domain-specific regressors.
[0127] The architecture principle of the positioning method described in this embodiment is as follows Figure 1 As shown in the figure, it mainly includes CSI data acquisition, data preprocessing, data construction (fingerprint image generation) and multi-source unsupervised domain adaptation module.
[0128] Step 1: Raw channel state information (CSI) data is susceptible to multipath effects, noise interference, and clock asynchrony. To address this, this embodiment designs a QC (Quality Control) preprocessing module, which includes an HWF (Hampel and Wavelet Filtering) module for amplitude and an LC (Linear Calibration) module for phase. The specific steps are as follows:
[0129] Step 11: HWF module processing of amplitude (see Figure 2 )
[0130] Hampel identifier: uses the median and median absolute deviation (MAD) within a sliding window to detect and replace outliers (mutation values) in a single subcarrier time series, such as Figure 2 As shown in (a).
[0131] Wavelet filter: An improved wavelet threshold function is used to smooth each subcarrier sequence to reduce time jitter. The threshold function is expressed as:
[0132]
[0133] Where X is the original wavelet coefficient and T is the threshold;
[0134] like Figure 2 As shown in (b), the subcarrier smoothness is significantly improved after filtering;
[0135] Butterworth low-pass filter: used to attenuate high-frequency noise in the subcarrier CSI sequence, achieved by adjusting the cutoff frequency and filter order, such as Figure 2 As shown in (c), the standard deviation is reduced after filtering and the signal is smoother;
[0136] Step 12: Phase LC+HWF module processing (see Figure 3 )
[0137] To address phase distortion caused by clock asynchrony such as sampling time offset (STO), sampling frequency offset (SFO), and carrier frequency offset (CFO), an LC block is first used for linear calibration. This block uses least squares optimization and linear regression to process the phase response after unwrapping. The formula is as follows:
[0138]
[0139] where ψ i (m,n) is the unwrapping phase of the ith data packet, m is the antenna index, n is the subcarrier index, τ s,i For STO, f δ is the frequency spacing between adjacent subcarriers, ρ and β are the least squares coefficients, is the phase after transformation, Indicates the phase after STO cleaning, such as Figure 3 As shown in (c), the original phase is processed by the LC module and then processed by the HWF module (Hampel identifier, wavelet filtering, Butterworth low-pass filtering) similar to the amplitude sequence to further improve the stability of the phase fingerprint;
[0140] Step 2: Build the CSI fingerprint as follows:
[0141] This embodiment extracts CSI data from the OFDM receiver of a commercial WiFi AP, including the amplitude and phase information of each subcarrier. The amplitude and phase information of multiple CSI data packets (e.g. V = 1000) collected are pre-processed and processed in a specific way (e.g. Figure 4 Reshaping, stacking, sliding window slicing as shown) is constructed into a two-dimensional fingerprint image (heat map);
[0142] For example, a sliding window of T = 90 is used to construct K fingerprint images for each reference point (RP) from V packets. The dimensions of the image can be set to (for example) S'×M×C, where S' is the number of subcarriers (for example, 30), M is the number of antennas (for example, 3), and C is the number of channels (one channel for amplitude, one channel for phase, or different channels combined into RGB images). Figure 5 Examples of CSI amplitude and phase fingerprint images constructed at different locations are shown, showing that fingerprint images at different locations are distinguishable.
[0143] Step 3: Build and design a multi-source unsupervised domain adaptation localization model under the MUDA framework, which includes a general feature extractor g(·), N domain-specific feature extractors and N domain-specific regressors
[0144] The universal feature extractor adopts an advanced feature learning backbone network that integrates multi-scale convolution (MS-ConvBlock), multi-scale channel attention mechanism (MS-CAM) and attention feature fusion (AFF) to learn representative shared features from fingerprint images from N different source domains (e.g., data collected at different time periods or different activity states) and fingerprint images from the target domain;
[0145] Next, domain adaptation is performed through a two-stage alignment strategy:
[0146] In the first stage, N domain-specific feature extractors receive shared features and map each pair of source and target domain data into a specific latent space. They align the marginal distributions between each source and target domain by minimizing the maximum mean difference (MMD). At the same time, N domain-specific regressors align the conditional distributions when processing domain-invariant features.
[0147] In the second stage, the outputs of N domain-specific regressors for target domain samples are aligned to minimize the difference between their prediction results, so as to utilize the decision boundary information of multiple source domains and improve the cross-domain regression performance:
[0148] Specifically, first assume that the input measurable space is The label set is C, the source domain sample Target domain samples The present invention processes P(csi S )≠P(csi T ) and P(L S ∣csi} S ≠P(L T ∣csi} T In the scenario, the localization method based on the multi-source unsupervised domain adaptation localization model (DF-Loc) aims to learn a transferable regressor f to minimize the target domain risk;
[0149] Step 31: Two-stage alignment strategy:
[0150] The localization method proposed in this embodiment adopts a two-stage alignment strategy, instead of learning a unified shared feature space across all domains. This strategy learns a domain adapter for each source-target domain pair and aligns the output of the regressor on the target sample, such as Figure 7 As shown:
[0151] This is achieved by minimizing the distance between each source domain and the target domain, as follows:
[0152]
[0153] where D(·,·) represents an estimator of the difference between two domains, g(·) acts as a feature extractor that maps each domain to a common feature space, and f(·) represents a regressor. The symbol N represents the number of different potential source distributions, and i represents the sample index.
[0154] The localization method proposed in this embodiment learns a domain adapter for each source-target domain pair and then aligns the regressor output of the target sample;
[0155] The two-stage alignment strategy aligns the distribution of source-target domain pairs, promoting consistent predictions in different environments, and enables synchronous end-to-end learning of the feature extraction function g(·) and the regressor f, as Figure 7 As shown in Figure 2, DF-LocNet leverages advanced convolutional neural networks (CNNs) to effectively learn the ability to extract representative features. Specifically, a backbone network is used to learn transferable feature representations while achieving domain adaptation through distribution alignment.
[0156] Step 311: Align the marginal and conditional distributions of specific domains:
[0157] The goal of distribution adaptation in domain adaptation is to align the marginal distribution P and the conditional distribution Q. Defined as:
[0158]
[0159] where c∈{1,…,C} is the category indicator, D f (P S ,P T ) represents the alignment of marginal distributions between the source and target domains, represents the alignment of the conditional distribution of each category c;
[0160] Based on formula (6), the learning objective of the multi-source unsupervised domain adaptation localization model can be expressed as follows:
[0161]
[0162] where J(·,·) represents the mean squared error (MSE) loss function, Θ = {w,b} represents the network parameter set, including weights and biases;
[0163] Position prediction can be formulated as a classification problem or a regression problem. The main difference lies in the design of the activation function in the last layer of the network. In this embodiment, it is considered a regression task and conditional distribution alignment is approximated by minimizing the maximum mean difference (MMD) between the source and target domains in the regressor.
[0164] Since the multi-source unsupervised domain adaptation localization model is based on a deep neural network (DNN) architecture, its training process uses mini-batch stochastic gradient descent (SGD) instead of using domain data. This approach ensures that distribution adaptation is only calculated between batches. This design is particularly practical and efficient for practical applications such as fingerprint-based localization, where data is usually received in the form of streams.
[0165] Traditional transfer learning methods based on maximum mean difference (MMD) are usually based on the following formula:
[0166]
[0167] Where m and n represent and The number of samples in, this formula relies on pairwise similarity and has quadratic time complexity. In addition, these methods are often simplified to linear kernels as shown below:
[0168]
[0169] where n S and n T Represent the number of source domain samples and the number of target domain samples respectively, and c represents the category index;
[0170] However, in deep learning-based domain adaptation methods, such calculations are often more time-consuming. To solve this problem, this embodiment uses the MMD unbiased linear time approximation method, which significantly reduces the computational complexity:
[0171]
[0172] in h l is a quadruple defined in z i The operator on is defined as follows:
[0173]
[0174] Where k represents the feature kernel. Therefore, the summation approximation above is applicable to gradient calculation using a mini-batch process.
[0175] The gradient of the parameters is defined as follows:
[0176]
[0177] According to formula (11), each domain-specific feature extractor aligns the marginal distribution of each pair of source-target domains by minimizing the following formula:
[0178]
[0179] Likewise, the alignment of conditional distributions is achieved by minimizing the following maximum mean discrepancy (MMD) loss:
[0180]
[0181] Step 312: Domain-specific regressor alignment
[0182] Target samples close to the regression boundary are more likely to be estimated incorrectly by regressors trained on the source domain. These regressors originate from different source domains and may produce inconsistent predictions for the same target sample, especially in the boundary area. Ideally, each regressor should produce similar outputs for the same sample. Therefore, the second stage of alignment focuses on minimizing the differences between regressors. In this embodiment, the Euclidean distance between the outputs of all regressors on the target domain data is used as the loss function:
[0183]
[0184] By minimizing the above formula, the output of the regression model is aligned;
[0185] In addition, for each regressor, the prediction loss is calculated using MSE, which is defined by the following equation:
[0186]
[0187] Where i represents the sample index.
[0188] In summary, the localization method based on the multi-source unsupervised domain adaptation localization model (DF-Loc) includes two alignment stages: learning a specific source domain invariant representation and aligning the target sample regressor output. The loss function of this method includes prediction loss, marginal distribution difference loss, conditional distribution difference loss, and regressor alignment loss. Specifically, the network improves the prediction accuracy of source domain data by minimizing the regression error, promotes the learning of domain invariant representation by reducing the MMD loss, and aligns the outputs of each regressor by reducing the difference loss. The overall loss formula is as follows:
[0189]
[0190] The training process mainly follows the standard mini-batch stochastic gradient descent algorithm, and trains the source specific network in sequence. Finally, the predicted value of the target sample is determined by averaging the outputs of all regression models:
[0191]
[0192] Where j represents the index of the regression model, N is the number of regression models, and the training process is shown in Algorithm 1;
[0193] Step 32: Multi-scale attention feature fusion network for feature extraction:
[0194] like Figure 5 As shown in the figure, the CSI image constructed at each location shows significant distinguishability in the feature dimension, but has low distinguishability in the sample dimension and contains two information flows: amplitude and phase. To solve this problem, this embodiment designs a fingerprint positioning network called DF-LocNet, which is based on multi-scale convolution AFF.
[0195] Specifically, in order to adapt to the DF-Loc method, DF-LocNet is divided into three components: a general feature extractor, a domain-specific feature extractor, and a domain-specific regressor. The general feature extractor uses two multi-scale convolution blocks (MS-ConvBlocks) to learn key local information from amplitude and phase fingerprints, and integrates this information through the AFF module to improve the overall understanding ability of the model. The domain-specific feature extractor reduces the dimension of the feature map and performs domain alignment. Finally, the domain-specific regressor predicts the two-dimensional coordinates of the input fingerprint sample through the fully connected layer. The architecture of DF-LocNet is as follows: Figure 8 As shown in (a), the specific implementation details are as follows:
[0196] Step 321: First, multi-scale convolution feature learning:
[0197] like Figure 8 As shown in (b), inspired by the Inception network architecture, the DF-LocNet fingerprint positioning network is constructed by combining parallel multi-scale feature extraction with MC-CAM design. This configuration enables the fingerprint positioning network to focus on detailed features while capturing global context information, thereby enhancing its ability to flexibly adapt to various input feature distributions and improving the model's representation ability. Therefore, for this task, it achieves a balance between the depth and width of the fingerprint positioning network. Specifically, the dimension is The reconstructed amplitude and phase features are input into a parallel two-dimensional convolutional neural network (CNN) for feature extraction;
[0198] Step 322: Multi-scale channel attention mechanism
[0199] MS-CAM addresses the challenge of insufficient feature consistency across different scales by integrating global and local context information, such as Figure 8 As shown in (c), by changing the spatial pooling size, MS-CAM aggregates multi-scale context features along the channel dimension, so that it can simultaneously highlight the global distribution features of large objects and the local distribution features of small objects. Given the global channel context and local channel context Use Sigmoid function to calculate the attention weight M(X)∈R C×H×W , and generate optimized features according to the following formula
[0200]
[0201] Where σ represents the sigmoid function, represents element-wise multiplication, while ⊕ represents broadcast addition;
[0202] Step 323: Attention-based feature fusion
[0203] Module M based on the multi-scale channel attention mechanism (MS-CAM), such as Figure 8 As shown in (a), the network can perform soft selection or weighted averaging between X and Y. Therefore, the designed fingerprint localization network can integrate contextual information beyond the simple initial fusion while fusing amplitude fingerprint information and phase fingerprint information. The formula of AFF is as follows:
[0204]
[0205] Among the features Figure X ,Y∈R C×H×W , and Z∈R C×H×W represents the fused features, represents the initial feature fusion;
[0206] Step 324: Fully connected regression positioning
[0207] Regression-based localization is achieved by integrating the output of the domain-specific feature extractor through a fully connected network. Specifically, the downsampled output χ is flattened into a one-dimensional tensor And used as the input of the fully connected network. The final predicted coordinates are expressed as follows:
[0208]
[0209] The function f(·) constitutes the linear regression part of the fully connected neural network, W χl and b l Represent their weights and biases respectively. In addition, the mean square error (MSE) is used as the loss function, and its formula is as follows:
[0210]
[0211] where ||·||2 represents the Euclidean norm, L g (x,y) represents the real coordinates of the g-th reference point (RP);
[0212] During the training phase of the MUDA-based multi-source unsupervised domain adaptation localization model, the model's generalization capability was enhanced and convergence was accelerated by introducing an L2 regularization term, multiple Dropout layers, and a ReLU activation function. The entire model was trained using a stochastic gradient descent (SGD) optimizer combined with an adaptive learning rate adjustment strategy. In addition, to prevent overfitting, an early stopping mechanism and a save-only best model strategy were implemented to monitor and retain the optimal model throughout the training process.
[0213] Next, the technical solution of the present invention is further described with reference to specific embodiments:
[0214] The present invention was field tested in two typical large-scale indoor environments: an office building of a university and a classroom of a national key laboratory of a university. Data was collected using a TP-Link TL-WR886N wireless AP and a Thinkpad X201 receiver (running Ubuntu 12.04LTS). 1000 CSI packets were collected at each RP point at a sampling rate of 100 Hz in the 5 GHz frequency band and 20 MHz bandwidth. The distance between adjacent antennas was 2.68 cm. The model was implemented on the Ascend computing platform of a university based on the Python and PyTorch frameworks.
[0215] Experimental scenario such as Figure 9 As shown, the office scene includes various environments such as corridors, laboratories, and halls, with RP points spaced 0.6 meters apart. The classroom scene has RP points spaced 2 meters apart, both in NLOS environments. At each RP point, various human activities (such as standing, squatting, walking, and no one present) were recorded as different tasks.
[0216] The performance indicators mainly use the mean Euclidean distance (MED) and the cumulative distribution function (CDF) of the positioning error.
[0217] Experimental results (such as Figure 10-20 (shown) indicates that:
[0218] Pre-processing module (QC) module validity: Figure 16 and Figure 17 As shown in the figure, the HWF module significantly reduces the coefficient of variation of the CSI amplitude feature (CV value drops from 0.3149 to 0.1739), improving feature stability and inter-position discrimination.
[0219] Attention mechanism and MUDA module effectiveness: Figure 13 As shown in , the attention mechanism enables the model to focus on features with more information. Figure 14 As shown in , DF-Loc can effectively align the feature distributions of the source domain and the target domain. Figure 18As shown in the figure, the DF model containing full QC, attention mechanism and MUDA shows the smallest median, quartile and mean errors in all test cases, especially in the "different" test cases (ODT, CDT), which proves the synergy of each module.
[0220] Positioning accuracy: Figure 15 As shown in the figure, in the OST case, the 1-σ / 2-σ errors of DF-Loc are 0.98m / 1.27m; in the CST case, the 1-σ error is 4.15m; in the ODT case, the 1-σ error is 0.87m; and in the CDT case, the 1-σ error is 4.8m, which are all better than or comparable to most of the comparison algorithms (KNN, RFR, SVR, CiFi, Hi-Loc, TCA, JDA).
[0221] Robustness and generalization: Figure 11 and Figure 12 As shown in FIG, the DF-Loc method of this embodiment maintains good positioning performance in different sub-areas and different human body postures; Figure 19 As shown in Figure 3, DF-Loc is insensitive to changes in the test RP ratio and the number of training samples, and exhibits good generalization ability.
[0222] Challenge: As Figure 20 As shown in Figure 2, when there are large differences between training points and test points, or when inconsistent time scales lead to significant environmental dynamics, the model still faces challenges and the predicted coordinates may deviate significantly from the true coordinates.
[0223] In summary, the positioning method of the present invention first preprocesses the collected channel state information (CSI) to construct a fingerprint image; then, the multi-source unsupervised domain adaptation (MUDA) framework is used to integrate historical data knowledge from multiple time scales through a two-stage alignment strategy (feature distribution alignment and regressor output alignment), learn domain-invariant features, and reduce dependence on labeled data in the target domain; a feature learning backbone network that integrates multi-scale convolution, multi-scale channel attention mechanism (MS-CAM) and attention feature fusion (AFF) is used to extract features that are robust to environmental changes. It can achieve high-precision and high-robust positioning in dynamic indoor environments, effectively overcoming the defect that distribution drift causes the failure of traditional methods.
[0224] Example 2:
[0225] The present invention provides a dynamic environment robust indoor positioning system based on multi-source unsupervised domain adaptation, which is used to implement the dynamic environment robust indoor positioning method based on multi-source unsupervised domain adaptation described in the first aspect, including:
[0226] a preprocessing module, configured to receive and preprocess the channel state information data obtained from the wireless access point, wherein the preprocessing includes filtering based on a Hampel identifier and an improved wavelet threshold, as well as linear calibration for phase information, and constructing a fingerprint image based on the amplitude and phase information of the preprocessed channel state information;
[0227] A construction module is used to construct and train a multi-source unsupervised domain adaptation positioning model to obtain a trained multi-source unsupervised domain adaptation positioning model, wherein the multi-source unsupervised domain adaptation positioning model includes a general feature extractor, N domain-specific feature extractors, and N domain-specific regressors;
[0228] A two-stage alignment strategy is adopted. N domain-specific feature extractors are used to align the marginal distribution and conditional distribution between each source domain and the target domain. N domain-specific regressors are then used to align the regressor outputs for target domain samples to learn domain-invariant feature representations.
[0229] The universal feature extractor is a feature learning backbone network that integrates multi-scale convolution, multi-scale channel attention mechanism and attention feature fusion, which is used to extract features from fingerprint images of multiple source domains and fingerprint images of target domains;
[0230] The prediction output module is used to input the fingerprint image to be located, which is constructed after online collection and preprocessing, into the trained multi-source unsupervised domain adaptation positioning model, and obtain the final position estimate by performing weighted average calculation on the output results of N domain-specific regressors.
[0231] Example 3:
[0232] The present invention provides a terminal device, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor. The memory stores a computer program capable of running on the processor. When the processor loads and executes the computer program, the above-mentioned dynamic environment robust indoor positioning method based on multi-source unsupervised domain adaptation is adopted.
[0233] It should be noted that the terminal device can be a computer device such as a desktop computer, a laptop computer or a cloud server, and the terminal device includes but is not limited to a processor and a memory. For example, the terminal device can also include input and output devices, network access devices and buses, etc.
[0234] Furthermore, the processor may adopt a central processing unit (CPU). Of course, depending on the actual usage, other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. may also be adopted. The general-purpose processor may adopt a microprocessor or any conventional processor, etc., and this application does not impose any restrictions on this.
[0235] Example 4:
[0236] The present invention provides a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform the above-mentioned dynamic environment robust indoor positioning method based on multi-source unsupervised domain adaptation.
[0237] Among them, the computer program can be stored in a computer-readable medium, the computer program includes computer program code, the computer program code can be in the form of source code, object code, executable file or certain middleware, etc. The computer-readable medium includes any entity or device that can carry computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that computer-readable medium includes but is not limited to the above-mentioned components.
[0238] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that includes a list of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus.
[0239] For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to the specific circumstances. When an element is referred to as being "assembled on", "installed on", "fixed on" or "set on" another element, it can be directly on the other element or there can be a central element. When an element is considered to be "connected" to another element, it can be directly connected to the other element or there can be a central element at the same time. The terms "vertical", "horizontal", "up", "down", "left", "right" and similar expressions used herein are for illustrative purposes only and are not intended to be the only embodiment.
[0240] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to these embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the appended claims and their equivalents.
[0241] Throughout this specification, references to terms such as "one embodiment," "example," or "specific example" indicate that a specific feature, structure, material, or characteristic described in conjunction with that embodiment or example is included in at least one embodiment or example of the present disclosure. In this specification, schematic representations of these terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
Claims
1. A robust indoor positioning method in dynamic environments based on multi-source unsupervised domain adaptation, characterized in that: The following steps are involved: S1. Receive channel state information data obtained from a wireless access point and perform preprocessing, wherein the preprocessing includes filtering based on a Hampel identifier and an improved wavelet threshold, as well as linear calibration for phase information, and construct a fingerprint image based on the preprocessed channel state information amplitude and phase information; S2. Construct and train a multi-source unsupervised domain adaptation localization model to obtain a trained multi-source unsupervised domain adaptation localization model, wherein the multi-source unsupervised domain adaptation localization model includes a general feature extractor, N domain-specific feature extractors, and N domain-specific regressors; A two-stage alignment strategy is adopted. N domain-specific feature extractors are used to align the marginal distribution and conditional distribution between each source domain and the target domain. N domain-specific regressors are then used to align the regressor outputs for target domain samples to learn domain-invariant feature representations. The universal feature extractor is a feature learning backbone network that integrates multi-scale convolution, multi-scale channel attention mechanism and attention feature fusion, which is used to extract features from fingerprint images of multiple source domains and fingerprint images of target domains; S3. Input the fingerprint image to be located after online collection and preprocessing into the trained multi-source unsupervised domain adaptation localization model, and obtain the final location estimate by performing weighted average calculation on the output results of N domain-specific regressors.
2. The method for robust indoor positioning in dynamic environments based on multi-source unsupervised domain adaptation according to claim 1, characterized in that: In step S1, channel state information data obtained from a wireless access point is received and preprocessed, wherein the preprocessing includes filtering based on a Hampel identifier and an improved wavelet threshold and linear calibration for phase information, specifically as follows: (21) Using Hampel identifiers to remove outliers in the channel state information data subcarrier time series; (22) Use a wavelet filter based on an improved wavelet threshold function to smooth each subcarrier sequence, as follows: An improved wavelet threshold function is used to smooth each subcarrier sequence to reduce time jitter. The improved wavelet threshold function is expressed as: Where X is the original wavelet coefficient and T is the threshold; (23) Using a Butterworth low-pass filter to attenuate high-frequency noise in the subcarrier channel state information data sequence is achieved by adjusting the cutoff frequency and the filter order; (24) The linear calibration of phase information is as follows: The phase response after unwrapping is processed using least squares optimization and linear regression, and the formula is as follows: where ψ i (m,n) is the unwrapping phase of the ith data packet, m is the antenna index, n is the subcarrier index, τ s,i For STO, f δ is the frequency spacing between adjacent subcarriers, ρ and β are the least squares coefficients, is the phase after transformation, Indicates the phase after STO cleaning.
3. The method for robust indoor positioning in dynamic environments based on multi-source unsupervised domain adaptation according to claim 2, characterized in that: In step S1, a fingerprint image is constructed based on the pre-processed channel state information amplitude and phase information, specifically as follows: (31) Based on the WiFi AP’s OFDM receiver, the channel state information data is extracted, which includes the amplitude and phase information of each subcarrier. (32) The amplitude and phase information of the collected multiple channel state information data packets are preprocessed to construct a two-dimensional fingerprint image.
4. The method for robust indoor positioning in dynamic environments based on multi-source unsupervised domain adaptation according to claim 3, characterized in that: In step S2, a two-stage alignment strategy is adopted to align the marginal distribution and conditional distribution between each source domain and the target domain using N domain-specific feature extractors, and to align the regressor outputs for target domain samples using N domain-specific regressors to learn domain-invariant feature representations, as follows: (41) Using N domain-specific feature extractors to align the marginal distribution and conditional distribution between each source domain and target domain: (41.1) The goal of distribution adaptation in domain adaptation is to align the marginal distribution P and the conditional distribution Q. The distribution alignment term Defined as: where c∈{1,…,C} is the category indicator, D f (P S ,P T ) represents the alignment of marginal distributions between the source and target domains, represents the alignment of the conditional distribution of each category c; Based on formula (6), the learning objective of the multi-source unsupervised domain adaptation localization model is expressed as follows: where J(·,·) represents the mean square error loss function, Θ = {w,b} represents the network parameter set, including weights and biases, N represents the number of sources, E represents the expectation, X represents the collected dataset, csi represents the fingerprint sample, and L represents the corresponding label. (·,·) is the distribution adaptability between quantization domains, R f (·,·) is the Laplace regularization term that promotes smoothness, λ and ρ are used as regularization coefficients, g(·) acts as a feature extractor that maps each domain into a common feature space, h j (·) is a domain-specific feature extractor, and f(·) represents a regressor; Position prediction is formulated as a regression problem, where the conditional distribution alignment is approximated by minimizing the maximum mean difference between the source and target domains in the regressor: (41.2) The maximum mean difference unbiased linear time approximation method is used to reduce the computational complexity: In the formula S and T represent the data distribution of the source domain and the target domain respectively, n represents the number of samples, and h l is a quadruple defined in z i The operator on is defined as follows: Where k represents the feature kernel, so the sum of formula (11) and formula (12) is approximately applicable to the gradient calculation using a small batch process; The gradient of the parameters is defined as follows: Where λ and ρ are used as regularization coefficients; According to formula (11), each domain-specific feature extractor aligns the marginal distribution of each pair of source-target domains by minimizing the following formula: where D(·,·) represents the estimator of the difference between the two domains; Again, the alignment of the conditional distributions is achieved by minimizing the following maximum mean difference loss: (42) Use N domain-specific regressors to align the regressor output for target domain samples The Euclidean distance between the outputs of the regressor on the target domain data is used as the loss function: By minimizing formula (16), the outputs of the regression models are aligned; In addition, for each regressor, the prediction loss is calculated using the mean squared error, which is defined by the following equation: Where i represents the sample index.
5. The method for robust indoor positioning in dynamic environments based on multi-source unsupervised domain adaptation according to claim 4, characterized in that: The general feature extractor is a feature learning backbone network that integrates multi-scale convolution, multi-scale channel attention mechanism, and attention feature fusion. It is used to extract features from fingerprint images of multiple source domains and fingerprint images of target domains. The details are as follows: (51) Multi-scale convolutional feature learning: The feature learning backbone network is constructed by combining parallel multi-scale feature extraction with MC-CAM design to focus on detailed features while capturing global context information. Therefore, the feature learning backbone network achieves a balance between network depth and width, which is the dimension The reconstructed amplitude and phase features are input into a parallel two-dimensional convolutional neural network for feature extraction; (52) Multi-scale channel attention mechanism The multi-scale channel attention mechanism aggregates multi-scale context features along the channel dimension, enabling it to simultaneously highlight the global distribution features of large objects and the local distribution features of small objects. Given the global channel context (X) and local channel context Use Sigmoid function to calculate the attention weight M(X)∈R C×H×W , and generate optimized features according to the following formula Where σ represents the sigmoid function, represents element-wise multiplication, and represents broadcast addition; (53) Attention-based feature fusion Attention-based feature fusion, the feature learning backbone network can integrate contextual information beyond the simple initial fusion while fusing amplitude fingerprint information and phase fingerprint information. The attention-based feature fusion formula is as follows: Where the feature map X,Y∈R C×H×W , and Z∈R C×H×W represents the fused features, represents the initial feature fusion; (54) Fully connected regression positioning Regression-based localization is achieved by integrating the output of the domain-specific feature extractor through a fully connected network. Specifically, the downsampled output χ is flattened into a one-dimensional tensor And as the input of the fully connected network, the final predicted coordinates are expressed as follows: The function f(·) constitutes the linear regression part of the fully connected neural network, W χl and b l Represent their weights and biases respectively. In addition, the mean square error is used as the loss function, which is formulated as follows: where ||·||2 represents the Euclidean norm, L g (x,y) represents the real coordinates of the g-th reference point (RP).
6. The method for robust indoor positioning in dynamic environments based on multi-source unsupervised domain adaptation according to claim 5, characterized in that: The training method of the multi-source unsupervised domain adaptation positioning model includes the following steps: (61) The stochastic gradient descent algorithm is used to improve the model performance by iteratively optimizing the feature extraction and domain adaptation steps, and balancing the empirical risk and regularization term according to the principle of structural risk minimization; (62) Configure model hyperparameters including learning rate, convolution kernel size, batch size, and number of filters to adjust model complexity and generalization ability: (62.1) Use the Adam optimizer to optimize the model and set the learning rate decay strategy, that is, the learning rate is decayed by 0.1 times every 30 epochs; (62.2) Set the training cycle and termination conditions: the maximum number of training rounds is 100 epochs, and the early stopping strategy is enabled. When the validation loss does not improve for 10 consecutive epochs, the training is stopped. (62.3) Using a batch processing approach, each training batch contains samples from multiple source and target domains; (62.4) Establish a validation strategy: Split a validation set from the source domain data to evaluate the source domain performance and domain adaptation loss to indirectly verify the model's ability to generalize to the target domain; (63) Sample balance: Ensure balanced samples across domains through uniform sampling to avoid bias towards a specific source domain; (64) The overall loss function of the multi-source unsupervised domain adaptation localization model is the sum of the prediction loss, marginal distribution difference loss, conditional distribution difference loss, and regressor alignment loss, which is specifically expressed as follows: In the formula represents the prediction loss calculated using the mean squared error (MSE), Marginal distribution alignment loss for each source-target domain pair in each domain-specific feature extractor; Achieve maximum mean difference loss for conditional distribution alignment, Euclidean distance between all regressor outputs on target domain data.
7. The method for robust indoor positioning in dynamic environments based on multi-source unsupervised domain adaptation according to claim 1, characterized in that: The final position estimate is obtained by taking a weighted average of the outputs of N domain-specific regressors as follows: Where j represents the index of the regression model and N is the number of regression models.
8. A dynamic environment robust indoor positioning system based on multi-source unsupervised domain adaptation, used to implement the dynamic environment robust indoor positioning method based on multi-source unsupervised domain adaptation according to any one of claims 1 to 7, characterized in that: include: a preprocessing module, configured to receive and preprocess the channel state information data obtained from the wireless access point, wherein the preprocessing includes filtering based on a Hampel identifier and an improved wavelet threshold, as well as linear calibration for phase information, and constructing a fingerprint image based on the amplitude and phase information of the preprocessed channel state information; A construction module is used to construct and train a multi-source unsupervised domain adaptation positioning model to obtain a trained multi-source unsupervised domain adaptation positioning model, wherein the multi-source unsupervised domain adaptation positioning model includes a general feature extractor, N domain-specific feature extractors, and N domain-specific regressors; A two-stage alignment strategy is adopted. N domain-specific feature extractors are used to align the marginal distribution and conditional distribution between each source domain and the target domain. N domain-specific regressors are then used to align the regressor outputs for target domain samples to learn domain-invariant feature representations. The universal feature extractor is a feature learning backbone network that integrates multi-scale convolution, multi-scale channel attention mechanism and attention feature fusion, which is used to extract features from fingerprint images of multiple source domains and fingerprint images of target domains; The prediction output module is used to input the fingerprint image to be located, which is constructed after online collection and preprocessing, into the trained multi-source unsupervised domain adaptation positioning model, and obtain the final position estimate by performing weighted average calculation on the output results of N domain-specific regressors.
9. A terminal device comprising a memory, a processor, and a computer program stored in the memory and capable of running on the processor, characterized in that: The memory stores a computer program that can be run on a processor. When the processor loads and executes the computer program, the dynamic environment robust indoor positioning method based on multi-source unsupervised domain adaptation described in any one of claims 1 to 7 is adopted.
10. A storage medium containing computer-executable instructions, characterized in that: When executed by a computer processor, the computer executable instructions are used to perform the dynamic environment robust indoor positioning method based on multi-source unsupervised domain adaptation according to any one of claims 1 to 7.
Citation Information
Patent Citations
Indoor positioning method in dynamic environment based on 1D-CNN
CN116367085A
Indoor positioning method based on C-L-ATT network model
CN119211839A
Metaadapter-based small sample indoor positioning method
CN120075732A
Indoor positioning method and system based on channel state information and depth feature fusion
CN120075998A