A deep learning-based vehicle beidou positioning data anomaly repair method

By processing BeiDou positioning data with deep learning technology and combining it with multi-source sensor data, trajectory repair in complex environments has been achieved, solving the problem of abnormal positioning data in existing technologies and improving the reliability and accuracy of intelligent transportation systems.

CN121117433BActive Publication Date: 2026-01-23DEXINDONGYUAN INTELLIGENT TECH BEIJING CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511657118.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-13
Publication Date
2026-01-23
Estimated Expiration
2045-11-13

AI Technical Summary

Technical Problem

Existing technologies struggle to effectively capture the spatiotemporal correlations and long-range dependencies of vehicle BeiDou positioning data in complex urban environments, leading to abnormally frequent positioning data and impacting the reliability and operational accuracy of intelligent transportation systems.

Method used

A deep learning-based approach is adopted, which involves multi-source data preprocessing, anomaly mask generation, and trajectory completion. Combined with an Encoder-Decoder structure, attention mechanism, and autoencoder, a multi-objective loss function is constructed to repair the trajectory, ensuring the continuity and physical rationality of the repaired trajectory.

Benefits of technology

In complex urban environments, it can effectively improve the continuity and accuracy of positioning data, accurately identify intermittent missing segments and sudden jump points, and enhance the reliability and operational precision of intelligent transportation systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121117433B_ABST
    Figure CN121117433B_ABST
Patent Text Reader

Abstract

The present application relates to the field of Beidou positioning technology, and more particularly to a vehicle Beidou positioning data anomaly repair method based on deep learning. The method comprises the following steps: multi-source preprocessing; anomaly mask generation; trajectory completion: a deep learning model based on an Encoder-Decoder structure, fusion attention mechanism and introduction of an autoencoder auxiliary is constructed, an end-to-end training framework is adopted, and a multi-objective loss function including a mean square error loss term containing position error, a trajectory curvature continuity constraint loss term and a physical rationality constraint loss term; real-time output and system deployment are fused. The present application captures the spatio-temporal correlation and long-range dependency in vehicle trajectory data through deep learning technology, combines the cooperative processing logic of anomaly detection and trajectory completion, can accurately identify intermittent missing sections and sudden jump points, ensures the physical rationality of the repaired trajectory, and thus improves the reliability and operation accuracy of the downstream intelligent transportation system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of BeiDou positioning technology, and more specifically, to a method for repairing anomalies in vehicle BeiDou positioning data based on deep learning. Background Technology

[0002] The BeiDou Navigation Satellite System (BDS), my country's independently developed global satellite navigation system, has been widely applied in key areas such as transportation, intelligent driving, and unmanned equipment navigation. The positioning data it provides is the core foundation for the accurate operation of downstream systems (such as intelligent traffic scheduling and unmanned vehicle path planning), playing an irreplaceable role in ensuring the navigation reliability of various mobile vehicles. However, in real-world applications, vehicles often face the challenges of complex urban environments, such as signal obstruction caused by tall buildings, signal interruptions during tunnel passage, and signal distortion caused by electromagnetic interference. These factors can cause frequent anomalies in BeiDou positioning data, such as short-term data loss, coordinate jumps, and position drift, directly compromising the continuity and accuracy of the positioning data.

[0003] To address the aforementioned anomaly issues in BeiDou positioning data, existing technologies often employ traditional filtering methods such as Kalman filtering and particle filtering for repair. However, these methods can only perform simple smoothing based on the short-term statistical characteristics of the data, failing to effectively capture the implicit spatiotemporal relationships (such as the correlation of motion trends between trajectory points at different time steps) and long-term dependencies (such as the temporal transmission patterns of speed and heading angle during continuous driving). This results in limited anomaly repair effectiveness—it cannot accurately identify intermittent missing segments and sudden jumps in complex scenarios, nor can it guarantee the physical rationality of the repaired trajectory. Ultimately, this severely impacts the reliability and operational accuracy of downstream intelligent transportation systems. Therefore, there is an urgent need for a new method for BeiDou positioning data anomaly repair that combines deep learning technology with both anomaly detection accuracy and trajectory completion rationality. In light of this, we present a deep learning-based method for repairing vehicle BeiDou positioning data anomalies. Summary of the Invention

[0004] The purpose of this invention is to provide a deep learning-based method for repairing vehicle BeiDou positioning data anomalies, in order to solve the problem of poor traditional repair effects for BeiDou positioning anomalies mentioned in the background art.

[0005] To address the aforementioned technical problems, this invention provides a deep learning-based method for repairing anomalies in vehicle BeiDou positioning data, comprising the following steps:

[0006] S1. Multi-source preprocessing: Real-time acquisition of vehicle BeiDou positioning data and multi-source auxiliary sensor data; extraction of driving speed, acceleration, heading angle and direction change features from BeiDou positioning data through a sliding window; first-order difference analysis of driving speed, acceleration and heading angle to complete preprocessing; and fusion of preprocessed BeiDou positioning data and multi-source auxiliary sensor data into a multi-dimensional feature set.

[0007] S2, Anomaly Mask Generation: Based on the BeiDou positioning data fused from the multidimensional feature set in S1, combined with statistical methods and the DBSCAN clustering algorithm (statistical methods are used to analyze the temporal correlation of data, and DBSCAN clustering is used to analyze the spatial distribution relationship of data), anomaly points and missing segments in the BeiDou positioning data are identified, and an anomaly mask matrix is ​​generated.

[0008] S3. Trajectory Completion: Construct a deep learning model based on an Encoder-Decoder structure, incorporating an attention mechanism and introducing an autoencoder for assistance. Employ an end-to-end training framework and use a multi-objective loss function that includes a mean squared error loss term for positional error, a trajectory curvature continuity constraint loss term, and a physical rationality constraint loss term. Simulate and generate training samples with randomly missing segments on existing real trajectory data. Supervised learning training is then performed on the deep learning model to enable it to learn the contextual associations and physical constraints for trajectory completion. The trained deep learning model is then used in conjunction with the multi-dimensional feature set from S1 and the anomaly mask matrix from S2 to perform context-aware completion and repair of abnormal trajectory segments, outputting a continuous sequence of trajectory coordinates.

[0009] S4. Real-time output integration and system deployment: Deploy the lightweight deep learning model on the vehicle terminal or edge computing node, integrate the multi-source auxiliary sensor data in the multi-dimensional feature set described in S1, perform physical rationality correction on the trajectory coordinate sequence completed in S3, input abnormal trajectories in real time through a sliding window method and output the repair results, and finally obtain the BeiDou positioning trajectory that conforms to the vehicle dynamics characteristics.

[0010] As a further improvement to this technical solution, in S1, the vehicle's BeiDou positioning data includes at least longitude coordinates, latitude coordinates, driving speed, acceleration, and heading angle; the multi-source auxiliary sensor data includes at least the vehicle's inertial measurement unit (IMU) three-axis acceleration data, odometer cumulative driving distance data, and gyroscope heading angle velocity data.

[0011] As a further improvement to this technical solution, in step S2, identifying abnormal points and missing segments in BeiDou positioning data includes the following steps:

[0012] S2.1 Extract BeiDou positioning data (including velocity, acceleration, and direction change features extracted by sliding window and first-order difference analysis results) from the multi-dimensional feature set fused in S1.

[0013] S2.2 First, the extracted BeiDou positioning data is input into statistical methods to analyze the temporal correlation of the data and screen out suspected abnormal data that exceed the normal fluctuation range; then, the suspected abnormal data and the remaining normal data are input into the DBSCAN clustering algorithm to further analyze the spatial distribution relationship of the data features.

[0014] S2.3. Based on the combined calculation results of statistical methods and DBSCAN clustering algorithm, isolated data points that are not classified into any cluster are identified as outliers in BeiDou positioning data, and trajectory segments that do not form effective clusters and meet the set time continuity conditions are identified as missing segments.

[0015] As a further improvement to this technical solution, in step S2, generating the anomaly mask matrix includes the following steps:

[0016] S2.4 Construct an anomaly mask matrix that matches the length of the BeiDou positioning data time series, ensuring that the matrix dimensions correspond one-to-one with the data time dimensions;

[0017] S2.5. Mark the elements in the anomaly mask matrix according to the rule that "the positions of abnormal points and missing segments are marked as 0, and the positions of normal tracks are marked as 1".

[0018] S2.6 After completing the anomaly mask matrix marking, record the time index (start time step and end time step) of the missing segment, and extract the context features of the missing segment (normal trajectory features of the preset time steps before and after the missing segment) to form a complete annotation result containing the anomaly location, time range and context information.

[0019] As a further improvement to this technical solution, in step S3, a deep learning model based on an Encoder-Decoder structure, incorporating an attention mechanism and introducing an autoencoder is constructed, including the following steps:

[0020] S3.1. Employ a multi-layer bidirectional long short-term memory network Bi-LSTM or a multi-layer Transformer encoder layer to extract temporal features from the input multi-dimensional feature set (including multi-source data from S1 and contextual features from S2) and capture the long-range contextual association of the trajectory.

[0021] S3.2. A multi-head self-attention module is introduced between the encoder and decoder to enhance the influence of key trajectory segments on the completion result by calculating the weight coefficients between trajectory points.

[0022] S3.3. Introduce an autoencoder module to perform dimensionality reduction and reconstruction on the temporal features output by the encoder, and select the core features that match the trajectory motion law.

[0023] S3.4. Employ a multi-layer LSTM or Transformer decoder layer, combined with the anomaly mask matrix and encoder output, to generate the completed trajectory coordinate sequence step by step over time.

[0024] As a further improvement to this technical solution, in step S3, the construction and calculation of the multi-objective loss function includes the following steps:

[0025] S3.5 Calculate the coordinates of the predicted trajectory Compared with the actual trajectory coordinates when there are no anomalies The mean squared Euclidean distance is used to obtain the mean squared error loss term of the position error. ;in The time step index represents the trajectory coordinate sequence;

[0026] S3.6 Calculate the rate of change of curvature of adjacent trajectory points in the completed trajectory to obtain the trajectory curvature continuity constraint loss term. ;

[0027] S3.7. Combining the IMU triaxial acceleration data from the multi-source auxiliary sensors in the S1 multi-dimensional feature set with the odometer cumulative driving distance data, calculate the deviation between the acceleration and velocity of the predicted trajectory and the corresponding sensor measured values, and introduce weighting coefficients. (α is the weighting coefficient for the IMU triaxial acceleration data, and β is the weighting coefficient for the odometer cumulative mileage data) Balancing the influence of the two types of sensor data yields the physical rationality constraint loss term. .

[0028] As a further improvement to this technical solution, in step S3, simulating the generation of training samples with randomly missing segments includes the following steps:

[0029] S3.8. For existing real trajectory data, two modes are used to randomly label missing segments: when using the continuous time missing mode, the length of a single missing segment is set to 5-20 time steps; when using the random discrete missing mode, the proportion of missing points in a single trajectory is controlled at 5%-20%.

[0030] S3.9. Use the context trajectory of the marked missing segment as the input feature. The context trajectory is the normal trajectory data of the 20-50 time steps before the start time step and the 20-50 time steps after the end time step of the missing segment (including the positioning data and multi-source auxiliary sensor data in the multi-dimensional feature set mentioned in S1); use the real trajectory coordinates of the missing segment as the label to form a training sample pair corresponding to the input feature and the label.

[0031] As a further improvement to this technical solution, in step S3, the context-aware completion and repair of trajectory anomaly segments using the trained deep learning model includes the following steps:

[0032] S3.10. Combining the anomaly mask matrix described in S2, locate the start and end time steps of the abnormal segment of the trajectory, extract the normal trajectory features (including velocity, heading angle and multi-source auxiliary sensor data in the multi-dimensional feature set described in S1) of the 30-100 time steps before the start time step and the 30-100 time steps after the end time step of the abnormal segment, as context input;

[0033] S3.11 Input the context input and the anomaly mask matrix described in S2 into the trained deep learning model;

[0034] S3.12. The deep learning model assigns dynamic weights to contextual features through an attention mechanism, prioritizing the enhancement of the influence of trajectory points consistent with the movement trend of the abnormal segment, and generating the trajectory coordinates of the abnormal segment step by step.

[0035] S3.13. Output a continuous trajectory coordinate sequence, wherein the trajectory coordinate sequence maintains spatiotemporal continuity with the normal trajectory before and after the abnormal segment, and satisfies the physical constraints of the multi-objective loss function.

[0036] As a further improvement to this technical solution, in step S4, the deployment of the lightweight deep learning model and the input of real-time data include the following steps:

[0037] S4.1 Lightweighting of the trained deep learning model, including model parameter pruning and quantization compression, to adapt to the hardware operation requirements of vehicle terminals or edge computing nodes.

[0038] S4.2 Configure a sliding window for real-time data acquisition. The time step range covered by the window must include the latest generated abnormal trajectory data to ensure that the temporal correlation information of the trajectory can be captured synchronously.

[0039] S4.3 Real-time data input via sliding window: After each window data acquisition is completed, the abnormal trajectory data (including the abnormal position information marked by the abnormal mask matrix described in S2) and the multi-source auxiliary sensor data in the multi-dimensional feature set described in S1 are simultaneously input into the window to provide complete input information for deep learning model inference.

[0040] As a further improvement to this technical solution, in step S4, the output of the physical rationality correction and repair results includes the following steps:

[0041] S4.4. Integrate the IMU three-axis acceleration data, odometer cumulative driving distance data, and gyroscope heading angular velocity data from the multi-dimensional feature set described in S1, and construct constraint logic based on vehicle dynamics constraints (such as the temporal correlation between acceleration and velocity, and the matching of heading angle and driving direction) to verify the rationality of trajectory motion parameters.

[0042] S4.5 Based on the constraint logic of S4.4, the continuous trajectory coordinate sequence output by S3 is verified and corrected step by step: If the motion parameters (acceleration, velocity, heading angle) of a trajectory point at a certain time step do not match the actual motion state of the vehicle reflected by the multi-source auxiliary sensor data, the coordinates of the trajectory point are adjusted in combination with the sensor data so that the trajectory conforms to the vehicle motion law.

[0043] S4.6 Output the corrected BeiDou positioning trajectory. The trajectory data must include the longitude coordinates, latitude coordinates, driving speed and heading angle for each time step, and be consistent with the core parameter dimensions of the vehicle BeiDou positioning data in S1.

[0044] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0045] 1. This invention adopts a deep learning-based technical solution and utilizes the deep learning model's ability to process vehicle trajectory data. It addresses anomalies such as short-term loss of BeiDou positioning data, coordinate jumps, and position drift caused by factors such as tall building obstruction, tunnel traffic signal interruption, and electromagnetic interference in complex urban environments. In application scenarios such as transportation, intelligent driving, and unmanned equipment navigation, it can effectively improve the continuity and accuracy of positioning data.

[0046] 2. This invention uses deep learning technology to capture the spatiotemporal relationships and long-range dependencies in vehicle trajectory data. Combined with the collaborative processing logic of anomaly detection and trajectory completion, it addresses the problem that traditional filtering methods struggle to capture these data features, leading to the inability to accurately identify intermittent missing segments and sudden jump points in complex scenarios, and the lack of physical rationality in the repaired trajectory. This, in turn, affects the reliability and operational accuracy of downstream intelligent traffic scheduling, unmanned vehicle path planning, and other systems. In the aforementioned application scenarios, this invention can accurately identify intermittent missing segments and sudden jump points, ensuring the physical rationality of the repaired trajectory, thereby improving the reliability and operational accuracy of downstream intelligent transportation systems. Attached Figure Description

[0047] Figure 1 This is a schematic diagram of the method steps of the present invention. Detailed Implementation

[0048] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.

[0049] like Figure 1 As shown, this embodiment provides a deep learning-based method for repairing anomalies in vehicle BeiDou positioning data, including:

[0050] S1. Multi-source preprocessing: Real-time acquisition of vehicle BeiDou positioning data and multi-source auxiliary sensor data; extraction of driving speed, acceleration, heading angle and direction change features from BeiDou positioning data through a sliding window; first-order difference analysis of driving speed, acceleration and heading angle to complete preprocessing; and fusion of preprocessed BeiDou positioning data and multi-source auxiliary sensor data into a multi-dimensional feature set.

[0051] In this step, in S1, the vehicle's BeiDou positioning data includes at least longitude coordinates, latitude coordinates, driving speed, acceleration, and heading angle; the multi-source auxiliary sensor data includes at least the vehicle's inertial measurement unit (IMU) three-axis acceleration data, odometer cumulative driving distance data, and gyroscope heading angle velocity data.

[0052] Specifically, the vehicle needs to simultaneously deploy a BeiDou positioning receiver module and a multi-source auxiliary sensor module, including:

[0053] The Beidou positioning receiver module uses terminal equipment that supports the BDSB1I / B2I frequency band to ensure real-time output of longitude coordinates, latitude coordinates, driving speed, acceleration and heading angle data;

[0054] The multi-source auxiliary sensor module needs to integrate an inertial measurement unit (IMU), an odometer, and a gyroscope, and each device needs to communicate with each other via the vehicle's CAN bus or Ethernet to ensure the coordination of the data acquisition process.

[0055] Meanwhile, based on the changing patterns of vehicle trajectory characteristics during driving, the acquisition frequency of BeiDou positioning data and multi-source auxiliary sensor data is uniformly set to 1-10Hz (which can be adjusted according to actual application scenarios, such as 5-10Hz for urban roads to capture frequent turning and start-stop characteristics, and 1-5Hz for highways to balance data volume and timeliness). Furthermore, to avoid time discrepancies caused by acquisition delays in multi-source data, each device needs to synchronize its time based on GPS timestamps or a unified vehicle clock signal to ensure a one-to-one correspondence between BeiDou data and auxiliary sensor data at the same time step.

[0056] In addition, the collected raw data needs to be temporarily stored in the local cache unit of the vehicle terminal (such as SD card or solid-state storage). The temporary storage format adopts a structured data format (such as JSON or CSV). Each data record needs to include "collection timestamp + Beidou positioning parameters (longitude, latitude, driving speed, acceleration, heading angle) + auxiliary sensor parameters (IMU three-axis acceleration, odometer cumulative driving distance, gyroscope heading angle velocity)" to facilitate quick retrieval when extracting features in the subsequent sliding window.

[0057] Furthermore, the vehicle speed, acceleration, heading angle, and direction change features in the BeiDou positioning data are extracted using a sliding window, and first-order difference analysis is performed on the vehicle speed, acceleration, and heading angle to complete the preprocessing, including the following steps:

[0058] S1.1 Based on the BeiDou positioning data acquisition frequency (5-10Hz for urban roads, 1-5Hz for highways), the sliding window length is set to 5-20 time steps and the sliding step size is 1 time step; the real-time BeiDou positioning data stream (including longitude, latitude, driving speed, acceleration, and heading angle) is traversed in units of time steps, and continuous data blocks are extracted according to the window length to form several sliding window data blocks containing complete positioning parameters;

[0059] S1.2 For each window data block, extract features by time step: directly extract the values ​​of driving speed, acceleration, and heading angle to form 3 basic feature sequences; calculate the numerical difference between adjacent time steps (set the difference of the first time step to 0 or keep it consistent with the difference of the second time step) to obtain the direction change feature sequence, forming a total of 4 feature sequences;

[0060] S1.3. Using the speed, acceleration, and heading angle sequences from S1.2 as the calculation objects, calculate the numerical difference between adjacent time steps of each sequence (the difference of the first time step is set to 0 or consistent with the difference of the second time step), resulting in three types of first-order difference sequences, reflecting the rate of change of speed, the fluctuation of acceleration, and the trend of heading angle. In this step, the "absolute value characteristics" of speed, acceleration, and heading angle are transformed into "rate of change characteristics" through first-order difference, which can more sensitively capture the sudden trend of vehicle motion (such as sudden acceleration, hard braking, and rapid steering). This trend information can complement multi-source auxiliary sensor data (such as acceleration changes from IMU and angular velocity changes from gyroscope), providing richer temporal change basis for subsequent anomaly detection.

[0061] S1.4 Align the four types of extracted features (driving speed, acceleration, heading angle, and direction change) of each sliding window with the three types of differential features (velocity difference, acceleration difference, and heading angle difference) by time step to form a preprocessed feature subset, which provides a foundation for subsequent fusion with multi-source auxiliary sensor data to construct a multi-dimensional feature set.

[0062] Furthermore, when fusing the preprocessed BeiDou positioning data and multi-source auxiliary sensor data into a multi-dimensional feature set, the consistency of the preprocessed BeiDou positioning data (including velocity, acceleration, heading angle, direction change features extracted by the sliding window, and the first-order difference results of the three) and the multi-source auxiliary sensor data (IMU three-axis acceleration, odometer cumulative driving distance, gyroscope heading angular velocity) is first checked, and data exceeding the vehicle's physical motion range is removed. Then, using the time step as an index, the two types of data are aligned one by one to construct a multi-dimensional feature matrix (each row corresponds to one time step, and each column corresponds to one feature). Finally, the matrix is ​​stored in binary format, with metadata such as feature name and time step range, providing complete input for subsequent steps.

[0063] S2, Anomaly Mask Generation: Based on the BeiDou positioning data fused from the multidimensional feature set in S1, combined with statistical methods and the DBSCAN clustering algorithm (statistical methods are used to analyze the temporal correlation of data, and DBSCAN clustering is used to analyze the spatial distribution relationship of data), anomaly points and missing segments in the BeiDou positioning data are identified, and an anomaly mask matrix is ​​generated.

[0064] In this step, S2, identifying abnormal points and missing segments in BeiDou positioning data includes the following steps:

[0065] S2.1 Extract BeiDou positioning data (including velocity, acceleration, and direction change features extracted by sliding window and first-order difference analysis results) from the multi-dimensional feature set fused in S1.

[0066] Specifically, from the multidimensional feature set fused by S1, BeiDou positioning data is extracted one by one according to time steps. The extracted content must include the driving speed, acceleration, and direction change features extracted by the sliding window, as well as the first-order difference analysis results of these three. Furthermore, the extracted data must maintain the same temporal order as the original multidimensional feature set to prevent the subsequent anomaly analysis from being affected by temporal disorder.

[0067] S2.2 First, the extracted BeiDou positioning data is input into statistical methods to analyze the temporal correlation of the data and screen out suspected abnormal data that exceed the normal fluctuation range; then, the suspected abnormal data and the remaining normal data are input into the DBSCAN clustering algorithm to further analyze the spatial distribution relationship of the data features.

[0068] Specifically, statistical methods are first used to analyze the temporal correlation of the data. The mean and standard deviation of the features within the sliding window are used to define the normal fluctuation range, and data that exceeds this range are marked as suspected abnormal data. Then, the suspected abnormal data and the remaining normal data are input into the DBSCAN clustering algorithm. The neighborhood radius and minimum number of samples of the algorithm need to be flexibly adjusted according to the spatial density of the actual trajectory data to adapt to the spatial distribution relationship of data in different scenarios and achieve further screening of the data.

[0069] Furthermore, for statistical methods, the sliding window length remains consistent with that in S1, ranging from 5 to 20 time steps. For the characteristics of driving speed, acceleration, and direction changes, and their respective first-order difference results, the mean and standard deviation of each feature within the sliding window are calculated. The normal fluctuation range of each feature is defined by the mean plus or minus three times the standard deviation; data exceeding this range are marked as suspected outliers.

[0070] For the DBSCAN clustering algorithm, the neighborhood radius and minimum sample size need to be dynamically adjusted based on the spatial density of the trajectory data: In urban road scenarios, where the spatial density of trajectory points is high, the neighborhood radius can be set to 1.5-2 times the distance between adjacent trajectory points when the vehicle is traveling normally, and the minimum sample size can be set to 5-8; in highway scenarios, where the spatial density of trajectory points is low, the neighborhood radius can be set to 2-3 times the distance between adjacent trajectory points when the vehicle is traveling normally, and the minimum sample size can be set to 3-5. After clustering, isolated data points that are not assigned to any cluster are identified as outliers; if suspected outliers are assigned to valid clusters, they are considered normal data. This achieves joint verification of the two methods, improving the accuracy of anomaly identification.

[0071] S2.3. Based on the combined calculation results of statistical methods and DBSCAN clustering algorithm, isolated data points that are not classified into any cluster are identified as outliers in BeiDou positioning data, and trajectory segments that do not form effective clusters and meet the set time continuity conditions are identified as missing segments.

[0072] Specifically, anomalies are determined based on the combined results of statistical methods and the DBSCAN clustering algorithm: isolated data points that are not assigned to any cluster are directly identified as anomalies in the BeiDou positioning data; for continuous trajectory segments that have not formed effective clusters, if they meet the preset time continuity conditions (usually set to three or more consecutive time steps), they are identified as missing segments of BeiDou positioning data.

[0073] In this step, generating the anomaly mask matrix in S2 includes the following steps:

[0074] S2.4 Construct an anomaly mask matrix that matches the length of the BeiDou positioning data time series. The matrix type is set to a one-dimensional matrix, and the number of matrix elements must correspond one-to-one with the number of time steps in the BeiDou positioning data to ensure that each element in the matrix can be accurately mapped to the corresponding time step position of the data.

[0075] S2.5. Mark the elements in the anomaly mask matrix according to the rule that “the trajectory positions corresponding to abnormal points and missing segments are marked as 0, and the normal trajectory positions are marked as 1”. The marking process must cover all elements of the matrix to avoid omissions or mismarking.

[0076] S2.6 After completing the anomaly mask matrix marking, record the time index of the missing segment (to clarify the start and end time steps of the missing segment), and extract the context features of the missing segment, specifically the normal trajectory features of the 20-50 time steps before the start time step and the 20-50 time steps after the end time step of the missing segment, to form a complete annotation result containing the anomaly location, time range and context information.

[0077] S3. Trajectory Completion: Construct a deep learning model based on an Encoder-Decoder structure, incorporating an attention mechanism and introducing an autoencoder for assistance. Employ an end-to-end training framework and use a multi-objective loss function that includes a mean squared error loss term for positional error, a trajectory curvature continuity constraint loss term, and a physical rationality constraint loss term. Simulate and generate training samples with randomly missing segments on existing real trajectory data. Supervised learning training is then performed on the deep learning model to enable it to learn the contextual associations and physical constraints for trajectory completion. The trained deep learning model is then used in conjunction with the multi-dimensional feature set from S1 and the anomaly mask matrix from S2 to perform context-aware completion and repair of abnormal trajectory segments, outputting a continuous sequence of trajectory coordinates.

[0078] This step S3 constructs a deep learning model with a specific structure, combines a multi-objective loss function with simulated training samples, and achieves context-aware completion of abnormal trajectory segments. The core is to ensure that the model can learn the spatiotemporal correlation and physical constraints of the trajectory, and finally output a continuous and reasonable trajectory coordinate sequence.

[0079] In this step, S3, a deep learning model based on an Encoder-Decoder structure, incorporating an attention mechanism and introducing autoencoder assistance is constructed, including the following steps:

[0080] S3.1. Employ a multi-layer bidirectional long short-term memory network Bi-LSTM or a multi-layer Transformer encoder layer to extract temporal features from the input multi-dimensional feature set (including multi-source data from S1 and contextual features from S2) and capture the long-range contextual association of the trajectory.

[0081] Specifically, if Bi-LSTM is used, the input is the multidimensional feature set generated by S1. ,in: This indicates the batch size for model training, ranging from 32 to 64 (to match the batch size for subsequent training sample storage). This indicates the length of the input time series, which is consistent with the number of time steps of the context features extracted by S2 (20-50 time steps). The multi-dimensional feature dimensions include BeiDou positioning data, IMU three-axis acceleration data, odometer cumulative driving distance data, etc., with a typical value of 10-15.

[0082] Bi-LSTM fuses features using a forward LSTM (capturing future temporal relationships) and a backward LSTM (capturing historical temporal relationships), outputting a temporal feature tensor. , This indicates the number of hidden units per layer in the Bi-LSTM, ranging from 64 to 128 (according to...). Adjustment, when Take 64 at the time. (Time taken 96), Forget Gate Offset Initialize to To enhance the memory of long-term trajectory features;

[0083] If a Transformer encoder is selected, sinusoidal position encoding needs to be added. The formulas are as follows:

[0084] ;

[0085] ;

[0086] in, For the time step position ( ), For dimension index ( ), Take 64-128 (compared to Bi-LSTM) Consistent);

[0087] Input features After processing, the input is given to a 2-3 layer Transformer encoder, with each layer connected via residuals. Layer normalization alleviates gradient vanishing, ultimately outputting a temporal feature tensor. .

[0088] S3.2. A multi-head self-attention module is introduced between the encoder and decoder to enhance the influence of key trajectory segments on the completion result by calculating the weight coefficients between trajectory points.

[0089] Specifically, a multi-head self-attention module needs to be introduced between the encoder and decoder to enhance the impact of key trajectory segments on the completion results, as detailed below:

[0090] The encoder output features are received via a multi-head self-attention module. First, map it to a query. ,key ,value ,Right now:

[0091] ;

[0092] in, The number of attention heads (values ​​4-8). It is a single-head attention feature dimension, and ;

[0093] Then, the attention score is calculated using the following formula:

[0094] ;

[0095] in, This represents the attention score, which measures... and Similarity; Indicates matrix transpose;

[0096] and through The weighting coefficients are obtained; the single-head output is... ;in For attention head index, and ; Represents the normalization function; Indicates the first The output of each attention head;

[0097] Finally, the outputs of all the heads are concatenated and passed through a linear layer, as shown in the formula:

[0098] ;

[0099] in, This indicates the output used to focus all attention heads. Concatenate along the feature dimension; This represents a linear transformation layer, used to map the concatenated multi-head features back to the original feature dimension;

[0100] Optimization during training via backpropagation The mapping parameters tilt the weights toward trajectory points that align with the movement trend of the abnormal segments.

[0101] S3.3. Introduce an autoencoder module to perform dimensionality reduction and reconstruction on the temporal features output by the encoder, and select the core features that match the trajectory motion law.

[0102] Specifically, to filter the core features of trajectory motion, an autoencoder module needs to be introduced to process the encoder output. Perform dimensionality reduction and reconstruction. Specifically:

[0103] The encoding process is implemented using the following formula:

[0104] ;

[0105] in, The coding layer weight matrix (dimension) ), For coding layer bias (dimension) ), Activation functions are used to introduce non-linear filtering capabilities; This represents the core feature tensor obtained after encoding by the autoencoder, and is a representation of the encoder output. Key features that match the trajectory motion patterns are retained after dimensionality reduction;

[0106] The decoding process is implemented using the following formula:

[0107] ;

[0108] in, The decoding layer weight matrix (dimensions) ), For the decoding layer bias (dimension) ); This represents the feature tensor reconstructed after decoding by the autoencoder, used in conjunction with the original encoder output. Calculate the reconstruction error and constrain the effectiveness of the core features;

[0109] During training, the reconstruction error of the autoencoder ( The mean squared error function is used as an auxiliary loss term (weights 0.1-0.3) and jointly trained with the main network to ensure... Only the core features that match the trajectory motion pattern are retained.

[0110] S3.4. Employ a multi-layer LSTM or Transformer decoder layer, combined with the anomaly mask matrix and encoder output, to generate the completed trajectory coordinate sequence step by step over time.

[0111] Specifically, if an LSTM decoder is used, the number of layers is the same as the encoder (2-3 layers), and the number of hidden units is the same as the encoder. First, the output of the autoencoder... The anomaly mask matrix generated by S2 ( Outliers / missing segments are marked as 0, and normal segments are marked as 1) and mapped to dimension-consistent segments through a linear layer. merging into Subsequently, an "autoregressive generation" method was adopted, through... Calculate the hidden state; then... Generate complete coordinates ;in To predict longitude, To predict latitude; Indicates the output of the self-encoder With the mapped mask tensor The fusion result; Indicates the LSTM decoder at the 1st The hidden state of a time step records historical time step information. It is the hidden state of the previous time step;

[0112] If a Transformer decoder is used, the number of layers is the same as the encoder. Each layer includes a masked multi-head self-attention sublayer (to prevent information leakage at future time steps) and an encoder-decoder attention sublayer (to focus on...). The core features) and feedforward neural network sublayers, first and Temporal mask tensor mapped by the embedding layer spliced ​​as After being processed by the input decoder, the output is generated through a linear layer (output dimension = 2). .

[0113] In this step, S3, the construction and calculation of the multi-objective loss function includes the following steps:

[0114] To ensure the positional accuracy, smoothness, and physical plausibility of the completed trajectory, a multi-objective loss function needs to be constructed.

[0115] S3.5 Calculate the coordinates of the predicted trajectory Compared with the actual trajectory coordinates when there are no anomalies The mean squared Euclidean distance is used to obtain the mean squared error loss term of the position error. ;in The time step index represents the trajectory coordinate sequence;

[0116] Specifically, the mean square error loss term of the position error The formula used to constrain the deviation between predicted and true coordinates is:

[0117] ;

[0118] in The time step index for the abnormal segment (located by the S2 mask matrix); This represents the total number of time steps during the abnormal period, and , This is the starting time step of the abnormal segment. End time step; To predict coordinates, These are the true coordinates when there are no anomalies. This loss is calculated only for the anomaly segments to avoid interference from the normal segments.

[0119] S3.6 Calculate the rate of change of curvature of adjacent trajectory points in the completed trajectory to obtain the trajectory curvature continuity constraint loss term. ;

[0120] Specifically, the trajectory curvature continuity constraint loss term To ensure a smooth trajectory, the curvature of three adjacent points on the trajectory is first calculated and supplemented as follows: :

[0121] ;

[0122] in, For two-dimensional vector cross product, The vector magnitude;

[0123] The rate of change of curvature is then calculated using the following formula:

[0124] ;

[0125] The final loss formula is .

[0126] S3.7. Combining the IMU triaxial acceleration data from the multi-source auxiliary sensors in the S1 multi-dimensional feature set with the odometer cumulative driving distance data, calculate the deviation between the acceleration and velocity of the predicted trajectory and the corresponding sensor measured values, and introduce weighting coefficients. (α is the weighting coefficient for the IMU triaxial acceleration data, and β is the weighting coefficient for the odometer cumulative mileage data) Balancing the influence of the two types of sensor data yields the physical rationality constraint loss term. .

[0127] Specifically, the loss item due to physical rationality constraints To ensure the trajectory conforms to vehicle dynamics, the predicted speed is first calculated. Speed ​​measured by odometer and predicted acceleration =Acceleration measured by IMU ;in, The data acquisition time step interval is consistent with the S1 acquisition frequency. The total distance traveled as measured by the odometer in S1; , , This refers to the three-axis acceleration data of the IMU in S1;

[0128] Then introduce weighting coefficients (α is the weighting coefficient for the IMU triaxial acceleration data, with a value of 0.3-0.7) and ( The weighting coefficient for the odometer's cumulative mileage data, ranging from 0.3 to 0.7, and City roads , highway );

[0129] The loss formula is: ;

[0130] The total loss for multiple objectives is: ;

[0131] in, This represents the physical rationality constraint loss term, used to measure the deviation between the velocity and acceleration of the completed trajectory and the sensor's measured values. The total loss for multiple targets is the weighted sum of the losses from position error, trajectory curvature continuity, and physical rationality. If the sum is positive and equal to 1, then the default value is... (This default value is determined based on the technical logic of "prioritizing positional accuracy while taking into account the continuity of trajectory curvature and physical rationality").

[0132] In this step, S3, simulating the generation of training samples with randomly missing fragments includes the following steps:

[0133] S3.8. For existing real trajectory data, two modes are used to randomly label missing segments: when using the continuous time missing mode, the length of a single missing segment is set to 5-20 time steps; when using the random discrete missing mode, the proportion of missing points in a single trajectory is controlled at 5%-20%.

[0134] S3.9. Use the context trajectory of the marked missing segment as the input feature. The context trajectory is the normal trajectory data of the 20-50 time steps before the start time step and the 20-50 time steps after the end time step of the missing segment (including the positioning data and multi-source auxiliary sensor data in the multi-dimensional feature set mentioned in S1); use the real trajectory coordinates of the missing segment as the label to form a training sample pair corresponding to the input feature and the label.

[0135] Specifically, model training requires simulating the generation of training samples with randomly missing segments. First, missing segments are labeled using two modes on real trajectory data (covering urban, highway, and suburban roads, with each trajectory having a time step ≥300 and a total data volume ≥3000, preprocessed into a multi-dimensional feature set using S1):

[0136] In the continuous time missing mode, the length of a single missing segment is 5-20 time steps, and 1-3 non-overlapping intervals are randomly selected and marked for each trajectory;

[0137] In the random discrete missing pattern, the missing percentage is 5%-20%, according to Random selection Each discontinuous time step is labeled, and the labeling only applies to the trajectory coordinates, while the corresponding multidimensional feature set retains normal values; among which... The percentage of missing data. The total time steps of the trajectory. This is a rounding function;

[0138] Training sample pairs are then constructed, with the input feature being the context trajectory of the missing segment. ( The time range is before the start of the missing segment. Each time step and after the end (each time step, adjusted when boundaries are insufficient), labeled with the true trajectory coordinates of the missing segment. ( (This represents the total number of time steps in the missing period). Sample pairs are stored as Tensor files according to "Sample ID-Input Feature Tensor-Label Tensor" (each file contains 32-64 samples), and divided into training set, validation set, and test set in a 7:2:1 ratio.

[0139] In this step, S3, the context-aware completion and repair of trajectory anomaly segments using the trained deep learning model includes the following steps:

[0140] S3.10. Combining the anomaly mask matrix described in S2, locate the start and end time steps of the abnormal segment of the trajectory, extract the normal trajectory features (including velocity, heading angle and multi-source auxiliary sensor data in the multi-dimensional feature set described in S1) of the 30-100 time steps before the start time step and the 30-100 time steps after the end time step of the abnormal segment, as context input;

[0141] It should be added that the contextual associations and physical constraints for supervised learning training of the deep learning model to complete its learning trajectory should be performed according to the following process:

[0142] First, a training sample set is constructed: based on real-world trajectory data collected from real vehicles in multiple scenarios (covering urban roads, highways, suburban roads, etc.), sample pairs are generated according to the missing segment labeling method (continuous time missing, random discrete missing). The input is the contextual trajectory features before and after the abnormal segment (including the multi-dimensional feature set generated by S1, such as BeiDou positioning coordinates, driving speed, IMU three-axis acceleration, odometer distance, etc., with a time step length of 30-100), and the label is the real trajectory coordinates and physical parameters of the missing segment (including longitude, latitude, and the corresponding real speed, acceleration, etc.).

[0143] Secondly, joint optimization of loss functions: During training, multi-objective loss functions jointly constrain model learning. Attention mechanisms enable models to capture the temporal correlations of contextual trajectories (such as the velocity change trends of adjacent trajectory points and the continuity of heading angles, ensuring that the completed trajectory is seamlessly connected with the preceding and following normal trajectories in time and space). Force the model to learn physical constraints (to ensure that the speed and acceleration of the completed trajectory are consistent with the measured data from sensors such as IMU and odometer, and conform to the laws of vehicle dynamics, such as ensuring that the deviation between the acceleration and the measured value of IMU during acceleration is within a reasonable range).

[0144] Finally, iterative model training: batch training is employed. The network parameters (such as the forget gate weights of LSTM and the attention weights of Transformer) are iteratively optimized through the backpropagation algorithm. Training is completed when the multi-target loss on the validation set converges and the completed trajectory meets the criteria of "spatiotemporal continuity (the distance between adjacent coordinates meets the vehicle speed constraint) + physical rationality (the deviation between speed, acceleration and sensor data meets the standard)".

[0145] The trained model can output a complete trajectory that satisfies both contextual association and physical constraints based on the contextual features of the anomalous segments.

[0146] S3.11 Input the context input and the anomaly mask matrix described in S2 into the trained deep learning model;

[0147] S3.12. The deep learning model assigns dynamic weights to contextual features through an attention mechanism, prioritizing the enhancement of the influence of trajectory points consistent with the movement trend of the abnormal segment, and generating the trajectory coordinates of the abnormal segment step by step.

[0148] S3.13. Output a continuous trajectory coordinate sequence, wherein the trajectory coordinate sequence maintains spatiotemporal continuity with the normal trajectory before and after the abnormal segment, and satisfies the physical constraints of the multi-objective loss function.

[0149] Specifically, when performing context-aware completion and repair on abnormal trajectory segments, the starting time step of the abnormal segment is first located by combining the S2 anomaly mask matrix. With end time step abnormal segment length and according to Extracting contextual input:

[0150] At that time, the context length is 30 time steps (range) );

[0151] At that time, the context length is 100 time steps (range) The context input includes the velocity, heading angle, and multi-source sensor data in S1, and is consistent with the normalization method of the training samples;

[0152] Next, organize the context input as follows: ( For the total number of context time steps, Extracting the corresponding part of the S2 mask matrix (Context marker 1, abnormal segment marker 0), synchronously input deep learning model.

[0153] Furthermore, deep learning models calculate dynamic weights through an attention mechanism, the expression of which is:

[0154] ;

[0155] in, Indicates the abnormal segment number Time step and context The dynamic weights of time-step features are used to measure the influence of contextual features on the completion of anomalous segments; Represents an exponential function; Cosine similarity; Candidate coordinates for the abnormal segment; For contextual features;

[0156] Then combine the weight and decoder mapping function Generate coordinates:

[0157] ;

[0158] in, Indicates the abnormal segment number The completed trajectory coordinates generated by the time step are a component of the final output continuous trajectory; This represents the first segment of the anomaly mask matrix. The time step marker (value is 0).

[0159] Finally, the coordinates of the abnormal segment are concatenated with the preceding and following normal trajectories to form a complete sequence. Verify that the distance between adjacent coordinates does not exceed ( The maximum design speed of the vehicle is read from the vehicle's factory parameters or the on-board system, and the time step sequence is consistent. The output format is consistent with the S1 Beidou positioning data (longitude and latitude are in degrees and 6 decimal places are retained).

[0160] S4. Real-time output integration and system deployment: Deploy the lightweight deep learning model on the vehicle terminal or edge computing node, integrate the multi-source auxiliary sensor data in the multi-dimensional feature set described in S1, perform physical rationality correction on the trajectory coordinate sequence completed in S3, input abnormal trajectories in real time through a sliding window method and output the repair results, and finally obtain the BeiDou positioning trajectory that conforms to the vehicle dynamics characteristics.

[0161] In this step, S4, the deployment of the lightweight deep learning model and real-time data input includes the following steps:

[0162] S4.1 Lightweighting of the trained deep learning model, including model parameter pruning and quantization compression, to adapt to the hardware operation requirements of vehicle terminals or edge computing nodes.

[0163] Specifically, the deep learning model (Encoder-Decoder structure, including attention mechanism and autoencoder auxiliary module) trained by S3 is lightweighted to adapt to the hardware resource limitations of in-vehicle terminals or edge computing nodes. This includes:

[0164] Model parameter pruning: A structured pruning strategy is employed to remove redundant parameters and neurons from the network. For the encoder and decoder hidden layers of Bi-LSTM / Transformer, the pruning ratio is determined based on hardware computing power requirements, removing neurons with low weight contribution. For multi-head self-attention modules, core attention heads are retained (the number is adapted according to the model feature dimensions), while redundant heads with low average attention weights are removed. After pruning, fine-tuning training is used to restore the performance of the deep learning model, ensuring that the trajectory completion effect is not affected.

[0165] Model Quantization Compression: Linear quantization is used to compress the precision of deep learning model parameters, converting high-precision parameters from the training phase into a low-precision format suitable for hardware inference, thereby reducing the storage size and computational complexity of the deep learning model. During quantization, the quantization scaling factor and offset are determined based on the statistical feature distribution of the training set data to ensure that the inference accuracy of the quantized deep learning model meets the trajectory repair requirements. Subsequently, the quantized deep learning model is converted into an inference format suitable for automotive or edge hardware to improve inference efficiency.

[0166] Deployment and Adaptation Verification: Inference tests are conducted on the target hardware platform (vehicle terminal or edge computing node) to verify the compatibility and real-time performance of the deep learning model. The tests focus on deep learning model loading speed, single inference time, and memory usage to ensure the deep learning model runs stably and meets the real-time processing requirements of the vehicle scenario. Simultaneously, the physical plausibility of the completed trajectory is verified to be consistent with that before lightweighting.

[0167] S4.2 Configure a sliding window for real-time data acquisition. The time step range covered by the window must include the latest generated abnormal trajectory data to ensure that the temporal correlation information of the trajectory can be captured synchronously.

[0168] Specifically, a sliding window is configured for real-time acquisition and caching of trajectory data to ensure that the model can capture the temporal correlation information of the trajectory. The parameter configuration is as follows:

[0169] Window time step range: The total number of time steps covered by the window should be consistent with the time step range of the context features in S3. It should include the latest generated abnormal trajectory data and the normal trajectory data related to the preceding and following ones, to ensure that the model can complete the trajectory based on the complete context.

[0170] Window sliding step size: The sliding step size is adapted to the acquisition frequency of Beidou positioning data in S1. Each time the sliding is completed, the window automatically updates the data, discards the expired data and incorporates the latest acquired trajectory data, so as to realize the real-time dynamic update of the data.

[0171] Window caching mechanism: A dedicated cache area is set up in the hardware platform to store the data in the window in the order of time steps, so as to ensure the continuity and integrity of the data in time sequence and avoid data loss or disorder.

[0172] S4.3 Real-time data input via sliding window: After each window data acquisition is completed, the abnormal trajectory data (including the abnormal position information marked by the abnormal mask matrix described in S2) and the multi-source auxiliary sensor data in the multi-dimensional feature set described in S1 are simultaneously input into the window to provide complete input information for deep learning model inference.

[0173] Specifically, after each sliding window data acquisition is completed, data is input into the lightweight model according to the following process:

[0174] Real-time data acquisition and synchronization: Multi-source auxiliary sensor data (IMU triaxial acceleration, odometer cumulative driving distance, gyroscope heading angular velocity) and BeiDou positioning data are acquired via the vehicle bus from the multi-dimensional feature set described in S1. Time-series alignment of data from different sources is achieved based on timestamps to ensure the consistency of input data. Simultaneously, the anomaly mask matrix generated in S2 is read to mark abnormal locations within the window.

[0175] Input data formatting: The abnormal trajectory data, abnormal mask matrix, and multi-source auxiliary sensor data within the window are formatted into an input format consistent with the deep learning model training phase. Feature data must undergo the same preprocessing methods as during training (such as normalization) to ensure that the input feature distribution is consistent with that during training, thus guaranteeing the inference accuracy of the deep learning model.

[0176] Model inference trigger: After the data format verification is passed, the inference process of the lightweight deep learning model is triggered, and the formatted input data is passed into the deep learning model to provide complete context information and abnormal location identifiers for trajectory completion and correction.

[0177] In this step, in S4, the output of the physical rationality correction and repair results includes the following steps:

[0178] S4.4. Integrate the IMU three-axis acceleration data, odometer cumulative driving distance data, and gyroscope heading angular velocity data from the multi-dimensional feature set described in S1, and construct constraint logic based on vehicle dynamics constraints (such as the temporal correlation between acceleration and velocity, and the matching of heading angle and driving direction) to verify the rationality of trajectory motion parameters.

[0179] Specifically, the specific constraints of the constraint logic are as follows:

[0180] Acceleration constraints: Based on the composite values ​​of triaxial acceleration measured by the IMU, the acceleration calculated for trajectory completion is constrained to be consistent with the actual acceleration of the vehicle, ensuring that the trajectory meets the limits of the vehicle's dynamic performance.

[0181] Speed ​​constraints: Based on the actual speed measured by the odometer, the speed calculated for completing the trajectory is constrained to match the actual driving speed of the vehicle, while ensuring that the speed does not exceed the reasonable driving range designed for the vehicle.

[0182] Heading angle constraint: Based on the heading angular velocity measured by the gyroscope, the heading angle change rate of the completed trajectory is constrained to be consistent with the actual steering motion of the vehicle, which conforms to the physical characteristics of the vehicle steering system.

[0183] S4.5 Based on the constraint logic of S4.4, the continuous trajectory coordinate sequence output by S3 is verified and corrected step by step: If the motion parameters (acceleration, velocity, heading angle) of a trajectory point at a certain time step do not match the actual motion state of the vehicle reflected by the multi-source auxiliary sensor data, the coordinates of the trajectory point are adjusted in combination with the sensor data so that the trajectory conforms to the vehicle motion law.

[0184] Specifically, based on the above constraint logic, the continuous trajectory coordinate sequence output by S3 is verified and corrected step by step over time:

[0185] Motion parameter calculation: For each time step of the trajectory sequence, calculate the corresponding motion parameters (velocity, acceleration, heading angle), and the calculation method is consistent with the parameter calculation logic of the trajectory completion process in S3;

[0186] Constraint compliance verification: The calculated motion parameters are compared with the measured data from multi-source sensors and vehicle dynamics constraints to determine whether the trajectory points at each time step meet the physical rationality requirements.

[0187] Trajectory coordinate correction: For trajectory points that do not meet physical constraints, the coordinates are adjusted based on sensor measurement data. The correction process is based on the actual vehicle motion state reflected by sensor data, adjusting the longitude and latitude coordinates of the trajectory points to ensure that the corrected trajectory motion parameters meet all constraints and conform to the actual driving patterns of the vehicle.

[0188] S4.6 Output the corrected BeiDou positioning trajectory. The trajectory data must include the longitude coordinates, latitude coordinates, driving speed and heading angle for each time step, and be consistent with the core parameter dimensions of the vehicle BeiDou positioning data in S1.

[0189] Those skilled in the art will understand that the process of implementing all or part of the steps of the above embodiments can be carried out by hardware or by a program instructing the relevant hardware.

[0190] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely preferred examples and are not intended to limit the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the present invention as claimed. The scope of protection of the present invention is defined by the appended claims and their equivalents.

Claims

1. A method for repairing anomalies in vehicle BeiDou positioning data based on deep learning, characterized in that, Includes the following steps: S1. Multi-source preprocessing: Real-time acquisition of vehicle BeiDou positioning data and multi-source auxiliary sensor data; extraction of driving speed, acceleration, heading angle and direction change features from BeiDou positioning data through a sliding window; first-order difference analysis of driving speed, acceleration and heading angle to complete preprocessing; and fusion of preprocessed BeiDou positioning data and multi-source auxiliary sensor data into a multi-dimensional feature set. S2, Anomaly Mask Generation: Based on the BeiDou positioning data fused from the multi-dimensional feature set in S1, combined with statistical methods and the DBSCAN clustering algorithm, anomaly points and missing segments in the BeiDou positioning data are identified, and an anomaly mask matrix is ​​generated. S3. Trajectory Completion: Construct a deep learning model based on an Encoder-Decoder structure, incorporating an attention mechanism and introducing an autoencoder for assistance. Employ an end-to-end training framework and use a multi-objective loss function that includes a mean squared error loss term for positional error, a trajectory curvature continuity constraint loss term, and a physical rationality constraint loss term. Simulate and generate training samples with randomly missing segments on existing real trajectory data. Supervised learning training is then performed on the deep learning model to enable it to learn the contextual associations and physical constraints for trajectory completion. The trained deep learning model is then used in conjunction with the multi-dimensional feature set from S1 and the anomaly mask matrix from S2 to perform context-aware completion and repair of abnormal trajectory segments, outputting a continuous sequence of trajectory coordinates. S4. Real-time output integration and system deployment: Deploy the lightweight deep learning model on the vehicle terminal or edge computing node, integrate the multi-source auxiliary sensor data in the multi-dimensional feature set described in S1, perform physical rationality correction on the trajectory coordinate sequence completed in S3, input abnormal trajectories in real time through a sliding window method and output the repair results, and finally obtain the BeiDou positioning trajectory that conforms to the vehicle dynamics characteristics.

2. The method for repairing vehicle BeiDou positioning data anomalies based on deep learning according to claim 1, characterized in that, In S1, the vehicle's BeiDou positioning data includes at least longitude coordinates, latitude coordinates, driving speed, acceleration, and heading angle; the multi-source auxiliary sensor data includes at least the vehicle's inertial measurement unit (IMU) three-axis acceleration data, odometer cumulative driving distance data, and gyroscope heading angle velocity data.

3. The method for repairing vehicle BeiDou positioning data anomalies based on deep learning according to claim 2, characterized in that, In step S2, identifying abnormal points and missing segments in BeiDou positioning data includes the following steps: S2.1 Extract BeiDou positioning data from the multi-dimensional feature set fused from S1; S2.2 First, the extracted BeiDou positioning data is input into statistical methods to analyze the temporal correlation of the data and screen out suspected abnormal data that exceed the normal fluctuation range; then, the suspected abnormal data and the remaining normal data are input into the DBSCAN clustering algorithm to further analyze the spatial distribution relationship of the data features. S2.

3. Based on the combined calculation results of statistical methods and DBSCAN clustering algorithm, isolated data points that are not classified into any cluster are identified as outliers in BeiDou positioning data, and trajectory segments that do not form effective clusters and meet the set time continuity conditions are identified as missing segments.

4. The method for repairing vehicle BeiDou positioning data anomalies based on deep learning according to claim 3, characterized in that, In step S2, generating the anomaly mask matrix includes the following steps: S2.4 Construct an anomaly mask matrix that matches the length of the BeiDou positioning data time series; S2.

5. Mark the elements in the anomaly mask matrix according to the rule that "abnormal points and missing segments are marked as 0, and normal trajectory positions are marked as 1". S2.6 After completing the anomaly mask matrix labeling, record the time index of the missing segment and extract the context features of the missing segment to form a complete annotation result containing the anomaly location, time range and context information.

5. The method for repairing vehicle BeiDou positioning data anomalies based on deep learning according to claim 4, characterized in that, In S3, a deep learning model based on an Encoder-Decoder structure, incorporating an attention mechanism and introducing an autoencoder is constructed, including the following steps: S3.

1. Employ a multi-layer bidirectional long short-term memory network Bi-LSTM or a multi-layer Transformer encoder layer to extract temporal features from the input multi-dimensional feature set and capture the long-range contextual association of the trajectory. S3.

2. A multi-head self-attention module is introduced between the encoder and decoder to enhance the influence of key trajectory segments on the completion result by calculating the weight coefficients between trajectory points. S3.

3. Introduce an autoencoder module to perform dimensionality reduction and reconstruction on the temporal features output by the encoder, and select the core features that match the trajectory motion law. S3.

4. Employ a multi-layer LSTM or Transformer decoder layer, combined with the anomaly mask matrix and encoder output, to generate the completed trajectory coordinate sequence step by step over time.

6. The method for repairing vehicle BeiDou positioning data anomalies based on deep learning according to claim 5, characterized in that, In step S3, the construction and calculation of the multi-objective loss function includes the following steps: S3.5 Calculate the coordinates of the predicted trajectory Compared with the actual trajectory coordinates when there are no anomalies The mean squared Euclidean distance is used to obtain the mean squared error loss term of the position error. ;in The time step index represents the trajectory coordinate sequence; S3.6 Calculate the rate of change of curvature of adjacent trajectory points in the completed trajectory to obtain the trajectory curvature continuity constraint loss term. ; S3.

7. Combining the IMU triaxial acceleration data from the multi-source auxiliary sensors in the S1 multi-dimensional feature set with the odometer cumulative driving distance data, calculate the deviation between the acceleration and velocity of the predicted trajectory and the corresponding sensor measured values, and introduce weighting coefficients. Balancing the impact of the two types of sensor data, we obtain the physical rationality constraint loss term. .

7. The method for repairing anomalies in vehicle BeiDou positioning data based on deep learning according to claim 6, characterized in that, In S3, simulating the generation of training samples with randomly missing fragments includes the following steps: S3.

8. For existing real trajectory data, two modes are used to randomly label missing segments: when using the continuous time missing mode, the length of a single missing segment is set to 5-20 time steps; when using the random discrete missing mode, the proportion of missing points in a single trajectory is controlled at 5%-20%. S3.

9. Use the context trajectory of the marked missing segment as the input feature. The context trajectory is the normal trajectory data of the missing segment in the 20-50 time steps before the start time step and the 20-50 time steps after the end time step. Use the real trajectory coordinates of the missing segment as the label to form a training sample pair corresponding to the input feature and the label.

8. The method for repairing vehicle BeiDou positioning data anomalies based on deep learning according to claim 7, characterized in that, In step S3, the context-aware completion and repair of trajectory anomaly segments using the trained deep learning model includes the following steps: S3.

10. Combining the start and end time steps of the abnormal segment of the trajectory with the abnormal mask matrix described in S2, extract the normal trajectory features of the 30-100 time steps before the start time step and the 30-100 time steps after the end time step of the abnormal segment as context input. S3.11 Input the context input and the anomaly mask matrix described in S2 into the trained deep learning model; S3.

12. The deep learning model assigns dynamic weights to contextual features through an attention mechanism, prioritizing the enhancement of the influence of trajectory points consistent with the movement trend of the abnormal segment, and generating the trajectory coordinates of the abnormal segment step by step. S3.

13. Output a continuous trajectory coordinate sequence, wherein the trajectory coordinate sequence maintains spatiotemporal continuity with the normal trajectory before and after the abnormal segment, and satisfies the physical constraints of the multi-objective loss function.

9. The method for repairing anomalies in vehicle BeiDou positioning data based on deep learning according to claim 8, characterized in that, In step S4, the deployment of the lightweight deep learning model and the input of real-time data include the following steps: S4.1 Lightweighting of the trained deep learning model, including model parameter pruning and quantization compression, to adapt to the hardware operation requirements of vehicle terminals or edge computing nodes. S4.2 Configure a sliding window for real-time data acquisition. The time step range covered by the window must include the latest generated abnormal trajectory data to ensure that the temporal correlation information of the trajectory can be captured synchronously. S4.3 Real-time data input via sliding window: After each window data acquisition is completed, the abnormal trajectory data in the window and the multi-source auxiliary sensor data in the multi-dimensional feature set described in S1 are input synchronously to provide complete input information for deep learning model inference.

10. The method for repairing anomalies in vehicle BeiDou positioning data based on deep learning according to claim 9, characterized in that, In step S4, the output of the physical rationality correction and repair results includes the following steps: S4.

4. Integrate the IMU three-axis acceleration data, odometer cumulative driving distance data, and gyroscope heading angular velocity data from the multi-dimensional feature set described in S1, and construct constraint logic based on vehicle dynamics constraints to verify the rationality of trajectory motion parameters; S4.5 Based on the constraint logic of S4.4, the continuous trajectory coordinate sequence output by S3 is verified and corrected step by step: if the motion parameters of a trajectory point at a certain time step do not match the actual motion state of the vehicle reflected by the multi-source auxiliary sensor data, the coordinates of the trajectory point are adjusted in combination with the sensor data so that the trajectory conforms to the vehicle motion law. S4.6 Output the corrected BeiDou positioning trajectory. The trajectory data must include the longitude coordinates, latitude coordinates, driving speed and heading angle for each time step, and be consistent with the core parameter dimensions of the vehicle BeiDou positioning data in S1.

Citation Information

Patent Citations

  • Navigation AIS data restoration method based on generative adversarial neural network

    CN116758403A

  • Training method and system of vehicle track frame compensation model

    CN120874942A