Dynamic environment robust indoor positioning method based on multi-source unsupervised domain adaptation
By employing a multi-source unsupervised domain adaptation method, channel state information is aligned using multi-scale convolution and attention mechanisms to construct a robust indoor positioning model for dynamic environments. This solves the problem of accuracy degradation in dynamic environments in traditional positioning technologies, achieving high-precision and low-cost positioning adaptation.
Patent Information
- Application Number
- CN202510881057.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-27
- Publication Date
- 2026-08-25
- Estimated Expiration
- 2045-06-27
AI Technical Summary
Traditional wireless positioning technology faces the problem of decreased positioning accuracy due to signal fluctuations and environmental changes in dynamic environments, especially under non-line-of-sight conditions where multipath propagation and signal attenuation are severe, and data annotation and model calibration are time-consuming and laborious.
A multi-source unsupervised domain adaptation method is adopted. By receiving and preprocessing channel state information data, a multi-source unsupervised domain adaptation localization model is constructed. The model aligns edges and conditional distributions using a general feature extractor and a domain-specific feature extractor. Features are extracted by combining multi-scale convolution and attention mechanisms. Two-stage alignment and weighted average calculation are performed to finally achieve position estimation.
It improves the robustness and accuracy of the positioning system in dynamic environments, reduces reliance on labeled data, lowers the cost of frequent calibration and data annotation, enhances feature extraction capabilities, and adapts to constantly changing indoor scenarios in the real world.
Smart Images

Figure CN120676313B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of wireless communication and indoor positioning technology, specifically to a dynamic environment robust indoor positioning method based on multi-source unsupervised domain adaptation. Background Technology
[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 time of arrival (ToA) and angle of arrival (AoA) geometric positioning methods, have high accuracy under line-of-sight (LOS) conditions, but their performance degrades significantly in non-line-of-sight (NLOS) and complex indoor environments due to multipath propagation and signal attenuation. Furthermore, they typically rely on precise base station deployment and complex hardware, resulting in high deployment costs. Fingerprint positioning technology has become a research hotspot in indoor positioning due to its robustness under NLOS conditions, minimal hardware requirements, and ability to utilize existing wireless infrastructure. This method typically includes an offline database of signal characteristics (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, multipath effects, personnel movement, and obstacle rearrangement cause the signal propagation path to change continuously, and key signal features such as CSI amplitude and phase exhibit temporal differences. This makes it difficult for models trained on outdated data to generalize to new environments, resulting in decreased 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 laborious. To address these issues, this invention proposes a robust indoor positioning method for dynamic environments based on multi-source unsupervised domain adaptation. Summary of the Invention
[0004] The purpose of this invention is to provide a robust indoor positioning method for dynamic environments based on multi-source unsupervised domain adaptation. This method can effectively utilize diverse data from multiple historical time scales, extract domain-invariant features, enhance the model's generalization ability in the target domain, and reduce dependence on labeled data in the target domain, thereby achieving high-precision and robust indoor positioning in dynamically changing environments.
[0005] According to a first aspect of the present invention, in order to achieve the above-mentioned objective, 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 the wireless access point and preprocess it. The preprocessing includes filtering based on Hampel identifier and improved wavelet threshold and linear calibration for phase information. Construct a fingerprint image based on the amplitude and phase information of the preprocessed channel state information.
[0007] S2. Construct and train a multi-source unsupervised domain adaptive localization model to obtain the trained multi-source unsupervised domain adaptive localization model, which includes a general feature extractor, N domain-specific feature extractors and N domain-specific regressors.
[0008] A two-stage alignment strategy is adopted, which uses N domain-specific feature extractors to align the marginal distributions and conditional distributions between the source and target domains, and uses N domain-specific regressors to align the regressor outputs for the target domain samples, thereby learning domain-invariant feature representations.
[0009] The general feature extractor is a feature learning backbone network that integrates multi-scale convolution, multi-scale channel attention mechanism and attention feature fusion, used to extract features from fingerprint images of multiple source domains and fingerprint images of the target domain.
[0010] S3. Input the fingerprint image to be located, which is collected online and preprocessed, into the trained multi-source unsupervised domain adaptive localization model. The final location estimate is obtained by weighted averaging the outputs of N domain-specific regressors.
[0011] Further, in step S1, channel state information data obtained from the wireless access point is received and preprocessed. The preprocessing includes filtering based on the Hampel identifier and improved wavelet threshold, as well as linear calibration for the phase information, as follows:
[0012] (21) Use the Hampel identifier to remove outliers from the channel state information data subcarrier time series;
[0013] (22) Smooth each subcarrier sequence using a wavelet filter based on an improved wavelet threshold function, 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 follows:
[0015]
[0016] In the formula, X represents the original wavelet coefficients, and T represents the threshold.
[0017] (23) Use a Butterworth low-pass filter to attenuate high-frequency noise in the subcarrier channel state information data sequence, specifically by adjusting the cutoff frequency and the filter order;
[0018] (24) Linear calibration of phase information is as follows:
[0019] The phase response after untangling is processed using least squares optimization and linear regression, as shown in the following formula:
[0020]
[0021] Where ψ i (m,n) represents the unwrapping phase of the i-th data packet, where m is the antenna index, n is the subcarrier index, and τ s,i For STO, f δ Where ρ is the frequency spacing between adjacent subcarriers, and β is the least squares coefficient. The transformed phase, This indicates the phase after STO cleaning.
[0022] Furthermore, in step S1, a fingerprint image is constructed based on the preprocessed channel state information amplitude and phase information, as follows:
[0023] (31) The OFDM receiver based on WiFi AP extracts channel state information data, including the amplitude and phase information of each subcarrier.
[0024] (32) The amplitude and phase information of the multiple channel state information data packets collected are preprocessed to construct a two-dimensional fingerprint image.
[0025] Furthermore, in step S2, a two-stage alignment strategy is adopted, using N domain-specific feature extractors to align the marginal and conditional distributions between the source and target domains, and using N domain-specific regressors to align the regressor outputs for the target domain samples, thereby learning domain-invariant feature representations, as detailed below:
[0026] (41) Align the edge distribution and conditional distribution between each source domain and target domain using N domain-specific feature extractors:
[0027] (41.1) In domain adaptation, the goal of distribution adaptation is to align both the marginal distribution P and the conditional distribution Q. The distribution alignment term... Defined as:
[0028]
[0029] Where c∈{1,…,C} serves as the category indicator, and D f (P S ,P T () indicates the alignment of the marginal distributions between the source and target domains. This indicates the alignment of the conditional distribution for each category c;
[0030] Based on formula (6), the learning objective of the multi-source unsupervised adaptive localization model is expressed as follows:
[0031]
[0032] In the formula, J(·,·) represents the mean squared error loss function, and Θ={w,b} represents the network parameter set, including weights and biases;
[0033] Location prediction is formulated as a regression problem, approximating conditional distribution alignment 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 computational complexity:
[0035]
[0036] In the formula h l It is defined in the quadruple z i The operator on is defined as follows:
[0037]
[0038] Where k represents the feature kernel, therefore, the summation of formulas (11) and (12) is approximately applicable to gradient calculation using mini-batch processes;
[0039] The gradient of the parameter is defined as follows:
[0040]
[0041] According to formula (11), each domain-specific feature extractor aligns the edge distributions of each source-target domain pair by minimizing the following formula:
[0042]
[0043] Similarly, alignment of conditional distributions is achieved by minimizing the following maximum mean difference loss:
[0044]
[0045] (42) Align the regressor outputs for the target domain samples using N domain-specific regressors.
[0046] The loss function is the Euclidean distance between the outputs of the regressor on the target domain data.
[0047]
[0048] By minimizing formula (16), the output of the regression model is aligned;
[0049] Furthermore, 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 general feature extractor is a feature learning backbone network integrating multi-scale convolution, multi-scale channel attention mechanism, and attention feature fusion, used to extract features from fingerprint images of multiple source domains and fingerprint images of the target domain, 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, which is used to focus on detailed features while capturing global contextual information;
[0055] Therefore, the feature learning backbone network achieves a balance between network depth and width, which will have a dimension of The reconstructed amplitude and phase features are input into a parallel two-dimensional convolutional neural network for feature extraction;
[0056] (52) Multiscale channel attention mechanism
[0057] The multi-scale channel attention mechanism aggregates multi-scale contextual 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 The attention weights M(X)∈R are calculated using the Sigmoid function. 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 allows the feature learning backbone network to incorporate contextual information beyond simple initial fusion while fusing amplitude 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 Indicates the characteristics after fusion. Indicates initial feature fusion;
[0064] (54) Fully connected regression localization
[0065] Regression-based localization is achieved by integrating the outputs of domain-specific feature extractors through a fully connected network. Specifically, the downsampled output χ is flattened into a one-dimensional tensor. And as input to the fully connected network, the final predicted coordinates are represented as follows:
[0066]
[0067] The function f(·) constitutes the linear regression part of the fully connected neural network, W χl and b l Let these represent the weights and biases, respectively. Furthermore, the mean squared error is used as the loss function, and its formula is as follows:
[0068]
[0069] Where ||·||2 represents the Euclidean norm, and L g (x,y) represents the true coordinates of the g-th reference point (RP).
[0070] Furthermore, the training method for the multi-source unsupervised domain adaptive localization model includes the following steps:
[0071] (61) The stochastic gradient descent algorithm is adopted to improve the model performance by iteratively optimizing the feature extraction and domain adaptation steps, and the empirical risk and regularization term are balanced according to the principle of minimizing structural risk.
[0072] (62) Configure model hyperparameters, including learning rate, 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 a learning rate decay strategy, that is, decay the learning rate by 0.1 times every 30 epochs;
[0074] (62.2) Set training cycle and termination conditions: The maximum number of training rounds is 100 epochs, and the early stop strategy is enabled. Training is stopped when the verification loss has not improved for 10 consecutive epochs.
[0075] (62.3) A batch processing method is adopted, and each training batch contains samples from multiple source and target domains;
[0076] (62.4) Establish a validation strategy: Divide the validation set from the source domain data to evaluate the source domain performance and domain adaptation loss, so as to indirectly verify the model’s ability to generalize to the target domain.
[0077] (63) Sample balance: Ensure the balance of samples in each domain by uniform sampling to avoid bias towards a specific source domain;
[0078] (64) The overall loss function of the multi-source unsupervised adaptive localization model is the sum of the prediction loss, marginal distribution difference loss, conditional distribution difference loss, and regressor alignment loss, as specifically expressed below:
[0079]
[0080] In the formula This represents the prediction loss calculated using the mean squared error (MSE). Marginal distribution alignment loss for each source-target domain pair in the feature extractor for each specific domain; Achieve maximum mean difference loss for conditional distribution alignment. The Euclidean distance between all regressor outputs on the target domain data.
[0081] Furthermore, the final location estimate is obtained by weighted averaging the outputs 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, for implementing the dynamic environment robust indoor positioning method based on multi-source unsupervised domain adaptation described in the first aspect, comprising:
[0085] The preprocessing module is used to receive channel state information data obtained from the wireless access point and preprocess it. The preprocessing includes filtering based on Hampel identifier and 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] The building module is used to build and train a multi-source unsupervised domain adaptive localization model to obtain the trained multi-source unsupervised domain adaptive localization model, which includes a general feature extractor, N domain-specific feature extractors and N domain-specific regressors.
[0087] A two-stage alignment strategy is adopted, which uses N domain-specific feature extractors to align the marginal distributions and conditional distributions between the source and target domains, and uses N domain-specific regressors to align the regressor outputs for the target domain samples, thereby learning domain-invariant feature representations.
[0088] The general feature extractor is a feature learning backbone network that integrates multi-scale convolution, multi-scale channel attention mechanism and attention feature fusion, used to extract features from fingerprint images of multiple source domains and fingerprint images of the target domain.
[0089] The prediction output module is used to input the fingerprint image to be located, which is collected online and preprocessed, into the trained multi-source unsupervised domain adaptive localization model. The final location estimate is obtained by weighted averaging the outputs of N domain-specific regressors.
[0090] According to a third aspect of the present invention, the present invention provides a storage medium comprising computer-executable instructions, which, when executed by a computer processor, are used to perform 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 comprising a computer program, which, when executed by a processor, 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] This invention has at least the following beneficial effects:
[0093] 1. Strong robustness and high accuracy: This invention effectively integrates multi-source historical data and extracts domain-invariant features through a multi-source unsupervised domain adaptation framework and a two-stage alignment strategy, which significantly improves the robustness and positioning accuracy of the positioning system in dynamic environments (such as changes in signal characteristics caused by personnel movement and layout changes).
[0094] 2. Reduced reliance on labeled data: The localization method of this 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 labeling in dynamic environments.
[0095] 3. Enhanced feature extraction capability: The carefully designed QC preprocessing modules (HWF and LC) of this invention 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 addressing distribution drift: This invention overcomes the performance degradation problem caused by data distribution drift in traditional methods and is more suitable for constantly changing indoor scenarios in the real world.
[0097] Of course, any product implementing this invention does not necessarily need to achieve all of the advantages described above at the same time. Attached Figure Description
[0098] Figure 1 This is a schematic diagram illustrating the architectural principle of the positioning method described in this invention;
[0099] Figure 2 This is a schematic diagram of the preprocessing flow of CSI amplitude data based on the QC module of the present invention, wherein (a) shows the effect of Hampel identifiers in removing coarse outliers, (b) shows the effect of wavelet filter in smoothing sequences, and (c) shows the effect of Butterworth low-pass filter in removing high-frequency noise.
[0100] Figure 3 This 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 original phase measured, (b) shows the phase after unwinding, and (c) shows the phase after linear transformation.
[0101] Figure 4 This is a schematic diagram of the CSI fingerprint image construction mechanism of the present invention;
[0102] Figure 5 These are example images of the newly designed CSI fingerprint image in different positions, where (a) represents the amplitude fingerprint image at position 1, (b) represents the amplitude fingerprint image at position 2, (c) represents the phase fingerprint image at position 1, and (d) represents the phase fingerprint image at position 2.
[0103] Figure 6 This is a schematic diagram of a traditional localization framework based on transfer learning;
[0104] Figure 7 This is a schematic diagram of the two-stage alignment strategy of the positioning method described in this invention;
[0105] Figure 8 This is a schematic diagram of the DF-LocNet fingerprint localization network structure and its components, wherein (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 This is a schematic diagram of the layout of the experimental scenario (office and classroom) of the present invention. (a) shows the location of reference points (RPs) in the office, (b) shows the location of reference points (RPs) in the classroom, and (c) shows a photo of the classroom.
[0107] Figure 10 This is a graph showing the change in training loss of the multi-source unsupervised adaptive localization model in office and classroom experiments of this 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 This is a comparison chart of the positioning performance of the present invention under different postures, where (a) is the test of all points in the office at different times, and (b) is the test of all points in the classroom at different times.
[0110] Figure 13 This is a visualization of the attention mechanism weights of the present invention, where (a) is the context attention weights output by the CNN, and (b) is the attention weights fused from the dual information streams.
[0111] Figure 14 This is a schematic diagram of the domain adaptation effect of the DF-Loc 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 diagram shows the CDF graphs of the positioning errors of the DF-Loc positioning method of this invention and other algorithms under different test cases. (a) is the OST algorithm case, with different training points in the office at the same time and test points at different test points; (b) is the CST algorithm case, with different training points in the classroom at the same time and test points at different test points; (c) is the ODT algorithm case, with different training points in the office at different time and test points at different test points; (d) is the CDT algorithm case, with different training points in the classroom at different time and test points at different test points.
[0113] Figure 16 This is a 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 This is a schematic diagram of the CSI amplitude and phase fingerprint features 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 this 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 graph showing the generalization ability of the DF-Loc localization method of the present invention to locate MED in the DT case, where (a) represents different test reference point ratios and (b) represents different training sample sizes;
[0117] Figure 20 These are example diagrams illustrating the challenges faced by the DF-Loc positioning method of this invention in locating MEDs, where (a) is the p5 pose in the ODT case, (b) is the p'2 pose in the CDT case, (c) is the p5 pose in the OWT-2 case, and (d) is the p5 pose in the OWT-1 case.
[0118] Figure 21 This is a flowchart illustrating the positioning method described in this invention. Detailed Implementation
[0119] The technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.
[0120] Example 1:
[0121] Please see Figures 1-21 This 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 the wireless access point and preprocess it. The preprocessing includes filtering based on Hampel identifier and improved wavelet threshold and linear calibration for phase information. Construct a fingerprint image based on the amplitude and phase information of the preprocessed channel state information.
[0123] S2. Construct and train a multi-source unsupervised domain adaptive localization model to obtain the trained multi-source unsupervised domain adaptive localization model, which includes a general feature extractor, N domain-specific feature extractors and N domain-specific regressors.
[0124] A two-stage alignment strategy is adopted, which uses N domain-specific feature extractors to align the marginal distributions and conditional distributions between the source and target domains, and uses N domain-specific regressors to align the regressor outputs for the target domain samples, thereby learning domain-invariant feature representations.
[0125] The general feature extractor is a feature learning backbone network that integrates multi-scale convolution, multi-scale channel attention mechanism and attention feature fusion, used to extract features from fingerprint images of multiple source domains and fingerprint images of the target domain.
[0126] S3. Input the fingerprint image to be located, which is collected online and preprocessed, into the trained multi-source unsupervised domain adaptive localization model. The final location estimate is obtained by weighted averaging the outputs of N domain-specific regressors.
[0127] The architecture principle of the positioning method described in this embodiment is as follows: Figure 1 As shown, it mainly includes CSI data acquisition, data preprocessing, data construction (fingerprint image generation), and multi-source unsupervised domain adaptation modules.
[0128] Step 1: Raw Channel State Information (CSI) data is susceptible to multipath effects, noise interference, and clock asynchrony. Therefore, this embodiment designs a Quality Control (QC) preprocessing module, including an amplitude-based HWF (Hampel and Wavelet Filtering) module and a phase-based LC (Linear Calibration) module. The specific steps are as follows:
[0129] Step 11: Amplitude HWF module processing (see...) Figure 2 )
[0130] Hampel identifiers: Utilizing the median and median absolute deviation (MAD) within a sliding window to detect and replace outliers (abrupt 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. This 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 smoothness of the subcarrier is significantly improved after filtering;
[0135] Butterworth low-pass filter: Used to attenuate high-frequency noise in subcarrier CSI sequences, 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), a linear calibration module is first employed. This module utilizes least squares optimization and linear regression to process the unwound phase response, as shown in the following formula:
[0138]
[0139] Where ψ i (m,n) represents the unwrapping phase of the i-th data packet, where m is the antenna index, n is the subcarrier index, and τ s,i For STO, f δ Where ρ is the frequency spacing between adjacent subcarriers, and β is the least squares coefficient. The transformed phase, This 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 by the HWF module (Hampel identifier, wavelet filter, Butterworth low-pass filter), which is similar to the amplitude sequence, to further improve the stability of the phase fingerprint.
[0140] Step 2: Construct the CSI fingerprint, as follows:
[0141] This embodiment extracts CSI data from the OFDM receiver of a commercial WiFi AP, which includes amplitude and phase information for each subcarrier. The amplitude and phase information of multiple acquired CSI data packets (e.g., V=1000) are preprocessed and then processed in a specific way (e.g., ... Figure 4 The reshaping, stacking, and sliding window slicing shown are used to construct a two-dimensional fingerprint image (heatmap);
[0142] For example, using a sliding window of T=90, K fingerprint images are constructed for each reference point (RP) from V data packets. The dimensions of the image can be set as, for example, S′×M×C, where S′ is the number of subcarriers (e.g., 30), M is the number of antennas (e.g., 3), and C is the number of channels (amplitude is one channel, phase is one channel, or different channels combined into an RGB image). Figure 5 Examples of CSI amplitude and phase fingerprint images constructed at different locations are shown, demonstrating that fingerprint images at different locations are distinguishable.
[0143] Step 3: Construct and design a multi-source unsupervised domain adaptive localization model under the MUDA framework. This model includes a general feature extractor g(·) and N domain-specific feature extractors. and N domain-specific regressors
[0144] The general feature extractor employs 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 under different activity states) and fingerprint images from the target domain.
[0145] Next, domain adaptation is performed using a two-stage alignment strategy:
[0146] In the first stage, N domain-specific feature extractors receive shared features and map each pair of source domain data and target domain data to a specific latent space. The marginal distribution alignment between each source domain and target domain is achieved by minimizing the maximum mean difference (MMD). At the same time, the N domain-specific regressors align the conditional distribution when processing domain-invariant features.
[0147] In the second stage, the outputs of the N domain-specific regressors for the target domain samples are aligned, and the differences between their predictions are minimized to leverage decision boundary information from multiple source domains and improve cross-domain regression performance.
[0148] Specifically, we first assume that the input measurable space is... The label set is C, and the source domain samples are... Target domain samples This invention processes P(csi) S )≠P(csi T And P(L) S |csi} S ≠P(L T |csi} T In this scenario, the localization method based on the multi-source unsupervised domain adaptive 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 employs a two-stage alignment strategy, rather than learning a unified shared feature space across all domains. This strategy learns a domain adapter for each source-target domain pair and aligns the regressor's output 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 shown in the following formula:
[0152]
[0153] Where D(·,·) represents the estimator of the difference between two domains, g(·) is the feature extractor that maps each domain to a common feature space, and f(·) represents the 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 across different environments. Simultaneously, it enables synchronous end-to-end learning of the feature extraction function g(·) and the regressor f, such as... Figure 7 As shown, DF-LocNet effectively learns the ability to extract representative features using advanced convolutional neural networks (CNNs). Specifically, it employs a backbone network to learn transferable feature representations while achieving domain adaptation through distribution alignment.
[0156] Step 311: Alignment of Marginal and Conditional Distributions in Specific Domains:
[0157] In domain adaptation, the goal of distribution adaptation is to align the marginal distribution P and the conditional distribution Q. The distribution alignment term... Defined as:
[0158]
[0159] Where c∈{1,…,C} serves as the category indicator, and D f (P S ,P T () indicates the alignment of the marginal distributions between the source and target domains. This indicates the alignment of the conditional distribution for each category c;
[0160] Based on formula (6), the learning objective of the multi-source unsupervised domain adaptive localization model can be expressed as follows:
[0161]
[0162] Where J(·,·) represents the mean squared error (MSE) loss function, and Θ={w,b} represents the network parameter set, including weights and biases;
[0163] Location prediction can be described 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 regarded as a regression task, and the 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 adaptive 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 method ensures that distribution adaptation is computed only between batches. This design is particularly practical and efficient for practical applications such as fingerprint-based localization, where data is usually received in streaming form.
[0165] Traditional transfer learning methods based on maximum mean difference (MMD) are typically based on the following formula:
[0166]
[0167] Where m and n represent respectively and The number of samples in the formula depends on pairwise similarity and has quadratic time complexity. Furthermore, these methods are often simplified to a linear kernel, as shown in the following equation:
[0168]
[0169] Where n S and n T These represent the number of samples in the source domain and the number of samples in the target domain, respectively, and c represents the category index;
[0170] However, in deep learning-based domain adaptation methods, such computations are often more time-consuming. To address this issue, this embodiment employs the MMD unbiased linear-time approximation method, which significantly reduces computational complexity.
[0171]
[0172] in h l It is defined in the quadruple z i The operator on is defined as follows:
[0173]
[0174] Where k represents the feature kernel. Therefore, the summation approximation in the above equation is applicable to gradient computation using mini-batch processes.
[0175] The gradient of the parameter is defined as follows:
[0176]
[0177] According to formula (11), each domain-specific feature extractor aligns the edge distributions of each source-target domain pair by minimizing the following formula:
[0178]
[0179] Similarly, alignment of conditional distributions is achieved by minimizing the following maximum mean difference (MMD) loss:
[0180]
[0181] Step 312: Domain-Specific Regressor Alignment
[0182] Target samples near the regression boundary are more likely to produce estimation errors 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 region. 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 equation, the output of the regression model can be aligned;
[0185] In addition, for each regressor, the predictive 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 adaptive localization model (DF-Loc) comprises two alignment stages: learning specific source domain-invariant representations and aligning the outputs of the target sample regressors. The loss function of this method includes prediction loss, marginal distribution discrepancy loss, conditional distribution discrepancy loss, and regressor alignment loss. Specifically, the network improves the prediction accuracy of the source domain data by minimizing regression error, promotes the learning of domain-invariant representations by reducing MMD loss, and aligns the outputs of each regressor by reducing discrepancy loss. The overall loss formula is as follows:
[0189]
[0190] The training process primarily follows the standard mini-batch stochastic gradient descent algorithm, training the source-specific networks sequentially. Ultimately, the predicted value for 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, the CSI images constructed at each location exhibit significant discriminability in the feature dimension, but low discriminability in the sample dimension, and contain both amplitude and phase information streams. To address this issue, this embodiment designs a fingerprint localization network called DF-LocNet, which is based on multi-scale convolutional AFF.
[0195] Specifically, to adapt to the DF-Loc method, DF-LocNet consists of three components: a general feature extractor, a domain-specific feature extractor, and a domain-specific regressor. The general feature extractor uses two multi-scale convolutional blocks (MS-ConvBlocks) to learn key local information from the amplitude and phase fingerprints, and integrates this information through an AFF module to improve the model's overall understanding. The domain-specific feature extractor reduces the dimensionality of the feature map and performs domain alignment. Finally, the domain-specific regressor predicts the two-dimensional coordinates of the input fingerprint sample through a 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 convolutional feature learning:
[0197] like Figure 8 As shown in (b), inspired by the Inception network architecture, the DF-LocNet fingerprint localization network is constructed by combining parallel multi-scale feature extraction with MC-CAM design. This configuration allows the fingerprint localization network to focus on detailed features while capturing global contextual information, thereby enhancing its ability to flexibly adapt to various input feature distributions and improving the model's representational power. Therefore, for this task, it achieves a balance between the depth and width of the fingerprint localization 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 contextual information, such as... Figure 8 As shown in (c), by changing the spatial pooling size, MS-CAM aggregates multi-scale contextual 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 The attention weights M(X)∈R are calculated using the Sigmoid function. 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 incorporate contextual information beyond simple initial fusion while fusing amplitude fingerprint information and phase fingerprint information. The formula for AFF is as follows:
[0204]
[0205] Among the features Figure X ,Y∈R C×H×W And Z∈R C×H×W Indicates the characteristics after fusion. Indicates initial feature fusion;
[0206] Step 324: Fully Connected Regression Localization
[0207] Regression-based localization is achieved by integrating the outputs of domain-specific feature extractors through a fully connected network. Specifically, the downsampled output χ is flattened into a one-dimensional tensor. This is then used as input to the fully connected network. The final predicted coordinates are represented as follows:
[0208]
[0209] The function f(·) constitutes the linear regression part of the fully connected neural network, W χl and b l Let these represent the weights and biases, respectively. Furthermore, the mean squared error (MSE) is used as the loss function, and its formula is as follows:
[0210]
[0211] Where ||·||2 represents the Euclidean norm, and L g (x,y) represents the true coordinates of the g-th reference point (RP);
[0212] In the training phase of the MUDA-based multi-source unsupervised domain adaptive localization model, the generalization ability of the model and the convergence are enhanced by introducing L2 regularization, multiple Dropout layers and ReLU activation function. The entire model is 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 strategy of saving only the best model are implemented to monitor and retain the optimal model throughout the training process.
[0213] The technical solution of the present invention will be further described below with reference to specific embodiments:
[0214] This invention was field-tested in two typical large-scale indoor environments: an office building and a classroom in a national key laboratory of a university. Data acquisition was performed using a TP-Link TL-WR886N wireless AP and a Thinkpad X201 receiver (running Ubuntu 12.04LTS). In the 5GHz band with a bandwidth of 20MHz, 1000 CSI data packets were collected at each RP point at a sampling rate of 100Hz. The distance between adjacent antennas was 2.68cm. The model was implemented on the Ascend computing platform of a university using Python and PyTorch frameworks.
[0215] Experimental scenarios such as Figure 9 As shown, the office scene includes various environments such as corridors, laboratories, and lobbies, with a RP point spacing of 0.6m; the classroom scene has a RP point spacing of 2m, both in NLOS environments. At each RP point, various human activities (such as standing, squatting, walking, and being alone) were recorded as different tasks.
[0216] The performance metrics are mainly the mean Euclidean distance (MED) and the cumulative distribution function (CDF) of the positioning error.
[0217] Experimental results (e.g.) Figures 10-20 As shown in the figure:
[0218] Preprocessing module (QC) module validity: such as Figure 16 and Figure 17 As shown, the HWF module significantly reduced the coefficient of variation of CSI amplitude features (CV value decreased from 0.3149 to 0.1739), improving feature stability and inter-location discrimination.
[0219] Attention mechanisms and the effectiveness of MUDA modules: such as Figure 13 As shown, the attention mechanism enables the model to focus on features with greater information content. For example... Figure 14 As shown, DF-Loc can effectively align the feature distributions of the source and target domains. For example... Figure 18As shown, the DF model, which includes complete QC, attention mechanism and MUDA, exhibits the smallest median, quartile and mean error in all test cases, especially in the "different" test cases (ODT, CDT), demonstrating the synergistic effect of each module.
[0220] Positioning accuracy: such as Figure 15 As shown, in the OST case, the 1-σ / 2-σ error of DF-Loc is 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, all of which are better than or significantly better than most of the comparison algorithms (KNN, RFR, SVR, CiFi, Hi-Loc, TCA, JDA).
[0221] Robustness and generalization: such as Figure 11 and Figure 12 As shown, the DF-Loc method in this embodiment maintains good localization performance under different sub-regions and different human poses; as Figure 19 As shown, DF-Loc is insensitive to changes in the ratio of test RPs and the number of training samples, demonstrating good generalization ability.
[0222] Challenges: such as Figure 20 As shown, when there are large differences between training 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 localization method of this invention first preprocesses the acquired Channel State Information (CSI) to construct a fingerprint image; then, it utilizes the Multi-Source Unsupervised Domain Adaptation (MUDA) framework to integrate historical data knowledge from multiple time scales through a two-stage alignment strategy (feature distribution alignment and regressor output alignment), learning domain-invariant features and reducing dependence on labeled data in the target domain; and employs a feature learning backbone network integrating multi-scale convolution, multi-scale channel attention mechanism (MS-CAM), and attention feature fusion (AFF) to extract features robust to environmental changes, enabling high-precision and robust localization in dynamic indoor environments, effectively overcoming the shortcomings of traditional methods that fail due to distribution drift.
[0224] Example 2:
[0225] This invention provides 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 described in the first aspect, comprising:
[0226] The preprocessing module is used to receive channel state information data obtained from the wireless access point and preprocess it. The preprocessing includes filtering based on Hampel identifier and 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] The building module is used to build and train a multi-source unsupervised domain adaptive localization model to obtain the trained multi-source unsupervised domain adaptive localization model, which includes a general feature extractor, N domain-specific feature extractors and N domain-specific regressors.
[0228] A two-stage alignment strategy is adopted, which uses N domain-specific feature extractors to align the marginal distributions and conditional distributions between the source and target domains, and uses N domain-specific regressors to align the regressor outputs for the target domain samples, thereby learning domain-invariant feature representations.
[0229] The general feature extractor is a feature learning backbone network that integrates multi-scale convolution, multi-scale channel attention mechanism and attention feature fusion, used to extract features from fingerprint images of multiple source domains and fingerprint images of the target domain.
[0230] The prediction output module is used to input the fingerprint image to be located, which is collected online and preprocessed, into the trained multi-source unsupervised domain adaptive localization model. The final location estimate is obtained by weighted averaging the outputs 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 the computer program capable of running on the processor. When the processor loads and executes the computer program, it employs the aforementioned dynamic environment robust indoor positioning method based on multi-source unsupervised domain adaptation.
[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 may also include input / output devices, network access devices, and buses.
[0234] Furthermore, the processor can be a central processing unit (CPU). Of course, depending on the actual use, other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), off-the-shelf programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. can also be used. The general-purpose processor can be a microprocessor or any conventional processor, etc., and this application does not limit it in this regard.
[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-described dynamic environment robust indoor positioning method based on multi-source unsupervised domain adaptation.
[0237] The computer program can be stored in a computer-readable medium. The computer program includes computer program code, which can be in the form of source code, object code, executable file, or certain middleware. The computer-readable medium includes any entity or device capable of carrying computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the 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" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.
[0239] For those skilled in the art, the specific meaning of the above terms in this invention can be understood according to the specific circumstances. When an element is referred to as being "assembled on," "mounted on," "fixed to," or "set on" another element, it may be directly on the other element or there may be an intermediate element present. When an element is considered to be "connected to" another element, it may be directly connected to the other element or there may be an intermediate element present. The terms "vertical," "horizontal," "upper," "lower," "left," "right," and similar expressions used herein are for illustrative purposes only and do not represent the only possible embodiments.
[0240] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
[0241] In the description of this specification, references to terms such as "an embodiment," "example," "specific example," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this disclosure. In this specification, the illustrative expressions of the above 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 one or more embodiments or examples.
Claims
1. A dynamic environment robust indoor positioning method based on multi-source unsupervised domain adaptation, characterized in that, Includes the following steps: S1. Receive channel state information data obtained from the wireless access point and preprocess it. The preprocessing includes filtering based on Hampel identifier and improved wavelet threshold and linear calibration for phase information. Construct a fingerprint image based on the amplitude and phase information of the preprocessed channel state information. S2. Construct and train a multi-source unsupervised domain adaptive localization model to obtain the trained multi-source unsupervised domain adaptive localization model, which includes a general feature extractor, N domain-specific feature extractors and N domain-specific regressors. A two-stage alignment strategy is adopted, which uses N domain-specific feature extractors to align the marginal and conditional distributions between the source and target domains, and uses N domain-specific regressors to align the regressor outputs for the target domain samples, thus learning domain-invariant feature representations, as detailed below: Align the edge distributions and conditional distributions between the source and target domains using N domain-specific feature extractors: In domain adaptation, the goal of distribution adaptation is to align the marginal distribution P and the conditional distribution Q. The distribution alignment term... Defined as: (6) in As a category indicator, This indicates the alignment of the marginal distributions between the source and target domains. This indicates the alignment of the conditional distribution for each category c; Based on formula (6), the learning objective of the multi-source unsupervised domain adaptive localization model is expressed as follows: (7) In the formula J (⋅,⋅) represents the mean squared error loss function, and Θ={w,b} represents the network parameter set, including weights and biases. N Let E represent the number of sources, E represent the expectation, and X represent the collected dataset. csi For fingerprint samples, L For the corresponding tags, To adapt to the distribution across quantization domains, It is a Laplace regularization term that promotes smoothness. and Used as a regularization coefficient, As a feature extractor, it maps each domain to a common feature space. For domain-specific feature extractors, Represents a regressor; Location prediction is formulated as a regression problem, approximating conditional distribution alignment by minimizing the maximum mean difference between the source and target domains in the regressor: The maximum mean difference unbiased linear time approximation method is used to reduce computational complexity: (11) In the formula , S and T The data distributions representing the source and target domains, respectively. n Represents the number of samples. It is defined in a quadruple The operator on is defined as follows: (12) Where k represents the feature kernel, therefore, the summation approximation of formulas (11) and (12) is applicable to gradient calculation using mini-batch processes; The gradient of the parameter is defined as follows: (13) in and Used as a regularization coefficient; According to formula (11), each domain-specific feature extractor aligns the edge distributions of each source-target domain pair by minimizing the following formula: (14) in An estimate representing the difference between two domains; Similarly, alignment of conditional distributions is achieved by minimizing the following maximum mean difference loss: (15); Align the regressor outputs for the target domain samples using N domain-specific regressors. The loss function is the Euclidean distance between the outputs of the regressor on the target domain data. (16) The output of the regression model is aligned by minimizing formula (16); Furthermore, for each regressor, the prediction loss is calculated using the mean squared error, which is defined by the following equation: (17) Where i represents the sample index; The general feature extractor is a feature learning backbone network that integrates multi-scale convolution, multi-scale channel attention mechanism and attention feature fusion, used to extract features from fingerprint images of multiple source domains and fingerprint images of the target domain. S3. Input the fingerprint image to be located, which is collected online and preprocessed, into the trained multi-source unsupervised domain adaptive localization model. The final location estimate is obtained by weighted averaging the outputs of N domain-specific regressors.
2. The dynamic environment robust indoor positioning method based on multi-source unsupervised domain adaptation according to claim 1, characterized in that: In step S1, channel state information data obtained from the wireless access point is received and preprocessed. The preprocessing includes filtering based on the Hampel identifier and improved wavelet threshold, as well as linear calibration for phase information, as detailed below: (21) Use the Hampel identifier to remove outliers from the channel state information data subcarrier time series; (22) The subcarrier sequences are smoothed using a wavelet filter based on an improved wavelet threshold function, 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 follows: (1) In the formula, X represents the original wavelet coefficients, and T represents the threshold. (23) Use Butterworth low-pass filters to attenuate high-frequency noise in the subcarrier channel state information data sequence, specifically by adjusting the cutoff frequency and the filter order; (24) Linear calibration for phase information is as follows: The phase response after untangling is processed using least squares optimization and linear regression, as shown in the following formula: (2) (3) (4) in Let m be the unwrapping phase of the i-th data packet, m be the antenna index, and n be the subcarrier index. For STO, The frequency spacing between adjacent subcarriers. and These are the least squares coefficients. The transformed phase, This indicates the phase after STO cleaning.
3. The dynamic environment robust indoor positioning method 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 preprocessed channel state information amplitude and phase information, as follows: (31) The OFDM receiver based on WiFi AP extracts channel state information data, including the amplitude and phase information of each subcarrier. ; (32) The amplitude and phase information of the multiple channel state information data packets collected are preprocessed to construct a two-dimensional fingerprint image.
4. The dynamic environment robust indoor positioning method based on multi-source unsupervised domain adaptation according to claim 3, characterized in that: The general feature extractor is a feature learning backbone network that integrates multi-scale convolution, multi-scale channel attention mechanisms, and attention feature fusion. It is used to extract features from fingerprint images of multiple source domains and fingerprint images of the target domain, as follows: (41) Multi-scale convolutional feature learning: The feature learning backbone network is constructed by combining parallel multi-scale feature extraction with MC-CAM design, which is used to focus on detailed features while capturing global contextual information; Therefore, the feature learning backbone network achieves a balance between network depth and width, which will have a dimension of The reconstructed amplitude and phase features are input into a parallel two-dimensional convolutional neural network for feature extraction; (42) Multiscale channel attention mechanism The multi-scale channel attention mechanism aggregates multi-scale contextual 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 The attention weights are calculated using the Sigmoid function. And generate optimized features according to the following formula. : (20) Where σ represents the sigmoid function. This represents element-wise multiplication, while Indicates broadcast addition; (43) Attention-based feature fusion Attention-based feature fusion allows the feature learning backbone network to incorporate contextual information beyond simple initial fusion while fusing amplitude and phase fingerprint information. The attention-based feature fusion formula is as follows: (21) Feature map ,and Indicates the characteristics after fusion. Indicates initial feature fusion; (44) Fully connected regression localization Regression-based localization is achieved by integrating the outputs of domain-specific feature extractors through a fully connected network. Specifically, the downsampled outputs... Flattened into a one-dimensional tensor And as input to the fully connected network, the final predicted coordinates are represented as follows: (22) The function f(⋅) constitutes the linear regression part of the fully connected neural network. and Let these represent the weights and biases, respectively. Furthermore, the mean squared error is used as the loss function, and its formula is as follows: (23) in Describes the Euclidean norm. Indicates the first The true coordinates of a reference point (RP).
5. The dynamic environment robust indoor positioning method based on multi-source unsupervised domain adaptation according to claim 4, characterized in that: The training method for the multi-source unsupervised domain adaptive localization model includes the following steps: (51) The stochastic gradient descent algorithm is adopted to improve the model performance by iteratively optimizing the feature extraction and domain adaptation steps, and the empirical risk and regularization term are balanced according to the principle of minimizing structural risk. (52) Configure model hyperparameters, including learning rate, kernel size, batch size, and number of filters, to adjust model complexity and generalization ability: (52.1) Use the Adam optimizer to optimize the model and set a learning rate decay strategy, that is, decay the learning rate by 0.1 times every 30 epochs; (52.2) Set training cycle and termination conditions: The maximum number of training rounds is 100 epochs, and the early stop strategy is enabled. Training is stopped when the verification loss has not improved for 10 consecutive epochs. (52.3) A batch processing method is adopted, and each training batch contains samples from multiple source and target domains; (52.4) Establish a validation strategy: Divide the validation set from the source domain data to evaluate the source domain performance and domain adaptation loss, so as to indirectly verify the model's ability to generalize to the target domain; (53) Sample balance: Ensure sample balance in each domain through uniform sampling to avoid bias towards a specific source domain; (54) The overall loss function of the multi-source unsupervised adaptive localization model is the sum of the prediction loss, marginal distribution difference loss, conditional distribution difference loss, and regressor alignment loss, as specifically expressed below: (18) In the formula This represents the prediction loss calculated using the mean squared error (MSE). Marginal distribution alignment loss for each source-target domain pair in the feature extractor for each specific domain; To achieve maximum mean difference loss for conditional distribution alignment. The Euclidean distance between all regressor outputs on the target domain data.
6. The dynamic environment robust indoor positioning method based on multi-source unsupervised domain adaptation according to claim 1, characterized in that: The final location estimate is obtained by weighted averaging the outputs of N domain-specific regressors, as follows: (19) in j Indicates the index of the regression model. N This represents the number of regression models.
7. 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 as described in any one of claims 1 to 6, characterized in that, include: The preprocessing module is used to receive channel state information data obtained from the wireless access point and preprocess it. The preprocessing includes filtering based on Hampel identifier and 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. The building module is used to build and train a multi-source unsupervised domain adaptive localization model to obtain the trained multi-source unsupervised domain adaptive localization model, which includes a general feature extractor, N domain-specific feature extractors and N domain-specific regressors. A two-stage alignment strategy is adopted, which uses N domain-specific feature extractors to align the marginal distributions and conditional distributions between the source and target domains, and uses N domain-specific regressors to align the regressor outputs for the target domain samples, thereby learning domain-invariant feature representations. The general feature extractor is a feature learning backbone network that integrates multi-scale convolution, multi-scale channel attention mechanism and attention feature fusion, used to extract features from fingerprint images of multiple source domains and fingerprint images of the target domain. The prediction output module is used to input the fingerprint image to be located, which is collected online and preprocessed, into the trained multi-source unsupervised domain adaptive localization model. The final location estimate is obtained by weighted averaging the outputs of N domain-specific regressors.
8. 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 run on a processor. When the processor loads and executes the computer program, it employs the dynamic environment robust indoor positioning method based on multi-source unsupervised domain adaptation as described in any one of claims 1 to 6.
9. A storage medium containing computer-executable instructions, characterized in that, The computer-executable instructions, when executed by a computer processor, are used to perform the dynamic environment robust indoor positioning method based on multi-source unsupervised domain adaptation as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Metaadapter-based small sample indoor positioning method
CN120075732A
Indoor positioning method and system based on channel state information and depth feature fusion
CN120075998A