Metaadapter-based small sample indoor positioning method

By combining model-independent learning MAML and adapter technology in indoor positioning, the problem that indoor positioning method is difficult to quickly adapt to the new environment under the conditions of small sample data is solved, and the indoor positioning effect with high accuracy and low computing cost is achieved.

CN120075732AInactive Publication Date: 2025-05-30SICHUAN DAJIAO TECH CO LTD +1
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510313606.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-17
Publication Date
2025-05-30
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing indoor positioning method based on WiFi fingerprint is difficult to quickly adapt to the new environment under small sample data conditions, and its ability to adapt to dynamic changes in the environment is insufficient, which can easily lead to reduced positioning accuracy and overfitting problems.

Method used

Using the framework and adapter technology based on model-independent learning MAML, the model is trained on multiple related tasks to quickly adapt to new tasks, and insert a lightweight adapter module into the pre-trained model, only a small number of parameters of the adapter are updated to achieve efficient fine-tuning.

Benefits of technology

The accuracy and stability of indoor positioning are significantly improved under the conditions of small sample data, reduce dependence on specific task data, reduce computing resource consumption, and quickly adapt to positioning tasks in a new environment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120075732A_ABST
    Figure CN120075732A_ABST
Patent Text Reader

Abstract

The invention discloses a small sample indoor positioning method based on a meta adapter. The invention relates to a method for positioning small data samples in an indoor environment, in particular to a small sample indoor positioning method based on meta-learning and adapter technologies. According to the method, channel state information (CSI) data is collected at each grid point of an indoor environment, an offline fingerprint database is constructed, and a positioning model is trained by using labeled source domain data. Parameters of the model are fixed and introduced into an adapter module, and an adapter is finely adjusted through a small number of samples of a new environment, so that the calculation overhead is remarkably reduced. Meanwhile, in combination with a meta-learning framework, a plurality of related positioning tasks are trained, common features are extracted, and the model is endowed with a cross-scene quick knowledge migration capability, so that the model can quickly adapt to a new positioning environment under the condition of a small number of samples. According to the method, the defects that a traditional field adaptation technology depends on a large number of data samples and the calculation cost of the training process is high are effectively overcome, and rapid adaptation and high-precision positioning under the small sample condition are achieved by fusing the meta-learning framework and the adapter.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of indoor positioning, and particularly relates to a small-sample learning method based on a meta-adapter, which is used to achieve high-precision indoor positioning under the condition of a small amount of sample data. Background Art

[0002] Indoor positioning technology is a key support in fields such as smart cities, smart homes, and industrial automation. Especially, the demand for high-precision positioning in indoor environments without GPS signals is becoming increasingly urgent. Indoor positioning based on WiFi fingerprints has attracted much attention due to advantages such as wide deployment of infrastructure and no need for additional hardware. The WiFi fingerprint indoor positioning method based on machine learning usually cannot adjust model parameters online in real time and dynamically, resulting in insufficient adaptability to environmental dynamic changes, and the positioning performance is prone to significant attenuation over time or with scene changes. The WiFi fingerprint indoor positioning method based on traditional deep learning faces problems such as high dependence on the training environment, large data volume requirements, and database failure caused by environmental changes.

[0003] In view of the above problems, the introduction of the model-agnostic meta-learning MAML technology is particularly important. MAML is an optimization-based meta-learning method. By training on multiple different tasks, the model is enabled to quickly adapt to new tasks, thereby significantly reducing the dependence on new task data. When this method is deployed to the positioning task in a new environment, fine-tuning is required. However, traditional fine-tuning methods usually need to update the entire model parameters, which not only has a high computational cost but also easily brings the problem of model overfitting when the data is a small sample. The adapter fine-tuning technology only needs to update a small number of parameters, which can reduce the computational amount of fine-tuning to a certain extent. The adapter fine-tuning technology inserts a lightweight adapter module into the pre-trained model, freezes the parameters of the pre-trained model, makes full use of the general features learned by the pre-trained model, and realizes the adaptation to specific tasks through a small number of trainable parameters, avoiding training the model from scratch, improving the fine-tuning efficiency, and reducing the dependence on specific task data. Therefore, combining the ability of MAML to quickly adapt to new tasks with the efficient fine-tuning ability of the adapter can reduce the demand for the number of samples in the target scene. By only updating a small number of parameters of the adapter to suppress overfitting, the model can be efficiently deployed using small-sample data in the positioning task of the new environment.

[0004] Reference [1] can obtain better positioning performance by using a convolutional neural network (CNN) to extract the deep features of CSI signals. This method has the following two main drawbacks: 1) Traditional CNN models are prone to overfitting under small sample conditions and it is difficult to quickly adapt to new environments with small sample data; 2) The signal distributions in different environments vary greatly, resulting in the model being unable to effectively acquire the knowledge of new environments and having low positioning accuracy in new environments. Reference [2] uses the KNN algorithm for positioning. This is a case-based machine learning method, and its core idea is to infer the position by finding the K training samples closest to the point to be located. The performance of this method depends on the quantity and quality of the training data. In the problem of indoor positioning with small samples, it is difficult for this method to find a sufficient number of neighboring samples to accurately infer the position, thus prone to misjudgment or deviation, resulting in unstable positioning results.

[0005] [1] Chen H, Zhang Y, Li W, et al. ConFi: Convolutional neural networks based indoor Wi-Fi localization using channel state information[J]. IeeeAccess, 2017, 5: 18066 - 18074.

[0006] [2] P. Bahl and V. N. Padmanabhan, “RADAR: An in-building RF-based user location and tracking system,” in Proc. Conf. Comput. Commun., 19th Annu. Joint Conf. IEEE Comput. Commun. Societies, Mar. 2000, pp. 775–784.. Summary of the Invention

[0007] To overcome the above technical deficiencies, the present invention provides a small-sample indoor positioning method based on a meta-adapter. The method of the present invention is based on the model-agnostic meta-learning framework MAML and the adapter technology. A meta-adapter refers to the model structure after embedding an adapter module into the model trained by the meta-learning framework. Use the MAML framework and the training data set to train the model to obtain the model parameters θ * , freeze the model parameters and use it as a fixed feature extractor. Embed a lightweight adapter module into the model trained by meta-learning. The structure of the adapter is successively a feed-forward down-projection layer and a feed-forward up-projection layer, and a non-linear activation function RELU is used in the middle. In the meta-training stage, use the support set data of all tasks to update the task-specific adaptive parameters θ in the inner loop of the MAML framework i′, use the query set to perform position estimation on θ i ′ to obtain the total loss, and then update the model parameter θ by minimizing the total loss * . Use the fine-tuning data set in the test environment to train the meta-adapter, and then use the test data set in the test environment to evaluate the positioning performance of the model. To sum up, the method of the present invention reduces the dependence on specific task data by making full use of the general features of the model trained by meta-learning on multiple related tasks, and only needs to update a small number of parameters of the meta-adapter in the new environment, greatly reducing the consumption of computing resources, and can quickly adapt to the new environment positioning task under the small sample condition.

[0008] To achieve the purpose of the present invention, the following technical solutions will be adopted: A small sample indoor positioning method based on a meta-adapter. It includes the following steps:

[0009] S1. Deploy the experimental environment. Fix the positions of the multi-antenna wireless signal transmitting devices in R 1 training environments and R 2 test environments, and divide the environment into N r grid points according to a certain scale.

[0010] S2. Build a fingerprint database:

[0011] S2-1. Data collection. At each preset grid point in each environment, a person holds a signal collection device to sequentially collect the CSI signals of each grid point and set a unique label. Collect the CSI data for M sampling periods at each grid point, extract the amplitude data in the CSI signal, and the CSI amplitude data at each grid point contains N T ×N R ×M×N S amplitude measurement values, where N T represents the number of transmitting antennas, N R represents the number of receiving antennas, and N S represents the number of subcarriers.

[0012] S2-2. Sliding window division. Use the sliding window method to divide the continuous CSI amplitude data at each grid point with a step size of s to obtain M / s windows, and then convert the windows into multi-channel amplitude feature maps, and the number of channels is (N T ×N R ), so there are L CSI amplitude feature map samples at one grid point, where, For all CSI amplitude feature map samples at the i-th grid point in an indoor environment, they can be expressed as: represents the l-th sample on the j-th channel. Then the total number of samples in an indoor environment is (N r ×N T ×NR × L).

[0013] S2-3. Construct a fingerprint database. Record the CSI amplitude feature maps at each grid point obtained in step 2-2 and the corresponding grid point labels Y i =(x i , y i ) in sequence to form an offline fingerprint database.

[0014] S3. Dataset division. Use the sample data obtained in R 1 training environments as the training dataset D train . Divide D train into different tasks according to the indoor environment From all samples X i at each grid point randomly select 15 samples, of which 10 samples and the corresponding label Y i =(x i , y i ) together constitute the support set 5 samples and the corresponding label together constitute the query set It can be expressed as: Then randomly select 10 samples at each grid point in the test environment for subsequent fine-tuning of the meta-adapter, denoted as D finetune ; Use the remaining samples at each grid point for online testing, denoted as D test .

[0015] S4. Meta-training:

[0016] S4-1. Randomly initialize the parameters of the model as θ. In the inner layer of the MAML framework, use the support set data to train the model, use the mean squared error loss function to calculate the localization loss, and update the task-specific parameters θ i ':

[0017]

[0018] where α is the inner layer learning rate, and f θ is the function representation of the randomly initialized parameter θ.

[0019] S4-2. Further use the updated parameter θ i ' in the query set to evaluate the performance of the model, and obtain the loss Define the loss as the sum of the losses of all tasks

[0020] S4-3. In the outer layer, update the parameter θ by minimizing the total loss through the stochastic gradient descent method:

[0021]

[0022] where β is the outer layer learning rate.

[0023] S4-4. After the training is completed, save the optimal parameter θ * as the model parameter for subsequent tasks:

[0024]

[0025] S5. Meta-adapter fine-tuning:

[0026] S5-1. Construct a meta-adapter. Remove the last fully connected layer of the model in the meta-training stage and add an adapter module after the fully connected layer 2.

[0027] S5-2. Freeze the model parameter θ trained by meta-learning * , initialize the parameter of the adapter as ψ, and input the D train sampled from D finetune into the meta-adapter for g times of gradient updates:

[0028]

[0029] S5-3. Save the trained meta-adapter model f meta-adapter for online positioning.

[0030] S6. Testing stage:

[0031] S6-1. Input the model f meta-adapter and the unseen test data set D test into the saved model f fine-tuned by the meta-adapter meta-adapter to obtain the position estimation of each sample. Description of the Drawings

[0032] Figure 1 Framework diagram of the method of the present invention

[0033] Figure 2 Positioning flow chart of the method of the present invention

[0034] Figure 3 Comparison chart of the average positioning error between the method of the background technology and the method of the present invention

[0035] Figure 4 Positioning cumulative error percentage of the method of the background technology and the method of the present invention

[0036] Figure 5Comparison chart of the average positioning error of the method of the present invention and the method without fine-tuning using a meta-adapter at different sample numbers

[0037] Figure 6 Comparison chart of the average positioning error of the background technology method 1 and the method of the present invention at different sample numbers Detailed implementation manners

[0038] The following combines the accompanying drawings and embodiments to describe in detail the implementation manners of the present invention:

[0039] 1. Deploy the experimental environment. Fix the positions of the multi-antenna wireless signal transmitting devices in R 1 training environments and R 2 testing environments, and divide the environment into N r grid points according to a certain scale.

[0040] 2. Construct the fingerprint database:

[0041] 2-1. Data collection. At each preset grid point in each environment, a person holds a signal collection device to sequentially collect the CSI signals of each grid point and set a unique label. Collect CSI data for M sampling periods at each grid point, extract the amplitude data in the CSI signals, and the CSI amplitude data at each grid point contains N T ×N R ×M×N S amplitude measurement values, where N T represents the number of transmitting antennas, N R represents the number of receiving antennas, and N S represents the number of subcarriers.

[0042] 2-2. Sliding window division. Use the sliding window method to divide the continuous CSI amplitude data at each grid point with a step size of s to obtain M / s windows, and then convert the windows into multi-channel amplitude feature maps with the number of channels being (N T ×N R ). Then there are L CSI amplitude feature map samples at one grid point. Among them, For all CSI amplitude feature map samples at the i-th grid point in an indoor environment, they can be expressed as: represents the l-th sample on the j-th channel. Then the total number of samples in an indoor environment is (N r ×N T ×N R ×L).

[0043] 2-3. Construct the fingerprint database. Combine the CSI amplitude feature maps at each grid point obtained in step 2-2 with the corresponding grid point label Y i =(x i ,y i)Record them in sequence to form an offline fingerprint database.

[0044] 3. Dataset division. Use the sample data obtained in R 1 training environments as the training dataset D train . Divide D train into different tasks according to the indoor environment From all samples X at each grid point i randomly select 15 samples, among which 10 samples and the corresponding label Y i =(x i , y i ) together constitute the support set 5 samples and the corresponding label together constitute the query set It can be expressed as: Then randomly select 10 samples from each grid point in the test environment for subsequent fine-tuning of the meta-adapter, denoted as D finetune ; Use the remaining samples at each grid point for online testing, denoted as D test .

[0045] 4. Meta-training:

[0046] 4-1. Randomly initialize the parameters of the model as θ. In the inner layer of the MAML framework, use the support set data to train the model, calculate the positioning loss using the mean square error loss function, and update the task-specific parameters θ i ':

[0047]

[0048] where α is the inner layer learning rate, and f θ is the function representation of the randomly initialized parameter θ.

[0049] 4-2. Further use the updated parameter θ i ' to evaluate the performance of the model on the query set, and obtain the loss Define the loss as the sum of the losses of all tasks

[0050] 4-3. In the outer layer, update the parameter θ by minimizing the sum of losses through stochastic gradient descent:

[0051]

[0052] where β is the outer layer learning rate.

[0053] 4-4. After training is completed, save the optimal parameter θ * , as the model parameter for subsequent tasks:

[0054]

[0055] 5. Meta-adapter fine-tuning:

[0056] 5-1. Construct a meta-adapter. Remove the last fully connected layer of the model in the meta-training stage and add an adapter module after the second fully connected layer.

[0057] 5-2. Freeze the model parameters θ trained by meta-learning * , initialize the parameters of the adapter as ψ, and input the D train sampled from D finetune into the meta-adapter for g times of gradient updates:

[0058]

[0059] 5-3. Save the trained meta-adapter model f meta-adapter for online localization.

[0060] 6. Testing stage:

[0061] 6-1. Input the model f meta-adapter and the unseen test dataset D test into the saved model f fine-tuned by the meta-adapter meta-adapter to obtain the position estimates of each sample.

[0062] Embodiment

[0063] The experimental dataset in this experiment is CSI data collected in classrooms 113, 114, 115, 116, and 120 in Area C of Pinxue Building at the University of Electronic Science and Technology. The layout of classroom 113 is 12m × 8m, containing 76 grid points; the layout of classroom 114 is 11m × 7m, containing 68 grid points; the layout of classroom 115 is 12m × 8m, containing 86 grid points; the layout of classroom 116 is 11m × 7m, containing 56 grid points; the layout of classroom 120 is 12m × 7m, containing 59 grid points. A desktop computer with the Ubuntu 14.04 LTS system is used as the CSI signal transmitter and is fixed at the podium of each classroom. The CSI signal receiver is a laptop configured with an Intel 5300 network card and CSI tools. The experimenter holds the CSI signal receiver and moves it sequentially at the grid points to collect the CSI time-series signals at each grid point and records the grid point labels to form a fingerprint database. Each grid point contains 36 CSI two-dimensional amplitude feature map data. The sample data obtained in classrooms 113, 114, 115, and 116 are used as the training dataset D train . Use Dtrain Divided into different tasks according to the indoor environment Take one All samples X of each grid point i Randomly select 15 samples, among which 10 samples and the corresponding labels jointly form the support set 5 samples and the corresponding labels jointly form the query set For model meta-training. Then randomly select 10 samples from each grid point in the test environment classroom 120 for subsequent fine-tuning of the meta-adapter, denoted as D finetune ; The remaining samples at each grid point are used for online testing, denoted as D test .

[0064] The model in the meta-learning stage involved in the method of the present invention includes 3 convolutional layers and 3 fully connected layers. The convolutional kernels of the three convolutional layers are 3×3, and the number of output channels is 16, 32, and 64 in sequence. The number of neurons in the three fully connected layers is 128, 64, and 2 respectively. The meta-adapter structure is to remove the last fully connected layer of the model trained by meta-learning, and add an adapter module after the fully connected layer 2. Among them, the adapter consists of a feed-forward down-projection layer and a feed-forward up-projection layer, and the RELU activation function is used between the two layers. Use the support set train Sampled from the training dataset D And the query set To train the model in the meta-training stage. Further, use D in the test environment classroom 120 finetune Fine-tune the meta-adapter, and then use the test dataset D test To test the positioning result of the trained meta-adapter model f meta-adapter .

[0065] The present invention designs three groups of experiments to verify the superiority of the proposed algorithm.

[0066] The first group of experiments is to compare the average positioning error of the background technology method and the method of the present invention under the condition of small samples. Among them, the CNN model structure used in the background method 1 is the same as the model structure used in the present invention in the meta-training stage. The data of 4 classrooms are used as the training set, and the data collected in the new classroom is used as the test set. The background method 2 is to use the traditional machine learning KNN algorithm to match the samples collected from the test environment with the samples in the fingerprint database, and select the 5 most similar sample labels for weighted average. Figure 3 Draw a comparison chart of the average positioning error of the two background methods and the method of the present invention in the test environment. From Figure 3 It can be seen that the positioning accuracy of the method of the present invention is the highest, and the average positioning error is about 1.936 meters, while the average positioning error of the background method 1 is about 3.223 meters, and the average positioning error of the background method 2 is about 4.436 meters. Figure 4The percentage results of the positioning cumulative error of the background method and the method of the present invention are given.

[0067] The second group of experiments compares the positioning performance of the method of the present invention and the method without fine-tuning with the meta-adapter in the test environment. Figure 5 The percentage results of the positioning cumulative error of these two methods are plotted when taking 10 samples at each grid point in the test environment. Figure 5 It can be seen that the positioning performance of the method of the present invention is better than that of the method without fine-tuning with the meta-adapter, and the number of training parameters of the method of the present invention in the test environment is significantly less than that of the method without fine-tuning with the meta-adapter. Table 1 gives the comparison of the number of training parameters of the method of the present invention and the method without fine-tuning with the meta-adapter in this group of experiments.

[0068] Table 1 Comparison of the number of training parameters

[0069]

[0070] The third group of experiments compares the change of the positioning error of the method of the present invention and the background method 1 under the data sets with the number of samples being 5, 10, and 15 in turn in the test environment. Figure 6 As shown, the sensitivity of the positioning error of the method of the present invention to the change of the number of samples is lower than that of the background method 1. When the number of samples at each grid point in the fine-tuning data set is 5, 10, and 15 in turn, the change of the positioning error is not large, and a relatively high positioning accuracy can be obtained; while the positioning error of the background method 1 changes greatly when the number of samples at each grid point in the fine-tuning data set changes within the range of 5, 10, and 15.

[0071] The results of the three groups of experiments prove that a small-sample indoor positioning method based on a meta-adapter proposed by the present invention can achieve a relatively high positioning accuracy and a small computational cost in a new positioning task when the training data is small. By combining the meta-learning framework with the efficient fine-tuning ability of the adapter, the common knowledge of multiple related tasks is learned, and accurate position estimation can be performed under small-sample conditions. In summary, the present invention is a method that can achieve high-precision positioning in the indoor environment of small-sample scenarios.

Claims

1. A small sample indoor positioning method based on a meta-adapter, characterized in that: The small sample indoor positioning method includes a point database establishment module, a data set division module, a model training module and a meta-adapter fine-tuning module. Compared with the traditional WiFi fingerprint positioning algorithm based on deep learning, this method uses the data set collected in the training environment to train the model on the meta-learning MAML framework, freezes the trained model parameters, and further removes the last fully connected layer of the model and embeds an adapter thereafter to form a meta-adapter, trains the meta-adapter using a small sample data set in a new environment, and then tests the positioning performance of the meta-adapter using a test data set in the new environment. This method preserves the knowledge learned by the model on related tasks by freezing the main model parameters, does not need to collect large-scale data samples in the new environment, and only fine-tunes a small number of parameters of the meta-adapter, which greatly reduces the computational cost and can quickly adapt to positioning tasks in new environments under the condition of small samples.

2. The database establishment module according to claim 1, characterized in that: The positions of the multi-antenna wireless signal transmitting devices are fixed in the R1 training environment and the R2 test environment, and the environment is divided into N areas with a 1-meter interval in front, back, left, and right directions. r grid points. At each preset grid point in each environment, a person holds a signal acquisition device and collects CSI signals of M sampling periods at each grid point in turn and sets a unique label. The continuous CSI amplitude data at each grid point is divided into M / s windows with a step size of s using the sliding window method. The window is converted into a multi-channel amplitude feature map. Finally, the CSI amplitude feature map at each grid point and the corresponding label are stored in turn to obtain an offline fingerprint database.

3. The data set partitioning module according to claim 1, characterized in that: The sample data obtained in R1 training environments is used as the training data set D train . D train Divide into different tasks according to the indoor environment Will one Randomly select 15 samples from all samples Xi of each grid point, 10 of which are associated with the corresponding label Y i =(x i ,y i ) together constitute the support set The 5 samples and corresponding labels together constitute the query set It can be expressed as: Then, 10 samples are randomly selected from each grid point of the test environment for subsequent fine-tuning of the meta-adapter, denoted as D finetune ; The remaining samples at each grid point are used for online testing, denoted as D test .

4. The model training module according to claim 1, characterized in that: The parameters of the model are randomly initialized to θ. In the inner layer of the MAML framework, use Support set data Train the main model, calculate the localization loss using the mean squared error loss function, and update the task-specific Parameters Among them, α is the inner layer learning rate, f θ is the function representation of the randomly initialized parameter θ. Further use the updated parameter θ i 'exist Query set Evaluate the performance of the model and get the loss The loss is defined as the sum of the losses of all tasks. In the outer layer, the parameters are updated by minimizing the sum of the losses through stochastic gradient descent. β is the outer layer learning rate. After training is completed, save the optimal parameter θ * , as model parameters for subsequent tasks.

5. The meta-adapter fine-tuning module according to claim 1, characterized in that: The main model includes 3 convolutional layers and 3 fully connected layers. The convolution kernels of the three convolutional layers are 3×3, and the number of output channels is 16, 32, and 64. The number of neurons in the three fully connected layers is 128, 64, and 2, respectively. The meta-adapter structure replaces the fully connected layer 3 of the meta-learning trained model with an adapter module, where the adapter consists of a feed-forward down-projection layer and a feed-forward up-projection layer, with a RELU activation function between the two layers. finetune Fine-tune the meta-adapter and then use the test dataset D test For the trained meta-adapter model f meta-adapter Test the positioning results.

Citation Information

Cited By

  • Dynamic environment robust indoor positioning method based on multi-source unsupervised domain adaptation

    CN120676313A

  • Dynamic environment robust indoor positioning method based on multi-source unsupervised domain adaptation

    CN120676313B