A vehicle geomagnetic positioning method and system based on neural network

Through the Transformer-LSTM-based neural network structure, the boundary characteristics and carrier interference problems of the DTW algorithm in traditional geomagnetic positioning methods are solved, and high-precision vehicle positioning is achieved in conditions where satellite signals are unavailable, such as urban canyons and indoors.

CN120351941BActive Publication Date: 2025-09-05AEROSPACE INFORMATION RES INST CAS
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510852077.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-24
Publication Date
2025-09-05
Estimated Expiration
2045-06-24

AI Technical Summary

Technical Problem

Traditional geomagnetic positioning methods have problems in vehicle positioning, such as the difficulty in meeting the boundary conditions of the DTW algorithm and the inability of the point matching similarity measurement method to avoid carrier interference, resulting in insufficient positioning accuracy.

Method used

A neural network structure based on Transformer-LSTM is adopted to process magnetic field data through the spatiotemporal feature extraction layer and LSH self-attention mechanism, and the position is solved by combining with the LSTM decoder to realize global and local extraction of magnetic field features. The noise distribution is learned through the training set to improve positioning accuracy.

Benefits of technology

The accuracy and stability of geomagnetic positioning have been improved, and it can handle different speeds and noise interference without the assistance of other information, achieving high-precision positioning around the clock and in all weather conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120351941B_ABST
    Figure CN120351941B_ABST
Patent Text Reader

Abstract

The present invention discloses a vehicle geomagnetic positioning method and system based on a neural network, belonging to the field of vehicle positioning technology. The method includes an offline stage, collecting geomagnetic data and position data and preprocessing them, constructing a geomagnetic-position sequence of equal time span, and using the geomagnetic-position sequence of equal time span to train a network model; the network model extracts spatial magnetic field features related to position in the input data and converts them into position features, associates the position features with position coordinates, and solves the coordinate sequence of the vehicle in the current and historical time periods; in the online stage, inputs the valid magnetic sequence data into the network model trained in the offline stage for inference, and calculates the positioning result. The present invention ensures the network's ability to process magnetic field data of different vehicle speeds. At the same time, it classifies and processes the factors that affect the positioning results, thereby improving positioning accuracy while alleviating computing pressure.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of vehicle positioning technology, 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 indoor environments. Background Art

[0002] There are a variety of vehicle positioning methods. Global satellite navigation systems, leveraging their wireless signal ranging technology and the distance intersection method, are the most widely used, providing users with high-precision three-dimensional coordinate information in real time. However, satellite navigation signals are inherently fragile and susceptible to interference from factors such as signal blocking, multipath, and non-line-of-sight signal suppression, making it difficult to ensure accurate vehicle positioning. Geomagnetic positioning, with its advantages of no long-term cumulative error and susceptibility to interference, enables all-day, all-weather, and all-region positioning, demonstrating enormous potential for vehicle applications. Currently, most vehicle geomagnetic positioning methods are matching methods. Their core approach is to match measured magnetic field sequences with those in a geomagnetic reference library to estimate position. These methods are divided into two phases: geomagnetic reference library construction and position resolution. In the geomagnetic reference library construction phase, a geomagnetic reference library for the desired positioning area is established through measurement and interpolation. In the position resolution phase, the raw magnetic field measurement data is directly used to match features with the geomagnetic reference library according to matching criteria to calculate the most likely position. However, without additional information such as attitude and mileage, the sampling rate and vehicle speed cannot be fully consistent, resulting in different lengths of the two acquired magnetic field time series. Dynamic Time Warping (DTW) is one of the most effective methods for aligning sequences of different lengths. By calculating the similarity between two time series, the real-time sequence is stretched or resized to match the length of the sequence to be matched. This process distorts or bends the real-time sequence to match the features. 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, making it unsuitable for geomagnetic positioning on vehicle platforms. Summary of the Invention

[0003] To address the aforementioned technical issues, the present invention provides a neural network-based vehicle geomagnetic positioning method and system. This system employs a spatiotemporal feature extraction layer to progressively extract global and local magnetic field features, as well as positional features. The system innovatively utilizes a spatial feature extraction layer that fuses multiple receptive fields and a temporal feature extraction layer that extends virtual moments to extract spatial magnetic field features. Furthermore, a self-attention mechanism called LSH (Locality Sensitive Hashing) is employed to "divide and conquer" the numerous factors influencing geomagnetic positioning results, categorizing their impact on the positioning results. Finally, considering the increased data diversity and training difficulty associated with varying vehicle speeds, an LSTM-based decoder architecture is proposed to obtain the user's location.

[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 phase, geomagnetic data and position data are collected and preprocessed to construct a geomagnetic-position sequence of equal time span. The geomagnetic-position sequence of equal time span is used to train the Transformer-LSTM network model. The Transformer-LSTM network model includes an encoder and a decoder. The encoder is used to extract spatial magnetic field features related to 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.

[0007] Step 2: In the online phase, geomagnetic data and inertial data are collected and preprocessed to construct valid magnetic sequence data. The valid magnetic sequence data is input into the Transformer-LSTM network model trained in the offline phase for inference, and the positioning results are calculated.

[0008] In another aspect, the present invention provides a vehicle geomagnetic positioning system based on a neural network, comprising:

[0009] An offline module is used to collect and preprocess geomagnetic data and position data, construct a geomagnetic-position sequence of equal time span, and use the geomagnetic-position sequence of equal time span to train a Transformer-LSTM network model. The Transformer-LSTM network model includes an encoder and a decoder. The encoder is used to extract spatial magnetic field features related to 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.

[0010] The online module is used to collect and preprocess geomagnetic data and inertial data to construct effective magnetic sequence data; the effective magnetic sequence data is input into the Transformer-LSTM network model trained in the offline stage for inference, and the positioning results are calculated.

[0011] In a third aspect, the present invention provides an electronic device comprising: 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 aforementioned neural network-based vehicle geomagnetic positioning method.

[0012] In a fourth aspect, the present invention provides a computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, enables the processor to implement the aforementioned neural network-based vehicle geomagnetic positioning method.

[0013] Beneficial effects:

[0014] 1. Compared with the existing geomagnetic matching method, the present invention has obvious advantages in improving the accuracy of geomagnetic positioning. On the one hand, the traditional geomagnetic matching method relies on the geomagnetic reference library, while the present invention adopts 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 of each location point richer. On the other hand, the traditional method directly uses the original magnetic field measurement information, while the neural network of the present invention learns the features that meet the constraints of the data set and loss function through a "training-testing" mode. When the network converges, it has a powerful feature extraction capability. In addition, the neural network-based method, due to its data-driven characteristics, can achieve global optimization of feature extraction and processing, and is thus superior to the traditional method in magnetic field feature extraction and matching.

[0015] 2. The neural network structure of this invention is optimized in design. The encoder replaces the traditional standard encoding layer with multiple spatiotemporal feature extraction layers, focusing on extracting positional features. The decoder, addressing the challenges of high data diversity and limited training data without auxiliary information, leverages the LSTM's low parameter count and ease of convergence, effectively reducing training difficulty and improving the model's adaptability and stability.

[0016] 3. The spatiotemporal 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 magnetic field bias caused by carrier interference. The local feature extraction layer takes into account the possibility of slow or fast vehicle speeds. It is designed to integrate multiple receptive fields into the spatial feature extraction layer and the temporal feature extraction layer with extended virtual moments to ensure that the network can effectively process magnetic field data at different speeds. The position feature extraction layer classifies the factors that affect the positioning results, reducing the computational burden while improving positioning accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 This is a flow chart of a vehicle geomagnetic positioning method based on a neural network according to the present invention;

[0018] Figure 2 This is the Transformer-LSTM network model structure diagram;

[0019] Figure 3 This is the detailed diagram of the Transformer-LSTM network model;

[0020] Figure 4 This is the structure diagram of the spatiotemporal feature extraction layer;

[0021] Figure 5 Extraction layer structure diagram for local magnetic features;

[0022] Figure 6 This is the structure diagram of the spatial feature extraction layer;

[0023] Figure 7 This is the structure diagram of the time feature extraction layer;

[0024] Figure 8 It is the structure diagram of the position feature extraction layer;

[0025] Figure 9 This is the structure diagram of the LSH self-attention layer;

[0026] Figure 10 Schematic diagram of a vehicle geomagnetic positioning device based on a neural network of the present invention. DETAILED DESCRIPTION

[0027] The present invention will be further described below with reference to the accompanying drawings and examples.

[0028] like Figure 1 FIG. 1 is a flow chart of a vehicle geomagnetic positioning method based on a neural network according to the present invention. The method includes an offline phase and an online phase. Specifically, the method includes:

[0029] Step 1: In the offline phase, geomagnetic data and position data are collected and preprocessed to construct a geomagnetic-position sequence with equal time span. The geomagnetic-position sequence with equal time span is used to train the Transformer-LSTM network model. The Transformer-LSTM network model includes an encoder and a decoder. The encoder is used to extract spatial magnetic field features related to 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. Specifically, the following steps are performed:

[0030] The vehicle collects a large amount of geomagnetic data and location data while driving;

[0031] The collected geomagnetic data is downsampled and combined with the driving speed to obtain geomagnetic data with equal time intervals and moderate frequency;

[0032] A sliding window is used to divide a large number of continuous geomagnetic data with equal time intervals into magnetic field sequences to ensure 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 the magnetic field of each geomagnetic data point in each geomagnetic sequence to avoid the impact of excessive differences in the absolute values ​​of the magnetic field intensity on training, and generate a series of geomagnetic sequences with equal time spans;

[0034] Normalize the positions of the magnetic data points in the geomagnetic sequence to 0-1, and construct a large number of complete geomagnetic-position sequences with equal time span together with the geomagnetic sequences with equal time span to form the training data set;

[0035] Train the Transformer-LSTM network using the training dataset.

[0036] like Figure 2 The figure below shows the structure of the Transformer-LSTM network model. Its core consists of an encoder and a decoder. For the input geomagnetic time series, the encoder extracts location-related spatial geomagnetic features from the series and converts them into position features. The decoder associates the position features with location coordinates to calculate the vehicle's coordinate sequence for the current and historical time periods. The input magnetic field sequence has a dimension of [B, W, 3], where B represents the batch size, W represents the number of points in the sequence, and 3 refers to the use of a three-axis magnetic field vector. The position feature has a dimension of [B, W, D], where D represents the dimension of the deep magnetic field feature. The decoder runs only once and outputs a position coordinate sequence of dimension [B, W, 2], where 2 represents the total dimension of the horizontal and vertical axes. The current position is the coordinate of the last point in the position sequence.

[0037] like Figure 3 Figure 2 shows 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. Unlike the standard Transformer encoder, this invention replaces the standard encoding layer with multiple spatiotemporal feature extraction layers in the encoder. In the decoder, considering the high data diversity when no information is provided and the limited amount of training data, to reduce the difficulty of training, the traditional Transformer decoder is replaced with a structure consisting of two LSTM layers and a fully connected layer. The decoder converts the position features output by the encoder into coordinates corresponding to the time series.

[0038] The input of the encoder is a magnetic field time series of length W, and the output is the position feature corresponding to the sequence. That is, the encoder mainly realizes the function of converting magnetic field features into position features. Unlike the traditional Transformer encoder, the spatiotemporal feature extraction layer is designed in the encoder of the present invention and stacked vertically, such as Figure 3 As shown in Figure 2, this layer is responsible for transforming geomagnetic time series into spatial position features.

[0039] The internal structure of the spatiotemporal feature extraction layer is as follows: Figure 4 As shown, it contains three layers internally, 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 realize the unified calculation of all geomagnetic features in the geomagnetic-position sequence with equal time span. This layer mainly extracts features at the level of the entire sequence, such as the magnetic field bias caused by the interference of the carrier in the sequence. The standard Transformer encoding layer is used here as the global feature extraction layer to realize the calculation of the global features of the sequence. The algorithm mechanism of the Transformer encoding layer has strong scalability and diversity. This design enables the Transformer encoding layer to have a mathematical basis for global feature calculation. For the Transformer encoding layer, the i-th geomagnetic feature in the sequence After passing through the Transformer encoding layer, a residual is learned inside the encoding layer. This residual can be briefly expressed as follows:

[0042] (1)

[0043] Among them, EncoderLayer represents the encoding layer, and the residual is calculated by all the magnetic features in the sequence. The specific calculation mainly includes the self-attention mechanism SelfAtt and the feedforward neural network. It can be seen that the above formula can support global calculations in 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 ability to describe local features. In order to compensate for the lack of local features, the present invention introduces a local magnetic feature extraction layer. Considering the particularity of the ever-changing speed in the current scene, the local magnetic feature extraction layer is designed as follows: Figure 5 The structure shown.

[0046] Among them, the spatial feature extraction layer is suitable for situations where the vehicle speed is medium or slow. 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 magnetic field features that are uniformly sampled in space", it is necessary to process information with a smaller spatial span when the vehicle speed is slow in response to this situation.

[0047] To achieve this goal, the spatial feature extraction layer designs four different receptive field convolution layers with convolution kernels of 3, 5, 7, and 9, respectively, to avoid the loss of necessary spatial information in the current computing node. Then, the output feature tensors of different receptive fields are matrix-expanded in the dimension of feature channels, and then a convolution layer performs feature selection and feature fusion to obtain spatial features, such as Figure 6 shown.

[0048] The temporal feature extraction layer is suitable for scenarios with high vehicle speeds. When a vehicle is traveling at high speeds, evenly spaced magnetic features are lost in the magnetic field time series. In this case, evenly spaced computations cannot be achieved, regardless of the receptive field size. To address this issue, the temporal feature extraction layer expands the original time series of length W into a virtual time series of length W'. This expanded time series length W' is greater than the original length W.

[0049] Therefore, the designed temporal feature extraction layer network structure is as follows Figure 7 As shown in the figure, all the data points within the output data sequence of the global magnetic feature extraction layer are combined in the time dimension. A one-dimensional convolution is then performed in the time dimension with a 3×3 kernel whose weights are learned. The data after the one-dimensional convolution is expanded to obtain a virtual time series. The spatial feature extraction layer then extracts features from this virtual time series. Finally, the virtual time series is scaled back to the length of the original time series through the convolution layer to obtain the temporal 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 the position features. Figure 8 As shown in the figure, the position feature extraction layer is similar to the standard Transformer encoding layer, including a self-attention layer, layer normalization, and a feedforward neural network. The difference is that the position feature extraction layer uses the self-attention layer of LSH.

[0052] LSH technology realizes self-classification of points in a set by constructing LSH function, decoupling the influence of factors such as velocity variability and magnetic field noise on positioning results. Different from other hash functions, LSH function needs to meet the condition of local 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 is the distance function If the condition of formula (2) is satisfied, then It is distance sensitive.

[0053] (2)

[0054] in, 、 、 and is a constant, > , Represents probability.

[0055] The core of LSH technology is to construct an LSH mapping function. Here, we use the random projection method to implement it: define multiple random rotation matrices Ri, then p becomes pRi after the rotation matrix, and the hash function can be expressed as follows:

[0056] (3)

[0057] Among them, [pR;-pR] represents the line connecting the pRi vector and -pRi.

[0058] According to formula (3), the standard for hash value clustering is designed to obtain formula (4). Represents a set of points with consistent hash values, which is also called a "bucket".

[0059] (4)

[0060] In the formula, j represents the hash value and For equal indices, the superscript r represents the sequence number composed of j. express The hash function, express Hash function of

[0061] Substitute formula (4) into the self-attention formula to obtain formula (5).

[0062] (5)

[0063] In formula (5), represents the output result of input i, represents the query of input i, represents the key of j, Indicates the value of j, set , to ensure h( )=h( ). At this time, the self-attention mechanism is only calculated 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 is first hashed using the LSH hash function to obtain its corresponding hash value. The magnetic field features at different moments are then assigned to different buckets based on the hash value. Furthermore, self-attention is applied to all moments within the bucket. Finally, the bucket values ​​are aligned with the original moments and output as residuals.

[0065] Compared with the standard self-attention mechanism, the LSH self-attention mechanism is an attempt and extension of the "divide and conquer" approach to the self-attention mechanism. In the scenario of the present invention, the "divide and conquer" approach of the LSH self-attention mechanism will lead to an improvement in positioning accuracy. During vehicle driving, the variability of speed and the instability caused by magnetic field noise will affect the final positioning result. If these factors can be explicitly decoupled, the geomagnetic positioning accuracy will be significantly improved. However, these factors are often difficult to model and even unpredictable. At this time, the clustering setting in the LSH self-attention mechanism makes it possible to merge points with similar characteristics in the neural network through learning, thereby improving the overall positioning accuracy.

[0066] (4) Training strategy

[0067] Network training is completed in the offline phase, and the network weights are output after network training is completed. In the online phase, after the network loads the weights, no additional updates are required to the weights, and inference can be performed directly 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 (MSE) between the predicted position and the true position, while the displacement loss can be written as Equation (6):

[0068] (6)

[0069] in, and Represent the predicted position and the actual position at time i respectively. The final loss function is the sum of the position MSE and the displacement loss. During the training process, the warm-up mode was used for training, the number of warm-up iterations was 1000 steps, and the learning rate was 1× .

[0070] Step 2: In the online phase, geomagnetic data and inertial data are collected and preprocessed to construct valid magnetic sequence data. The valid magnetic sequence data is input into the Transformer-LSTM network model trained in the offline phase for inference and calculation to obtain the positioning results, including:

[0071] The vehicle collects geomagnetic data and inertial data while driving in real time;

[0072] Use the inertial information sequence to determine zero speed and eliminate invalid geomagnetic sequences consisting of continuous zero speed moments;

[0073] The geomagnetic data with consecutive zero-speed moments are downsampled and combined with the driving speed to obtain magnetic field data with equal time intervals and moderate frequency;

[0074] The geomagnetic data with equal time intervals and moderate frequencies are divided into geomagnetic sequences in the form of sliding windows to ensure that the number of geomagnetic data points contained in each magnetic field sequence is the same as that in the offline stage, that is, to generate a series of geomagnetic sequences with equal time spans;

[0075] The effective magnetic sequence data is obtained by subtracting the mean magnetic field value of each sequence from the geomagnetic field of each point in each sequence of equal time span, so as to avoid the influence of large differences in the absolute value of the geomagnetic field intensity on the training.

[0076] The valid magnetic sequence data is input into the Transformer-LSTM network model trained in the offline stage for inference, and the positioning results are calculated.

[0077] In summary, the present invention designs a neural network to learn the correspondence between geomagnetic features and positions, which can effectively deal with the problem that geomagnetic sequences cannot be aligned on a spatial scale without other information assistance.

[0078] On the other hand, Figure 10 As shown, the present invention provides a vehicle geomagnetic positioning system based on a neural network, which includes various modules capable of implementing various steps of the aforementioned method, specifically including the following modules:

[0079] An offline module is used to collect and preprocess geomagnetic data and position data, construct a geomagnetic-position sequence of equal time span, and use the geomagnetic-position sequence of equal time span to train a Transformer-LSTM network model. The Transformer-LSTM network model includes an encoder and a decoder. The encoder is used to extract spatial magnetic field features related to 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] The online module is used to collect and preprocess geomagnetic data and inertial data to construct effective magnetic sequence data; the effective magnetic sequence data is input into the Transformer-LSTM network model trained in the offline stage for inference, and the positioning results are calculated.

[0081] In a third aspect, the present invention provides an electronic device comprising: 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 aforementioned neural network-based vehicle geomagnetic positioning method.

[0082] In a fourth aspect, the present invention provides a computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, enables the processor to implement the aforementioned neural network-based vehicle geomagnetic positioning method.

[0083] The specific embodiments described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above are only specific embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A vehicle geomagnetic positioning method based on neural network, characterized in that: The steps include: Step 1: In the offline stage, geomagnetic data and position data are collected and preprocessed to construct a geomagnetic-position sequence with equal time span, and the geomagnetic-position sequence with equal time span is used to train a Transformer-LSTM network model; the Transformer-LSTM network model includes an encoder and a decoder, and the encoder is used to extract spatial magnetic field features related to position in the input data and convert them into position features, including: the encoder receives input data and obtains position features after sequentially passing through a fully connected layer, a position encoding layer, and multiple spatiotemporal feature extraction layers; 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, including: the decoder receives the position features, passes them through two LSTM layers and a fully connected layer in sequence, and calculates the position features into coordinates corresponding to the time series; Step 2: In the online stage, geomagnetic data and inertial data are collected and preprocessed to construct effective magnetic sequence data; the effective magnetic sequence data is input into the Transformer-LSTM network model trained in the offline stage for inference, and the positioning results are calculated.

2. The vehicle geomagnetic positioning method based on neural network according to claim 1, characterized in that: The step 1 of constructing a geomagnetic-position sequence of equal time span includes: The collected geomagnetic data is downsampled and combined with the driving speed to obtain geomagnetic data with equal time intervals; A sliding window is used to divide the geomagnetic data of equal time intervals into sequences to ensure that the number of geomagnetic data points contained 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 the magnetic field of each geomagnetic data point in each geomagnetic sequence to generate a series of geomagnetic sequences with equal time spans; The positions corresponding to the magnetic data points in the geomagnetic sequence are normalized to 0~1, and a geomagnetic-position sequence of equal time span is constructed together with the geomagnetic sequence of equal time span.

3. The vehicle geomagnetic positioning method based on neural network according to claim 1, characterized in that: The spatiotemporal 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 which are cascaded in sequence.

4. The vehicle geomagnetic positioning method based on neural network according to claim 3, characterized in that: The global magnetic feature extraction layer adopts a standard Transformer encoding layer to realize unified calculation of all geomagnetic features in a geomagnetic-position sequence with equal time span.

5. The vehicle geomagnetic positioning method based on neural network according to claim 3, characterized in that: The local magnetic feature extraction layer includes a spatial feature extraction layer and a temporal feature extraction layer, which performs feature extraction on the output data of the global magnetic feature extraction layer, wherein the spatial feature extraction layer is used to process the data corresponding to medium and low speed driving conditions, and the temporal feature extraction layer is used to process the data corresponding to high speed driving conditions.

6. The vehicle geomagnetic positioning method based on neural network according to claim 5, characterized in that: The spatial feature extraction layer sends the output data of the global magnetic feature extraction layer to four different receptive field convolution layers with convolution kernels of 3, 5, 7 and 9 respectively. The output feature tensors of the convolution layers with different receptive fields are matrix expanded in the dimension of the feature channel, and then a convolution layer performs feature selection and feature fusion to obtain spatial features.

7. The vehicle geomagnetic positioning method based on neural network according to claim 5, characterized in that: The temporal feature extraction layer combines the output data of the global magnetic feature extraction layer in the time dimension, and then performs one-dimensional convolution on the time dimension. The size of the convolution kernel is 3×3. The data after the one-dimensional convolution is expanded to obtain a virtual time series. 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 the convolution layer to obtain the temporal feature.

8. The vehicle geomagnetic positioning method based on neural network according to claim 3, characterized in that: The position feature extraction layer includes an LSH self-attention layer, layer normalization, and a feedforward neural network. By constructing an LSH function, it achieves self-classification of points within the set and decouples the effects of speed variability and magnetic field noise on the positioning results. LSH stands for Locally Sensitive Hashing.

9. The vehicle geomagnetic positioning method based on neural network according to claim 1, characterized in that: The loss functions used to train the Transformer-LSTM network model include position loss and displacement loss.

10. The vehicle geomagnetic positioning method based on neural network according to claim 1, characterized in that: Constructing effective magnetic sequence data in step 2 includes: The vehicle collects geomagnetic data and inertial data while driving in real time; Use the inertial information sequence to determine zero speed and eliminate invalid geomagnetic sequences consisting of continuous zero speed moments; The geomagnetic data with consecutive zero-speed moments are downsampled and combined with the driving speed to obtain magnetic field data with equal time intervals. The geomagnetic data with equal time intervals are divided into geomagnetic sequences in the form of sliding windows to generate a series of geomagnetic sequences with equal time spans. The effective magnetic sequence data is obtained by subtracting the mean magnetic field of each sequence from the geomagnetic field of each point in each sequence of the same time span.

11. A vehicle geomagnetic positioning system based on neural network, characterized in that: Includes the following modules: An offline module is used to collect and preprocess geomagnetic data and position data, construct a geomagnetic-position sequence of equal time span, and use the geomagnetic-position sequence of equal time span to train a Transformer-LSTM network model; the Transformer-LSTM network model includes an encoder and a decoder, the encoder is used to extract spatial magnetic field features related to position in the input data and convert them into position features, including: the encoder receives input data and obtains position features after passing it through a fully connected layer, a position encoding layer, and multiple spatiotemporal feature extraction layers in sequence; 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, including: the decoder receives the position features, passes them through two LSTM layers and a fully connected layer in sequence, and calculates the position features into coordinates corresponding to the time series; The online module is used to collect and preprocess geomagnetic data and inertial data to construct effective magnetic sequence data; the effective magnetic sequence data is input into the Transformer-LSTM network model trained in the offline stage for inference, and the positioning results are calculated.

12. An electronic device, characterized in that: include: one or more processors; a memory for storing one or more programs; Wherein, when 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 described in any one of claims 1-10.

13. A computer-readable storage medium, characterized in that Executable instructions are stored thereon, which, when executed by a processor, enable the processor to implement the vehicle geomagnetic positioning method based on a neural network as described in any one of claims 1-10.

Citation Information

Patent Citations

  • Transform-based global positioning method for automatic driving commercial vehicle on structured road

    CN118691779A