CN117062002B - 5G NR indoor positioning method and system based on lightweight TRANSFORMER - Google Patents

5G NR indoor positioning method and system based on lightweight TRANSFORMER Download PDF

Info

Publication number
CN117062002B
CN117062002B CN202310957628.XA CN202310957628A CN117062002B CN 117062002 B CN117062002 B CN 117062002B CN 202310957628 A CN202310957628 A CN 202310957628A CN 117062002 B CN117062002 B CN 117062002B
Authority
CN
China
Prior art keywords
matrix
output
attention mechanism
data
relu
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202310957628.XA
Other languages
Chinese (zh)
Other versions
CN117062002A (en
Inventor
李伟
孟祥旭
郑文祺
刘芷含
赵铮
蔡易楠
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Harbin Engineering University
Original Assignee
Harbin Engineering University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Harbin Engineering University filed Critical Harbin Engineering University
Priority to CN202310957628.XA priority Critical patent/CN117062002B/en
Publication of CN117062002A publication Critical patent/CN117062002A/en
Application granted granted Critical
Publication of CN117062002B publication Critical patent/CN117062002B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/02Services making use of location information
    • H04W4/029Location-based management or tracking services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/02Services making use of location information
    • H04W4/025Services making use of location information using location based information parameters
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/30Services specially adapted for particular environments, situations or purposes
    • H04W4/33Services specially adapted for particular environments, situations or purposes for indoor environments, e.g. buildings
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Image Analysis (AREA)

Abstract

A5G NR indoor positioning method and system based on lightweight TRANSFORMER relates to the technical field of computers, in particular to the technical field of machine learning in computers. The method solves the problems of low positioning precision, low efficiency and difficult deployment caused by the limited subcarrier sensing range of the existing indoor fingerprint positioning method. The method comprises the following steps: processing the CSI input data by adopting a rectangular image block operation module with independent channels to obtain an output matrix; converting the three-dimensional matrix of the output matrix into a two-dimensional matrix compatible with an attention mechanism by adopting Reshape () function; inputting the two-dimensional matrix compatible with the attention mechanism into a multichannel attention mechanism module based on ReLU to obtain final output data; and carrying out position location on the final output data by adopting a position mapping module to obtain a mapping position. The invention is suitable for a 5G NR indoor positioning method based on lightweight TRANSFORMER in a computer.

Description

5G NR indoor positioning method and system based on lightweight TRANSFORMER
Technical Field
The present invention relates to the field of computer technology, and in particular, to the field of machine learning technology in computers.
Background
Indoor fingerprint positioning based on channel state Information (CHANNEL STATE Information, CSI) is widely used in the fields of indoor navigation, personnel tracking, etc. In addition, the rapid development of 5G technology has led to wider channel bandwidths, richer space-time channel descriptions, and larger amounts of data. Thus, 5G CSI may provide more channel information, which brings new features and challenges to CSI-based fingerprinting.
At present, the indoor fingerprint positioning methods applied in engineering practice can be mainly divided into the following two types:
(1) Machine learning-based methods such as patent literature published in 2020, 03, 27: CN110933604A discloses a KNN indoor positioning method based on time sequence characteristics of position fingerprints, the method obtains front K similar position fingerprints by calculating the similarity between the position at the current moment and the historical position fingerprints, then calculates the distance between each position fingerprint in the front K similar position fingerprints and the positioning result at the previous moment to obtain the estimated distance, then calculates the offset and weight of the front K similar position fingerprints respectively, and performs weighted summation on the position coordinates of the front K similar position fingerprints to obtain the position coordinates at the current moment to finish positioning. But this method cannot effectively utilize the higher information richness and feature resolution provided by the 5G CSI, resulting in lower accuracy and efficiency of indoor positioning.
(2) Deep learning-based methods such as patent literature published at 2022, 03, 15: CN114189809A discloses an indoor positioning method based on a convolutional neural network and high-dimensional 5G observation characteristics, and the method is used for obtaining a convolutional neural network position classification model by constructing an offline image fingerprint library and utilizing fingerprint library training. And then, processing the 5G observation value acquired by the target equipment at the test point, inputting the processed 5G observation value into a convolutional neural network position classification model, and obtaining the positioning coordinates of the test point by a probability weighted centroid method to finish positioning. The method can better process large-scale and high-dimensional data, and can automatically learn more abstract and higher-level characteristic representations, thereby improving the performance and accuracy of the model, but has the problems of difficult deployment on equipment, gradient elimination of a cyclic neural network and explosion.
Disclosure of Invention
The invention solves the problems of low positioning precision, low efficiency and difficult deployment caused by the limited subcarrier sensing range of the existing indoor fingerprint positioning method.
In order to achieve the above object, the present invention provides the following solutions:
The invention provides a 5G NR indoor positioning method based on a lightweight TRANSFORMER, which comprises the following steps:
S1, processing CSI input data by adopting a rectangular image block operation module with independent channels to obtain an output matrix;
s2, converting the three-dimensional matrix of the output matrix into a two-dimensional matrix compatible with an attention mechanism by adopting Reshape () function;
s3, inputting the two-dimensional matrix compatible with the attention mechanism into a multichannel attention mechanism module based on the ReLU to obtain final output data;
s4, adopting a position mapping module to position and locate the final output data to obtain a mapping position.
Further, in a preferred embodiment, the processing flow of the channel-independent rectangular image block operation module in the step S1 is as follows:
S11, dividing the CSI input data according to different channels to obtain H i data;
s12, performing image block operation on the H i data by adopting a convolution-based image block to obtain an output matrix.
Further, in a preferred embodiment, the formula of the convolution-based image block in the step S12 is expressed as:
Hp=Concat(P(H0,:),P(H1,:),...,P(HC,:));
Wherein, For the obtained output, H i is the data of the ith channel, C is the number of input channels, C' is the number of output channels, W is the input width, L is the input length, K w is the width of the convolution kernel for block-based convolution, K l is the length of the convolution kernel for block-based convolution,/>For an output width obtained by dividing an input width by a kernel width,/>Is the output length obtained by inputting the input through the input core length.
Further, in a preferred embodiment, the step of setting the image block based on convolution in the step S12 is:
The fill element is set to 0, K w is set to 8,K l to 13;
The stride in the width direction is set equal to the width of the convolution kernel, and the stride in the length direction is set equal to the length of the convolution kernel.
Further, in a preferred embodiment, the processing flow of the multi-channel attention mechanism module based on ReLU in step S3 is as follows:
s31, performing format conversion on the two-dimensional matrix compatible with the attention mechanism to obtain a converted two-dimensional matrix;
s32, performing dimension transformation on the converted two-dimensional matrix to obtain a transformed two-dimensional matrix;
S33, carrying out query processing on the transformed two-dimensional matrix by adopting a formula based on a ReLU attention mechanism to obtain a parameter matrix W q, a key generation parameter matrix W k and a value generation parameter matrix W v;
S34, calculating the parameter matrix W q, the key generation parameter matrix W k and the value generation parameter matrix W v by adopting a scoring formula based on a ReLU attention mechanism to obtain score data;
s35, normalizing the score data to obtain final score data;
S36, processing the final score data by adopting a ReLU activation function, multiplying the processed result points by a value to generate a parameter matrix W v, and accumulating to obtain a final result X matrix;
S37, inputting the final result X matrix into an attention mechanism module, and sequentially processing through a normalization layer, an attention layer and a normalization layer to obtain output data X output;
S38, inputting the output data X output into a multi-layer perceptron layer to obtain final output data X output.
Further, in a preferred embodiment, the formula based on the ReLU attention mechanism in the step S33 is expressed as:
Xoutput=Att(LN(Non-Trans(X)))+X;
where Non-Trans is unchanged dimension, LN is layer norm regularization, and Att is a ReLU-based attention mechanism.
Further, in a preferred embodiment, the score formula of the attention mechanism of the ReLU in step S34 is expressed as:
score=ReLU(WqX)(ReLU(WkX)·ReLU(WvX))。
The invention provides a 5GNR indoor positioning method based on a lightweight TRANSFORMER, which can be realized by adopting computer software, so that the invention also provides a 5GNR indoor positioning system based on a lightweight TRANSFORMER, which comprises the following steps:
The storage device is used for processing the CSI input data by adopting a rectangular image block operation module with independent channels to obtain an output matrix;
A storage means for converting the three-dimensional matrix of the output matrix into a two-dimensional matrix compatible with an attention mechanism;
A storage means for inputting the two-dimensional matrix compatible with the attention mechanism into a ReLU-based multi-channel attention mechanism module using Reshape () function to obtain final output data;
And the storage device is used for carrying out position positioning on the final output data by adopting a position mapping module to obtain a mapping position.
The invention also provides a computer readable storage medium, wherein a computer program is stored on the computer readable storage medium, and the computer program is executed by a processor to execute the 5GNR indoor positioning method based on the lightweight TRANSFORMER.
The invention also provides a computer device, which comprises a memory and a processor, wherein the memory stores a computer program, and when the processor runs the computer program stored in the memory, the processor executes the 5G NR indoor positioning method based on the lightweight TRANSFORMER.
The beneficial effects of the invention are as follows:
1. The invention provides a 5G NR indoor positioning method based on a lightweight TRANSFORMER, which is characterized in that CSI data is converted into a signal capable of adapting to the input of an attention mechanism by using a convolution-based image block operation on the CSI data in a rectangular image block operation module with independent channels, so that the subsequent attention calculation process is facilitated; the modeling dimension is concentrated on the channel dimension of the vector in the multichannel attention mechanism module based on the ReLU, so that interaction among subcarriers from a plurality of base stations can be modeled, and meanwhile, an attention mechanism of functional interaction is provided, so that faster and better performance is realized. The existing indoor fingerprint positioning method has the problems of low positioning precision and low efficiency due to limited subcarrier sensing range.
2. The invention provides a 5G NR indoor positioning method based on a lightweight TRANSFORMER, which replaces a hardware-unfriendly Softmax attention mechanism by using the attention mechanism based on Relu, so that the method can be deployed more easily even on equipment with limited resources, thereby solving the problem that the existing indoor fingerprint positioning method is difficult to deploy.
The invention is suitable for a 5G NR indoor positioning method based on lightweight TRANSFORMER in a computer.
Drawings
FIG. 1 is a flow chart of a lightweight TRANSFORMER-based 5G NR indoor positioning method according to one embodiment;
FIG. 2 is a flow chart of a process of a channel independent rectangular tile operation module according to the second embodiment;
FIG. 3 is a flow chart of a process of a ReLU-based multichannel attention mechanism module according to an embodiment five;
fig. 4 (a) is a graph comparing the results of different methods under the SNR10 dataset according to embodiment eleven;
fig. 4 (b) is a graph comparing the results of different methods under SNR20 data set according to embodiment eleven;
Fig. 4 (c) is a graph comparing the results of different methods under the SNR50 data set according to the eleventh embodiment;
fig. 5 is a diagram comparing the error magnitude of the 5G NR indoor positioning method based on the lightweight TRANSFORMER according to the first embodiment with the existing positioning method.
Where SNR is the signal-to-noise ratio.
Detailed Description
The following describes in further detail the embodiments of the present invention with reference to the drawings and examples. The following examples will assist those skilled in the art in further understanding the present invention, but are not intended to limit the invention in any way. It should be noted that variations and modifications can be made by those skilled in the art without departing from the spirit of the invention, which falls within the scope of the invention.
Referring to fig. 1, the present embodiment provides a 5G NR indoor positioning method based on lightweight TRANSFORMER, where the method is as follows:
S1, processing CSI input data by adopting a rectangular image block operation module with independent channels to obtain an output matrix;
s2, converting the three-dimensional matrix of the output matrix into a two-dimensional matrix compatible with an attention mechanism by adopting Reshape () function;
s3, inputting the two-dimensional matrix compatible with the attention mechanism into a multichannel attention mechanism module based on the ReLU to obtain final output data;
s4, adopting a position mapping module to position and locate the final output data to obtain a mapping position.
In practical application, the embodiment comprises a rectangular image block operation module with independent channels, a multichannel attention mechanism module based on ReLU and a position mapping module. First, after frequency division multiplexing demodulation and time offset correction of a received signal, a user equipment can obtain a reception resource grid. The received resource grid is defined as rxGrid and the known pilots are defined as refGrid, so each antenna can be represented as H raw=(rxGrid)k×1/(refGrid)k×1 with a k-dimensional vector, where k represents the number of subcarriers and H raw represents the channel impulse response.
The subcarriers of a single antenna may be denoted as H i∈R1×k, while the overall subcarriers of a 5G base station with multiple inputs and multiple outputs may be denoted as H' e R n×k, where n denotes the number of antennas. In a typical indoor positioning task, multiple base stations may be involved, so the overall CSI data may be denoted as H e R b×n×k, where b represents the number of base stations.
The fingerprint-based indoor positioning overall framework consists of two stages, offline and online, i.e. training and testing, respectively. The goal of this framework is to learn a mapping method with good generalization performance by using training dataset Ctrain={(csi1,loc1),(csi2,loc2),...,(csin,locn)} to enable optimal positioning performance on test data Cquery={(csin+1,locn+1),(csin+2,locn+2),...,(csim,locm)}. Wherein the training data and the test data are both composed of a set of paired data in which CSI i represents CSI data and loc i represents position data.
In the offline phase, a deep learning based mapping method is utilized to minimize the loss function, wherein the predicted locations are represented by the output of the mapping method and the actual locations are represented as ground truth. The mapping method based on deep learning has a small number of parameters and exhibits high positioning accuracy on test data.
When the method is applied, the input data are divided into different data to be operated: for a given CSI input data H, H is divided according to different channels of H, resulting in H i, where subscript i of H i represents the i-th channel of H.
Performing channel independent rectangular image block operation on data to be operated: and performing channel independent rectangular image block operation on the preprocessed data to be operated and the given convolution-based image block operation P, wherein a specific formula is shown as follows.
Hp=Concat(P(H0,:),P(H1,:),...,P(HC,:));
Wherein the method comprises the steps ofThe subscript i of H i denotes the ith channel of H, C and C' denote the number of input and output channels, respectively, W and L denote the input width and length, respectively, and K w and K l denote the width and length of the convolution kernel for block-based convolution, respectively,/>And/>The output width and length obtained by dividing the input width and length by the kernel width and length are respectively represented.
Setting related parameters: the padding element is set to 0, K w to 8, K l to 13, the stride in the width direction to be equal to the width of the convolution kernel, and the stride in the length direction to be equal to the length of the convolution kernel.
And (3) performing a remolding operation on the output matrix: the resulting output H p was subjected to Reshape (remodelling) operation, which resulted in the conversion of H p from a three-dimensional matrix to a two-dimensional matrix compatible with the attention mechanism.
ReLU-based multichannel attention mechanism operation: dimension transform is performed on input X:
let x=w i be the number, The dimension transformation is performed on X, and a specific description formula is shown as follows.
For example, define X as a matrix:
The dimension transformation of X according to the transformation formula can be obtained:
By this operation, the input X is enabled to adapt to the attention mechanism.
Calculation of self-attention layer: first, a query generation parameter matrix W q, a key generation parameter matrix W k, and a value generation parameter matrix W v of X are calculated, and then a score is calculated according to the three generation parameter matrices of X, and a specific calculation formula is shown below.
score=ReLU(WqX)(ReLU(WkX)·ReLU(WvX));
For gradient stabilization, regularization is performed on the calculated score to obtain the final score, and a specific regularization formula is shown below.
Where α is a regularization constant, which is set to 1×10 -15.
The use of the ReLU activation function for score makes score positive or 0 faster than the normal use of the softmax activation function.
And multiplying the obtained result point by the W v value to obtain a weighted score V of each input vector, and adding to obtain a final output result matrix X.
Feature fusion based on multi-layer self-attention layers:
The above process is repeated for a plurality of times by building a plurality of self-attention layers, normalization operation is performed through a normalization layer, and output and input after attention calculation are overlapped each time, and a specific flow description formula is shown as follows.
Xoutput=Att(LN(Non-Trans(X)))+X;
And (3) position mapping, namely inputting the output obtained from the attention mechanism module into a position mapping module formed by the full connection layer for position location. The position mapping module consists of a layer of full-connection layer, and the specific description formula is shown as follows:
(X,Y,Z)=Linear(LN(Xoutput));
Where LN represents the layer norm and Linear represents a simple Linear layer.
The embodiment provides a 5GNR indoor positioning method based on a lightweight TRANSFORMER, which transforms CSI data into a signal capable of adapting to the input of an attention mechanism by using a convolution-based image block operation on the CSI data in a rectangular image block operation module with independent channels, so that the subsequent attention calculation process is facilitated; the modeling dimension is concentrated on the channel dimension of the vector in the multichannel attention mechanism module based on the ReLU, so that interaction among subcarriers from a plurality of base stations can be modeled, and meanwhile, an attention mechanism of functional interaction is provided, so that faster and better performance is realized. The existing indoor fingerprint positioning method has the problems of low positioning precision, low efficiency and difficult deployment caused by limited subcarrier sensing range.
Referring to fig. 2, the present embodiment is an example of a processing flow of the channel-independent rectangular image block operation module of step S1 in the 5G NR indoor positioning method based on the lightweight TRANSFORMER according to the first embodiment, where the processing flow is:
S11, dividing the CSI input data according to different channels to obtain H i data;
s12, performing image block operation on the H i data by adopting a convolution-based image block to obtain an output matrix.
In practical application, as shown in fig. 2, the present embodiment performs the image block operation on the data H i of the ith channel of the different given input H by using the formula H p=Concat(P(H0,:),P(H1,:),...,P(HC,:).
Wherein the method comprises the steps ofThe subscript i of H i denotes the ith channel of H, C and C' denote the number of input and output channels, respectively, W and L denote the input width and length, respectively, and K w and K l denote the width and length of the convolution kernel for block-based convolution, respectively,/>And/>The output width and length obtained by dividing the input width and length by the kernel width and length are respectively represented.
The padding element is set to 0, and furthermore the stride in the width direction is set to be equal to the width of the convolution kernel, and the stride in the length direction is set to be equal to the length of the convolution kernel. K w is set to 8 and K l is set to 13. Because the specific aspect ratio of CSI requires such a design to extract features efficiently. A smaller value of 8 corresponds to a smaller antenna size and a larger value of 13 corresponds to a larger subcarrier size.
The obtained output matrix H p is represented by a formulaAnd performing dimension conversion of the matrix to obtain a two-dimensional matrix output H p compatible with the attention mechanism.
The obtained outputThe interactions between subcarriers from multiple base stations are modeled by a multichannel attention mechanism module based on ReLU.
In the third embodiment, the formula of the convolution-based image block in step S12 in the 5GNR indoor positioning method based on the lightweight TRANSFORMER according to the second embodiment is illustrated, where the formula of the convolution-based image block is expressed as:
Hp=Concat(P(H0,:),P(H1,:),...,P(HC,:));
Wherein, For the obtained output, H i is the data of the ith channel, C is the number of input channels, C' is the number of output channels, W is the input width, L is the input length, K w is the width of the convolution kernel for block-based convolution, K l is the length of the convolution kernel for block-based convolution,/>For an output width obtained by dividing an input width by a kernel width,/>Is the output length obtained by inputting the input through the input core length.
In the fourth embodiment, the step of setting the image block based on convolution in step S12 in the 5G NR indoor positioning method based on the lightweight TRANSFORMER according to the second embodiment is illustrated, where the step of setting is:
The fill element is set to 0, K w is set to 8,K l to 13;
The stride in the width direction is set equal to the width of the convolution kernel, and the stride in the length direction is set equal to the length of the convolution kernel.
In the present embodiment, in practical application, the padding element is set to 0, and furthermore, the step in the width direction is set to be equal to the width of the convolution kernel, and the step in the length direction is set to be equal to the length of the convolution kernel. K w is set to 8 and K l is set to 13. Because the specific aspect ratio of CSI requires such a design to extract features efficiently. A smaller value of 8 corresponds to a smaller antenna size and a larger value of 13 corresponds to a larger subcarrier size.
Referring to fig. 3, the present embodiment is an illustration of a processing flow of the ReLU-based multichannel attention mechanism module in step S3 in the 5G NR indoor positioning method based on the lightweight TRANSFORMER according to the first embodiment, where the processing flow is:
s31, performing format conversion on the two-dimensional matrix compatible with the attention mechanism to obtain a converted two-dimensional matrix;
s32, performing dimension transformation on the converted two-dimensional matrix to obtain a transformed two-dimensional matrix;
S33, carrying out query processing on the transformed two-dimensional matrix by adopting a formula based on a ReLU attention mechanism to obtain a parameter matrix W q, a key generation parameter matrix W k and a value generation parameter matrix W v;
S34, calculating the parameter matrix W q, the key generation parameter matrix W k and the value generation parameter matrix W v by adopting a scoring formula based on a ReLU attention mechanism to obtain score data;
s35, normalizing the score data to obtain final score data;
S36, processing the final score data by adopting a ReLU activation function, multiplying the processed result points by a value to generate a parameter matrix W v, and accumulating to obtain a final result X matrix;
S37, inputting the final result X matrix into an attention mechanism module, and sequentially processing through a normalization layer, an attention layer and a normalization layer to obtain output data X output;
S38, inputting the output data X output into a multi-layer perceptron layer to obtain final output data X output.
In practical application, as shown in fig. 3, the embodiment obtains feature information for the rectangular image block operation module with independent channelsA ReLU-based attention mechanism is employed to capture global interactions between subcarriers while maintaining equal or even better time efficiency. The output X output obtained after performing the attention computation is input into the multi-layer perceptron to increase the feature richness. And then delivering the obtained output to a position mapping module for three-dimensional coordinate positioning, and completing the positioning task.
Wherein the whole formula based on the ReLU attention mechanism is:
Xoutput=Att(LN(Non-Trans(X)))+X;
where Non-Trans represents unchanged dimension, LN represents layer norm regularization, and Att represents a ReLU-based attention mechanism.
Wherein the scoring formula for the ReLU-based attention mechanism is described as follows:
score=ReLU(WqX)(ReLU(WkX)·ReLU(WvX));
Where W q,Wk and W v represent the generation parameter matrices for the query, key, and value, respectively. By regularization The final score was obtained, where α is the regularization constant, which was set to 1×10 -15. Since the matrix multiplication of attention based on ReLU first calculates keys and values, the attention calculation is not centered on C'.
The feature matrix is in the form of an output obtained by channel independent rectangular image block operation before the input W i The dimension transformation is needed to be carried out on X, and a specific description formula of a matrix of the dimension transformation is shown as follows:
where X i represents different subcarrier characteristics from the same channel and X, y and z represent different channels from X. For ease of explanation, the weight subscript may be omitted and denoted as w, which in a broad sense represents the weight parameter. In the result of the left matrix multiplication, the form of each value is (wx 1+wx2+wx3). Instead, in the result of the right matrix multiplication, each value is in the form of (wx 1+wy1+wz1), which means that there is an interaction between the subcarriers from different channels, and this feature will be enhanced in the calculation of the following attention mechanisms. The left matrix multiplication is performed Is calculated on the format of (a).
In the sixth embodiment, the formula based on the ReLU attention mechanism in step S33 in the 5G NR indoor positioning method based on the lightweight TRANSFORMER according to the fifth embodiment is illustrated, where the formula based on the ReLU attention mechanism is expressed as:
Xoutput=Att(LN(Non-Trans(X)))+X;
where Non-Trans is unchanged dimension, LN is layer norm regularization, and Att is a ReLU-based attention mechanism.
In the fifth embodiment, a scoring formula of the attention mechanism of the ReLU in step S34 in the 5G NR indoor positioning method based on the lightweight TRANSFORMER is illustrated, where the scoring formula of the attention mechanism of the ReLU is expressed as follows:
score=ReLU(WqX)(ReLU(WkX)·ReLU(WvX))。
The eighth embodiment provides a 5G NR indoor positioning system based on a lightweight TRANSFORMER, where the system is:
The storage device is used for processing the CSI input data by adopting a rectangular image block operation module with independent channels to obtain an output matrix;
A storage means for converting the three-dimensional matrix of the output matrix into a two-dimensional matrix compatible with an attention mechanism;
A storage means for inputting the two-dimensional matrix compatible with the attention mechanism into a ReLU-based multi-channel attention mechanism module using Reshape () function to obtain final output data;
And the storage device is used for carrying out position positioning on the final output data by adopting a position mapping module to obtain a mapping position.
The ninth embodiment provides a computer-readable storage medium having a computer program stored thereon, which when executed by a processor, performs a 5G NR indoor positioning method according to any one of the first to seventh embodiments, wherein the method is based on lightweight TRANSFORMER.
In a tenth embodiment, the present embodiment provides a computer device, where the memory stores a computer program, and when the processor runs the computer program stored in the memory, the processor executes a 5G NR indoor positioning method according to any one of the first to seventh embodiments, which is based on a lightweight TRANSFORMER.
An eleventh embodiment is described with reference to fig. 4 and 5, in which a verification description is made on a 5G NR indoor positioning method according to any one of the first to seventh embodiments, which is based on a lightweight TRANSFORMER:
Three real 5G scene data sets collected in the indoor space of a new experiment building of the Beijing China academy of sciences are adopted as experimental data, and the whole indoor space is 20m x 60 m x 4 m, so that the system is a large room suitable for factories, museums and other applications. To obtain CSI, five 5G base stations were deployed at 3.5 ghz using integrated sensing and communication, with a bandwidth of 100 mhz and a power of 40 watts. These base stations are mounted on plastic supports at a height of 2.4 meters above the ground and introduce a random float height of 0.1 meters during simulation to prevent coplanarity. The user device acts as a receiver and is placed on a marked lift car at a height of 1.2 meters from the ground, simulating a person holding a mobile phone at a height of 1.8 meters. The obtained data sets comprise 4816 positioning samples, wherein three data sets correspond to different representations of CSI at SNR (signal to noise ratio) 10, SNR20 and SNR 50. To divide the dataset into training, validation and test sets, approximate 6 was used according to different signal-to-noise ratios: 2:2, 2888, 964 and 964 samples were obtained, respectively. The size of the single CSI matrix is 5×16×193, meaning that there are 5 base stations, each with 16 antennas, each with 193 subcarriers.
For a channel independent rectangular tile, K w will be set to 8 and K l will be set to 13. The dimension of the hidden layer C' is 385. The dimensions of the hidden layers in both the multi-layer perceptron module and the normalization module are 31. The final positioner uses a linear layer with an input size 385 and an output size 3.
The initial learning rate was 1×10 -4, after 100 training cycles, the learning rate was halved every 25 cycles, training round epoch was 300, and batch size batch_size was 16.
The two evaluation criteria used in the course of the experiment were root mean square error (Root Mean Square Error, RMSE),
Mean absolute error (Mean Absolute Error, MAE):
Where y i represents the predicted value of the value, Representing the true value.
The comparison method of the present embodiment includes: clnet method Complex input lightweight neural network designed for massive MIMO CSI feedback (complex input lightweight neural network designed for massive MIMO CSI feedback), KNN method: DEEP LEARNING for massive MIMO CSI feedback (deep learning of massive MIMO CSI feedback), MIMOnet method: maMIMO CSI-Based Positioning using CNNs: PEEKING INSIDE THE Black Box (MaMIMO csi positioning based on CNN: peeking inside the Black Box), hiloc method: hybrid Indoor Localization VIA ENHANCED 5G NR CSI (hybrid indoor positioning based on enhanced 5G NR CSI), 5G NR high-precision indoor positioning based on channel frequency response by SVM method :Toward 5G NR High-Precision Indoor Positioning via Channel Frequency Response:A New Paradigm and Dataset Generation Method(, a new paradigm and data set generation method, and 5G NR high-precision indoor positioning based on channel frequency response by MPRI method :Toward 5G NR High-Precision Indoor Positioning via Channel Frequency Response:A New Paradigm and Dataset Generation Method(.
Comparing the error of the method with the error of the 5G NR indoor positioning method based on the lightweight TRANSFORMER according to the present embodiment, the comparison result is shown in FIG. 5, and it can be seen from the graph that the 5G NR indoor positioning method based on the lightweight TRANSFORMER according to the present embodiment greatly reduces the error compared with the CLnet, KNN, CSInet, MIMOnet, hiloc, SVM, MPRI method, and effectively improves the prediction accuracy.
Meanwhile, by comparing the above method with the cumulative distribution function distribution of the 5G NR indoor positioning method based on the lightweight TRANSFORMER according to the present embodiment, as shown in fig. 4 (a), fig. 4 (b) and fig. 4 (c), it can be seen that the positioning accuracy of the 5G NR indoor positioning method based on the lightweight TRANSFORMER according to the present embodiment is greatly improved compared with that of the CLnet, KNN, CSInet, MIMOnet, hiloc, SVM, MPRI method.
Furthermore, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In the description of the present invention, the meaning of "plurality" means at least two, for example, two, three, etc., unless specifically defined otherwise.
In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms are not necessarily directed to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, the different embodiments or examples described in this specification and the features of the different embodiments or examples may be combined and combined by those skilled in the art without contradiction.
The above description is only an example of the present invention and is not limited to the present invention, but various modifications and changes will be apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of the claims of the present invention.

Claims (9)

1. A5G NR indoor positioning method based on lightweight TRANSFORMER is characterized by comprising the following steps:
S1, processing CSI input data by adopting a rectangular image block operation module with independent channels to obtain an output matrix;
s2, converting the three-dimensional matrix of the output matrix into a two-dimensional matrix compatible with an attention mechanism by adopting Reshape () function;
s3, inputting the two-dimensional matrix compatible with the attention mechanism into a multichannel attention mechanism module based on the ReLU to obtain final output data;
the processing flow of the multichannel attention mechanism module based on the ReLU in the step S3 is as follows:
s31, performing format conversion on the two-dimensional matrix compatible with the attention mechanism to obtain a converted two-dimensional matrix;
s32, performing dimension transformation on the converted two-dimensional matrix to obtain a transformed two-dimensional matrix;
S33, carrying out query processing on the transformed two-dimensional matrix by adopting a formula based on a ReLU attention mechanism to obtain a parameter matrix W q, a key generation parameter matrix W k and a value generation parameter matrix W v;
S34, calculating the parameter matrix W q, the key generation parameter matrix W k and the value generation parameter matrix W v by adopting a scoring formula based on a ReLU attention mechanism to obtain score data;
s35, normalizing the score data to obtain final score data;
S36, processing the final score data by adopting a ReLU activation function, multiplying the processed result points by a value to generate a parameter matrix W v, and accumulating to obtain a final result X matrix;
S37, inputting the final result X matrix into an attention mechanism module, and sequentially processing through a normalization layer, an attention layer and a normalization layer to obtain output data X output;
S38, inputting the output data X output into a multi-layer perceptron layer to obtain final output data X output;
s4, adopting a position mapping module to position and locate the final output data to obtain a mapping position.
2. The 5G NR indoor positioning method based on the lightweight TRANSFORMER according to claim 1, wherein the processing flow of the channel independent rectangular image block operation module in the step S1 is as follows:
S11, dividing the CSI input data according to different channels to obtain H i data;
s12, performing image block operation on the H i data by adopting a convolution-based image block to obtain an output matrix.
3. The 5G NR indoor positioning method based on the lightweight TRANSFORMER according to claim 2, wherein the formula of the convolution-based image block in the step S12 is expressed as:
Hp=Concat(P(H0,:),P(H1,:),...,P(HC,:));
Wherein, For the obtained output, H i is the data of the ith channel, C is the number of input channels, C' is the number of output channels, W is the input width, L is the input length, K w is the width of the convolution kernel for block-based convolution, K l is the length of the convolution kernel for block-based convolution,/>For an output width obtained by dividing an input width by a kernel width,/>Is the output length obtained by inputting the input through the input core length.
4. The method for 5G NR indoor positioning based on the lightweight TRANSFORMER according to claim 2, wherein the step of setting the image block based on convolution in the step S12 is:
The fill element is set to 0, K w is set to 8,K l to 13;
The stride in the width direction is set equal to the width of the convolution kernel, and the stride in the length direction is set equal to the length of the convolution kernel.
5. The lightweight TRANSFORMER G NR indoor positioning method according to claim 1, wherein the ReLU-based attention mechanism formula in step S33 is expressed as:
Xoutput=Att(LN(Non-Trans(X)))+X;
where Non-Trans is unchanged dimension, LN is layer norm regularization, and Att is a ReLU-based attention mechanism.
6. The 5G NR indoor positioning method based on the lightweight TRANSFORMER according to claim 1, wherein the score formula of the attention mechanism of the ReLU in the step S34 is expressed as:
7. A lightweight TRANSFORMER G NR indoor positioning system, the system being characterized by:
The storage device is used for processing the CSI input data by adopting a rectangular image block operation module with independent channels to obtain an output matrix;
A storage means for converting the three-dimensional matrix of the output matrix into a two-dimensional matrix compatible with an attention mechanism;
A storage means for inputting the two-dimensional matrix compatible with the attention mechanism into a ReLU-based multi-channel attention mechanism module using Reshape () function to obtain final output data;
The obtaining of the final output data specifically includes:
performing format conversion on the two-dimensional matrix compatible with the attention mechanism to obtain a converted two-dimensional matrix;
performing dimension transformation on the transformed two-dimensional matrix to obtain a transformed two-dimensional matrix;
Query processing is carried out on the transformed two-dimensional matrix by adopting a formula based on a ReLU attention mechanism, so as to obtain a parameter matrix W q, a key generation parameter matrix W k and a value generation parameter matrix W v;
Calculating the parameter matrix W q, the key generation parameter matrix W k and the value generation parameter matrix W v by adopting a scoring formula based on a concentration mechanism of the ReLU to obtain score data;
Normalizing the score data to obtain final score data;
processing the final score data by adopting a ReLU activation function, multiplying the processed result point by a value to generate a parameter matrix W v, and accumulating to obtain a final result X matrix;
inputting the final result X matrix into an attention mechanism module, and sequentially processing by a normalization layer, an attention layer and a normalization layer to obtain output data X output;
Inputting the output data X output into a multi-layer perceptron layer to obtain final output data X output;
And the storage device is used for carrying out position positioning on the final output data by adopting a position mapping module to obtain a mapping position.
8. A computer readable storage medium, characterized in that the computer readable storage medium has stored thereon a computer program which, when executed by a processor, performs a lightweight TRANSFORMER-based 5G NR indoor positioning method according to any one of claims 1-6.
9. A computer device, characterized by: the apparatus comprising a memory and a processor, said memory having stored therein a computer program, said processor performing a lightweight TRANSFORMER G NR indoor positioning method according to any one of claims 1-6 when said processor runs said computer program stored in said memory.
CN202310957628.XA 2023-08-01 2023-08-01 5G NR indoor positioning method and system based on lightweight TRANSFORMER Active CN117062002B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310957628.XA CN117062002B (en) 2023-08-01 2023-08-01 5G NR indoor positioning method and system based on lightweight TRANSFORMER

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310957628.XA CN117062002B (en) 2023-08-01 2023-08-01 5G NR indoor positioning method and system based on lightweight TRANSFORMER

Publications (2)

Publication Number Publication Date
CN117062002A CN117062002A (en) 2023-11-14
CN117062002B true CN117062002B (en) 2024-04-30

Family

ID=88660007

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310957628.XA Active CN117062002B (en) 2023-08-01 2023-08-01 5G NR indoor positioning method and system based on lightweight TRANSFORMER

Country Status (1)

Country Link
CN (1) CN117062002B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111479231A (en) * 2020-04-17 2020-07-31 西安交通大学 Indoor fingerprint positioning method for millimeter wave large-scale MIMO system
WO2022041206A1 (en) * 2020-08-31 2022-03-03 深圳市大疆创新科技有限公司 Image encoding method and apparatus, image decoding method and apparatus, and storage medium
CN115087038A (en) * 2022-06-09 2022-09-20 华东师范大学 Channel state information compression and decompression method for 5G positioning
CN115131214A (en) * 2022-08-31 2022-09-30 南京邮电大学 Indoor aged person image super-resolution reconstruction method and system based on self-attention
CN115567871A (en) * 2022-09-26 2023-01-03 南京大学 WiFi fingerprint indoor floor identification and position estimation method
CN115908547A (en) * 2022-10-27 2023-04-04 东南大学 Wireless positioning method based on deep learning
CN116321414A (en) * 2023-01-19 2023-06-23 北京邮电大学 Wireless positioning method and electronic equipment
CN116401794A (en) * 2023-06-09 2023-07-07 四川大学 Blade three-dimensional accurate reconstruction method based on attention-guided depth point cloud registration

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111479231A (en) * 2020-04-17 2020-07-31 西安交通大学 Indoor fingerprint positioning method for millimeter wave large-scale MIMO system
WO2022041206A1 (en) * 2020-08-31 2022-03-03 深圳市大疆创新科技有限公司 Image encoding method and apparatus, image decoding method and apparatus, and storage medium
CN115087038A (en) * 2022-06-09 2022-09-20 华东师范大学 Channel state information compression and decompression method for 5G positioning
CN115131214A (en) * 2022-08-31 2022-09-30 南京邮电大学 Indoor aged person image super-resolution reconstruction method and system based on self-attention
CN115567871A (en) * 2022-09-26 2023-01-03 南京大学 WiFi fingerprint indoor floor identification and position estimation method
CN115908547A (en) * 2022-10-27 2023-04-04 东南大学 Wireless positioning method based on deep learning
CN116321414A (en) * 2023-01-19 2023-06-23 北京邮电大学 Wireless positioning method and electronic equipment
CN116401794A (en) * 2023-06-09 2023-07-07 四川大学 Blade three-dimensional accurate reconstruction method based on attention-guided depth point cloud registration

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于CSI幅度分解的动作识别和位置估计算法研究;刘广磊;《优秀硕士学位论文》;20230215;第15-51页 *

Also Published As

Publication number Publication date
CN117062002A (en) 2023-11-14

Similar Documents

Publication Publication Date Title
CN106355151B (en) A kind of three-dimensional S AR images steganalysis method based on depth confidence network
CN111414953B (en) Point cloud classification method and device
Zhang et al. An efficient machine learning approach for indoor localization
CN110933633B (en) Onboard environment indoor positioning method based on CSI fingerprint feature migration
CN114449452B (en) Wi-Fi indoor positioning method based on CNN-RNN
US20220392201A1 (en) Image feature matching method and related apparatus, device and storage medium
CN111311702B (en) Image generation and identification module and method based on BlockGAN
CN109117851A (en) A kind of video image matching process based on lattice statistical constraint
CN112434637A (en) Object identification method based on quantum computing line and LiDAR point cloud classification
CN114627369B (en) Environment monitoring system, method and computer device thereof
CN113111706B (en) SAR target feature unwrapping and identifying method for azimuth continuous deletion
Li et al. A variational learning approach for concurrent distance estimation and environmental identification
CN112329830B (en) Passive positioning track data identification method and system based on convolutional neural network and transfer learning
CN109871907A (en) Radar target high resolution range profile recognition methods based on SAE-HMM model
CN117062002B (en) 5G NR indoor positioning method and system based on lightweight TRANSFORMER
Wang et al. Fast Construction of the Radio Map Based on the Improved Low‐Rank Matrix Completion and Recovery Method for an Indoor Positioning System
CN116704363B (en) Land coverage classification method and device based on deep learning model
CN117853706A (en) Method, device, equipment and medium for detecting rotating target
CN117098067A (en) Multi-mode deep learning indoor positioning method based on gradient fusion
Wang et al. Multi-view SAR automatic target recognition based on deformable convolutional network
CN117062001B (en) 5G NR indoor positioning method and system based on interpretable deep learning
CN114399628A (en) Insulator high-efficiency detection system under complex space environment
CN117062001A (en) 5G NR indoor positioning method and system based on interpretable deep learning
CN113194401A (en) Millimeter wave indoor positioning method and system based on generative countermeasure network
CN117528769A (en) Fingerprint indoor positioning method based on attention enhancement mechanism and depth separable convolution

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant