Vehicle geomagnetic positioning method and system based on neural network
Through the neural network structure based on Transformer-LSTM, the problems of boundary nature of the DTW algorithm and carrier interference in the traditional geomagnetic positioning method are solved, and high-precision vehicle positioning without the assistance of other information is achieved.
Patent Information
- Application Number
- CN202510852077.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-24
- Publication Date
- 2025-07-22
- Estimated Expiration
- 2045-06-24
AI Technical Summary
In vehicle positioning, traditional geomagnetic positioning methods have problems such as difficulty in meeting the boundary conditions of the DTW algorithm and large impact on carrier interference, resulting in insufficient positioning accuracy.
Using a neural network structure based on Transformer-LSTM, geomagnetic data is processed through the spatiotemporal feature extraction layer and the LSH self-attention mechanism, and an encoder and decoder are designed to achieve the precise matching of magnetic field characteristics and location.
It improves the accuracy and stability of geomagnetic positioning, can handle the influence of different vehicle speeds and magnetic field noise without other information assistance, and improves the accuracy of positioning results.
Smart Images

Figure CN120351941A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of vehicle positioning, and specifically relates to a vehicle geomagnetic positioning method and system based on a neural network, which can be used to achieve reliable and accurate positioning of vehicles under conditions where satellite signals are unavailable, such as in urban canyons and indoors. Background Art
[0002] There are many different means of vehicle positioning. Among them, the global satellite navigation system is the most widely used, relying on its wireless signal ranging technology and using the distance intersection method to provide users with high-precision three-dimensional coordinate information in real time. However, satellite navigation signals are inherently fragile and are easily interfered by factors such as signal blocking, multipath effects, and non-line-of-sight signal suppression, making it difficult to ensure the accuracy of vehicle positioning. Geomagnetic positioning, with its advantages of no long-term cumulative errors and not being easily interfered with, can achieve all-day, all-weather, and all-region positioning, showing great potential for vehicle applications. At present, most vehicle geomagnetic positioning methods are matching methods. The core is to match the measured magnetic field sequence with the magnetic field sequence in the geomagnetic reference library to estimate the position, which is divided into two stages: geomagnetic reference library construction and position solution. In the geomagnetic reference library construction stage, the geomagnetic reference library of the required positioning area is established through measurement and interpolation; in the position solution stage, the original magnetic field measurement data is directly used to match the characteristics with the magnetic field of the geomagnetic reference library according to the matching criteria to calculate the most likely position. However, without the assistance of information such as attitude and mileage, the sampling rate and vehicle speed are difficult to be completely consistent, resulting in different lengths of the magnetic field time series collected twice. The Dynamic Time Warping (DTW) method is one of the effective means to align sequences of different lengths. By calculating the similarity of two time series, the real-time sequence is stretched to the same length as the sequence to be matched. In the process, the real-time sequence will be twisted or bent to match the feature quantity. However, in geomagnetic positioning applications, the DTW algorithm has two problems: first, the boundary conditions of the traditional DTW algorithm are difficult to meet in vehicle geomagnetic positioning; second, its point matching similarity measurement method based on the Euclidean distance between two points cannot avoid carrier interference and is not suitable for geomagnetic positioning of vehicle platforms. Summary of the invention
[0003] To solve the above technical problems, the present invention provides a vehicle geomagnetic positioning method and system based on a neural network. A spatio-temporal feature extraction layer is designed to extract global and local magnetic field features and position features step by step. Among them, a spatial feature extraction layer that fuses multiple receptive fields and a temporal feature extraction layer that extends virtual moments are innovatively used to extract the magnetic field spatial features. At the same time, the LSH (Locality Sensitive Hashing) self-attention mechanism is used to "divide and conquer" the many factors that affect the geomagnetic positioning result, and classify and process the influence of different types of factors on the positioning result. Finally, considering the enhanced data diversity and increased training difficulty brought about by different vehicle speeds, an LSTM-based decoder structure is proposed to obtain the user's position.
[0004] To achieve the above object, the technical solution adopted by the present invention is as follows:
[0005] A vehicle geomagnetic positioning method based on a neural network, the method comprising:
[0006] Step 1, in the offline stage, collect geomagnetic data and position data and perform preprocessing to construct an equal-time-span geomagnetic-position sequence, and use the equal-time-span geomagnetic-position sequence to train a Transformer-LSTM network model; the Transformer-LSTM network model includes an encoder and a decoder, the encoder is used to extract the spatial magnetic field features related to the position in the input data and convert them into position features; the decoder is used to associate the position features with the position coordinates to calculate the coordinate sequences of the vehicle in the current and historical time periods;
[0007] Step 2, in the online stage, collect geomagnetic data and inertial data and perform preprocessing to construct an effective geomagnetic sequence data; input the effective geomagnetic sequence data into the Transformer-LSTM network model trained in the offline stage for inference to calculate the positioning result.
[0008] On the other hand, the present invention provides a vehicle geomagnetic positioning system based on a neural network, comprising:
[0009] An offline module for collecting geomagnetic data and position data and performing preprocessing to construct an equal-time-span geomagnetic-position sequence, and using the equal-time-span geomagnetic-position sequence to train a Transformer-LSTM network model; the Transformer-LSTM network model includes an encoder and a decoder, the encoder is used to extract the spatial magnetic field features related to the position in the input data and convert them into position features; the decoder is used to associate the position features with the position coordinates to calculate the coordinate sequences of the vehicle in the current and historical time periods;
[0010] An online module for collecting geomagnetic data and inertial data, preprocessing them, and constructing effective geomagnetic sequence data; inputting the effective geomagnetic sequence data into the Transformer-LSTM network model trained in the offline stage for inference, and calculating the positioning result.
[0011] In a third aspect, the present invention provides an electronic device, including: one or more processors; a memory for storing one or more programs; wherein, when the one or more programs are executed by the one or more processors, the one or more processors implement the foregoing vehicle geomagnetic positioning method based on a neural network.
[0012] In a fourth aspect, the present invention provides a computer-readable storage medium, on which executable instructions are stored, and when the instructions are executed by a processor, the processor can implement the foregoing vehicle geomagnetic positioning method based on a neural network.
[0013] Beneficial effects:
[0014] 1. Compared with the existing geomagnetic matching methods, the present invention has obvious advantages in improving the geomagnetic positioning accuracy. On the one hand, traditional geomagnetic matching methods rely on a geomagnetic reference library, while the present invention uses a neural network, which can not only capture the relationship between the magnetic field sequence and the position more accurately, but also learn the noise distribution of the magnetic field data through a large-scale training set, making the magnetic field data at each position point more abundant. On the other hand, traditional methods directly use the original magnetic field measurement information, while the neural network of the present invention learns the features that satisfy the constraints of the data set and the loss function through a "training-test" mode. When the network converges, it has a strong feature extraction ability. In addition, due to the data-driven characteristics of the neural network-based method, it can achieve the global optimum of feature extraction and processing, thus being superior to traditional methods in magnetic field feature extraction and matching.
[0015] 2. The neural network structure of the present invention is optimized in design. In the encoder part, the traditional standard encoding layer is replaced by multiple spatio-temporal feature extraction layers, which focus on extracting position features. And for the decoder, aiming at the problems of high data diversity and limited training data without information assistance, it uses the characteristics of few LSTM parameters and easy convergence, effectively reducing the training difficulty and improving the adaptability and stability of the model.
[0016] 3. The spatio-temporal feature extraction layer in the encoder of the present invention consists of three parts. The global magnetic feature extraction layer is responsible for extracting overall features, such as the magnetic field bias caused by carrier interference. The local feature extraction layer takes into account the situation where the vehicle speed may be slow or fast, and designs a spatial feature extraction layer that fuses multiple receptive fields and a temporal feature extraction layer that extends virtual time moments, ensuring that the network can effectively process magnetic field data at different speeds. The position feature extraction layer classifies the factors affecting the positioning result, reducing the computational burden while improving the positioning accuracy. Description of the Drawings
[0017] Figure 1 is a flowchart of a vehicle geomagnetic positioning method based on a neural network according to the present invention;
[0018] Figure 2 is a structural diagram of a Transformer-LSTM network model;
[0019] Figure 3 is a detailed diagram of a Transformer-LSTM network model;
[0020] Figure 4 is a structural diagram of a spatio-temporal feature extraction layer;
[0021] Figure 5 is a structural diagram of a local magnetic feature extraction layer;
[0022] Figure 6 is a structural diagram of a spatial feature extraction layer;
[0023] Figure 7 is a structural diagram of a temporal feature extraction layer;
[0024] Figure 8 is a structural diagram of a position feature extraction layer;
[0025] Figure 9 is a structural diagram of an LSH self-attention layer;
[0026] Figure 10 is a schematic diagram of a vehicle geomagnetic positioning device based on a neural network according to the present invention. Detailed Embodiment
[0027] The present invention will be further described below with reference to the drawings and embodiments.
[0028] As Figure 1 shown, it is a flowchart of a vehicle geomagnetic positioning method based on a neural network according to the present invention. The method includes an offline stage and an online stage; specifically, it includes:
[0029] Step 1. In the offline stage, collect geomagnetic data and position data, preprocess them, construct a geomagnetic-position sequence with equal time spans, and use the geomagnetic-position sequence with equal time spans to train the Transformer-LSTM network model. The Transformer-LSTM network model includes an encoder and a decoder. The encoder is used to extract the spatial magnetic field features related to the position in the input data and convert them into position features. The decoder is used to associate the position features with the position coordinates and calculate the coordinate sequences of the vehicle in the current and historical time periods, specifically including:
[0030] During the driving process of the vehicle, collect a large amount of geomagnetic data and position data.
[0031] Downsample the collected geomagnetic data and combine it with the driving speed to obtain geomagnetic data with equal time intervals and moderate frequencies.
[0032] Use a sliding window to divide the large amount of continuous geomagnetic data with equal time intervals into magnetic field sequences, ensuring that the number of geomagnetic data points contained in each magnetic field sequence is equal.
[0033] Calculate the geomagnetic mean of each geomagnetic sequence, and subtract the geomagnetic mean of the corresponding geomagnetic sequence from each geomagnetic data point of each geomagnetic sequence to avoid the influence of too large differences in the absolute values of the magnetic field intensities on the training, and generate a series of geomagnetic sequences with equal time spans.
[0034] Normalize the positions corresponding to the geomagnetic data points of the geomagnetic sequence to 0-1, and jointly construct a large number of complete geomagnetic-position sequences with equal time spans with the geomagnetic sequence with equal time spans to form a training dataset.
[0035] Use the training dataset to train the Transformer-LSTM network.
[0036] As Figure 2 shown, it is the structure diagram of the Transformer-LSTM network model, which mainly includes an encoder and a decoder. For the input geomagnetic time series, the role of the encoder is to extract the spatial geomagnetic features related to the position in the geomagnetic time series and convert them into position features. The decoder is to associate the position features with the position coordinates and calculate the coordinate sequences of the vehicle in the current and historical time periods. The size of the input magnetic field sequence is [B, W, 3], where B represents the number of batches, W represents the number of points in the sequence, and 3 means that the magnetic field vector used is three-axis. The size of the position feature is [B, W, D], where D refers to the dimension of the deep magnetic field feature. The decoder runs only once and outputs the position coordinate sequence, with the size of [B, W, 2], and 2 represents two dimensions including the abscissa and the ordinate. And the required current position is the coordinate of the last point in the position sequence.
[0037] As Figure 3 shown, it is a detailed diagram of the Transformer-LSTM network model. The encoder first inputs the geomagnetic sequence into a fully connected layer and a position encoding layer. Different from the standard Transformer encoder, in the encoder of the present invention, the standard encoding layer is replaced with multiple spatio-temporal feature extraction layers. In the decoder, considering that the data diversity is strong without information assistance and the training data volume is limited, in order to reduce the training difficulty, the traditional Transformer decoder is replaced with a structure including two LSTM layers and a fully connected layer. The decoder resolves the position features output by the encoder into the coordinates corresponding to the time series.
[0038] The input of the encoder is a magnetic field time series with a length of W, and the output is the position features corresponding to the sequence. That is, the encoder mainly realizes the function of converting magnetic field features into position features. Different from the traditional Transformer encoder, in the encoder of the present invention, spatio-temporal feature extraction layers are designed and stacked longitudinally, as Figure 3 shown, this layer is responsible for completing the conversion of the geomagnetic time series to spatial position features.
[0039] The internal structure of the spatio-temporal feature extraction layer is as Figure 4 shown. It contains three layers in total, namely the global magnetic feature extraction layer, the local magnetic feature extraction layer, and the position feature extraction layer.
[0040] (1) Global magnetic feature extraction layer
[0041] The global magnetic feature extraction layer is used to uniformly calculate all geomagnetic features within the geomagnetic-position sequence with equal time spans. This layer mainly extracts features at the entire sequence level, such as the magnetic field bias generated by carrier interference within the sequence. Here, a standard Transformer encoding layer is used as the global feature extraction layer to realize the calculation of sequence global features. The algorithm mechanism of the Transformer encoding layer has strong scalability and diversity, and this design enables the Transformer encoding layer to have the mathematical basis for global feature calculation. For the Transformer encoding layer, the i-th geomagnetic feature in the sequence will learn a residual within the encoding layer after passing through the Transformer encoding layer, and this residual can be briefly expressed by the following formula:
[0042] (1)
[0043] Among them, EncoderLayer represents the encoding layer, and the residual is jointly calculated by all magnetic features within the sequence. The specific calculation mainly includes the self-attention mechanism SelfAtt and the feed-forward neural network. It can be seen that the above formula can support global-range calculations in terms of mathematical form.
[0044] (2) Local magnetic feature extraction layer
[0045] Although the global magnetic feature extraction layer has a larger receptive field, it lacks the characterization of local features. To make up for the lack of local features, the present invention introduces a local magnetic feature extraction layer. Considering the particularity of the continuously changing speed in the current scenario, the local magnetic feature extraction layer is designed as Figure 5 the structure shown.
[0046] Among them, the spatial feature extraction layer is applicable to the cases of medium and slow vehicle speeds. At this time, there will be magnetic field data with similar values in adjacent time intervals, which are redundant features and do not contribute to the final positioning. For the local feature extraction layer whose goal is to "extract spatially uniformly sampled magnetic field features", it is necessary to process the information with a small spatial span when the vehicle speed is slow for this situation.
[0047] To achieve this goal, the spatial feature extraction layer designs 4 different receptive field convolutional layers with convolutional kernels of 3, 5, 7, and 9 respectively to avoid losing necessary spatial information in the current calculation node. Then, the output feature tensors of different receptive fields are matrix-expanded in the dimension of the feature channel, and then a convolutional layer is used for feature selection and feature fusion to obtain spatial features, as Figure 6 shown.
[0048] The time feature extraction layer is applicable to the scenario of fast vehicle speed. When the vehicle is traveling at a fast speed, magnetic features with equal spatial intervals will be lost in the magnetic field time series. In this case, no matter how large the receptive field is used, it is impossible to achieve equal spatial interval calculation. To solve this problem, the time feature extraction layer expands the original time series with a length of W into a virtual time series with a length of W', and the length W' of the expanded time series is greater than the original length W.
[0049] Therefore, the designed network structure of the time feature extraction layer is as Figure 7 shown. First, all the moment data in the output data sequence of the global magnetic feature extraction layer are combined in the time dimension, and then a one-dimensional convolution is performed in the time dimension with a convolutional kernel size of 3×3, and the weights of the convolutional kernel are obtained through learning. The data after one-dimensional convolution is expanded to obtain a virtual time series, and then the spatial feature extraction layer is used to extract features from the virtual time series. Finally, the virtual time series is scaled back to the original time series length through a convolutional layer to obtain time features.
[0050] (3) Position feature extraction layer
[0051] The input of the position feature extraction layer is the spatially aligned magnetic field features (i.e., the output data of the local magnetic feature extraction layer), and the output is the magnetic field features embedded with position features. As Figure 8 shown, the position feature extraction layer is similar to the standard Transformer encoding layer, both containing a self-attention layer, layer normalization, and a feed-forward neural network. The difference is that the position feature extraction layer uses the self-attention layer of LSH.
[0052] The LSH technology realizes the self-classification of points in the set by constructing LSH functions, decoupling the influence of factors such as the variability of speed and magnetic field noise on the positioning result. Different from other hash functions, the LSH function needs to meet the condition of locality sensitivity, that is, for any two points p and q in the set S, if the function family H = {h1, h2,..., hn} from S to U satisfies the distance function satisfies the condition of Equation (2), then is distance-sensitive.
[0053] (2)
[0054] where, 、 、 and are constants, > , represents probability.
[0055] The core of the LSH technology is to construct the LSH mapping function. Here, the random projection method is used to implement it: define multiple random rotation matrices Ri, then p becomes pRi after passing through the rotation matrix, and the hash function can be expressed by Equation (3):
[0056] (3)
[0057] where, [pR; -pR] represents the connection line between the pRi vector and -pRi.
[0058] According to Equation (3), the standard for hash value clustering is designed to obtain Equation (4). represents the set composed of points with the same hash value, and this set is also called a "bucket".
[0059] (4)
[0060] In the formula, j represents the index whose hash value is equal to , the superscript r represents the sequence number composed of j, represents 's hash function, represents Hash function;
[0061] Substitute Equation (4) into the self-attention formula to obtain Equation (5).
[0062] (5)
[0063] In Equation (5), represents the output result of input i, represents the query of input i, represents the key of j, represents the value of j, set , to ensure that h( ) = h( ). At this time, the self-attention mechanism only calculates within the bucket. Based on the above settings, the structure of the LSH self-attention layer can be obtained, as shown in Figure 9 shown.
[0064] The magnetic field time series first passes through the LSH hash function to obtain its corresponding hash value, and then different magnetic field features at different times are assigned to different buckets according to the hash value. Furthermore, self-attention calculation is performed on all times inside the bucket, and finally the values inside the bucket are corresponding to the original times and output in a residual manner.
[0065] Compared with the standard self-attention mechanism, the LSH self-attention mechanism is an attempt and extension of the "divide and conquer" idea in the self-attention mechanism. In the scenario of the present invention, the "divide and conquer" idea of the LSH self-attention mechanism will bring an improvement in positioning accuracy. During the vehicle driving process, the variability of speed and the instability caused by magnetic field noise will both affect the final positioning result. If these factors can be explicitly decoupled, then the geomagnetic positioning accuracy will be significantly improved. However, these factors are often difficult to model or even unpredictable, and at this time, the clustering setting in the LSH self-attention mechanism enables points with certain similar characteristics to be merged and processed through learning inside the neural network, thereby improving the overall positioning accuracy.
[0066] (4) Training strategy
[0067] Network training is completed in the offline stage, and the weights of the network are output after network training. In the online stage, after the network loads the weights, no additional updates are required for the weights, and inference can be directly performed to complete geomagnetic positioning. The loss function consists of two parts: position loss and displacement loss. The position loss is the root mean square error (Mean Squared Error, MSE) between the predicted position and the true position, and the displacement loss can be written as Equation (6):
[0068] (6)
[0069] Among them, and respectively represent the predicted position and the true position at time i. The final loss function is the sum of the position MSE and the displacement loss. During the training process, a warm-up mode is adopted for training. The number of warm-up iterations is 1000 steps, and the learning rate is 1× .
[0070] Step 2: In the online stage, collect geomagnetic data and inertial data and perform preprocessing to construct effective geomagnetic sequence data; input the effective geomagnetic sequence data into the Transformer-LSTM network model trained in the offline stage for inference, and calculate the positioning result, including:
[0071] During the real-time driving of the vehicle, collect geomagnetic data and inertial data;
[0072] Use the inertial information sequence to judge zero speed, and eliminate the invalid geomagnetic sequence composed of consecutive zero-speed moments;
[0073] Downsample the geomagnetic data after eliminating consecutive zero-speed moments, and combine with the driving speed to obtain magnetic field data with equal time intervals and moderate frequencies;
[0074] Use a sliding window to divide the geomagnetic data with equal time intervals and moderate frequencies into geomagnetic sequences, ensuring that the number of geomagnetic data points included in each magnetic field sequence is the same as that in the offline stage, that is, generate a series of geomagnetic sequences with equal time spans;
[0075] Subtract the magnetic field mean value of each sequence from each point of the geomagnetic in each sequence of a series of geomagnetic sequences with equal time spans to obtain effective geomagnetic sequence data, so as to avoid the influence of too large absolute value difference of the geomagnetic field intensity on training;
[0076] Input the effective geomagnetic sequence data into the Transformer-LSTM network model trained in the offline stage for inference, and calculate the positioning result.
[0077] In summary, the present invention designs a neural network to learn the correspondence between geomagnetic features and positions, and can effectively handle the problem that geomagnetic sequences cannot be aligned in the spatial scale without other information assistance.
[0078] On the other hand, as Figure 10 shown, the present invention provides a vehicle geomagnetic positioning system based on a neural network, and each module included therein can implement each step of the foregoing method, specifically including the following modules:
[0079] An offline module for collecting geomagnetic data and position data, preprocessing them, constructing a geomagnetic-position sequence with an equal time span, and training a Transformer-LSTM network model using the geomagnetic-position sequence with an equal time span; the Transformer-LSTM network model includes an encoder and a decoder, the encoder is used to extract the spatial magnetic field features related to the position in the input data and convert them into position features; the decoder is used to associate the position features with the position coordinates and calculate the coordinate sequence of the vehicle in the current and historical time periods.
[0080] An online module for collecting geomagnetic data and inertial data, preprocessing them, and constructing effective geomagnetic sequence data; inputting the effective geomagnetic sequence data into the Transformer-LSTM network model trained in the offline stage for inference to calculate the positioning result.
[0081] In a third aspect, the present invention provides an electronic device, including: one or more processors; a memory for storing one or more programs; wherein, when the one or more programs are executed by the one or more processors, the one or more processors implement the foregoing vehicle geomagnetic positioning method based on a neural network.
[0082] In a fourth aspect, the present invention provides a computer-readable storage medium, on which executable instructions are stored, and when the instructions are executed by a processor, the processor can implement the foregoing vehicle geomagnetic positioning method based on a neural network.
[0083] The specific embodiments described above further elaborate on the purpose, technical solutions, and beneficial effects of the present invention. It should be understood that the above are only specific embodiments of the present invention and are not used to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.
Claims
1. A vehicle geomagnetic positioning method based on a neural network, characterized in that, It includes the following steps: Step 1: In the offline stage, collect geomagnetic data and location data and perform preprocessing to construct a geomagnetic-location sequence with an equal time span. Use the geomagnetic-location sequence with an equal time span to train the Transformer-LSTM network model. The Transformer-LSTM network model includes an encoder and a decoder. The encoder is used to extract the spatial magnetic field features related to the location in the input data and convert them into location features; The decoder is used to associate the location features with the location coordinates and calculate the coordinate sequence of the vehicle in the current and historical time periods; Step 2: In the online stage, collect geomagnetic data and inertial data and perform preprocessing to construct effective geomagnetic sequence data. Input the effective geomagnetic sequence data into the Transformer-LSTM network model trained in the offline stage for inference to calculate the positioning result.
2. The vehicle geomagnetic positioning method based on a neural network according to claim 1, characterized in that, The construction of the geomagnetic-location sequence with an equal time span in Step 1 includes: Downsample the collected geomagnetic data and combine it with the driving speed to obtain geomagnetic data at equal time intervals; Use a sliding window to divide the geomagnetic data at equal time intervals into sequences to ensure that the number of geomagnetic data points in each geomagnetic sequence is equal; Calculate the geomagnetic mean of each geomagnetic sequence, and subtract the geomagnetic mean of the corresponding geomagnetic sequence from each geomagnetic data point of each geomagnetic sequence to generate a series of geomagnetic sequences with an equal time span; Normalize the positions corresponding to the geomagnetic data points of the geomagnetic sequence to 0-1, and jointly construct a geomagnetic-location sequence with an equal time span with the geomagnetic sequence with an equal time span.
3. A vehicle geomagnetic positioning method based on a neural network according to claim 1, characterized in that In Step 1, the encoder receives the input data and obtains location features after passing through a fully connected layer, a position encoding layer, and multiple spatio-temporal feature extraction layers in sequence. The decoder receives the location features and passes through two LSTM layers and a fully connected layer in sequence to calculate the coordinates corresponding to the time series from the location features.
4. The vehicle geomagnetic positioning method based on a neural network according to claim 3, characterized in that The spatio-temporal feature extraction layer of the encoder includes a global magnetic feature extraction layer, a local magnetic feature extraction layer, and a position feature extraction layer cascaded in sequence.
5. The vehicle geomagnetic positioning method based on a neural network according to claim 4, wherein, The global magnetic feature extraction layer uses a standard Transformer encoding layer to uniformly calculate all magnetic features within the geomagnetic-location sequence with an equal time span.
6. The vehicle geomagnetic positioning method based on a neural network according to claim 4, characterized in that The local magnetic feature extraction layer includes a spatial feature extraction layer and a temporal feature extraction layer to extract features from the output data of the global magnetic feature extraction layer. Among them, the spatial feature extraction layer is used to process the data corresponding to medium and low driving speeds, and the temporal feature extraction layer is used to process the data corresponding to high driving speeds of the vehicle.
7. A vehicle geomagnetic positioning method based on a neural network according to claim 6, characterized in that, The spatial feature extraction layer sends the output data of the global magnetic feature extraction layer into 4 different receptive field convolutional layers with convolutional kernels of 3, 5, 7, and 9 respectively. Expand the output feature tensors of different receptive field convolutional layers in the dimension of the feature channel, and then perform feature selection and feature fusion by a convolutional layer to obtain spatial features.
8. The vehicle geomagnetic positioning method based on a neural network according to claim 6, characterized in that, The time feature extraction layer combines the output data of the global magnetic feature extraction layer in the time dimension, then performs one-dimensional convolution in the time dimension with a convolution kernel size of 3×3. After expanding the data obtained from the one-dimensional convolution, a virtual time series is obtained. The spatial feature extraction layer is used to extract features from the virtual time series. Finally, it is scaled to the length of the original time series through a convolutional layer to obtain time features.
9. A vehicle geomagnetic positioning method based on a neural network according to claim 4, characterized in that, The position feature extraction layer includes a self-attention layer with LSH, layer normalization, and a feed-forward neural network. By constructing an LSH function, self-classification of points within the set is achieved, decoupling the influence of the variability of speed and magnetic field noise on the positioning result; LSH represents Locality-Sensitive Hashing.
10. A vehicle geomagnetic positioning method based on a neural network according to claim 1, characterized in that, The loss function used for training the Transformer-LSTM network model includes position loss and displacement loss.
11. A vehicle geomagnetic positioning method based on a neural network according to claim 1, characterized in that The construction of effective magnetic sequence data in step 2 includes: During the real-time driving process of the vehicle, geomagnetic data and inertial data are collected; Using the inertial information sequence to judge zero speed, and removing the invalid geomagnetic sequence composed of consecutive zero-speed moments; Downsampling the geomagnetic data after removing consecutive zero-speed moments, and combining with the driving speed to obtain magnetic field data at equal time intervals; Dividing the geomagnetic data at equal time intervals in the form of a sliding window to generate a series of geomagnetic sequences with equal time spans; Subtracting the magnetic field mean value of each sequence from each point in each sequence of the geomagnetic sequence with equal time spans to obtain effective magnetic sequence data.
12. A vehicle geomagnetic positioning system based on a neural network, characterized in that, It includes the following modules: An offline module for collecting geomagnetic data and position data and performing preprocessing, constructing a geomagnetic-position sequence with equal time spans, and using the geomagnetic-position sequence with equal time spans to train the Transformer-LSTM network model; the Transformer-LSTM network model includes an encoder and a decoder, and the encoder is used to extract the spatial magnetic field features related to the position in the input data and convert them into position features; The decoder is used to associate the position features with the position coordinates to calculate the coordinate sequence of the vehicle at the current and historical time periods; An online module for collecting geomagnetic data and inertial data and performing preprocessing, constructing effective magnetic sequence data; inputting the effective magnetic sequence data into the Transformer-LSTM network model trained in the offline stage for inference to calculate the positioning result.
13. An electronic device, characterized in that, It includes: One or more processors; A memory for storing one or more programs; Wherein, when the one or more programs are executed by the one or more processors, the one or more processors implement the neural network-based vehicle geomagnetic positioning method according to any one of claims 1-11.
14. A computer-readable storage medium, characterized in that, Stored thereon are executable instructions, which when executed by a processor can enable the processor to implement the neural network-based vehicle geomagnetic positioning method according to any one of claims 1-11.
Citation Information
Patent Citations
Graph convolutional neural network model and vehicle trajectory prediction method using same
CN111931905A
Geomagnetic navigation method based on hierarchical bidirectional LSTM (Long Short Term Memory) and track plotting
CN116907480A
Coarse and fine matching combined geomagnetic road positioning method and system and storage medium
CN118329014A
Transform-based global positioning method for automatic driving commercial vehicle on structured road
CN118691779A
Method for bus arrival time prediction when lacking data
WO2023029234A1