Cross-domain adaptive ultra-wideband nlos identification method and system based on metric meta-learning

CN123021089APending Publication Date: 2026-10-30XIAMEN UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611197457.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-07
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

[0005]针对现有NLOS识别模型存在的参数量庞大、难以在算力资源受限的边缘设备上部署运行,且高度依赖特定训练环境的问题,本发明提出一种基于度量元学习的跨域自适应超宽带NLOS识别方法及系统,能够在保障高识别精度的前提下,大幅压缩模型的参数量与计算开销,满足边缘设备的部署要求

Benefits of technology

[0041](1)本发明设计了全新的轻量化特征提取器和使用不包含可学习参数的基于度量的元学习分类器,在保障识别精度的前提下,大幅减少了模型的参数量和计算量,同时提高了模型在CPU和GPU环境下的推理速度。使其能够在资源受限的边缘设备上进行有效部署;

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123021089A_ABST
    Figure CN123021089A_ABST
Patent Text Reader

Abstract

The application discloses a cross-domain adaptive ultra-wideband NLOS identification method and system based on metric meta-learning, which comprises the following steps: collecting channel impulse response (CIR) data in multiple environments and performing normalization processing, and constructing a training data set based on the normalized CIR data; constructing an identification model comprising a lightweight feature extractor, a domain adversarial discriminator and a metric-based meta-learning classifier; training the constructed identification model, calculating the adversarial discrimination loss and the classification loss, updating the parameters of the lightweight feature extractor and the domain adversarial discriminator, and obtaining a trained model; and deploying the trained identification model on an edge device to identify and classify NLOS in an actual scene. The application greatly reduces the parameter quantity and calculation cost of the model under the premise of ensuring high identification accuracy, meets the deployment requirements of the edge device, and still has excellent cross-domain generalization performance in complex application scenarios across environments and devices.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of ultra-wideband indoor positioning, and in particular to a cross-domain adaptive ultra-wideband NLOS recognition method and system based on metric learning. Background Technology

[0002] In recent years, with the rapid development of the Internet of Things (IoT) and Location-Based Services (LBS), high-precision indoor positioning technology has shown enormous application potential in fields such as industrial manufacturing, smart warehousing, medical care, and autonomous driving. Among numerous indoor positioning technologies, Ultra-Wideband (UWB) technology, with its nanosecond-level extremely high time resolution, strong anti-multipath interference capability, and low power consumption, has become the mainstream solution for achieving centimeter-level high-precision indoor positioning. Especially in positioning systems based on Time of Arrival (TOA) and Time Difference of Arrival (TDOA), UWB technology can provide extremely accurate ranging information, and combined with positioning algorithms, it can achieve centimeter-level positioning accuracy. However, in complex indoor environments, such as those with walls, foot traffic, or metal equipment, the line-of-sight (LOS) propagation path of UWB signals is easily blocked, causing the receiver to receive only non-line-of-sight (NLOS) signals that have been reflected, refracted, or diffracted. Since the propagation path of NLOS signals is longer than the actual straight-line distance and experiences significant energy attenuation when penetrating obstacles, this not only alters the waveform of the channel impulse response (CIR) but also introduces significant positive ranging errors. If these errors are not identified and addressed, they will be directly incorporated into the positioning algorithm, leading to a sharp decline in system positioning accuracy. Therefore, quickly and accurately identifying the NLOS state of UWB signals is a primary prerequisite for improving the robustness of UWB positioning systems in complex environments.

[0003] Currently, deep learning models such as CNN and Transformer are widely used to solve this recognition challenge. These models can extract deep and robust decision features from raw CIR data, thereby achieving high NLOS recognition accuracy in various indoor scenarios.

[0004] While existing deep learning recognition models have demonstrated significant advantages, they often lack cross-domain generalization ability, and their excellent recognition performance is frequently limited to the specific scenarios in which the training data was collected. This is because different environments or acquisition devices can cause significant differences in CIR waveforms, leading to severe domain shift (DS) problems, which cause a sharp drop in the model's recognition performance in new scenarios. Figure 1 The figure shows the two-dimensional data distribution of CIR data under different environments after dimensionality reduction by Principal Component Analysis (PCA). The horizontal and vertical axes represent the first principal component (PC1) and the second principal component (PC2), respectively, which represent the two directions with the most dramatic changes in data distribution. Comparing the two subfigures, it can be seen that the data distribution in environment one is relatively continuous, while the data in environment two exhibits obvious fragmentation and multi-cluster clustering. In addition, the absolute position, topological structure, and distribution range of the same labeled data in the feature space are significantly different. This clearly visible distribution difference is the reason for the decline in model recognition performance. Furthermore, current mainstream deep learning recognition models usually have a huge number of parameters, making them difficult to deploy and run on edge devices with limited computing power. Summary of the Invention

[0005] To address the problems of existing NLOS recognition models, such as large parameter counts, difficulty in deployment on edge devices with limited computing resources, and high dependence on specific training environments, this invention proposes a cross-domain adaptive ultrawideband NLOS recognition method and system based on metric learning. This method significantly reduces the number of model parameters and computational overhead while maintaining high recognition accuracy, meeting the deployment requirements of edge devices. Furthermore, it maintains excellent cross-domain generalization performance in complex application scenarios involving multiple environments and devices. In addition, by optimizing the acquisition process, this invention decouples data acquisition from the recognition task, effectively improving the system's practicality and stability.

[0006] The technical solution adopted by this invention to solve its technical problem is:

[0007] On the one hand, a cross-domain adaptive ultrawideband NLOS recognition method based on metric learning includes:

[0008] The steps for constructing the CIR training dataset are as follows: collect Channel Impulse Response (CIR) data under multiple environments and normalize them; construct the training dataset based on the normalized CIR data; divide the training dataset into source domain training set and target domain training set according to environment type; both the source domain training set and the target domain training set contain two types of samples: line-of-sight (LOS) and non-line-of-sight (NLOS).

[0009] The steps for building the NLOS recognition model include constructing a recognition model that includes a lightweight feature extractor, a domain adversarial discriminator, and a metric-based meta-learning classifier.

[0010] The NLOS recognition model training steps are as follows: In each iteration, several samples are randomly selected from the source and target domain training sets to generate a support set and a query set; the support set and query set are respectively processed by a lightweight feature extractor to obtain corresponding feature vectors; the feature vectors are input into a domain adversarial discriminator to calculate the probability that a sample belongs to the target domain, and the domain adversarial discriminant loss is obtained based on this probability; the meta-learning classifier calculates the category prototype based on the support set feature vectors, and uses the Euclidean distance between the query set feature vectors and the category prototypes to obtain the probability distribution of category assignment and calculate the classification loss; based on the weighted sum of the adversarial loss and the classification loss, the network parameters of the lightweight feature extractor and the domain adversarial discriminator are updated by backpropagation; the above training process is repeated until the preset number of training iterations is reached to obtain a trained recognition model;

[0011] The category recognition step involves inputting real-time collected and normalized CIR data into the trained recognition model, extracting feature vectors through a lightweight feature extractor, classifying the feature vectors using a meta-learning classifier, and outputting the corresponding LOS / NLOS labels.

[0012] Preferably, the lightweight feature extractor consists of three cascaded LK_RepConv modules, an ECA channel attention module, a feature flattening layer, and a random deactivation Dropout regularization layer. The LK_RepConv module introduces a structure reparameterization mechanism. During the training phase, the LK_RepConv module uses a three-branch parallel topology architecture of different sizes to extract multi-scale spatial features. The feature responses of each branch are superimposed and output by the GELU activation function. During the test and inference phase, the LK_RepConv module merges the multi-branch structure into a single convolutional layer, which is then output as a feature sequence by the GELU activation function.

[0013] Preferably, the ECA channel attention module includes a global average pooling layer, a dimension permutation operation Transpose, a one-dimensional convolutional layer Conv, and a Sigmoid activation function connected in sequence. The feature sequence extracted by the LK_RepConv module is optimized by feature weighting to obtain a weighted feature sequence.

[0014] Preferably, the domain adversarial discriminator consists of a three-layer fully connected network, wherein the first and second fully connected layers are configured with ReLU activation function and Dropout strategy; the third fully connected layer serves as the output layer, mapping features to domain prediction probabilities and outputting the discriminant probability that the feature belongs to the target domain.

[0015] Preferably, the metric-based meta-learning classifier uses a prototype network and does not contain a number of learnable parameters.

[0016] Preferably, the probability that a sample belongs to the target domain is calculated, and the domain adversarial discrimination loss is obtained based on this probability, specifically including:

[0017] The domain adversarial discriminator predicts the probability that a sample belongs to the target domain, as shown below:

[0018] ;

[0019] in, This represents the first input to the domain adversarial discriminant. The feature vector of each sample For domain adversarial discriminators, Indicate the parameters of the adversarial discriminant in the domain; Indicates the first The probability that the feature vector of a sample is predicted to be the target domain takes a value between (0,1);

[0020] Based on the probability that a sample belongs to the target domain, the domain adversarial discriminant loss is obtained. , means as follows:

[0021] ;

[0022] in, This indicates the total number of samples contained in the support set and query set in each contextual training session; Indicates the first The true domain label of the feature vector of each sample.

[0023] Preferably, the meta-learning classifier calculates the category prototype based on the support set feature vectors, uses the Euclidean distance between the query set feature vectors and the category prototypes to obtain the probability distribution of category assignment and calculates the classification loss, specifically including:

[0024] The meta-learning classifier calculates the prototype of each class based on the feature vectors of the support set, as shown below:

[0025] ;

[0026] in, It supports centralized categories The prototype, , representing LOS and NLOS respectively; For lightweight feature extractors, These represent the parameters of the lightweight feature extractor; Indicates category The first support set One sample, Indicates the total number of samples in the support set;

[0027] Calculate the Euclidean distance between the feature vectors of each sample in the query set and the prototypes of each class to predict its class. The probability of is expressed as follows:

[0028] ;

[0029] in, Indicates that in the given first A sample query set Given the given conditions, predict the true class label of the sample. Category The probability of; Represents the Euclidean distance metric function; =1, Indicates the corresponding category Support for prototype sets;

[0030] Finally, the loss function for the entire query set is obtained. , means as follows:

[0031] ;

[0032] in, Indicates the total number of samples in the query set; Indicates the first A sample query set; Indicates the first The true category labels of each query set sample .

[0033] Preferably, the step of collecting channel impulse response (CIR) data under multiple environments and performing normalization processing specifically includes:

[0034] During the data acquisition process, after the device completes the ranging, it only reads the channel impulse response (CIR) data of the preset sampling points before and after the first path FP, and performs maximum value normalization on the acquired CIR data to scale the data to the range (0, 1).

[0035] On the other hand, a cross-domain adaptive ultrawideband NLOS recognition system based on metric learning includes:

[0036] The CIR training dataset construction module is used to collect channel impulse response (CIR) data under multiple environments and perform normalization processing. Based on the normalized CIR data, a training dataset is constructed. The training dataset is divided into a source domain training set and a target domain training set according to the environment type. Both the source domain training set and the target domain training set contain two types of samples: line-of-sight (LOS) and non-line-of-sight (NLOS).

[0037] The NLOS recognition model building module is used to build recognition models that include a lightweight feature extractor, a domain adversarial discriminator, and a metric-based meta-learning classifier.

[0038] The NLOS recognition model training module is used to randomly sample several samples from the source and target domain training sets in each iteration to generate a support set and a query set. The support set and query set are then processed by a lightweight feature extractor to obtain corresponding feature vectors. These feature vectors are input into a domain adversarial discriminator to calculate the probability that a sample belongs to the target domain, and the domain adversarial discriminant loss is obtained based on this probability. A meta-learning classifier calculates the category prototype based on the support set feature vectors, and uses the Euclidean distance between the query set feature vectors and the category prototypes to obtain the probability distribution of category assignment and calculate the classification loss. The network parameters of the lightweight feature extractor and the domain adversarial discriminator are updated via backpropagation based on the weighted sum of the adversarial loss and the classification loss. This training process is repeated until a preset number of training iterations is reached to obtain a trained recognition model.

[0039] The model deployment module is used to deploy the trained recognition model to edge devices. It collects CIR data in real-time from the actual scene, normalizes it, and inputs it into the trained recognition model. It extracts feature vectors through a lightweight feature extractor, classifies the feature vectors using a meta-learning classifier, and outputs the corresponding LOS / NLOS labels.

[0040] Compared with the prior art, the present invention has the following beneficial effects:

[0041] (1) This invention designs a novel lightweight feature extractor and uses a metric-based meta-learning classifier that does not contain learnable parameters. While ensuring recognition accuracy, it significantly reduces the number of model parameters and computational cost, and improves the inference speed of the model in CPU and GPU environments. This enables it to be effectively deployed on resource-constrained edge devices;

[0042] (2) In the training process, the present invention uses channel impulse response (CIR) data in multiple environments and constructs adversarial discrimination loss and classification loss based on the source domain training set and the target domain training set. The network parameters of the lightweight feature extractor and the domain adversarial discriminator are updated by backpropagation. The trained model can balance the NLOS recognition accuracy in different environments and maintain stable and excellent recognition performance in complex applications across environments and devices.

[0043] (3) The present invention optimizes and decouples the acquisition and identification of UWB CIR data. During the acquisition process, the data acquisition process is optimized and CIR data is selectively acquired to reduce the extra expenses caused by redundant data.

[0044] (4) The present invention uses edge devices for model deployment, realizes the separation of acquisition and recognition, and improves the practicality and stability of the system. Attached Figure Description

[0045] Figure 1 The two-dimensional data distribution of CIR data under different environments after dimensionality reduction by principal component analysis (PCA);

[0046] Figure 2 This is a flowchart illustrating the cross-domain adaptive ultrawideband NLOS recognition method based on metric learning, according to an embodiment of the present invention.

[0047] Figure 3 This is an overall framework diagram of the cross-domain adaptive ultrawideband NLOS recognition process based on metric learning according to an embodiment of the present invention;

[0048] Figure 4 This is a schematic diagram of the lightweight feature extractor according to an embodiment of the present invention;

[0049] Figure 5 This is a flowchart illustrating the training and recognition phases of an embodiment of the present invention.

[0050] Figure 6 This is a schematic diagram comparing the recognition performance of different recognition methods in different environments according to embodiments of the present invention;

[0051] Figure 7 This is a schematic diagram comparing the recognition performance of different recognition methods in different environments and devices according to embodiments of the present invention;

[0052] Figure 8 This is a block diagram of the cross-domain adaptive ultrawideband NLOS recognition system based on metric learning, according to an embodiment of the present invention. Detailed Implementation

[0053] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.

[0054] In the description of this invention, it should be noted that the terms "comprising," "including," or any other variations thereof are intended to cover a 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 a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0055] like Figure 2 As shown in the figure, this embodiment presents a cross-domain adaptive ultrawideband NLOS recognition method based on metric learning, which includes the following steps.

[0056] Step 201 of constructing the CIR training dataset: Collect channel impulse response (CIR) data under multiple environments and normalize them. Construct a training dataset based on the normalized CIR data. Divide the training dataset into a source domain training set and a target domain training set according to the environment type. Both the source domain training set and the target domain training set contain two types of samples: line-of-sight (LOS) and non-line-of-sight (NLOS).

[0057] In this embodiment, to reduce transmission bottlenecks during the acquisition process, the data collected by the acquisition device is selectively read to obtain core and valid information, and the read data is subjected to maximum normalization processing, as follows:

[0058] During the data acquisition process, after the device completes the ranging, it only reads the channel impulse response (CIR) data of the preset sampling points before and after the first path FP, and performs maximum value normalization on the acquired CIR data to scale the data to the range (0, 1).

[0059] Step 202 of the NLOS recognition model construction involves constructing a recognition model that includes a lightweight feature extractor, a domain adversarial discriminator, and a metric-based meta-learning classifier.

[0060] Specifically, such as Figure 3 As shown, the recognition model consists of a lightweight feature extractor, a domain adversarial discriminator, and a metric-based meta-learning classifier. The lightweight feature extractor extracts features from the input UWB CIR data in both the source and target domains, significantly reducing the number of network parameters and computational complexity while maintaining feature representation capabilities, enabling smooth deployment on resource-constrained edge devices. The domain adversarial discriminator and the lightweight feature extractor form a domain adversarial network. The metric-based meta-learning classifier uses prototypical networks, which do not contain a large number of learnable parameters, and uses Euclidean distance to classify the CIR data using a metric.

[0061] In practice, the system first employs an adversarial process between a lightweight feature extractor and a domain adversarial discriminator to extract domain-invariant and class-discriminative features from the CIR data of both the source and target domains, effectively overcoming distributional differences caused by the environment. Subsequently, a parameter-free metric-learning classifier is introduced to further reduce the model's computational cost, and Euclidean distance is used to optimize the topological relationships of the feature space, achieving efficient aggregation of similar signal features and significant separation of dissimilar features, thus enabling accurate NLOS identification. Finally, a scenario-based training strategy is employed to give the model rapid adaptive capabilities, ensuring the stability of its cluster structure even under extremely limited sample conditions.

[0062] In this embodiment, the lightweight feature extractor consists of three cascaded LK_RepConv modules, an ECA channel attention module, and a Flatten & Dropout module, as follows: Figure 4 As shown.

[0063] The LK_RepConv module introduces a structural reparameterization mechanism. During training, this module employs a three-branch parallel topology to extract multi-scale spatial features, specifically including large, medium, and small convolutional branches with sizes k=31, k=5, and k=3. The feature responses from each branch are superimposed and output by the GELU activation function. During testing and inference, the linear additivity of the convolution operator is used for mathematical equivalence transformation: specifically, the weight matrices of the medium kernel (k=5) and the small kernel (k=3) are zero-padding around their spatial dimensions to ensure strict alignment with the large kernel (k=31). Then, the weight matrices and bias vectors of the three branches are element-wise added. In this way, the multi-branch structure is losslessly fused into a single convolutional layer, Fused Conv, which is then output by the GELU activation function. This achieves zero additional latency during the inference and deployment phases while preserving the multi-scale feature representation capability.

[0064] The ECA channel attention module mainly consists of a global average pooling layer, a dimension permutation operation (Transpose), a one-dimensional convolutional layer (Conv), and a sigmoid activation function. For the feature sequence extracted by LK_RepConv, feature weighting optimization is performed by the ECA channel attention module before entering the downstream modules. The specific calculation process is as follows: First, the global average pooling layer aggregates the global context information of each channel; then, the channel dimension is converted to the sequence dimension through a dimension permutation operation, and a one-dimensional convolution with a receptive field of k=3 directly performs local information interaction between adjacent channels without dimension reduction; next, the output is mapped to the attention weights of each channel by the sigmoid activation function; finally, these weights are multiplied element-wise with the original input feature sequence. This mechanism completes cross-dimensional information interaction between 64 feature channels with minimal parameter cost, effectively suppressing redundant noisy channels and adaptively amplifying the responses of key feature channels sensitive to NLOS states.

[0065] The Flatten & Dropout module mainly consists of a feature flattening layer and a dropout regularization layer. The feature sequence, weighted by the pre-processed ECA attention mechanism, is first reconstructed into a one-dimensional global feature vector through feature flattening to bridge the dimensionality difference between convolutional and fully connected layers. This one-dimensional vector then enters the dropout regularization layer. During domain adversarial training, this layer randomly blocks the activation states of some neurons with a preset probability, forcing the network to learn more robust and distributed nonlinear representations, thus effectively mitigating overfitting when facing complex multipath environments. During the online inference phase at edge computing nodes, this dropout mechanism is automatically bypassed to ensure the absolute integrity of UWB signal feature transmission and forward inference efficiency.

[0066] The domain adversarial discriminator consists of three fully connected layers. The first and second fully connected layers are configured with ReLU activation function and Dropout strategy to alleviate overfitting. The third fully connected layer serves as the output layer, mapping features to domain prediction probabilities, thereby outputting the discriminant probability that the feature belongs to the target domain.

[0067] The metric-based meta-learning classifier uses a prototype network that does not contain a number of learnable parameters and uses Euclidean distance to classify CIR data by metric.

[0068] In step 203 of the NLOS recognition model training, in each iteration, several samples are randomly selected from the source and target domain training sets to generate a support set and a query set; the support set and query set are respectively processed by a lightweight feature extractor to obtain corresponding feature vectors; the feature vectors are input into the domain adversarial discriminator to calculate the probability that a sample belongs to the target domain, and the domain adversarial discriminant loss is obtained based on this probability; the meta-learning classifier calculates the category prototype based on the support set feature vectors, and uses the Euclidean distance between the query set feature vectors and the category prototypes to obtain the probability distribution of category assignment and calculate the classification loss; based on the weighted sum of the adversarial discriminant loss and the classification loss, the network parameters of the lightweight feature extractor and the domain adversarial discriminator are updated by backpropagation; the above training process is repeated until the preset number of training iterations is reached to obtain the trained recognition model.

[0069] like Figure 5 As shown, the training phase includes the following steps.

[0070] Task scenario sampling, setting the number of scenario training sessions to [number]. During each training session, each category of the source and target domain training sets is randomly sampled. Using samples as the support set, randomly select... samples are used as the query set. This embodiment has two categories, LOS and NLOS, therefore a total of samples are used in each training iteration. A support set, A query set, and , .

[0071] Feature extraction involves extracting features from the sampled support set and query set using a lightweight feature extractor to obtain feature vectors.

[0072] The domain adversarial discriminator splits and reassembles the extracted feature vectors from the support set and query set into feature vectors from the source domain and the target domain, which are then fed into the domain adversarial discriminator to distinguish between the source and target domains. The domain adversarial discriminator predicts the probability that a sample belongs to the target domain as follows:

[0073] ;

[0074] in, This represents the first input to the domain adversarial discriminant. The feature vector of each sample For domain adversarial discriminators, Indicate the parameters of the adversarial discriminant in the domain; Indicates the first The probability that the feature vector of a sample is predicted to be the target domain takes a value between (0,1).

[0075] Obtain domain adversarial discriminant loss for:

[0076] ;

[0077] in, This indicates the total number of samples contained in the support set and query set in each contextual training session; Indicates the first In this embodiment, the true domain label of the feature vector of a sample is 0 for the source domain and 1 for the target domain.

[0078] Metric-based meta-learning classification, while performing domain adversarial discrimination, calculates various prototypes from the feature vectors of the support set using a metric-based method. The calculation formula is as follows:

[0079] ;

[0080] in, It supports centralized categories The prototype, , representing LOS and NLOS respectively; For lightweight feature extractors, These represent the parameters of the lightweight feature extractor; Indicates category The first support set One sample, This indicates the total number of samples in the entire support set.

[0081] Then, the Euclidean distance between the feature vector of each sample in the query set and the prototypes of each class is calculated to predict the class. The probability distribution is given by the formula:

[0082] ;

[0083] in, Indicates that in the given first A sample query set Given the given conditions, predict the true class label of the sample. Category The probability of; Represents the Euclidean distance metric function; =1, Indicates the corresponding category Support set prototype, through This variable iterates through all category prototypes calculated from the superimposed support set.

[0084] Finally, the classification loss is calculated by comparing it with the true class label, and is expressed as:

[0085] ;

[0086] in, Indicates the total number of samples in the query set; Indicates the first A sample query set; Indicates the first The true category labels of each query set sample .

[0087] Joint optimization and updating are performed by backpropagating the domain adversarial discriminative loss and the classification loss to obtain the total loss function, which is expressed as:

[0088] .

[0089] The Adam optimizer updates the network parameters of the lightweight feature extractor and the domain adversarial discriminator. This process is repeated until the set parameters are complete. This training session.

[0090] In category identification step 204, the real-time collected and normalized CIR data is input into the trained identification model, feature vectors are extracted through a lightweight feature extractor, and the feature vectors are classified using a meta-learning classifier to output the corresponding LOS / NLOS labels.

[0091] like Figure 5 As shown, the identification phase specifically includes:

[0092] The system receives CIR data collected in the source and target domains and normalized to the maximum value so that the model can perform identification.

[0093] Feature extraction: Use a lightweight feature extractor with updated parameters to extract feature vectors from the received CIR data.

[0094] The predicted labels are obtained by using a metric-based meta-learning classifier, which calculates the Euclidean distance with each class prototype to obtain the predicted labels for the received CIR data.

[0095] In summary, the method of this invention first constructs a domain adversarial network consisting of a lightweight feature extractor and a domain adversarial discriminator. This forces the network to extract domain-invariant feature vectors with class discrimination shared by the source and target domains from the CIR data, effectively overcoming the distribution differences in CIR data caused by the environment. Building upon this, a metric-based meta-learning classifier is combined. This classifier does not contain learnable parameters, further reducing the model's parameter count and computational cost. Euclidean distance is used to optimize the topological relationships in the feature space, achieving high aggregation of similar signal features and significant separation of dissimilar features. Simultaneously, a scenario-based training strategy is employed to endow the model with rapid adaptive capabilities, ensuring the stability of its cluster structure even under extremely limited sample conditions.

[0096] Furthermore, to demonstrate the effectiveness of the proposed method, this invention conducted a lightweight evaluation and a cross-environment and cross-device recognition performance evaluation.

[0097] In the lightweight evaluation, two commonly used high-accuracy recognition methods, CNN_LSTM and CNN_Transformer, were selected for comparison. The comparison metrics were: number of parameters, computational cost, and inference speed. Table 1 shows the number of parameters, computational cost, and inference speed on CPU and GPU for each method. The results in the table show that, in the deployment and testing phase, the proposed method, through a lightweight feature extractor with large kernels and heavy parameterization and a classifier without learnable parameters, can significantly reduce the number of model parameters and computational cost. Compared to the training phase, the number of parameters is reduced by 32.50%, and the computational cost is reduced by 32.00%. Compared to CNN_LSTM, the number of parameters and computational cost decreased by 80.95% and 26.31%, respectively. Compared to CNN_Transformer, the number of parameters and computational cost decreased by 94.96% and 73.72%, respectively. Furthermore, the CPU and GPU inference speeds decreased to 1.603ms and 0.548ms, respectively.

[0098] Table 1. Comparison of indicators for each method:

[0099]

[0100] In the cross-environment recognition performance evaluation, the UWBCIR dataset, collected in both large industrial and office environments using the same equipment, was used. Commonly used methods in UWB NLOS recognition were selected for comparative experiments, including Support Vector Machine (SVM), CNN-LSTM (a combination of Convolutional Neural Networks and Long Short-Term Memory Networks), CNN-Transformer (a combination of Convolutional Neural Networks and Transformers), and Transfer Learning (TL) as benchmark comparison methods. The large industrial environment was used as the source domain, and the office environment as the target domain. The comparison results are as follows: Figure 6 As shown, while current deep learning methods like CNN_LSTM and CNN_Transformer perform well in the source domain, their recognition performance drops significantly in the target domain, confirming the generalization problem of current UWB NLOS recognition models. Transfer learning (TL), although it can improve recognition performance in the target domain, also reduces recognition performance in the source domain.

[0101] The domain adversarial network based on metric learning in this invention achieved accuracies of 95.72% and 95.73% in the source and target domains, respectively. Although the accuracy in the source domain lagged behind CNN_Transformer by 1.01%, the accuracy in the target domain was 16.57% higher than CNN_Transformer, achieving the best recognition performance. This demonstrates that the proposed method can improve the recognition accuracy in the target domain while maintaining the same recognition accuracy in the source domain in cross-environment applications, thus balancing the recognition performance in both the source and target domains.

[0102] In the cross-environment and cross-device recognition performance evaluation, the UWB CIR dataset, collected in large industrial and corridor environments using different devices, was used. Commonly used methods in the UWB NLOS recognition field were selected for comparative experiments, including Support Vector Machine (SVM), CNN-LSTM (a combination of Convolutional Neural Network and Long Short-Term Memory Network), CNN-Transformer (a combination of Convolutional Neural Network and Transformer), and Transfer Learning (TL) as benchmark comparison methods. The large industrial environment was used as the source domain, and the corridor environment as the target domain. The comparison results are as follows: Figure 7 As shown, deep learning methods CNN_LSTM and CNN_Transformer perform well in the source domain, but their recognition performance drops significantly in the target domain, and the magnitude of the drop is much greater than that of other methods. Figure 6 As shown, the generalization problem of deep learning NLOS recognition methods is further exacerbated when faced with data collected from different devices and environments. Transfer learning (TL) performs worse in recognizing both source and target domains compared to... Figure 6 The further decline indicates that transfer learning TL amplifies the problem of not being able to handle multiple environments simultaneously when facing different devices and environments.

[0103] The method of this invention maintains good recognition performance across environments and devices, achieving high accuracy rates of 95.61% and 95.40% in the source and target domains, respectively. This demonstrates that the model can exhibit stable and excellent performance when faced with data collected from different devices and environments.

[0104] like Figure 8 As shown in the figure, this embodiment also discloses a cross-domain adaptive ultrawideband NLOS recognition system based on metric learning, which includes the following modules.

[0105] The CIR training dataset construction module 801 is used to collect channel impulse response (CIR) data under multiple environments and perform normalization processing. Based on the normalized CIR data, a training dataset is constructed. The training dataset is divided into a source domain training set and a target domain training set according to the environment type. Both the source domain training set and the target domain training set contain two types of samples: line-of-sight (LOS) and non-line-of-sight (NLOS).

[0106] Specifically, an STM32F103C8T6 main control chip and a DWM1000 / DWM3000 RF chip were used to acquire data from multiple environments and construct a training dataset. During data acquisition, after the device completes ranging, only the CIR data of 150 sampling points before and after the first path (FP) is read to reduce redundant data and alleviate transmission bottlenecks. Furthermore, the acquired data is normalized to its maximum value, scaling it to the range (0,1) for easier computation.

[0107] NLOS recognition model building module 802 is used to build a recognition model that includes a lightweight feature extractor, a domain adversarial discriminator, and a metric-based meta-learning classifier.

[0108] Specifically, a lightweight feature extractor, a domain adversarial discriminator, and a metric-based meta-learning classifier are built using Python 3.10 and PyTorch 2.6.0.

[0109] The NLOS recognition model training module 803 is used to randomly sample several samples from the source and target domain training sets in each iteration to generate a support set and a query set; the support set and query set are respectively processed by a lightweight feature extractor to obtain corresponding feature vectors; the feature vectors are input into the domain adversarial discriminator to calculate the probability that a sample belongs to the target domain, and the domain adversarial discriminant loss is obtained based on this probability; the meta-learning classifier calculates the category prototype based on the support set feature vectors, and uses the Euclidean distance between the query set feature vectors and the category prototypes to obtain the probability distribution of category assignment and calculate the classification loss; the network parameters of the lightweight feature extractor and the domain adversarial discriminator are updated by backpropagation based on the weighted sum of the adversarial loss and the classification loss; the above training process is repeated until the preset number of training iterations is reached to obtain the trained recognition model.

[0110] The model deployment module 804 is used to deploy the trained recognition model to edge devices, collect CIR data in real-time from the actual scene, normalize it and input it into the trained recognition model, extract feature vectors through a lightweight feature extractor, classify the feature vectors using a meta-learning classifier, and output the corresponding LOS / NLOS labels.

[0111] Specifically, a model conversion tool is used to export the trained model to the ONNX standard format and burn it into the Raspberry Pi. During actual operation, the Raspberry Pi receives real-time CIR data acquired and preprocessed by the STM32F103C8T6 via a serial interface, triggers the model to perform inference, and outputs NLOS recognition results.

[0112] The specific implementation process of a cross-domain adaptive ultrawideband NLOS recognition system based on metric learning is basically the same as the above-described method embodiments, and will not be repeated here. It should be noted that each functional module in the system corresponds to a specific step in the method embodiments, and those skilled in the art can understand the specific implementation of the system based on the method flow.

[0113] The above embodiments illustrate the basic principles and implementation methods of the present invention, aiming to help understand the core concept and key steps of the invention. It should be understood that these embodiments are merely examples and do not limit the scope of application of the present invention. Those skilled in the art, based on their understanding of the concept of the present invention, can make various equivalent improvements to specific steps, parameter configurations, or system structures. These improvements also fall within the protection scope of the present invention, as defined in the appended claims.

Claims

1. A cross-domain adaptive ultrawideband NLOS recognition method based on metric learning, characterized in that, Includes the following steps: The steps for constructing the CIR training dataset are as follows: collect Channel Impulse Response (CIR) data under multiple environments and normalize them; construct the training dataset based on the normalized CIR data; divide the training dataset into source domain training set and target domain training set according to environment type; both the source domain training set and the target domain training set contain two types of samples: line-of-sight (LOS) and non-line-of-sight (NLOS). The steps for building the NLOS recognition model include constructing a recognition model that includes a lightweight feature extractor, a domain adversarial discriminator, and a metric-based meta-learning classifier. The NLOS recognition model training steps are as follows: In each iteration, a number of samples are randomly selected from the source domain and target domain training sets to generate a support set and a query set; the support set and query set are then processed by a lightweight feature extractor to obtain the corresponding feature vectors. Will The feature vector is input into the domain adversarial discriminator, the probability that a sample belongs to the target domain is calculated, and the domain adversarial discriminant loss is obtained based on this probability; The meta-learning classifier calculates the category prototype based on the support set feature vectors, and uses the Euclidean distance between the query set feature vectors and the category prototypes to obtain the probability distribution of category assignment and calculate the classification loss. Based on the weighted sum of the adversarial discriminant loss and the classification loss, the network parameters of the lightweight feature extractor and the domain adversarial discriminator are updated by backpropagation. The above training process is repeated until the preset number of training times is reached to obtain a well-trained recognition model. The category recognition step involves inputting real-time collected and normalized CIR data into the trained recognition model, extracting feature vectors through a lightweight feature extractor, classifying the feature vectors using a meta-learning classifier, and outputting the corresponding LOS / NLOS labels.

2. The cross-domain adaptive ultrawideband NLOS recognition method based on metric learning according to claim 1, characterized in that, The lightweight feature extractor consists of three cascaded LK_RepConv modules, an ECA channel attention module, a feature flattening layer, and a random deactivation Dropout regularization layer. The LK_RepConv module introduces a structure reparameterization mechanism. During the training phase, the LK_RepConv module uses a three-branch parallel topology architecture of different sizes to extract multi-scale spatial features. The feature responses of each branch are superimposed and output by the GELU activation function. During the test and inference phase, the LK_RepConv module merges the multi-branch structure into a single convolutional layer, which is then output as a feature sequence by the GELU activation function.

3. The cross-domain adaptive ultrawideband NLOS recognition method based on metric learning according to claim 2, characterized in that, The ECA channel attention module includes a global average pooling layer, a dimension permutation operation Transpose, a one-dimensional convolutional layer Conv, and a Sigmoid activation function connected in sequence. It performs feature weighting optimization on the feature sequence extracted by the LK_RepConv module to obtain a weighted feature sequence.

4. The cross-domain adaptive ultrawideband NLOS recognition method based on metric learning according to claim 1, characterized in that, The domain adversarial discriminator consists of a three-layer fully connected network. The first and second fully connected layers are configured with ReLU activation function and Dropout strategy. The third fully connected layer serves as the output layer, mapping features to domain prediction probabilities and outputting the discriminant probability that the feature belongs to the target domain.

5. The cross-domain adaptive ultrawideband NLOS recognition method based on metric learning according to claim 1, characterized in that, The metric-based meta-learning classifier uses a prototype network and does not contain a number of learnable parameters.

6. The cross-domain adaptive ultrawideband NLOS recognition method based on metric learning according to claim 1, characterized in that, Calculate the probability that a sample belongs to the target domain, and obtain the domain adversarial discriminant loss based on this probability, specifically including: The domain adversarial discriminator predicts the probability that a sample belongs to the target domain, as shown below: ; in, This represents the first input to the domain adversarial discriminant. The feature vector of each sample For domain adversarial discriminators, Indicate the parameters of the adversarial discriminant in the domain; Indicates the first The probability that the feature vector of a sample is predicted to be the target domain takes a value between (0,1); Based on the probability that a sample belongs to the target domain, the domain adversarial discriminant loss is obtained. , means as follows: ; in, This indicates the total number of samples contained in the support set and query set in each contextual training session; Indicates the first The true domain label of the feature vector of each sample.

7. The cross-domain adaptive ultrawideband NLOS recognition method based on metric learning according to claim 1, characterized in that, The meta-learning classifier calculates class prototypes based on the feature vectors of the support set, uses the Euclidean distance between the feature vectors of the query set and the class prototypes to obtain the probability distribution of class assignment, and calculates the classification loss, specifically including: The meta-learning classifier calculates the prototype of each class based on the feature vectors of the support set, as shown below: ; in, It supports centralized categories The prototype, , representing LOS and NLOS respectively; For lightweight feature extractors, These represent the parameters of the lightweight feature extractor; Indicates category The first support set One sample, Indicates the total number of samples in the support set; Calculate the Euclidean distance between the feature vectors of each sample in the query set and the prototypes of each class, and predict the class to which it belongs. The probability of is expressed as follows: ; in, Indicates that in the given first A sample query set Given the given conditions, predict the true class label of the sample. Category The probability of; Represents the Euclidean distance metric function; =1, Indicates the corresponding category Support for prototype sets; Finally, the loss function for the entire query set is obtained. , means as follows: ; in, Indicates the total number of samples in the query set; Indicates the first A sample query set; Indicates the first The true category labels of each query set sample .

8. The cross-domain adaptive ultrawideband NLOS recognition method based on metric learning according to claim 1, characterized in that, The process of collecting and normalizing channel impulse response (CIR) data under multiple environments specifically includes: During the data acquisition process, after the device completes the ranging, it only reads the channel impulse response (CIR) data of the preset sampling points before and after the first path FP, and performs maximum value normalization on the acquired CIR data to scale the data to the range (0, 1).

9. A cross-domain adaptive ultrawideband NLOS recognition system based on metric learning, characterized in that, include: The CIR training dataset construction module is used to collect channel impulse response (CIR) data under multiple environments and perform normalization processing. Based on the normalized CIR data, a training dataset is constructed. The training dataset is divided into a source domain training set and a target domain training set according to the environment type. Both the source domain training set and the target domain training set contain two types of samples: line-of-sight (LOS) and non-line-of-sight (NLOS). The NLOS recognition model building module is used to build recognition models that include a lightweight feature extractor, a domain adversarial discriminator, and a metric-based meta-learning classifier. The NLOS recognition model training module is used to randomly extract several samples from the source and target domain training sets in each iteration to generate support sets and query sets; the support sets and query sets are then processed by a lightweight feature extractor to obtain the corresponding feature vectors. Will The feature vector is input into the domain adversarial discriminator, the probability that a sample belongs to the target domain is calculated, and the domain adversarial discriminant loss is obtained based on this probability; The meta-learning classifier calculates the category prototype based on the support set feature vectors, and uses the Euclidean distance between the query set feature vectors and the category prototypes to obtain the probability distribution of category assignment and calculate the classification loss. Based on the weighted sum of the adversarial discriminant loss and the classification loss, the network parameters of the lightweight feature extractor and the domain adversarial discriminator are updated by backpropagation. The above training process is repeated until the preset number of training times is reached to obtain a well-trained recognition model. The model deployment module is used to deploy the trained recognition model to edge devices. It collects CIR data in real-time from the actual scene, normalizes it, and inputs it into the trained recognition model. It extracts feature vectors through a lightweight feature extractor, classifies the feature vectors using a meta-learning classifier, and outputs the corresponding LOS / NLOS labels.