Multi-feature fusion-based few-sample learning positioning method

By adopting a multi-feature fusion few-shot learning method in the Industrial Internet of Things, and using BEiT and attention mechanisms to fuse radio frequency signals with environmental features, the problem of high-precision positioning in unknown environments in complex industrial environments is solved, and high-precision and Low-cost indoor positioning, strong adaptability, and suitable for rapid deployment in new environments.

CN118690322APending Publication Date: 2024-09-24WUXI XIAOZHI INFORMATION TECH CO LTD

Patent Information

Application Number
CN202410791740.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-19
Publication Date
2024-09-24

AI Technical Summary

Technical Problem

In complex industrial environments, it is difficult for existing technologies to achieve high-precision few-shot learning positioning in unknown environments. Especially when data is scarce, how to design effective methods to ensure model reliability is a challenge.

Method used

A few-shot learning method based on multi-feature fusion is used, positioning pre-training is performed through the BERT pre-training image transformer (BEiT), and self-supervised pre-training and attention mechanisms are combined to fuse RF signal parameters and environmental features, using multi-layer perception The MLP keeps the multi-modal feature dimensions consistent and outputs the final positioning coordinates through the fully connected layer.

Benefits of technology

Achieving high-precision indoor positioning under limited training data conditions significantly reduces the cost of data collection and labeling, improves positioning accuracy and model generalization capabilities, is suitable for rapid deployment in new environments, and reduces deployment costs and time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure HDA0004900285750000022
    Figure HDA0004900285750000022
  • Figure HDA0004900285750000011
    Figure HDA0004900285750000011
  • Figure BDA0004900285740000041
    Figure BDA0004900285740000041
Patent Text Reader

Abstract

The invention relates to the technical field of industrial Internet of Things application, and particularly provides a multi-feature fusion-based few-sample learning positioning method, which comprises the following steps of S1, performing self-supervision pre-training on an environment image by using BEiT to obtain a potential environment variable; s2, radio frequency signal parameters are mapped to the same dimension through a multi-layer sensor (MLP), and the multi-modal feature dimensions are kept consistent; s3, providing a multi-feature fusion-based few-sample learning positioning method for the environment features and the embodiment through an attention mechanism, illustrating the relation between the multi-feature fusion-based few-sample learning positioning method and the environment information, further processing, and outputting a final positioning coordinate; the method is excellent in performance in a new environment, the precision of indoor positioning is remarkably improved by integrating various characteristics, and an efficient and practical solution is provided for high-precision positioning in the industrial Internet of Things. The research not only fills the blank of few-sample learning in indoor positioning, but also shows the huge potential of pre-training and attention mechanisms in a complex environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of industrial Internet of Things application technology, and in particular to a positioning method based on multi-feature fusion and few-sample learning. Background Art

[0002] As a typical application scenario of the sixth generation of mobile communications (6G), the Industrial Internet of Things (IIoT) has an urgent need for high-precision positioning technology. High-precision positioning plays an important role in tasks such as equipment and asset tracking, security management, and logistics optimization. However, achieving high-precision positioning in complex industrial environments faces huge challenges. Since the 1990s, indoor positioning technology has undergone a transformation from simple infrared signal positioning to advanced machine learning algorithms. Traditional positioning algorithms use infrared signals emitted by wearable devices for positioning, but with the rapid development of machine learning technology, positioning algorithms based on machine learning have gradually become mainstream.

[0003] The application of machine learning in positioning algorithms can be divided into two main categories: supervised learning and unsupervised learning. In supervised learning, convolutional neural networks (CNNs) and long short-term memory networks (LSTMs) are used to extract channel information to improve the accuracy of non-line-of-sight (NLOS) and line-of-sight (LOS) classification, thereby enhancing positioning accuracy. Other studies have adopted a cascaded two-stage machine learning strategy to achieve high-precision and robust indoor positioning by adaptively selecting and combining radio frequency (RF) features. In addition, recursive neural networks (RNNs) are also used for WiFi fingerprint positioning, while random forests (RF) and Gaussian process manifold kernel dimensionality reduction (GPMKDR) are used to reduce the dimensionality of radio maps and reduce computational requirements.

[0004] Unsupervised learning strategies are also widely used. For example, studies have proposed using unlabeled data collected from aerial sensors to train fingerprint roaming models, using density-based clustering methods for indoor positioning, or performing unsupervised spatial representation learning through slow feature analysis (SFA) to achieve cost-effective positioning and mapping.

[0005] Although there have been many studies on model training and verification in known environments with a large amount of data, there is still a lack of research on few-shot learning and localization in new unknown environments. Few-shot learning can transfer the model's capabilities to new tasks with limited training data, thereby reducing the resources and amount of data required for training. However, how to design effective methods to cope with data scarcity and ensure the reliability of the model remains a challenge.

[0006] In order to solve these problems, this patent proposes a positioning method based on few-sample learning with multi-feature fusion. Summary of the invention

[0007] In view of the above-mentioned shortcomings of the prior art, an object of the present invention is to provide a positioning method based on few-sample learning with multi-feature fusion, so as to solve the problem in the prior art of how to implement few-sample learning positioning in a new unknown environment.

[0008] To achieve the above objectives and other related objectives, the present invention provides a positioning method based on multi-feature fusion and few-sample learning, comprising the following steps:

[0009] S1. Pre-train the image transformer (BEiT) through BERT, and pre-train BEiT for positioning in different environments;

[0010] S2, use BEiT to perform self-supervised pre-training on environmental images to obtain potential environmental variables;

[0011] S3, mapping the RF signal parameters to the same dimension through a multi-layer perceptron (MLP) to keep the multi-modal feature dimensions consistent;

[0012] S4, integrates environmental features and RF information through attention mechanism;

[0013] S5. The fused feature vector is further processed through a fully connected layer (FC) to output the final positioning coordinates.

[0014] In one embodiment of the present invention, in step S1, during the BERT pre-trained image transformer (BEiT), a BEiT including a six-layer Transformer architecture and twelve attention mechanisms is used; during the positioning pre-training of the BEiT in different environments, fine-tuning is performed by specifying freezing of the front-end and some back-end network layers.

[0015] In one embodiment of the present invention, the fine-tuning comprises the following steps:

[0016] Step 1: Freeze the first four layers of BEiT’s Transformer architecture and part of the attention mechanism. The parameters of the frozen Transformer architecture and attention mechanism remain unchanged during the fine-tuning process and are not updated.

[0017] Step 2: Fine-tune only the unfrozen Transformer architecture and feature fusion module of the attention mechanism of BEiT. During the fine-tuning process, use the new environment data to train these unfrozen layers so that they can learn and adapt to the new environment features.

[0018] Step 3: During the fine-tuning process, use the Adam optimizer to train the BEiT model to optimize the positioning error.

[0019] In one embodiment of the present invention, in step S2, the self-supervised pre-training of the environment image using BEiT to obtain potential environment variables includes the following steps:

[0020] A1. Preprocess the collected initial environment image of the industrial Internet of Things into an image of a fixed size, and divide the image into multiple image patches of fixed sizes;

[0021] A2, discretize the preprocessed image patches to obtain discrete visual markers;

[0022] A3. Use variational autoencoder (VAE) to convert image patches into discrete tags, represented as image tokens.

[0023] A4, randomly mask some image patches;

[0024] A5. Input the masked image patch into VAE for encoding. VAE serializes the image patch into discrete tokens and performs linear transformation on these discrete tokens to generate image patch embedding vectors.

[0025] A6. Add position encoding to the image patch embedding vector and input it into the Transformer encoder for processing;

[0026] A7. The Transformer encoder adopts a multi-head attention mechanism to extract and output the implicit feature representation of the image.

[0027] In one embodiment of the present invention, in step A4, the mask ratio of the random masking process performed on the partial image patches is 10%-40%.

[0028] In one embodiment of the present invention, in step S3, the radio frequency signal parameters include base station coordinates (BS), angle of arrival (AOA), time of arrival (TOA) and angle of emission (AOD).

[0029] In one embodiment of the present invention, in step S3, mapping the radio frequency signal parameters to the same dimension through a multi-layer perceptron (MLP) to keep the multi-modal feature dimensions consistent includes the following steps:

[0030] B1. Use a multi-layer perceptron (MLP), which includes an input layer, a hidden layer, and an output layer; input the RF signal parameters into the MLP;

[0031] B2, the input layer is used to receive the original RF signal parameters, and map the RF signal parameters to a high-dimensional space by linear transformation and introducing nonlinear characteristics through an activation function;

[0032] B3, the hidden layer uses the ReLU activation function to perform nonlinear transformation on the RF signal parameters, enhance the ability of feature representation, and further process and extract input features;

[0033] B4, the output layer maps the high-dimensional RF signal parameters back to a dimensional space consistent with the environmental characteristics.

[0034] In one embodiment of the present invention, in step S4, fusing the environmental features and the radio frequency information through the attention mechanism includes the following steps:

[0035] C1. Input the environmental features and RF signal parameters into the attention mechanism to generate the query matrix (Q), key matrix (K) and value matrix (V). The matrix (Q), key matrix (K) and value matrix (V) represent the query, key and value of the feature vector respectively.

[0036] C2, calculate the attention weight by performing a dot product operation on the query matrix and the key matrix, then dividing by the scaling factor d, and then applying the Softmax function to normalize;

[0037] C3. After calculating the attention weights, use the attention weights to perform weighted summation on the value matrix to generate the fused feature representation;

[0038] The attention mechanism can capture the relationship between environmental features and RF signal parameters, thereby achieving effective feature fusion.

[0039] In one embodiment of the present invention, the specific calculation formula of the attention weight is:

[0040]

[0041] In one embodiment of the present invention, in step S5, the fused feature vector is further processed by a fully connected layer (FC), and outputting the final positioning coordinates includes the following steps:

[0042] D1. Use a fully connected layer, which includes a nonlinear activation function (ReLU). Input the fused features into the fully connected layer, and perform nonlinear transformation and feature extraction on the fused features.

[0043] D2, the fully connected layer outputs the processing results and obtains the positioning coordinates.

[0044] As described above, the positioning method based on multi-feature fusion and few-sample learning of the present invention has the following advantages:

[0045] Beneficial effects:

[0046] The present invention adopts the few-sample learning technology, which can achieve high-precision indoor positioning under the condition of limited training data, greatly reducing the cost of data collection and annotation, and is particularly suitable for rapid deployment in new environments, improving positioning accuracy: the present invention effectively combines radio frequency signals and environmental features through multi-feature fusion and attention mechanism, which can significantly improve positioning accuracy. And this method shows excellent positioning performance in both line-of-sight (LOS) and non-line-of-sight (NLOS) scenarios, enhancing the generalization ability of the model; by fine-tuning the pre-trained model in different environments and adopting the strategy of freezing some network layers, the present invention can significantly improve the generalization ability of the model in different environments, so that the model can maintain stable positioning performance in various complex environments and has strong adaptability. Reduce deployment costs: Since the present invention reduces the need for a large amount of training data and can quickly adapt to new environments, the deployment cost and time of the system are significantly reduced. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 Shown is a flowchart of the positioning method based on multi-feature fusion and few-sample learning disclosed in Example 1.

[0048] Figure 2 The CDF curve diagram showing the positioning error of the simulation experimental method provided in Example 3;

[0049] Figure 3 The sample size and error variation diagram of the simulation experiment method provided in Example 3 is shown

[0050] Figure 4 The figure shows the change of positioning error when multiple samples of the simulation experimental method provided in Example 3 are added. DETAILED DESCRIPTION

[0051] The following is a description of the implementation of the present invention by means of specific embodiments. Those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification.

[0052] See also Figures 1 to 4 It should be noted that the structures, proportions, sizes, etc. illustrated in the drawings in this specification are only used to match the contents disclosed in the specification for people familiar with this technology to understand and read, and are not used to limit the conditions under which the present invention can be implemented. Therefore, they have no substantial technical significance. Any structural modification, change in proportion or adjustment of size should still fall within the scope of the technical contents disclosed in the present invention without affecting the effects and purposes that can be achieved by the present invention.

[0053] Example 1, please read Figure 1 This embodiment provides a positioning method based on multi-feature fusion and few-sample learning, including the following steps:

[0054] S1. Pre-train an image transformer (BEiT) with a six-layer Transformer architecture and twelve attention mechanisms through BERT. The pre-training process usually lasts for 100 cycles and contains 312,500 steps. Perform positioning pre-training on BEiT in different environments. The positioning pre-training is fine-tuned by freezing the front-end and some back-end network layers. The fine-tuning includes the following steps:

[0055] Step 1: Freeze the first four layers of BEiT’s Transformer architecture and part of the attention mechanism. The parameters of the frozen Transformer architecture and attention mechanism remain unchanged during the fine-tuning process and are not updated. The purpose of freezing these layers is to retain the common environment features learned in the pre-training phase so that they can maintain consistent feature representation in different environments.

[0056] Step 2: Fine-tune only the unfrozen Transformer architecture and feature fusion module of the attention mechanism of BEiT. During the fine-tuning process, use the new environment data to train these unfrozen layers so that they can learn and adapt to the new environment features.

[0057] Step 3. During the fine-tuning process, the BEiT model is trained using the Adam optimizer so that it can learn the statistical information of the environment from a large amount of unlabeled image data; the pre-training stage usually includes dozens of cycles to ensure that the encoder can fully learn the potential features of the image to achieve the purpose of optimizing the positioning error; the learning rate of fine-tuning is set to 0.1 times that of the pre-training stage to ensure the stability of parameter updates and the convergence of the model.

[0058] In this step, the pre-trained BEiT can be positioned in different environments. Fine-tuning by specifying the freezing of the front-end and part of the back-end network layers can improve the generalization ability of the positioning model for different environments. In unknown scenarios, a small number of samples can be used to enable the model to quickly adapt to the new environment, reducing the tuning time and data requirements, and improving the adaptability and robustness of the model in the new environment. It is suitable for rapid deployment and high-precision positioning needs in practical applications.

[0059] S2. Use BEiT to perform self-supervised pre-training on the environment image to obtain potential environment variables. Specifically, the following steps are included:

[0060] A1. Preprocess the collected initial environment image of the industrial Internet of Things into an image of a fixed size, such as 224×224 pixels, and divide the image into multiple image patches of a fixed size, such as 16×16 pixels;

[0061] A2, discretize the preprocessed image patches to obtain discrete visual markers;

[0062] A3. Use variational autoencoder (VAE) to convert image patches into discrete tags, represented as image tokens.

[0063] A4. Randomly mask some image patches with a mask ratio of 10%-40%. Using the discrete labeling and masking strategy, the loss is calculated and gradient backpropagation is performed by comparing the predicted visual labels with the actual labels.

[0064] A5. Input the masked image patch into VAE for encoding. VAE serializes the image patch into discrete tokens and performs linear transformation on these discrete tokens to generate image patch embedding vectors.

[0065] A6. Add position encoding to the image patch embedding vector and input it into the Transformer encoder for processing;

[0066] A7. The Transformer encoder adopts a multi-head attention mechanism to extract and output the implicit feature representation of the image. Specifically, the implicit feature representation of the image output by the Transformer encoder is FL=[fL[S],fL1,…,fLN], where fLi is the feature vector of the i-th figure.

[0067] S3, mapping the radio frequency signal parameters to the same dimension through a multi-layer perceptron (MLP) to keep the multi-modal feature dimensions consistent, wherein the radio frequency signal parameters include base station coordinates (BS), angle of arrival (AOA), time of arrival (TOA) and angle of emission (AOD); specifically comprising the following steps:

[0068] B1. Use a multi-layer perceptron (MLP), which includes an input layer, a hidden layer, and an output layer; input the RF signal parameters into the MLP;

[0069] B2, the input layer is used to receive the original RF signal parameters, and map the RF signal parameters to a high-dimensional space by linear transformation and introducing nonlinear characteristics through an activation function;

[0070] B3, the hidden layer uses the ReLU activation function to perform nonlinear transformation on the RF signal parameters to enhance the ability of feature representation, further process and extract input features, and enhance the ability of feature representation;

[0071] B4. The output layer maps the high-dimensional RF signal parameters back to a dimensional space consistent with the environmental features. For example, if the dimension of the environmental features is 196 (14×14), the dimension of the output layer is also set to 196 (14×14) to facilitate subsequent feature fusion.

[0072] In this step, the RF signal parameters are mapped through a multi-layer perceptron (MLP), which ensures the consistency of these parameters in dimensions and helps data matching and computational efficiency in the feature fusion process. This step is crucial to achieving high-precision indoor positioning because it can effectively fuse feature information from different sources to provide more accurate and robust positioning results.

[0073] S4: Fusion of environmental features and radio frequency information through the attention mechanism, specifically including the following steps:

[0074] C1. Perform shape processing on the RF signal parameters after MLP processing and the environmental features extracted by BEiT to make their shapes consistent; for example, the shape of the environmental features is [16, 1, 196], and after the RF signal parameters are processed by MLP, their shape also becomes [16, 1, 196];

[0075] C2. Input the environmental features and RF signal parameters into the attention mechanism to generate the query matrix (Q), key matrix (K) and value matrix (V). The matrix (Q), key matrix (K) and value matrix (V) represent the query, key and value of the feature vector respectively.

[0076] C3. The attention weight is calculated by performing a dot product operation on the query matrix and the key matrix, dividing the matrix by the scaling factor d, and then applying the Softmax function to normalize the matrix. The specific calculation formula of the attention weight is:

[0077]

[0078] C4. After calculating the attention weights, use the attention weights to perform weighted summation on the value matrix to generate the fused feature representation;

[0079] The attention mechanism can capture the relationship between environmental features and RF signal parameters, thereby achieving effective feature fusion.

[0080] S5. The fused feature vector is further processed through a fully connected layer (FC) to output the final positioning coordinates, which specifically includes the following steps:

[0081] D1. Use a fully connected layer, which includes a nonlinear activation function (ReLU). Input the fused features into the fully connected layer, and perform nonlinear transformation and feature extraction on the fused features.

[0082] D2. The fully connected layer outputs the processing results to obtain the positioning coordinates. For example, the output positioning coordinate structure is [16, Y1, Y2], where 16 represents the batch size, and Y1 and Y2 represent the specific values ​​of the positioning coordinates.

[0083] In this step, the attention mechanism can effectively fuse environmental features and RF signal parameters to calculate high-precision positioning coordinates. This process utilizes the powerful feature capture capability of the attention mechanism, ensures the effective fusion of data from different sources, and improves the accuracy and robustness of indoor positioning.

[0084] This method extracts environmental information through the BERT pre-trained image transformer (BEiT) network and integrates the RF signal with the environmental information using attention feature fusion. Specifically, the environmental information extraction model is self-supervised pre-trained based on BEiT, and the model is trained using a large amount of environmental data. The parameters of the RF signal are mapped to the same dimension through a multi-layer perceptron (MLP) to ensure the consistency of the tensor shape. The attention mechanism is used as a decoder for task-specific information fusion and ultimately calculates the positioning coordinates.

[0085] The present invention adopts the few-sample learning technology, which can achieve high-precision indoor positioning under the condition of limited training data, greatly reducing the cost of data collection and annotation, and is particularly suitable for rapid deployment in new environments, improving positioning accuracy: the present invention effectively combines radio frequency signals and environmental features through multi-feature fusion and attention mechanism, which can significantly improve positioning accuracy. And this method shows excellent positioning performance in both line-of-sight (LOS) and non-line-of-sight (NLOS) scenarios, enhancing the generalization ability of the model; by fine-tuning the pre-trained model in different environments and adopting the strategy of freezing some network layers, the present invention can significantly improve the generalization ability of the model in different environments, so that the model can maintain stable positioning performance in various complex environments and has strong adaptability. Reduce deployment costs: Since the present invention reduces the need for a large amount of training data and can quickly adapt to new environments, the deployment cost and time of the system are significantly reduced.

[0086] Example 2: This example provides a method for designing an Escherichia coli DNA promoter based on a diffusion model, which specifically includes:

[0087] Step 1: Use BEiT to perform self-supervised pre-training on environmental images to extract latent environmental variables;

[0088] Wherein, the network design and pre-training steps include:

[0089] First, the environment image data is preprocessed into a fixed size (e.g., 224×224 pixels) and the image is divided into fixed-size image patches (e.g., 16×16 pixels). The preprocessed image patches are discretized to obtain discrete visual tags. A discrete variational autoencoder (VAE) is used to convert image patches into discrete tags, represented as image tokens.

[0090] Part of the image patches are randomly masked with mask ratios of 10%, 32%, and 40%. The masked image patches are input to the encoder for encoding. The encoder generates patch embedding vectors by serializing the image patches into discrete tokens and performing linear transformations on these tokens. Position encoding is added to the patch embedding vectors and input into the Transformer encoder for processing. The encoder contains multiple layers and attention heads to extract implicit feature representations of the image.

[0091] The Transformer encoder outputs an implicit feature representation, denoted as FL = [fL[S], fL1,…, fLN], where fLi is the feature vector of the i-th image patch.

[0092] During the pre-training process, the Adam optimizer is used to train the encoder to learn the statistics of the environment from a large amount of unlabeled image data. The pre-training phase usually includes dozens of cycles to ensure that the encoder can fully learn the potential features of the image.

[0093] In the self-supervised learning process, the discrete labeling and masking strategies are used to optimize the encoder parameters by comparing the predicted visual labels with the actual labels, calculating the loss and performing gradient backpropagation.

[0094] Through the above steps, the trained encoder can effectively extract potential environmental variables from the environment image and provide high-quality feature representation for subsequent positioning tasks.

[0095] Step 2: Map the RF signal parameters to the same dimension through a multi-layer perceptron (MLP) to ensure dimensional consistency with the environmental features;

[0096] First, the RF signal parameters include base station (BS) coordinates, angle of arrival (AoA), time of arrival (ToA), and angle of transmission (AoD). The initial dimensions of these parameters may not be consistent, so they need to be mapped through a multi-layer perceptron (MLP) to ensure that all parameters are consistent with the environmental characteristics in dimension.

[0097] These RF signal parameters are input into a multi-layer perceptron (MLP). The MLP contains a three-layer neural network structure, namely the input layer, hidden layer and output layer. The input layer accepts the original RF signal parameters, the hidden layer is used for nonlinear transformation and feature extraction, and the output layer generates a dimensional vector consistent with the environmental characteristics.

[0098] In the first layer of MLP, the input layer maps the RF signal parameters to a high-dimensional space, such as 256 dimensions. This process is achieved through linear transformation and activation functions such as ReLU. The activation function is used to introduce nonlinear characteristics, allowing MLP to learn complex feature relationships.

[0099] Next, the hidden layer further processes the input data. The size of the hidden layer is set to 1024 dimensions, and the ReLU activation function is also used for nonlinear transformation. This step can further extract and process the input features and enhance the ability of feature representation.

[0100] Finally, the output layer maps the high-dimensional features of the hidden layer back to the dimensions consistent with the environmental features. For example, if the dimension of the environmental features is 196 (14×14), the dimension of the output layer is also set to 196. In this way, after the RF signal parameters are processed by MLP, their output dimensions are consistent with the environmental features, which is convenient for subsequent feature fusion.

[0101] Mapping the RF signal parameters through a multi-layer perceptron (MLP) ensures the consistency of these parameters in dimensions, which helps with data matching and computational efficiency during feature fusion. This step is crucial to achieving high-precision indoor positioning because it can effectively fuse feature information from different sources to provide more accurate and robust positioning results.

[0102] Step 3: Fusion of environmental features and RF information through the attention mechanism to calculate positioning coordinates: During the fusion process, the attention mechanism establishes the relationship between environmental features and RF features by calculating the query matrix, key matrix, and value matrix, and generates a multimodal feature vector.

[0103] First, the RF signal parameters processed by the multi-layer perceptron (MLP) and the environmental features extracted by BEiT are preprocessed to ensure that their dimensions are consistent and effective feature fusion can be performed. The shape of the environmental features is [16, 1, 196], and the shape of the RF signal parameters after MLP processing also becomes [16, 1, 196].

[0104] Next, the attention mechanism is used to fuse the environmental features and RF signal parameters. The core of the attention mechanism is to achieve nonlinear fusion of different types of data by modeling the relationship between feature vectors. The specific steps include the following aspects:

[0105] The environmental features and RF signal parameters are input into the attention mechanism to generate the query matrix (Q), key matrix (K) and value matrix (V). These matrices are calculated by the parameters and represent the query, key and value of the feature vector respectively.

[0106] Calculate the attention weight. The attention weight is normalized by performing a dot product operation on the query matrix and the key matrix, dividing it by the scaling factor d, and then applying the Softmax function. The specific calculation formula is:

[0107]

[0108] After calculating the attention weights, these weights are used to perform weighted summation on the value matrix to generate the fused feature representation. The attention mechanism can capture the relationship between environmental features and RF signal parameters, thereby achieving effective feature fusion.

[0109] Step 4: The fused feature vector is further processed through the fully connected layer (FC) and the positioning coordinates are finally output;

[0110] The fused feature representation is input into a fully connected layer to further process the features. The fully connected layer includes a non-linear activation function (ReLU) for non-linear transformation and feature extraction of the fused features.

[0111] Finally, the output layer generates the positioning coordinates. The output of the fully connected layer is further processed to obtain the positioning coordinates (such as [16, Y1, Y2]), where 16 represents the batch size, and Y1 and Y2 represent the specific values ​​of the positioning coordinates.

[0112] Step 5: The pre-trained BEiT is pre-trained for positioning in different environments. Fine-tuning is performed by freezing the front-end and some back-end network layers to improve the generalization ability of the positioning model for different environments. In unknown scenarios, a small number of samples are used to enable the model to quickly adapt to new environments, reducing tuning time and data requirements.

[0113] First, in the pre-training stage, BEiT is self-supervised and pre-trained using a large amount of environmental data to extract potential environmental variables. The purpose of pre-training is to allow the model to learn the geometry and statistics of the environment so that it can better understand and utilize environmental features in subsequent positioning tasks.

[0114] During pre-training, a BEiT with a six-layer Transformer architecture and twelve attention heads is used. The input image is segmented into 14×14 image patches, each of which is 16×16 pixels in size. The model masks the image patches using a random masking strategy, and then encodes the patches using a discrete variational autoencoder (VAE) to generate discrete visual tags. By comparing the predicted visual tags with the actual tags, the loss is calculated and the gradient is back-propagated to optimize the model parameters. The pre-training process typically lasts 100 epochs, for a total of 312,500 steps.

[0115] After completing pre-training, the fine-tuning phase begins. The goal of the fine-tuning phase is to enable the pre-trained BEiT to adapt to new environmental scenarios, thereby improving its positioning accuracy and generalization ability.

[0116] In the fine-tuning stage, in order to improve the generalization ability of the model to different environments, the strategy of freezing the front-end and some back-end network layers is adopted. The specific steps include:

[0117] First, the first four layers and some backend layers of BEiT are frozen. This means that the parameters of these layers remain unchanged and are not updated during fine-tuning. The purpose of freezing these layers is to retain the common environment features learned in the pre-training phase, so that it can maintain consistent feature representations in different environments.

[0118] Secondly, only the last few layers of BEiT and the attention feature fusion module are fine-tuned. During the fine-tuning process, these unfrozen layers are trained with new environmental data to enable them to learn and adapt to new environmental features. The learning rate of fine-tuning is usually set to 0.1 times that of the pre-training stage to ensure the stability of parameter updates and the convergence of the model.

[0119] During the fine-tuning process, the model is trained using the Adam optimizer, and the optimization goal is to minimize the positioning error. In this way, the model can quickly adapt to new environments and maintain high-precision positioning performance.

[0120] Example 3. This example provides a simulation experiment method, which is performed on an Intel(R) I7-13700 CPU 3.5GHz, RTXA5000, Ubuntu21.04LTS system, and a Pytorch=2.0.1 operating platform to complete the simulation training of noisy data generation and DNA sequence design in Example 2;

[0121] like Figure 2 As shown, the RMSE of the MLP model on the LOS path is 2.7 meters, and the accuracy is 96%. The RMSE of the proposed few-sample learning model in the LOS scenario is 1.5 meters, which is the best performance. The present invention can complete the positioning task, and the method is effective and feasible.

[0122] like Figure 3 As shown in the figure, the RMSE of the MLP model on the LOS path is 2.7 meters, and the accuracy is 96%. The RMSE of the proposed few-sample learning model in the LOS scenario is 1.5 meters, which is the best performance. The present invention can complete the positioning task, and the method is effective and feasible.

[0123] like Figure 4 As shown in the figure, as the sample size increases, the positioning error decreases rapidly and stabilizes when the sample size increases to about 50. This shows that the model has strong learning and generalization capabilities and can quickly improve performance with limited data. The rapid reduction in errors, especially when the sample size increases from 0 to about 50, shows that the model can effectively learn from limited data and quickly improve its performance, which is a sign of robust generalization, proving that the model has good learning ability for small samples in new environments and meets the positioning task.

[0124] The experimental design of this example includes comparative experiments with CNN and U-net architectures. The results show that the proposed model performs well in all scenarios, especially in non-line-of-sight conditions, with low positioning error and high accuracy. Compared with other models, pre-training significantly improves the performance of the model when dealing with unpredictable non-line-of-sight paths. By adopting BEiT and attention feature fusion, the proposed few-shot learning indoor positioning model not only improves positioning accuracy, but also reduces the time and amount of data required for fine-tuning in new environments.

[0125] Embodiment 4: This embodiment further provides a positioning device based on multi-feature fusion and few-sample learning, including:

[0126] Memory for storing computer programs;

[0127] A processor is used to implement any step of the positioning method based on multi-feature fusion and few-sample learning when executing the computer program.

[0128] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0129] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0130] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0131] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0132] In summary, the positioning method based on multi-feature fusion and few-sample learning proposed in the present invention performs well in new environments. By integrating multiple features, the accuracy of indoor positioning is significantly improved, and an efficient and practical solution is provided for high-precision positioning in the industrial Internet of Things. This study not only fills the gap in few-sample learning in indoor positioning, but also demonstrates the huge potential of pre-training and attention mechanisms in complex environments. Therefore, the present invention effectively overcomes the various shortcomings of the prior art and has a high industrial utilization value. Obviously, the above embodiments are only examples for clear explanation and are not limitations on the implementation methods. For ordinary technicians in the field, other different forms of changes or modifications can be made on the basis of the above description. It is not necessary and impossible to enumerate all the implementation methods here. The obvious changes or modifications derived from this are still within the scope of protection created by the present invention.

Claims

1. A positioning method based on multi-feature fusion and few-sample learning, characterized in that: The steps include: S1. Pre-train the image transformer (BEiT) through BERT, and pre-train BEiT for positioning in different environments; S2, use BEiT to perform self-supervised pre-training on environmental images to obtain potential environmental variables; S3, mapping the RF signal parameters to the same dimension through a multi-layer perceptron (MLP) to keep the multi-modal feature dimensions consistent; S4, integrates environmental features and RF information through attention mechanism; S5. The fused feature vector is further processed through a fully connected layer (FC) to output the final positioning coordinates.

2. The positioning method based on multi-feature fusion and few-sample learning according to claim 1 is characterized in that: In step S1, during the BERT pre-trained image transformer (BEiT), a BEiT including a six-layer Transformer architecture and twelve attention mechanisms is used; during the positioning pre-training of the BEiT in different environments, fine-tuning is performed by specifying freezing of the front-end and some back-end network layers.

3. The positioning method based on multi-feature fusion and few-sample learning according to claim 2 is characterized in that: The fine-tuning comprises the following steps: Step 1: Freeze the first four layers of BEiT’s Transformer architecture and part of the attention mechanism. The parameters of the frozen Transformer architecture and attention mechanism remain unchanged during the fine-tuning process and are not updated. Step 2: Fine-tune only the unfrozen Transformer architecture and feature fusion module of the attention mechanism of BEiT. During the fine-tuning process, use the new environment data to train these unfrozen layers so that they can learn and adapt to the new environment features. Step 3: During the fine-tuning process, use the Adam optimizer to train the BEiT model to optimize the positioning error.

4. The positioning method based on multi-feature fusion and few-sample learning according to claim 1, characterized in that: The method of using BEiT to perform self-supervised pre-training on environmental images to obtain potential environmental variables includes the following steps: A1. Preprocess the collected initial environment image of the industrial Internet of Things into an image of a fixed size, and divide the image into multiple image patches of fixed sizes; A2, discretize the preprocessed image patches to obtain discrete visual markers; A3. Use variational autoencoder (VAE) to convert image patches into discrete tags, represented as image tokens. A4, randomly mask some image patches; A5. Input the masked image patch into VAE for encoding. VAE serializes the image patch into discrete tokens and performs linear transformation on these discrete tokens to generate image patch embedding vectors. A6. Add position encoding to the image patch embedding vector and input it into the Transformer encoder for processing; A7. The Transformer encoder adopts a multi-head attention mechanism to extract and output the implicit feature representation of the image. The implicit features of the image output by the Transformer encoder are expressed as FL=[fL[S], fL1,…, fLN], where fLi is the feature vector of the i-th image.

5. The positioning method based on multi-feature fusion and few-sample learning according to claim 4 is characterized in that: In step A4 of S2, the mask ratio of randomly masking the partial image patches is 10%-40%.

6. The positioning method based on multi-feature fusion and few-sample learning according to claim 1, characterized in that: In step S3, the radio frequency signal parameters include base station coordinates (BS), angle of arrival (AOA), time of arrival (TOA) and angle of emission (AOD).

7. The positioning method based on multi-feature fusion and few-sample learning according to claim 5, characterized in that: In step S3, mapping the radio frequency signal parameters to the same dimension through a multi-layer perceptron (MLP) to keep the multi-modal feature dimensions consistent includes the following steps: B1. Use a multi-layer perceptron (MLP), which includes an input layer, a hidden layer, and an output layer; input the RF signal parameters into the MLP; B2, the input layer is used to receive the original radio frequency signal parameters, and map the radio frequency signal parameters to a high-dimensional space by linear transformation and introducing nonlinear characteristics through an activation function; B3, the hidden layer uses the ReLU activation function to perform nonlinear transformation on the RF signal parameters, enhance the ability of feature representation, and further process and extract input features; B4, the output layer maps the high-dimensional RF signal parameters back to a dimensional space consistent with the environmental characteristics.

8. The positioning method based on multi-feature fusion and few-sample learning according to claim 1, characterized in that: In step S4, the fusion of environmental features and radio frequency information through the attention mechanism includes the following steps: C1. Input the environmental features and RF signal parameters into the attention mechanism to generate the query matrix (Q), key matrix (K) and value matrix (V). The matrix (Q), key matrix (K) and value matrix (V) represent the query, key and value of the feature vector respectively. C2, calculate the attention weight by performing a dot product operation on the query matrix and the key matrix, then dividing by the scaling factor d, and then applying the Softmax function to normalize; C3. After calculating the attention weights, use the attention weights to perform weighted summation on the value matrix to generate the fused feature representation; The attention mechanism can capture the relationship between environmental features and RF signal parameters, thereby achieving effective feature fusion.

9. The positioning method based on multi-feature fusion and few-sample learning according to claim 8, characterized in that: The specific calculation formula of the attention weight is:

10. The positioning method based on multi-feature fusion and few-sample learning according to claim 1, characterized in that: In step S5, the fused feature vector is further processed by a fully connected layer (FC), and outputting the final positioning coordinates includes the following steps: D1. Use a fully connected layer, which includes a nonlinear activation function (ReLU). Input the fused features into the fully connected layer, and perform nonlinear transformation and feature extraction on the fused features. D2, the fully connected layer outputs the processing results and obtains the positioning coordinates.

Citation Information

Patent Citations

  • Generative self-supervision hyperspectral image target detection method based on spatial spectrum mask

    CN117746235A

  • Knowledge graph-based few-sample multi-hop reasoning optimization method

    CN118095445A

Cited By

  • Multi-mode identification system of intelligent work card

    CN121600502A