Ultra-wideband indoor positioning method based on heterogeneous graph and attention mechanism
By using heterogeneous diagrams and attention mechanisms in ultra-wideband indoor positioning, combined with base station geometric information and ranging values, the problem of inaccurate positioning results in the prior art is solved, and higher positioning accuracy and stability are achieved.
Patent Information
- Application Number
- CN202411069795.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-06
- Publication Date
- 2024-11-19
AI Technical Summary
The existing ultra-wideband indoor positioning method does not fully consider the geometric information between ultra-wideband base stations, resulting in inaccurate positioning results, especially in complex scenarios, which is difficult to ensure high-precision and stable positioning performance.
Using a method based on heterogeneous graph and attention mechanism, a heterogeneous graph including base station, ranging value and label is constructed. By designing metapaths and multi-head attention mechanisms, the label position and ranging value are fused and aggregated node characteristics are performed. Predict to improve positioning accuracy.
By combining base station geometric information and ranging value, noise can be effectively suppressed, positioning accuracy and robustness can be improved, and positioning performance in complex scenarios can be improved.
Smart Images

Figure CN118984489A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of positioning technology, and in particular relates to an ultra-wideband indoor positioning method based on heterogeneous graphs and an attention mechanism. Background Art
[0002] Some current UWB indoor positioning methods based on deep learning have achieved advanced positioning results in complex scenes, but there are still some shortcomings: the existing UWB indoor positioning process does not fully consider the geometric information between UWB base stations. The geometric information between base stations (including the precise location and relative spacing of base stations) is crucial for the positioning system. This geometric information can provide a more complete and accurate spatial reference frame, so that the ranging value can be used more effectively in the positioning calculation. Failure to fully consider the geometric information of the base station is equivalent to losing an important correction and reference dimension, making the positioning result inaccurate. The prediction of the tag position should be the result of the combination of the UWB base station geometric information and the ranging value. By combining the geometric information between base stations, the ranging data can be better corrected and interpreted, thereby improving the positioning accuracy and robustness. If the base station geometric information is not fully considered in combination with the ranging value, it will obviously have a negative impact on the positioning result, making it difficult for the system to ensure high-precision and stable positioning performance when facing a complex indoor environment. Summary of the invention
[0003] Purpose of the invention: The technical problem to be solved by the present invention is to provide an ultra-wideband indoor positioning method based on heterogeneous graphs and attention mechanism to address the deficiencies of the prior art, which greatly improves the ultra-wideband positioning problem in complex scenarios. The method of the present invention comprises the following steps:
[0004] Step 1, construct a heterogeneous graph and design a meta-path: construct nodes in the heterogeneous graph based on the base station locations in the environment, the ranging values between the ultra-wideband base station and the tag at each time, and the location of the tag at each time; construct edges in the heterogeneous graph based on the relationship between the base station and the ranging value, the relationship between the ranging value and the tag, and the relationship between the tags; design a meta-path to update the tag location and ranging value based on the relationship between the nodes and the edges in the graph;
[0005] Step 2: Establish a heterogeneous graph node feature extraction module to extract heterogeneous graph node features: base stations, labels, and ranging values are different types of nodes with different feature dimensions. The feature dimensions of base stations, labels, and ranging values are unified into a feature space of the same dimension through linear transformation;
[0006] Step 3, establish a meta-path-based node feature aggregation module for performing meta-path-based node feature aggregation: the meta-path designed in step 1 and the heterogeneous graph node features obtained in step 2 are used as inputs of the meta-path-based node feature aggregation module. First, the features are fused and extracted through a recurrent neural network (RNN) module to capture context information; then, the aggregation within the meta-path is obtained using a multi-head attention mechanism; finally, the attention mechanism is used to perform aggregation between meta-paths, which essentially assigns different weights to feature vectors corresponding to different meta-paths, and finally obtains the feature vector of the target node, which includes a distance value node and a label position node;
[0007] Step 4: Establish a distance measurement value and label position estimation module based on aggregated features, which is used to estimate the distance measurement value and label position based on aggregated features: for the feature vector of the distance measurement value node obtained by aggregation, use one fully connected layer to obtain the predicted value of the distance measurement value; for the feature vector of the label position node obtained by aggregation, use two fully connected layers to obtain the predicted value of the label position;
[0008] Step 5, perform network training based on supervised learning: the modules established in steps 2 to 4 constitute an ultra-wideband indoor positioning model based on heterogeneous graphs and attention mechanism, and adopt a supervised learning strategy to combine the ranging value and the predicted value of the label position obtained by the ultra-wideband indoor positioning model with the pre-collected true value to train the ultra-wideband indoor positioning model constructed in steps 2 to 4, thereby meeting the needs of indoor positioning.
[0009] Step 1 includes:
[0010] Step 1-1, assume that there are more than n ultra-wideband base stations in the space, n is a natural number, and select the base station in the space, the ranging value corresponding to the base station, and the label position as three types of nodes; then, since it is hoped that the correlation between the data can be used to achieve aggregation and information propagation between the data to smooth the data noise, the base station node and the ranging value node, the ranging value node and the label node, and the labels at different times are connected, and the connections are used as edges to construct a heterogeneous graph;
[0011] Step 1-2, design the meta-path based on the following relationships between nodes and edges between nodes:
[0012] There is a constraint relationship between the tag positions at different times: Since the tag movement speed is limited, about 0.5 meters per second, the distance between the tag position at the previous moment and the tag position at the next moment will not exceed the threshold of 0.5 meters;
[0013] There are constraints between the ranging values between different UWB base stations and tags at the same time: the relative positions of different UWB base stations at the same time are fixed, and the tag positions are also fixed, so there are geometric constraints between the ranging values obtained by different base stations;
[0014] There is a constraint relationship between the distance measurement values of the same UWB base station and the tag at different times: Since the tag's moving speed is limited, about 0.5 meters per second, the distance measurement values of the same UWB base station at different times will not differ too much. Considering that there are also errors in the distance measurement of the UWB base station, the distance measurement values of the UWB base station at different times will not exceed the threshold of 0.5 meters.
[0015] This results in three types of meta-paths:
[0016] The first category is the meta-path between tags at different times: the path contains the tag location information, the ranging value information of the same base station for different tags, and the location information of the base station;
[0017] The second type is the meta-path between the ranging values at the same time: the path contains the ranging value information and label information of different base stations for the same label;
[0018] The third category is the meta-path between the ranging values of the same ultra-wideband base station at different times: the path contains the tag location information and the ranging value information of the same base station at different times.
[0019] Step 2 includes:
[0020] Step 2-1, for the label position, the original input of the label position is missing, so the preliminary three-dimensional coordinates of the label position are first calculated by the least squares method, and the formula is:
[0021] t = LeastSquares(a, dis)
[0022] Where t represents the original coordinate output, Least Squares represents the least squares algorithm, a represents the location coordinates of the ultra-wideband base station, and dis represents the ranging value;
[0023] Then, the feature vector is extracted to a 128-dimensional feature space through linear transformation. The formula is:
[0024]
[0025] in represents the node with input dimension d1, w1 represents the linear transformation corresponding to the label, Represents the eigenvector with dimension d′1 after linear transformation;
[0026] Step 2-2, for the ultra-wideband base station position, the original input of the ultra-wideband base station position is the three-dimensional coordinates of the ultra-wideband base station position, and the three-dimensional coordinates are obtained by pre-measurement; the base station features are extracted into a 128-dimensional feature space through another linear transformation, and the formula is:
[0027]
[0028] in represents the node with input dimension d2, w2 represents the linear transformation corresponding to the base station node, Represents the eigenvector with dimension d′2 after linear transformation;
[0029] Step 2-4: For distance information, the sampling frequency of the ultra-wideband base station can be determined according to the actual situation. The frequency is set to 100 Hz, and the 10 measurement data within 0.1 seconds are linearly transformed to extract the features into a 128-dimensional feature space. The formula is:
[0030]
[0031] in represents the node with input dimension d3, w3 represents the linear transformation corresponding to the range value, Represents the eigenvector of dimension d′3 after linear transformation.
[0032] Step 3 includes:
[0033] Step 3-1, for a target node, there is a corresponding meta-path list for updating the target node, and the feature dimension is converted into a hidden dimension through a recurrent neural network module, and the recurrent neural network module is used to fuse and extract input features to better capture context information. The formula is as follows:
[0034] (metapath_num,seq_len,hidden_size)
[0035] =RNN(metapath_num,seq_len,feature_size)
[0036] Where metapath_num represents the number of metapaths to update the target node, seq_len represents the length of the metapath sequence, hidden_size represents the hidden dimension of the output, RNN represents the recurrent neural network module, and feature_size represents the feature dimension of the input;
[0037] Step 3-2, use the multi-head attention mechanism to process the output obtained in step 3-1: linear transformation generates three vectors of query, key and value, splits the query, key and value into two or more heads, and then uses normalization to obtain the attention weight, and finally weighted sums to obtain the feature vector of the meta-path, the formula is:
[0038]
[0039] Where H is the output of the weighted sum, Q represents the query vector, K represents the key vector, and V represents the value vector. is the attention weight corresponding to the value vector V, K T represents the transpose of the key vector, d k The number of columns of the Query vector, Key vector, and Value vector;
[0040] Step 3-3: For the feature vector of the meta-path obtained in step 3-2, use the attention mechanism to assign weights and perform weighted aggregation to obtain the feature vector of the target node. The formula is as follows:
[0041]
[0042] Where M is the feature vector of the target node, x is the number of meta-paths to update the target node, and w x is the weight of the x-th meta-path, H x is the feature vector of the x-th element path.
[0043] Step 4 includes:
[0044] Step 4-1, for the estimation of the label position: use two fully connected layers to reduce the dimension from 128 to 32, and then from 32 to 3, to obtain the estimated value of the label position;
[0045] Step 4-2, for the estimation of the ranging value: use a fully connected layer to reduce the dimension from 128 dimensions to 10 dimensions to obtain the estimated value of the ranging value.
[0046] Step 5 includes:
[0047] Step 5-1: For the estimation of label position, establish the loss function L t , for distance estimation, establish the loss function L d , the formula is:
[0048]
[0049]
[0050] Where N is the training batch size, t estis the predicted value of the label, t gt is the true value of the label, d est is the estimated value of the distance, d gt is the true value of the distance;
[0051] Step 5-2, establish the complete loss function L:
[0052] L=γ1L t +γ2L d
[0053] Where γ1 and γ2 represent the loss function L t The weight and L d The weight of
[0054] Step 5-3, using the loss function established in step 4-2, train the model established in steps 2 to 4 through supervised training.
[0055] The present invention also provides an electronic device, comprising a processor and a memory, wherein the memory stores program code, and when the program code is executed by the processor, the processor executes the steps of the described method.
[0056] The present invention also provides a storage medium storing a computer program or instruction. When the computer program or instruction is run on a computer, the steps of the method described are executed.
[0057] Compared with the prior art, the present invention has the following beneficial effects: when performing ultra-wideband positioning, a heterogeneous graph is constructed and the attention mechanism is integrated into it, which makes up for the deficiency of the deep learning positioning method that ignores the geometric information of the base station. At the same time, through the heterogeneous graph attention mechanism, the weights of each measurement value are more reasonably allocated, and the measurement noise is effectively suppressed. And while estimating the tag position, the ranging value is corrected. Finally, the positioning accuracy is effectively improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] Figure 1 This is a flowchart of the ultra-wideband positioning network based on heterogeneous graph and attention mechanism proposed in the present invention.
[0059] Figure 2 It is a schematic diagram of the meta-path of the heterogeneous graph construction method and design proposed by the present invention.
[0060] Figure 3 It is a schematic diagram of the base station, tag, and ranging information feature extraction process of the present invention.
[0061] Figure 4 It is a structural schematic diagram of the recurrent neural network model with multi-head attention in the present invention. DETAILED DESCRIPTION
[0062] The present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments, and the above and other advantages of the present invention will become more clear.
[0063] Reference Figure 1 In a specific embodiment of the present invention, an ultra-wideband indoor positioning method based on heterogeneous graph and attention mechanism is provided, comprising the following steps:
[0064] Step 1: Establish a heterogeneous graph construction method and design a meta-path. Nodes in the heterogeneous graph are constructed based on the base station locations in the environment, the ranging values between the ultra-wideband base station and the tag at each time, and the location of the tag at each time. The edges in the heterogeneous graph are constructed based on the relationship between the base station and the ranging value, the relationship between the ranging value and the tag, and the relationship between the tag. Based on the relationship between the nodes and the edges in the graph, a meta-path for updating the tag location and ranging value is designed to obtain a meta-path containing the updated target node (including the ranging value node and the label location node).
[0065] Step 2: Establish a heterogeneous graph node feature extraction module. Based on the heterogeneous graph designed in step 1, the graph contains three types of nodes with different feature dimensions: base stations, tags, and ranging values. The feature extraction module unifies them into a feature space of the same dimension to obtain a feature vector.
[0066] Step 3: Establish a node feature aggregation module based on meta-path. Combine the meta-path designed in step 1 with the feature vector of the node obtained in step 2 as input. First, fuse and extract features through the Recurrent Neural Network (RNN) module to capture context information; then, use the multi-head attention mechanism to obtain the aggregation within the meta-path; finally, use the attention mechanism to aggregate between meta-paths, which essentially assigns different weights to the feature vectors corresponding to different meta-paths, and finally obtains the feature vector of the target node.
[0067] Step 4: Establish a distance value and label position estimation module based on aggregated features. For the feature vector of the distance value node obtained by aggregation, use one fully connected layer to get the predicted value of the distance value. For the feature vector of the label position node, use two layers of full connection to get the predicted value of the label position.
[0068] Step 5: Establish a network training method based on supervised learning. The three modules corresponding to the above steps 2, 3, and 4 constitute an ultra-wideband indoor positioning model based on heterogeneous graphs and attention mechanism. A supervised learning strategy is adopted to train the ultra-wideband indoor positioning model constructed by steps 2 to 4 by combining the range values and predicted values of the label positions obtained by the model with the pre-collected true values, thereby meeting the needs of indoor positioning.
[0069] Further, step 1 specifically includes:
[0070] like Figure 2 As shown, the figure shows the heterogeneous graph construction method proposed by this method (only two moments are drawn) and a meta-path example.
[0071] Step 1-1: Assume that there are multiple ultra-wideband base stations in the space (base station No. 0, base station No. 1...base station No. n), select the base stations in the space, the ranging values corresponding to the base stations, and the label positions as three types of nodes; then, because it is hoped that the correlation between the data can be used to achieve data aggregation and information propagation to smooth data noise, the base station nodes are connected to the ranging value nodes, the ranging value nodes are connected to the label nodes, and the labels at different times, and these connections are used as edges to construct a heterogeneous graph.
[0072] Step 1-2: Design the meta-path based on the following relationships between nodes and edges between nodes:
[0073] There is a constraint relationship between the tag positions at different times: since the tag movement speed is limited, about 0.5 meters per second, the distance between the tag position at the previous moment and the tag position at the next moment will not exceed 0.5 meters;
[0074] There are constraints between the ranging values between different UWB base stations and tags at the same time: the relative positions of different UWB base stations at the same time are fixed, and the tag positions are also fixed, so there are geometric constraints between the ranging values obtained by different base stations;
[0075] There is a constraint relationship between the distance measurement values of the same UWB base station and the tag at different times: Since the tag's moving speed is limited, about 0.5 meters per second, the distance measurement values of the same UWB base station at different times will not differ too much. Considering that there are also errors in the distance measurement of the UWB base station, the distance measurement values of the UWB base station at different times will not exceed 0.5 meters; thus, three types of meta-paths can be obtained:
[0076] Meta-path between tags at different times: The path contains tag location information, the distance value information of the same base station for different tags, and the location information of the base station
[0077] Meta-path between ranging values at the same time: The path contains ranging value information and tag information of different base stations for the same tag
[0078] Meta-path between ranging values of the same UWB base station at different times: The path contains the tag location information and ranging value information of the same base station at different times.
[0079] Further, step 2 specifically includes:
[0080] like Figure 3 As shown, three different linear layers are used to map three different types of node information into the same feature space.
[0081] Step 2-1: For the label position, the original input of the label position is missing. Therefore, the preliminary three-dimensional coordinates of the label position are first calculated by the least squares method, and the formula is as follows: Then, the feature vector is extracted to a 128-dimensional feature space through linear transformation. The formula is as follows:
[0082] t=Least Squares(a,dis)
[0083] Where t represents the original coordinate output, Least Squares represents the least squares algorithm, a represents the location coordinates of the ultra-wideband base station, and dis represents the ranging value.
[0084] Then, the feature vector is extracted into a 128-dimensional feature space through linear transformation. The formula is as follows:
[0085]
[0086] in represents the node with input dimension d1, w1 represents the linear transformation corresponding to the label, Represents the feature vector with dimension d′1 after linear transformation.
[0087] Step 2-2: For the ultra-wideband base station location, the original input of the ultra-wideband base station location is its three-dimensional coordinates, which can be obtained through pre-measurement. The base station features can be extracted into a 128-dimensional feature space through another linear transformation. The formula is as follows:
[0088]
[0089] in represents the node with input dimension d2, w2 represents the linear transformation corresponding to the base station node, Represents the feature vector with dimension d′2 after linear transformation.
[0090] Step 2-3: For distance information, the sampling frequency of the ultra-wideband base station is 100 times per second, and the features of 10 measurement data within 0.1 seconds are extracted into a 128-dimensional feature space through linear transformation. The formula is as follows:
[0091]
[0092] in represents the node with input dimension d3, w3 represents the linear transformation corresponding to the range value, Represents the eigenvector of dimension d′3 after linear transformation.
[0093] Further, step 3 specifically includes:
[0094] like Figure 4 As shown, a recurrent neural network model with multi-head attention is used for aggregation within the meta-path.
[0095] Step 3-1: For a target node, there is a corresponding meta-path list for updating the target node. The feature dimension is converted into a hidden dimension through a recurrent neural network module. The module can fuse and extract the input features to better capture context information. The formula is as follows:
[0096] (metapath_num,seq_len,hidden_size)
[0097] =RNN(metapath_num,seq_len,feature_size)
[0098] Where metapath_num represents the number of metapaths for updating the target node, seq_len represents the length of the metapath sequence, hidden_size represents the hidden dimension of the output, RNN represents the recurrent neural network module, and feature_size represents the feature dimension of the input.
[0099] Step 3-2: Use the multi-head attention mechanism to process the output obtained in step 3-1. Linear transformation generates three vectors: query, key, and value. Split Q, K, and V into multiple heads, then use normalization to obtain attention weights, and finally weighted sum to obtain the feature vector of the meta-path. The formula is as follows:
[0100]
[0101] Where H is the output of the weighted summation, V is the value vector, is the attention weight corresponding to the V vector, K T is the transpose of the Key vector. k The number of columns of the Query vector, Key vector, and Value vector.
[0102] Step 3-3: For the feature vector of the meta-path obtained in step 3-2, use the attention mechanism to assign weights to it, and perform weighted aggregation to obtain the feature vector of the target node. The formula is as follows:
[0103]
[0104] Where M is the feature vector of the target node, x is the number of meta-paths to update the target node, and w x is the weight of the x-th meta-path, H x is the feature vector of the x-th element path.
[0105] Further, step 4 specifically includes:
[0106] Step 4-1: For the estimation of the label position, two fully connected layers are used to reduce the dimension from 128 to 32, and then from 32 to 3, to obtain the estimated value of the label position.
[0107] Step 4-2: For the estimation of the ranging value, a fully connected layer is used to reduce the dimension from 128 dimensions to 10 dimensions to obtain the estimated value of the ranging value.
[0108] Further, step 5 specifically includes:
[0109] This step adopts a supervised learning strategy and combines the label position and the distance measurement value to perform model training. The present invention designs two kinds of losses in the cost function, namely, the label position loss and the distance loss.
[0110] Label position loss L t The mathematical representation of is:
[0111]
[0112] Where N is the number of times the model is trained, t est is the estimated value of the label position, t gt is the true value of the label position.
[0113] Distance loss L d The mathematical representation of is:
[0114]
[0115] Where N is the training batch size for model training, d est is the estimated value of the distance, d gt is the true value of the distance.
[0116] Combining the label position loss and the distance loss, minimizing these two losses together gives us the complete cost function, which is defined as follows:
[0117] L=γ1L t +γ2L d
[0118] Where γ1 and γ2 represent the weights of the two loss functions.
[0119] By using the established cost function, the model established in steps 2 to 4 is trained through supervised training to achieve the purpose of indoor positioning.
[0120] The present invention provides an ultra-wideband indoor positioning method based on heterogeneous graphs and attention mechanism. There are many methods and ways to implement the technical solution. The above is only a preferred implementation of the present invention. It should be pointed out that for ordinary technicians in this technical field, without departing from the principle of the present invention, several improvements and modifications can be made, and these improvements and modifications should also be regarded as the protection scope of the present invention. All components not specified in this embodiment can be implemented by existing technologies.
Claims
1. An ultra-wideband indoor positioning method based on heterogeneous graph and attention mechanism, characterized in that: The following steps are involved: Step 1, construct a heterogeneous graph and design a meta-path: construct nodes in the heterogeneous graph based on the base station locations in the environment, the ranging values between the ultra-wideband base station and the tag at each time, and the location of the tag at each time; construct edges in the heterogeneous graph based on the relationship between the base station and the ranging value, the relationship between the ranging value and the tag, and the relationship between the tags; design a meta-path to update the tag location and ranging value based on the relationship between the nodes and the edges in the graph; Step 2: Establish a heterogeneous graph node feature extraction module to extract heterogeneous graph node features: base stations, labels, and ranging values are different types of nodes with different feature dimensions. The feature dimensions of base stations, labels, and ranging values are unified into a feature space of the same dimension through linear transformation; Step 3, establish a meta-path-based node feature aggregation module for performing meta-path-based node feature aggregation: the meta-path designed in step 1 and the heterogeneous graph node features obtained in step 2 are used as inputs of the meta-path-based node feature aggregation module. First, the features are fused and extracted through a recurrent neural network module to capture context information; then, the aggregation within the meta-path is obtained using a multi-head attention mechanism; finally, the attention mechanism is used to perform aggregation between meta-paths, and finally a feature vector of a target node is obtained, wherein the target node includes a distance value node and a label position node; Step 4: Establish a distance measurement value and label position estimation module based on aggregated features, which is used to estimate the distance measurement value and label position based on aggregated features: for the feature vector of the distance measurement value node obtained by aggregation, use one fully connected layer to obtain the predicted value of the distance measurement value; for the feature vector of the label position node obtained by aggregation, use two fully connected layers to obtain the predicted value of the label position; Step 5, perform network training based on supervised learning: the modules established in steps 2 to 4 constitute an ultra-wideband indoor positioning model based on heterogeneous graphs and attention mechanism, and adopt a supervised learning strategy to combine the ranging value and the predicted value of the label position obtained by the ultra-wideband indoor positioning model with the pre-collected true value to train the ultra-wideband indoor positioning model constructed in steps 2 to 4, thereby meeting the needs of indoor positioning.
2. The method according to claim 1, characterized in that Step 1 includes: Step 1-1, assume that there are more than n ultra-wideband base stations in the space, where n is a natural number, select the base stations in the space, the ranging values corresponding to the base stations, and the label positions as three types of nodes; connect the base station nodes with the ranging value nodes, the ranging value nodes with the label nodes, and the labels at different times, and use the connections as edges to construct a heterogeneous graph; Step 1-2, design the meta-path based on the following relationships between nodes and edges between nodes: There is a constraint relationship between the label positions at different times: since the label movement speed is limited, the difference between the label position at the previous moment and the label position at the next moment will not exceed the threshold; There are constraints between the ranging values between different UWB base stations and tags at the same time: the relative positions of different UWB base stations at the same time are fixed, and the tag positions are also fixed, so there are geometric constraints between the ranging values obtained by different base stations; There is a constraint relationship between the distance measurement values between the same UWB base station and the tag at different times: due to the limited movement speed of the tag, the distance measurement values of the UWB base station at different times will not exceed the threshold; This results in three types of meta-paths: The first category is the meta-path between tags at different times: the path contains the tag location information, the ranging value information of the same base station for different tags, and the location information of the base station; The second type is the meta-path between the ranging values at the same time: the path contains the ranging value information and label information of different base stations for the same label; The third category is the meta-path between the ranging values of the same ultra-wideband base station at different times: the path contains the tag location information and the ranging value information of the same base station at different times.
3. The method according to claim 2, characterized in that Step 2 includes: Step 2-1: For the label position, the preliminary three-dimensional coordinates of the label position are calculated by the least squares method. The formula is: t = LeastSquares(a, dis) Where t represents the original coordinate output, Least Squares represents the least squares algorithm, a represents the location coordinates of the ultra-wideband base station, and dis represents the ranging value; Then, the feature vector is extracted to a 128-dimensional feature space through linear transformation. The formula is: in represents the node with input dimension d1, w1 represents the linear transformation corresponding to the label, Represents the dimension after linear transformation is d ′ The eigenvector of 1; Step 2-2, for the ultra-wideband base station position, the original input of the ultra-wideband base station position is the three-dimensional coordinates of the ultra-wideband base station position, and the three-dimensional coordinates are obtained by pre-measurement; the base station features are extracted into a 128-dimensional feature space through another linear transformation, and the formula is: in represents the node with input dimension d2, w2 represents the linear transformation corresponding to the base station node, Represents the dimension after linear transformation is d ′ The eigenvector of 2; Step 2-4: For distance information, the measured data is linearly transformed to extract features into a 128-dimensional feature space. The formula is: in represents the node with input dimension d3, w3 represents the linear transformation corresponding to the range value, Represents the dimension after linear transformation is d ′ The eigenvector of 3.
4. The method according to claim 3, characterized in that Step 3 includes: Step 3-1, for a target node, there is a corresponding meta-path list for updating the target node, and the feature dimension is converted into a hidden dimension through a recurrent neural network module, and the recurrent neural network module is used to fuse and extract the input features. The formula is as follows: (metapath_num,seq_len,hidden_size) =RNN(metapatrh_num,seq_len,feature_size) Where metapath_num represents the number of metapaths to update the target node, seq_len represents the length of the metapath sequence, hidden_size represents the hidden dimension of the output, RNN represents the recurrent neural network module, and feature_size represents the feature dimension of the input; Step 3-2, use the multi-head attention mechanism to process the output obtained in step 3-1: linear transformation generates three vectors of query, key and value, splits the query, key and value into two or more heads, and then uses normalization to obtain the attention weight, and finally weighted sums to obtain the feature vector of the meta-path, the formula is: Where H is the output of the weighted sum, Q represents the query vector, K represents the key vector, and V represents the value vector. is the attention weight corresponding to the value vector V, K T represents the transpose of the key vector, d k The number of columns of the Query vector, Key vector, and Value vector; Step 3-3: For the feature vector of the meta-path obtained in step 3-2, use the attention mechanism to assign weights and perform weighted aggregation to obtain the feature vector of the target node. The formula is as follows: Where M is the feature vector of the target node, x is the number of meta-paths to update the target node, and w x is the weight of the x-th meta-path, H x is the feature vector of the x-th element path.
5. The method according to claim 4, characterized in that Step 4 includes: Step 4-1, for the estimation of the label position: use two fully connected layers to reduce the dimension from 128 to 32, and then from 32 to 3, to obtain the estimated value of the label position; Step 4-2, for the estimation of the ranging value: use a fully connected layer to reduce the dimension from 128 dimensions to 10 dimensions to obtain the estimated value of the ranging value.
6. The method according to claim 5, characterized in that Step 5 includes: Step 5-1: For the estimation of label position, establish the loss function L t , for distance estimation, establish the loss function L d , the formula is: Where N is the training batch size, t est is the predicted value of the label, t gt is the true value of the label, d est is the estimated value of the distance, d gt is the true value of the distance; Step 5-2, establish the complete loss function L: L=γ1L t +γ2L d Where γ1 and γ2 represent the loss function L t The weight and L d The weight of Step 5-3, using the loss function established in step 4-2, train the model established in steps 2 to 4 through supervised training.
7. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores program codes, and when the program codes are executed by the processor, the processor executes the steps of the method according to any one of claims 1 to 6.
8. A storage medium, characterized in that: A computer program or instruction is stored, and when the computer program or instruction is run on a computer, the steps of the method according to any one of claims 1 to 6 are executed.
Citation Information
Cited By
Ultra-wideband indoor positioning method based on multi-mode diffusion model
CN119907098A
An Ultra-Wideband Indoor Positioning Method Based on a Multimodal Diffusion Model
CN119907098B
