Self-adaptive indoor positioning method and system based on deep regression model and KL-Huber mixed loss function

The KL-Huber mixed loss function and RKnet model enhance CSI-based indoor positioning by improving spatial feature extraction and robustness in complex environments, addressing precision and robustness issues in existing technologies.

CN120321594APending Publication Date: 2025-07-15CHONGQING JIAOTONG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510568637.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-30
Publication Date
2025-07-15

AI Technical Summary

Technical Problem

The existing CSI-based indoor positioning technology lacks positioning accuracy and robustness in complex indoor environments, and traditional loss functions cannot effectively respond to environmental changes, resulting in insufficient generalization capabilities of the model.

Method used

Adaptive indoor positioning method based on a mixed loss function of depth regression model and KL-Huber, by constructing the RKnet positioning model and its RKLoss loss function, combining KL divergence and Huber loss, model parameters are optimized, and the positive and negative sample mining mechanism is used to improve the positioning accuracy and robustness of the model in complex environments.

Benefits of technology

It significantly improves the positioning accuracy and robustness in complex environments, especially under the influence of multipath effect and occlusion, the positioning error is greatly reduced, and the model can learn more carefully the spatial relationships in CSI data, improving positioning accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120321594A_ABST
    Figure CN120321594A_ABST
Patent Text Reader

Abstract

The invention discloses a self-adaptive indoor positioning method and system based on a deep regression model and a KL-Huber mixed loss function, and the method comprises the steps: data collection and preprocessing: collecting CSI data in a target indoor environment, and carrying out the preprocessing of the collected CSI data; an RKnet positioning model and an RKLoss loss function of the RKnet positioning model are constructed; the RKnet positioning model predicts the position of a positioning target according to the preprocessed CSI data; the RKLoss loss function is combined with KL divergence and Huber loss, and an RKnet positioning model is optimized through a positive and negative sample mining mechanism; model training: training the RKnet positioning model by using the preprocessed CSI data, and adjusting the parameters of the RKnet positioning model by minimizing the RKLoss; and then positioning prediction is carried out on real-time CSI data based on the trained RKnet positioning model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of indoor positioning based on CSI, and particularly relates to an adaptive indoor positioning method and system based on a depth regression model and a KL-Huber hybrid loss function. Background Art

[0002] In recent years, the research on indoor positioning systems has increasingly relied on wireless signal technologies, especially the channel state information (CSI) in Wi-Fi networks. Compared with traditional methods based on received signal strength indication (RSSI), CSI provides more accurate channel information, including the amplitude and phase of each subcarrier, thus enabling the capture of minute changes in the indoor environment. Especially in complex environments such as multipath effects and obstacles, CSI shows higher positioning accuracy. The wide deployment and low cost advantages of Wi-Fi networks make it the preferred technology for indoor positioning.

[0003] In CSI-based positioning methods, there are generally two main types: fingerprint positioning and model-based positioning. The fingerprint positioning method collects CSI data at different locations and constructs a fingerprint database, and in the online stage, it matches the real-time CSI with the fingerprint database to achieve positioning. However, this method relies on high-quality offline data collection, and the cost of constructing the fingerprint database is relatively high. In contrast, the model-based positioning method avoids the construction of the fingerprint database and directly maps the CSI data to physical location coordinates. Common techniques include signal propagation models (such as TOA, AOA models) and inference methods based on mathematical modeling.

[0004] In recent years, with the development of deep learning technologies, more and more research has started to introduce deep learning methods such as convolutional neural networks (CNNs) into the field of CSI data processing. These methods convert CSI data into a two-dimensional matrix similar to an image, enabling the CNN to extract spatial features from the data. However, traditional CNNs still face significant challenges when dealing with high-dimensional and noise-interfered CSI data in complex environments.

[0005] Existing CSI regression localization methods based on deep learning usually use deep learning models such as convolutional neural networks (CNNs) to treat CSI data as features and directly map them to physical location coordinates. The DeepFi system models CSI data through a deep network and combines a radial basis function (RBF) for location prediction. For example, Zhang et al. proposed a fusion localization framework based on CSI fingerprint and trajectory tracking, using a residual CNN network with an attention mechanism to improve feature extraction and global modeling capabilities. In addition, some studies have proposed using architectures such as residual networks (ResNets) to improve deep models and solve problems such as gradient vanishing during training. Some studies have attempted to convert CSI data into images, combine deep learning methods to extract their spatial features, and predict location coordinates through a model. However, the existing technologies still face the following challenges: when dealing with complex wireless channel environments, traditional loss functions (such as L1, L2, or Huber loss) cannot effectively cope with environmental changes to a certain extent, resulting in insufficient generalization ability of the model.

[0006] Therefore, in the face of the problems existing in the prior art, it is an urgent technical problem to be solved to develop an adaptive indoor positioning method and system that can improve the positioning accuracy and robustness in complex indoor environments. Summary of the Invention

[0007] The object of the present invention is to provide an adaptive indoor positioning method and system based on a deep regression model and a KL-Huber hybrid loss function to solve the problem of insufficient positioning accuracy and robustness of existing indoor positioning technologies in complex indoor environments.

[0008] To solve the above technical problems, in a first aspect, the present invention provides an adaptive indoor positioning method based on a deep regression model and a KL-Huber hybrid loss function, including the steps of:

[0009] Data collection and preprocessing, collecting CSI data in the target indoor environment and preprocessing the collected CSI data;

[0010] Constructing an RKnet positioning model and its RKLoss loss function; the RKnet positioning model predicts the location of the positioning target according to the preprocessed CSI data; the RKLoss loss function combines KL divergence and Huber loss and optimizes the RKnet positioning model through a positive and negative sample mining mechanism;

[0011] Model training, training the RKnet positioning model using the preprocessed CSI data, and adjusting the parameters of the RKnet positioning model by minimizing the RKLoss; then performing location prediction on real-time CSI data based on the trained RKnet positioning model.

[0012] Furthermore, the preprocessing steps of the CSI data include:

[0013] Outlier detection and repair: Traverse the CSI data to locate all null values in the CSI data, and replace the null values with the mean value of the valid data in the same channel;

[0014] Data standardization: Perform standardization processing on the CSI data using the Z-score method;

[0015] Data segmentation: Divide each CSI data sample into 50 time series blocks, and the size of each time series block is 3×30×30.

[0016] Furthermore, the RKnet localization model includes:

[0017] Residual module: Used to extract the feature map of the CSI data;

[0018] Squeeze-and-Excitation module: Used to adaptively learn the relationship between the channels of the feature map and adaptively adjust the weight of each channel in the feature map according to the importance of different channels;

[0019] Fully connected regression layer: Used to map the feature map into two-dimensional coordinates to obtain the predicted localization coordinates;

[0020] Furthermore, the residual module includes two convolutional layers, and a batch normalization layer and a ReLU activation function are provided after each convolutional layer.

[0021] Furthermore, the Squeeze-and-Excitation module realizes its function through the following steps:

[0022] Squeeze: Obtain the batch size and the number of channels of the input feature map, and then use the adaptive average pooling layer to perform global average pooling on the input feature map to compress the feature map of each channel into a scalar to generate a feature vector;

[0023] Excite: Generate the channel weight of each channel through two layers of first fully connected layers; among them, the first layer of the first fully connected layer is used to compress the dimension of the feature vector to C / 16 and introduce non-linear features through the ReLU activation function; the second layer of the first fully connected layer is used to restore the dimension of the feature vector to the original number of channels;

[0024] Scale: Multiply the channel weight and the feature map channel by channel.

[0025] Furthermore, the fully connected regression layer includes three layers of second fully connected layers. The feature map is gradually reduced in dimension through the three layers of the second fully connected layers and finally mapped into two-dimensional coordinates to obtain the predicted localization coordinates (x, y).

[0026] Furthermore, the construction method of the RKLoss function includes:

[0027] Softmax coordinate transformation, converting the predicted positioning coordinates into a probability distribution through the SoftMax function;

[0028] KL divergence metric, calculating the KL divergence between the predicted distribution and the true distribution, defining samples with KL divergence lower than the threshold as positively correlated points, and samples higher than the threshold as negatively correlated points;

[0029] Weighted Huber loss, using the Huber loss loss in the form of mean squared error for positive samples xp , and using the Huber loss loss with an amplified error term for negative samples xp , obtaining the total loss as: loss RK = loss xp + loss xp .

[0030] Furthermore, the Huber loss loss in the form of mean squared error xp is:

[0031]

[0032] The Huber loss loss with the amplified error term xp is:

[0033]

[0034] where u xp is the residual between the actual point and the projected position, and u xn is the difference between the actual coordinates and the predicted coordinates of the negatively correlated points; K m is the mean value of the KL divergence.

[0035] Furthermore, the method further includes:

[0036] Model verification and evaluation, evaluating the RKnet positioning model on the validation set and the test set, and calculating its positioning accuracy.

[0037] In a second aspect, the present invention provides an indoor positioning system based on the above method, including:

[0038] A data acquisition and preprocessing module, configured to obtain CSI data in real time and preprocess the collected CSI data;

[0039] An RKnet positioning model module, configured to extract features of the preprocessed CSI data and output predicted positioning coordinates according to the extracted features;

[0040] A positioning output module for visualizing or transmitting the positioning result corresponding to the predicted positioning coordinates.

[0041] The beneficial effects of the present invention are as follows: By establishing an RKnet positioning model integrating a residual attention mechanism, the spatio-temporal expression ability of CSI features is effectively enhanced, and the robustness of the network to noise and interference in complex environments is significantly improved; By constructing a customized loss function RKLoss combining the Huber loss function and KL divergence, combined with a positive and negative sample mining mechanism, the numerical accuracy and spatial distribution fitting ability of the model in coordinate prediction are improved, enabling the model to more carefully learn the spatial relationship in CSI data, thereby effectively improving the positioning accuracy. Especially in complex environments, such as under the influence of multipath effects and obstacles, the positioning error is greatly reduced. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] The drawings described herein are used to provide a further understanding of the present application and form a part of the present application. The same reference numerals are used to represent the same or similar parts in these drawings. The schematic embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation of the present application. In the drawings:

[0043] Figure 1 is a schematic structural diagram of an embodiment of the present invention;

[0044] Figure 2 shows the cumulative distribution function CDF graph of the average error of the RKnet positioning model in the NLOS experiment;

[0045] Figure 3 shows the cumulative distribution function CDF graph of the RKnet positioning model in the LOS environment. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0046] In a first aspect, the present invention discloses an adaptive indoor positioning method based on a deep regression model and a KL-Huber hybrid loss function, including the steps of:

[0047] Data collection and preprocessing, using devices such as Wi-Fi routers to collect CSI data in the target indoor environment, and preprocessing the collected CSI data; The purpose of preprocessing is to convert the CSI data into a format suitable for neural network processing (for example, a two-dimensional matrix);

[0048] Construct the RKnet positioning model and its RKLoss loss function; the RKnet positioning model predicts the position of the positioning target based on the preprocessed CSI data; the RKLoss loss function combines the KL divergence and the Huber loss, and optimizes the RKnet positioning model through the positive and negative sample mining mechanism; the RKnet positioning model combines the residual module and the attention mechanism, which can significantly improve the robustness of the network to noise and interference in complex environments; by introducing the RKLoss loss function optimized by the KL divergence, the coordinate prediction in the positioning process is optimized.

[0049] Model training: Use the preprocessed CSI data to train the RKnet positioning model, and adjust the parameters of the RKnet positioning model by minimizing the RKLoss; then perform positioning prediction on the real-time CSI data based on the trained RKnet positioning model; during the training process, the gradient descent optimization algorithm (such as Adam) can be used to minimize the RKLoss and gradually adjust the network parameters to optimize the positioning accuracy and robustness.

[0050] In the present invention, by establishing the RKnet positioning model integrating the residual attention mechanism, the spatio-temporal expression ability of CSI features is effectively enhanced, and the robustness of the network to noise and interference in complex environments is significantly improved; by constructing the customized loss function RKLoss combining the Huber loss function and the KL divergence, and combining the positive and negative sample mining mechanism, the numerical accuracy and the spatial distribution fitting ability in the coordinate prediction of the model are improved, enabling the model to more carefully learn the spatial relationship in the CSI data, thereby effectively improving the positioning accuracy. Especially in complex environments, such as under the influence of multipath effects and obstacles, the positioning error is greatly reduced.

[0051] Channel State Information (CSI) is the fine-grained communication information obtained at the physical layer, which can describe the transmission characteristics of the wireless channel in detail. It is usually expressed in complex form, including the amplitude and phase information of the channel, and can also reflect key factors such as attenuation, delay, and multipath effects in the wireless channel.

[0052] The complex form of CSI is usually denoted as H, and its mathematical expression is as follows:

[0053] H = H r + H i

[0054]

[0055] where, H r is the real part, and H i is the imaginary part, and i is the imaginary unit.

[0056] When using the RKnet positioning model for positioning tasks, the amplitude with better stability is selected as the feature of CSI. Moreover, the amplitude has higher reliability in multipath propagation and non-line-of-sight (NLOS) environments, and can reduce the positioning errors caused by noise and interference.

[0057] According to an embodiment of the present application, the preprocessing steps of the CSI data include:

[0058] Outlier detection and repair: Traverse the CSI data to locate all null values in the CSI data, and replace the null values with the mean value of the valid data in the same channel; By this replacement method, the influence of noise on the data can be effectively reduced, ensuring the integrity and continuity of the data, thereby improving the reliability and stability of the model in subsequent training and prediction processes;

[0059] Data standardization: The Z-score method is used to standardize the CSI data; Through Z-score standardization, we convert the data into a form where each feature channel has a zero mean and a unit variance. Data standardization ensures that when input into the model, different features will not dominate the learning process due to scale differences, thereby avoiding the excessive influence of certain features on model training. The Z-score formula is as follows:

[0060] Z = (X - μ) / σ

[0061] Where X is the original data, μ is the average, and σ is the standard deviation;

[0062] Data segmentation: Each CSI data sample is divided into 50 time series blocks, and the size of each time series block is 3×30×30. Considering that the CSI data has 3 antennas, 30 subcarriers, and 1500 time points, in this embodiment, the CSI data is divided into smaller blocks to better process the time series features; Data segmentation helps the model to better focus on the short-term time series changes within each segment, thereby enhancing its learning and prediction capabilities based on time-related patterns.

[0063] According to an embodiment of the present application, the RKnet positioning model includes:

[0064] Residual (RB) module, used to extract the feature map of the CSI data;

[0065] Squeeze-and-Excitation (SE) module, used to adaptively learn the relationship between the channels of the feature map and adaptively adjust the weight of each channel in the feature map according to the importance of different channels;

[0066] Fully connected regression layer, used to map the feature map into two-dimensional coordinates to obtain the predicted positioning coordinates;

[0067] According to an embodiment of the present application, the residual module includes two convolutional layers, and a batch normalization layer and a ReLU activation function are provided after each convolutional layer. The residual module alleviates the problem of gradient disappearance in the training of deep neural networks, improves the convergence and training stability of the model; the skip connection further supports effective information flow and gradient propagation, and finally stabilizes the training process of the deep network.

[0068] According to an embodiment of the present application, the squeeze-and-excitation module realizes its function through the following steps:

[0069] Squeeze, obtain the batch size and number of channels of the input feature map, and then use an adaptive average pooling layer to perform global average pooling on the input feature map, compress the feature map of each channel into a scalar, and generate a feature vector; in this step, by calculating global average pooling (GlobalAveragePooling), the spatial dimension H×W of each channel is compressed into a scalar, thereby generating a feature vector that summarizes the global characteristics of each channel; this process converts the input tensor T b ×C×H×W from (b, C, H, W) to (b, C), where each element represents the average activation value of the corresponding channel; specifically, for the Cth channel, the aggregated response calculation formula is as follows:

[0070]

[0071] where, T c is the average value of the cth channel, representing the overall information of this channel. This compressed feature vector T will be passed as input to the next excitation process;

[0072] Excitation, generate the channel weights of each channel through two first fully connected layers; among them, the first first fully connected layer is used to compress the dimension of the feature vector to C / 16, and introduce non-linear features through the ReLU activation function; the second first fully connected layer is used to restore the dimension of the feature vector T to the original number of channels; at this stage, two fully connected operations are performed on the descriptor feature vector T of each channel to generate adaptive channel weights; the first fully connected layer reduces the channel dimension C of the feature vector T to C / reduction (here 16 can be used) to compress the channel information, and introduces non-linear features through the ReLU activation function; subsequently, the second fully connected layer restores the dimension to the number of channels, and uses the Sigmoid activation function to limit the weight of each channel within the interval [0,1];

[0073] Z = ReLU(W1·T + b1)

[0074] S = Sigmoid(W2·z + b2)

[0075] Among them, W1 and W2 are the weight matrices of the fully connected layers, and b1 and b2 are the bias terms. The generated weight vector S represents the adaptive importance of each channel.

[0076] Scaling, multiplying the channel weights with the feature map channel by channel, so as to achieve adaptive weighting of important channels:

[0077] T out = T × S

[0078] Among them, the weight S is expanded to the shape (b, C, H, W). This weighting process can enhance the attention to important channels while suppressing the information of unimportant channels. Through these three steps of compression, excitation, and scaling, the SE module realizes the adaptive weighting of each channel, thereby improving the model's ability to identify important features.

[0079] According to an embodiment of the present application, the fully connected regression layer includes three layers of second fully connected layers (FC). The feature map is gradually reduced in dimension through the three layers of the second fully connected layers and finally mapped to two-dimensional coordinates to obtain the predicted positioning coordinates (x, y) = FC(R b×C×H×W ). By gradually reducing the dimension, the model can extract important spatial information from R and accurately map it to the two-dimensional coordinate space to achieve accurate positioning.

[0080] According to an embodiment of the present application, the construction method of the RKLoss loss function includes:

[0081] Softmax coordinate transformation, converting the predicted positioning coordinates into a probability distribution through the SoftMax function; this step associates the coordinate values with the probability distribution, ensuring that all output values are within the interval (0, 1) and their sum is 1. The calculation formula of the SoftMax function for the j-th coordinate of each sample i is as follows:

[0082]

[0083] Among them, the original coordinate value z ij is converted into a probability distribution P ij ; Therefore, the SoftMax function enhances the interpretability and effectiveness of the model in the decision-making process by mapping the original coordinates to the probability space;

[0084] KL divergence metric, calculating the KL divergence between the predicted distribution and the true distribution, and defining the samples with KL divergence lower than the threshold as positively correlated points and those higher than the threshold as negatively correlated points; using the KL divergence as the metric standard for mining positive and negative point sets, and then calculating after converting the two-dimensional coordinates into a probability distribution; for highly correlated points x p, hoping that its probability distribution is highly similar to the target distribution, thus minimizing the KL divergence; on the contrary, the negatively correlated points x n should not have sufficient similarity to the target distribution; therefore, the mean K of the KL divergence m is used as a criterion to derive the positive and negative point sets:

[0085]

[0086] Here we use the discrete expression of the KL divergence to obtain the corresponding negatively correlated point set KL:

[0087]

[0088] By analyzing the positive and negative correlated point sets, we can obtain detailed feature representations. This method can effectively distinguish the similarities and differences between samples, thus promoting the optimization in the selection of the Huber loss function.

[0089] Weighted Huber loss, the samples in the positive correlated dataset are highly consistent with the target distribution, providing important signals to help the model focus on key elements; in this case, the positive correlated point set uses the quadratic term to calculate the loss function, thus achieving a smooth loss within a smaller error range, which helps the adjustment of the model prediction. Therefore, the Huber loss loss in the form of mean squared error is adopted for positive samples xp ; the negative sample set contains data that significantly deviates from the true distribution, helping the model discover potential defects, prevent overfitting, and improve the robustness of the model; the loss function amplifies the loss of misclassified samples, forcing the model to pay attention to these deviations and make adjustments. Therefore, the Huber loss loss with an amplified error term is adopted for negative samples xp , and the total loss is obtained as: loss RK = loss xp + loss xp , through backpropagation optimization, the model will gradually improve the position accuracy and robustness throughout the training process.

[0090] According to an embodiment of the present application, the Huber loss loss in the form of mean squared error xp is:

[0091]

[0092] The Huber loss loss with an amplified error term xp is:

[0093]

[0094] where, u xp is the residual between the actual point and the projected position, uxn is the difference between the actual coordinates and the predicted coordinates of the negatively correlated points; K m is the mean value of the KL divergence.

[0095] Huber loss xp and the Huber loss xp The combination of these two loss functions enhances the learning process of the model, thereby improving the prediction accuracy and the generalization ability in complex tasks. The comprehensive feature representation and loss function selection provide strong support for the model in different application scenarios.

[0096] According to an embodiment of the present application, the method further includes:

[0097] Model verification and evaluation, evaluating the RKnet positioning model on the validation set and the test set, and calculating its positioning accuracy.

[0098] In a second aspect, the present invention discloses an indoor positioning system based on the above method, including:

[0099] A data acquisition and preprocessing module, configured to obtain CSI data in real time and preprocess the collected CSI data;

[0100] An RKnet positioning model module, configured to extract features of the preprocessed CSI data and output predicted positioning coordinates according to the extracted features;

[0101] A positioning output module, configured to visualize or transmit the positioning result corresponding to the predicted positioning coordinates.

[0102] To verify the effects in the present application, the present application tested the performance differences between the RKnet positioning model and other CSI indoor positioning models; specifically as follows:

[0103] The CSI data used in the experiment was CSI indoor data collected in the actual environment. The size of the NLOS environment is 13.5×11m 2 , the spacing between sampling points is 0.5m, and there are a total of 317 coordinate points. The size of the LOS environment is 10.5×12m 2 , the spacing between sampling points is 0.6m, and there are a total of 176 coordinate points. For the NLOS dataset, we use 80% of the data for model training, 10% for validation, and the remaining 10% for final testing to evaluate the performance of the model. For the LOS dataset, 70% of the data is used for training, 15% for validation, and 15% for testing.

[0104] When training the RKnet localization model, the batch size is set to 32, and the convolutional layer is configured for feature extraction. A 3×3 convolutional kernel is mainly used, and ReLU is always used as the activation function. The RKnet localization model is optimized using the Adam optimizer with a learning rate of 10^-3 and a training period of 100 times. The RKnet localization model that performs best on the validation set is selected as the final model. The performance of the localization algorithm is evaluated by the average position error, and the calculation formula is:

[0105]

[0106] where (x i y i ) are the predicted coordinates, is the corresponding true coordinate.

[0107] In the experiment, the effectiveness of the method is compared by comparing it with four machine learning and deep learning regression algorithms and a time series regression algorithm. These comparison algorithms include WKNN, SVR, NN, MLP, LSTM, BLS, and SWIM. Due to the time series characteristics of CSI data, LSTM is introduced as a time series regression model for comparison. Selecting these algorithms provides us with a multi-angle benchmark reference to help comprehensively evaluate the superior performance of the proposed method in terms of localization accuracy.

[0108] Figure 2 shows the cumulative distribution function CDF graph of the average error of the RKnet localization model in the NLOS experiment; Figure 3 shows the cumulative distribution function CDF graph of the RKnet localization model in the LOS environment. Table 1 gives the average error and standard deviation in the NLOS environment.

[0109] Table 1

[0110]

[0111]

[0112] After analysis, the RKnet localization model achieved an average error of 3.0906m and a standard deviation of 1.6949m in the NLOS environment, demonstrating its superior localization accuracy; in the LOS environment, the RKnet localization model had an average localization error of 2.3382m and a standard deviation of 1.3090m, ranking first among all models. It can be seen that in both environments, the RKnet localization model demonstrated excellent localization performance, not only providing better localization error in the complex NLOS environment but also adapting to the channel characteristics in the relatively simple LOS environment, showing strong generalization ability and robustness.

[0113] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present invention, and they should all be covered within the scope of the claims of the present invention.

Claims

1. An adaptive indoor positioning method based on a deep regression model and a KL-Huber hybrid loss function, characterized in that, Including the steps: Data collection and preprocessing, collecting CSI data in the target indoor environment and preprocessing the collected CSI data; Constructing the RKnet positioning model and its RKLoss loss function; the RKnet positioning model predicts the position of the positioning target according to the preprocessed CSI data; the RKLoss loss function combines the KL divergence and the Huber loss, and optimizes the RKnet positioning model through the positive and negative sample mining mechanism; Model training, using the preprocessed CSI data to train the RKnet positioning model, and adjusting the parameters of the RKnet positioning model by minimizing the RKLoss; then performing positioning prediction on the real-time CSI data based on the trained RKnet positioning model.

2. The adaptive indoor positioning method based on a deep regression model and a KL-Huber hybrid loss function according to claim 1, wherein The preprocessing steps of the CSI data include: Outlier detection and repair, traversing the CSI data, locating all null values in the CSI data, and replacing the null values with the mean value of the valid data in the same channel; Data standardization, performing standardization processing on the CSI data using the Z-score method; Data segmentation, dividing each CSI data sample into 50 time series blocks, and the size of each time series block is 3×30×30.

3. The adaptive indoor positioning method based on a deep regression model and a KL-Huber hybrid loss function according to claim 1, wherein The RKnet positioning model includes: Residual module, used to extract the feature map of the CSI data; Squeeze-and-Excitation module, used to adaptively learn the relationship between the channels of the feature map, and adaptively adjust the weight of each channel in the feature map according to the importance of different channels; Fully connected regression layer, used to map the feature map into two-dimensional coordinates to obtain the predicted positioning coordinates.

4. The adaptive indoor positioning method based on the depth regression model and the KL-Huber hybrid loss function according to claim 3, wherein The residual module includes two convolutional layers, and a batch normalization layer and a ReLU activation function are provided after each convolutional layer.

5. The adaptive indoor positioning method based on a deep regression model and a KL-Huber hybrid loss function according to claim 4, wherein The Squeeze-and-Excitation module realizes its function through the following steps: Squeeze, obtaining the batch size and the number of channels of the input feature map, and then using the adaptive average pooling layer to perform global average pooling on the input feature map, compressing the feature map of each channel into a scalar to generate a feature vector; Excite, generating the channel weight of each channel through two first fully connected layers; among them, the first first fully connected layer is used to compress the dimension of the feature vector to C / 16 and introduce non-linear features through the ReLU activation function; the second first fully connected layer is used to restore the dimension of the feature vector to the original number of channels; Scale, multiplying the channel weight and the feature map channel by channel.

6. The adaptive indoor positioning method based on a deep regression model and a KL-Huber hybrid loss function according to claim 5, wherein The fully connected regression layer includes three second fully connected layers, and the feature map gradually reduces the dimension of the feature map through the three second fully connected layers and finally maps it into two-dimensional coordinates to obtain the predicted positioning coordinates (x, y).

7. The adaptive indoor positioning method based on the deep regression model and the KL-Huber hybrid loss function according to claim 1, characterized in that The construction method of the RKLoss loss function includes: Softmax coordinate transformation, converting the predicted positioning coordinates into a probability distribution through the SoftMax function; KL divergence metric, calculating the KL divergence between the predicted distribution and the true distribution, defining the samples with KL divergence lower than the threshold as positive correlation points, and the samples higher than the threshold as negative correlation points; The weighted Huber loss uses the Huber loss in the form of mean squared error for positive samples xp , and uses the Huber loss with an amplified error term for negative samples xp , and the total loss is obtained as: loss RK = loss xp + loss xp .

8. The adaptive indoor positioning method based on a deep regression model and a KL-Huber hybrid loss function according to claim 7, characterized in that, The Huber loss in the form of mean square error xp is as follows: The Huber loss of the amplified error term xp is as follows: where, u xp is the residual between the actual point and the projection position, and u xn is the difference between the actual coordinates and the predicted coordinates of the negatively correlated points; K m is the mean value of the KL divergence.

9. The adaptive indoor positioning method based on a deep regression model and a KL-Huber hybrid loss function according to claim 1, wherein This method also includes: Model verification and evaluation, the RKnet positioning model is evaluated on the validation set and the test set, and its positioning accuracy is calculated.

10. An indoor positioning system based on the method according to any one of claims 1-9, characterized in that, It includes: Data acquisition and preprocessing module, which is used to obtain CSI data in real time and preprocess the collected CSI data; RKnet positioning model module, which is used to extract the features of the preprocessed CSI data and output the predicted positioning coordinates according to the extracted features; Positioning output module, which is used to visualize or transmit the positioning results corresponding to the predicted positioning coordinates.