Trajectory reconstruction method and system for vehicle in sparse detection environment based on spatio-temporal graph neural network and storage medium
By constructing a vehicle interaction graph and performing temporal and spatial modeling based on a spatiotemporal graph neural network, the accuracy and continuity issues of vehicle trajectory reconstruction in sparse detector environments are solved, achieving high-precision trajectory reconstruction in blind zones and supporting traffic monitoring and intelligent management.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- KUNMING UNIV OF SCI & TECH
- Filing Date
- 2026-02-04
- Publication Date
- 2026-04-17
AI Technical Summary
In sparse detector environments, existing technologies struggle to achieve high-precision reconstruction of vehicle trajectories, especially on highways and expressways. Due to the sparse deployment of detectors, limited field of view, and limited proportion of connected vehicles, the spatiotemporal movement of vehicles in blind spots cannot be observed, resulting in missing trajectory data and impacting traffic monitoring and safety risk identification.
A spatiotemporal graph neural network-based approach is adopted to reconstruct vehicle trajectories by constructing a vehicle interaction graph and using relative distance, relative speed, and interaction category encoding, combined with graph attention networks and gated recurrent units. This includes temporal and spatial modeling. A weighted fusion strategy combining forward and backward recursion is used to generate trajectory predictions with continuity and accuracy.
It improves the accuracy and continuity of vehicle trajectory reconstruction in sparse detector environments, can generate time-continuous trajectories in blind spots, reduces accumulated errors, supports traffic behavior analysis and online monitoring, and is suitable for offline data completion and online traffic monitoring.
Smart Images

Figure CN121659245B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and in particular to a method, system and storage medium for reconstructing vehicle trajectories in a sparse detection environment based on a spatiotemporal graph neural network. Background Technology
[0002] Full-time and spatiotemporal vehicle trajectory data is a crucial foundation for accurately depicting traffic flow status and micro-level driving behavior, and is of great significance for traffic operation monitoring, intelligent traffic management, driving behavior modeling, autonomous driving simulation, and road safety assessment. However, in actual highway and expressway environments, due to factors such as sparse detector deployment, limited field of view, and a limited proportion of connected vehicles, there are often large observation blind spots. In such cases, the spatiotemporal movement of vehicles within the blind spots, including acceleration, deceleration, following, and lane changes, is unobservable, resulting in a large-scale lack of trajectory data in time and space, posing a serious challenge to traffic operation monitoring and safety risk identification.
[0003] To address the aforementioned issues, some technical solutions have applied deep learning methods to the field of trajectory prediction and reconstruction by introducing recurrent neural networks or graph convolutional networks to characterize spatiotemporal features. However, current prediction methods require a high density of vehicle trajectory data and rely on dense detection data to maintain good performance. In sparse observation environments, they are prone to fluctuations in prediction accuracy.
[0004] Therefore, how to achieve high-precision reconstruction of the vehicle's full-time and spatial trajectory in a sparse detector environment remains an urgent problem to be solved in this field. Summary of the Invention
[0005] The main purpose of this application is to provide a vehicle trajectory reconstruction method based on spatiotemporal graph neural networks in sparse detection environments, aiming to solve the problem of how to reconstruct vehicle trajectories in sparse detector environments.
[0006] To achieve the above objectives, this application provides a sparse detection environment vehicle trajectory reconstruction method based on spatiotemporal graph neural networks, the method comprising:
[0007] S10, the time interval between the vehicle entry time collected by the upstream detector and the vehicle exit time detected by the downstream detector, as well as the road surface area between the upstream detector and the downstream detector, is used as the vehicle trajectory reconstruction area.
[0008] S20, using each vehicle in the vehicle trajectory reconstruction area as a node, and the relative distance, relative speed, and interaction category code between vehicles as edge feature vectors, a vehicle interaction graph is constructed, wherein the interaction category code is determined by the lane number and longitudinal position between the target vehicle and other vehicles;
[0009] S30, each of the vehicle interaction graph structures is combined according to the time sequence to obtain a graph sequence, and the graph sequence is input into the spatiotemporal graph neural network to obtain the vehicle trajectory predicted by the spatiotemporal graph neural network.
[0010] Optionally, in step S20, the mathematical expression for the edge feature vector is:
[0011]
[0012] in, and These are the normalized scaling factors, Encode the interaction category, The vertical relative distance, This refers to relative velocity.
[0013] Optionally, in step S20, the mathematical expression of the vehicle interaction diagram includes:
[0014]
[0015] in:
[0016]
[0017]
[0018] In the formula, This is a vehicle interaction diagram. Let be a set of nodes, representing all vehicles; Let be the set of edges, representing the interaction category encoding between vehicles; Let i be the edge feature vector, i be the i-th vehicle / node, and j be the j-th vehicle / node.
[0019] Optionally, the interaction category encoding includes:
[0020] when and At that time, the vehicle For vehicles The preceding vehicle, the interaction category is encoded as 0;
[0021] when and At that time, the vehicle For vehicles The following vehicle, the interaction category is encoded as 1;
[0022] when and At that time, the vehicle For vehicles The adjacent vehicle in the left front lane has an interaction category code of 2;
[0023] when and At that time, the vehicle For vehicles The adjacent vehicle in the left rear lane has an interaction category code of 3;
[0024] when and At that time, the vehicle For vehicles The adjacent vehicle in the right front lane has an interaction category code of 4;
[0025] when and At that time, the vehicle For vehicles The adjacent vehicle in the right rear lane has an interaction category code of 5.
[0026] In the formula, This is the lane number where vehicle i is located. Let j be the lane number of the vehicle in lane j. Let i be the longitudinal position of vehicle i. Let j be the longitudinal position of vehicle j.
[0027] Optionally, in step S30, the spatiotemporal graph neural network includes the following steps when performing vehicle trajectory prediction:
[0028] Step S31: At time Vehicle interaction diagram The node features are input into the spatiotemporal graph neural network, which uses H attention points for aggregation and updating.
[0029]
[0030] in,
[0031] In the formula, For nodes For nodes Attention weights For nodes The input feature vector, For edge feature vectors, This is the weight matrix. This is a learnable attention parameter vector. For activation function, For nodes The neighborhood group, This indicates the concatenation of vectors. , These are learnable parameters;
[0032] S32, after spatial aggregation As input to the time model, the hidden state of each vehicle node is updated over time using a gated recurrent unit. If a vehicle is absent from certain frames, its state from the previous time step is continued.
[0033]
[0034]
[0035]
[0036]
[0037] In the formula, For nodes At any moment The hidden state, For part-wise multiplication, , , , , , All are learnable parameters;
[0038] S33, based on Simultaneously perform continuous regression and lane classification to obtain lateral offset prediction and lane distribution probability:
[0039]
[0040]
[0041] In the formula, For lateral offset prediction, For lane distribution probability, , These are the predicted velocity values and the predicted acceleration values, respectively. , , , These are the weights of the regression head, the bias of the regression head, the weights of the classification head, and the bias of the classification head, respectively.
[0042] S34, assuming the blind zone time range is... At the beginning of the window At this location, the longitudinal position can be obtained from the current observed trajectory or the arc length after projecting the vehicle onto the centerline of the candidate lane, within the sampling interval. Next, perform discrete kinematics integration to recursively extrapolate the longitudinal position, lateral offset prediction, and lane distribution probability forward and backward:
[0043]
[0044]
[0045]
[0046]
[0047]
[0048]
[0049] in, The longitudinal velocity and acceleration after fusion can be obtained from the regression output of S33. We get the result by weighting the observed values:
[0050]
[0051] in, To balance the weights, These are physical velocities and accelerations obtained from historical observations.
[0052] Forward recursion from Starting from the beginning of the time, the backward recursion is based on... Time start:
[0053]
[0054]
[0055]
[0056] In the formula, and These represent the longitudinal position predictions obtained by forward recursion and backward recursion, respectively. These are the longitudinal velocity prediction values obtained from forward and backward recursion, respectively. These are the predicted longitudinal acceleration values obtained from forward and backward recursion, respectively. The combined longitudinal velocity and acceleration, and These represent the lateral offset predictions obtained by forward recursion and backward recursion, respectively. and Let represent the lane distribution probabilities obtained by forward recursion and the lane distribution probabilities obtained by backward recursion, respectively. The physical velocity after denormalization. The sampling interval;
[0057] S35, within the blind zone time range Define the time weighting coefficient. :
[0058]
[0059] In the formula, For window Inner The timestamp of each sampling moment.
[0060] The output is the longitudinal position prediction as the result of the vehicle trajectory prediction. Longitudinal velocity and acceleration prediction values Lateral offset prediction Lane distribution probability :
[0061]
[0062]
[0063]
[0064]
[0065] For vehicles At any moment The system selects the category with the highest probability from the predicted lane distribution probability vector as the final lane prediction result, thus mapping from a continuous probability distribution to a discrete lane decision. The final lane category prediction is:
[0066] .
[0067] in, For vehicles At any moment Predicted lane category labels, For vehicles Belongs to the The predicted probability of each lane category The total number of lane categories, This is a category indexing operator that maximizes the expression within parentheses.
[0068] Optionally, the spatiotemporal graph neural network includes the following steps when performing vehicle trajectory prediction:
[0069] The vehicle trajectory prediction results are then denormalized.
[0070]
[0071] in, For normalized predicted values, The vehicle trajectory prediction results include longitudinal position prediction, lateral offset prediction, speed prediction, acceleration prediction, and lane distribution probability. and These are the maximum and minimum values of the feature, respectively. It is a numerically stable term.
[0072] Optionally, the loss function of the spatiotemporal graph neural network during training satisfies the following expression:
[0073]
[0074] In the formula, For loss function, This represents the set of training samples within all blind zones. , , and For lane category, lateral offset, velocity, and acceleration in the real dataset, To predict the actual longitudinal position, , , and These represent the lane category distribution probability, lateral offset prediction, speed prediction, and acceleration prediction, respectively. CE represents the cross-entropy loss function, i represents the vehicle index, and k represents the time step index. , , These are the weighting coefficients.
[0075] In addition, to achieve the above objectives, this application also provides a computer system, the computer system comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed by the processor, it implements the steps of the sparse detection environment vehicle trajectory reconstruction method based on spatiotemporal graph neural network as described in any of the preceding claims.
[0076] In addition, to achieve the above objectives, this application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the sparse detection environment vehicle trajectory reconstruction method based on spatiotemporal graph neural network as described in any of the preceding claims.
[0077] This application has at least the following beneficial effects:
[0078] (1) Under the condition of sparse detector deployment, this application first performs unified processing on vehicle data, including timestamp alignment, time unit normalization, and position unit conversion, and divides blind zone areas based on the spatial positions of upstream and downstream detectors. Through the above preprocessing steps, the data that originally had problems such as inconsistent time, inconsistent units, and missing blind zones is transformed into a structurally consistent and temporally continuous input dataset. This processing not only improves the fusionability of data from detectors from different sources, but also provides a stable data environment for subsequent trajectory reconstruction;
[0079] (2) The node and edge feature construction method proposed in this application, in addition to including basic features of a single vehicle such as vehicle ID, position, speed and acceleration, also calculates relative distance and relative speed, and introduces interaction category coding to distinguish the front vehicle, the rear vehicle, the left front neighbor vehicle, the left rear neighbor vehicle, the right front neighbor vehicle and the right rear neighbor vehicle. In this way, the longitudinal following and lateral interaction relationships between vehicles can be expressed more precisely, so that the model can not only learn the motion law of a single vehicle, but also capture the dynamic coupling characteristics between multiple vehicles in the traffic flow, thereby significantly improving the authenticity of the reconstruction results;
[0080] (3) In the spatial modeling stage, this application uses a graph attention network to model the vehicle interaction graph. Unlike the traditional aggregation method based on fixed weights, the attention mechanism can adaptively allocate weights according to the influence of neighboring vehicles on the target vehicle. For example, in a high-speed car-following scenario, the importance of the vehicle in front is usually higher than that of the vehicle behind, and the model can automatically highlight this relationship through attention parameters. This mechanism improves the adaptability of the trajectory reconstruction model under different traffic densities and different scenarios, making the reconstructed trajectory closer to the real situation;
[0081] (4) In terms of time modeling, this application uses gated recurrent units (GRU) to learn the temporal information of vehicles. Compared with traditional recurrent neural networks, GRU can effectively solve the gradient vanishing problem in long sequence modeling and retain long-term dependency information while ensuring computational efficiency. By recursively updating the temporal features of each vehicle, the model can generate a trajectory with temporal continuity within the blind zone, avoiding the break or abrupt changes caused by relying solely on single-point observations;
[0082] (5) In terms of output design, this application uses parallel regression decoder and classification decoder to predict the vehicle's longitudinal position, lateral offset, speed, acceleration, and lane category, respectively. This not only enables the simultaneous output of multi-dimensional trajectory information, ensuring the integrity of trajectory reconstruction, but also provides the possibility for further driving behavior analysis. For example, through the continuously predicted lane category sequence, it is possible to directly determine whether the vehicle has changed lanes and the start and end times of the lane change, thereby supporting higher-level traffic behavior recognition;
[0083] (6) In the trajectory generation process, this application proposes a weighted fusion strategy that combines forward and backward recursion. Specifically, the observation value of the vehicle at the entrance of the blind zone is used as the initial value for forward recursion, and the observation value at the exit of the blind zone is used as the constraint for backward recursion. The two prediction results are then weighted and fused according to the time ratio within the blind zone. This strategy can effectively reduce the cumulative error caused by unidirectional prediction, making the reconstructed trajectory consistent with the observation data at the beginning and end of the blind zone, and achieving a smooth transition within the blind zone, thereby improving the accuracy and continuity of the trajectory.
[0084] (7) The method of this application is not only applicable to offline traffic data completion and analysis, but can also be extended to online traffic monitoring and intelligent control systems. In offline scenarios, this method can be used to complete existing trajectory datasets and improve the completeness of research data; in online scenarios, this method can process the data reported by sparse detectors in real time and output full-time and spatiotemporal trajectories, providing direct support for traffic congestion detection, safety early warning, and intelligent highway management. Therefore, this application has strong practical value and promotion potential in engineering applications. Attached Figure Description
[0085] Figure 1 This is a flowchart illustrating the sparse detection environment vehicle trajectory reconstruction method based on spatiotemporal graph neural network involved in the embodiments of this application;
[0086] Figure 2 This is a schematic diagram of a highway blind spot under the sparse detector deployment involved in the embodiments of this application;
[0087] Figure 3 This is a schematic diagram of the architecture of the spatiotemporal graph neural network involved in the embodiments of this application;
[0088] Figure 4 This is a schematic diagram of the trajectory reconstruction result of lane 1 involved in an embodiment of this application;
[0089] Figure 5 This is a schematic diagram of the trajectory reconstruction result of lane 2 involved in the embodiments of this application;
[0090] Figure 6 This is a schematic diagram of the hardware operating environment of the computer system involved in the embodiments of this application.
[0091] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0092] To better understand the above technical solutions, exemplary embodiments of this disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of this disclosure to those skilled in the art.
[0093] First Embodiment
[0094] Reference Figure 1 This embodiment provides a sparse detection environment vehicle trajectory reconstruction method based on spatiotemporal graph neural network, the method including the following steps:
[0095] S10, the time interval between the vehicle entry time collected by the upstream detector and the vehicle exit time collected by the downstream detector, as well as the road surface area between the upstream detector and the downstream detector, is used as the vehicle trajectory reconstruction area.
[0096] In this embodiment, when a vehicle is driving on the road, it first enters through the upstream detector and then exits through the downstream detector. The time interval and the road area traversed during this process are used as the vehicle trajectory reconstruction area.
[0097] In some optional implementations, the raw vehicle data collected by the upstream and downstream detectors needs to be formatted uniformly, converting the time unit to seconds and the position unit to meters. A standardized time-series data structure is constructed by selecting the smallest timestamp as the starting point and aligning the data at fixed sampling intervals. Simultaneously, the vehicle trajectory reconstruction region is determined based on the time range of the vehicle's entry time through the upstream detector and its exit time through the downstream detector, and the spatial range of the distance between the upstream and downstream detectors. The time unit in the raw data collected by the sparse detectors is unified to seconds, and the position unit is unified to meters. The time and position conversion formulas are as follows:
[0098]
[0099]
[0100] in, The converted time (in seconds). The detector's original timestamp, This is the time conversion factor; The converted position (unit: meters). For the detector's original position, This is the position conversion coefficient.
[0101] After completing the unit conversion, to ensure the consistency of different vehicle trajectories in the time dimension, the timestamps need to be aligned. This is done by selecting the smallest timestamp among all observation data. As the starting point, and according to the preset sampling interval A unified time series is generated sequentially, and its expression is:
[0102]
[0103] in, For the first A unified point in time, Sampling interval, The number of sampling points is specified. For data that could not be observed at the corresponding time, linear interpolation is performed between two adjacent observation times based on the sampling interval to fill in the missing values at the next observation time, thereby maintaining continuity and integrity in the time dimension.
[0104] Furthermore, the vehicle trajectory reconstruction area is determined by both temporal and spatial ranges. This includes the time when the vehicle enters the blind zone as detected by the upstream detector. The time when the vehicle exits the blind spot detected by the downstream detector As the time range, the spatial range is defined by the spatial difference between the upstream and downstream detectors, specifically expressed as follows:
[0105]
[0106]
[0107] in, Indicates the time range for trajectory reconstruction. Indicates the spatial range of trajectory reconstruction. and These represent the positions of the downstream and upstream detectors, respectively. Through the above processing, a foundation can be laid for subsequent trajectory feature extraction and modeling within a unified data format and spatiotemporal range. The remaining data serves as the target for trajectory reconstruction, such as... Figure 2 As shown.
[0108] S20, using each vehicle in the vehicle trajectory reconstruction area as a node, and the relative distance, relative speed, and interaction category code between vehicles as edge feature vectors, a vehicle interaction graph is constructed, wherein the interaction category code is determined by the lane number and longitudinal position between the target vehicle and other vehicles;
[0109] In this embodiment, after determining the vehicle trajectory reconstruction region, a node and edge feature construction step for the vehicle interaction graph is proposed. This step includes not only basic vehicle features such as vehicle ID, position, speed, and acceleration, but also calculates relative distance and relative speed, and introduces interaction category coding to distinguish between the preceding vehicle, following vehicle, left front neighbor vehicle, left rear neighbor vehicle, right front neighbor vehicle, and right rear neighbor vehicle. This approach allows for a more refined expression of the longitudinal following and lateral interaction relationships between vehicles, enabling the model to not only learn the motion patterns of individual vehicles but also capture the dynamic coupling characteristics between multiple vehicles in traffic flow, thereby significantly improving the realism of the reconstruction results.
[0110] Furthermore, and optionally, the mathematical expression for the edge eigenvector is:
[0111]
[0112] in, and These are the normalized scaling factors, Encode the interaction category, The vertical relative distance, This refers to relative velocity.
[0113] Further, and optionally, the mathematical expression for the vehicle interaction diagram includes:
[0114]
[0115] in:
[0116]
[0117]
[0118] In the formula, This is a vehicle interaction diagram. Let be a set of nodes, representing all vehicles; Let be the set of edges, representing the interaction category encoding between vehicles; Let be the edge feature vector, where i represents vehicle i and j represents vehicle j.
[0119] Furthermore, based on the longitudinal position and time interval, the velocity and acceleration of each vehicle are calculated, and the formula is defined as follows:
[0120]
[0121]
[0122] in, Indicates the first The car at any time longitudinal velocity, Indicates the first The longitudinal acceleration of the vehicle, This represents the time interval between adjacent samples.
[0123] To characterize the relative motion between vehicles, calculate the relative motion of any vehicle. with neighboring vehicles Relative position and relative velocity:
[0124]
[0125]
[0126] in, The vertical relative distance, This refers to relative velocity.
[0127] Furthermore, and optionally, interaction category encoding is used to represent the neighbor relationships between vehicles. Interaction category encoding can more precisely express the longitudinal following and lateral interaction relationships between vehicles, enabling the model to not only learn the motion patterns of individual vehicles but also capture the dynamic coupling characteristics between multiple vehicles in traffic flow, thereby significantly improving the realism of the reconstruction results. Specifically, this includes the following:
[0128] when and At that time, the vehicle For vehicles The preceding vehicle, the interaction category is encoded as 0;
[0129] when and At that time, the vehicle For vehicles The following vehicle, the interaction category is encoded as 1;
[0130] when and At that time, the vehicle For vehicles The adjacent vehicle in the left front lane has an interaction category code of 2;
[0131] when and At that time, the vehicle For vehicles The adjacent vehicle in the left rear lane has an interaction category code of 3;
[0132] when and At that time, the vehicle For vehicles The adjacent vehicle in the right front lane has an interaction category code of 4;
[0133] when and At that time, the vehicle For vehicles The adjacent vehicle in the right rear lane has an interaction category code of 5.
[0134] In the formula, This is the lane number where vehicle i is located. Let j be the lane number of the vehicle in lane j. Let i be the longitudinal position of vehicle i. Let j be the longitudinal position of vehicle j.
[0135] In some alternative implementations, before inputting vehicle features into the graph neural network, in order to eliminate scale differences between different physical quantities, a minimum-maximum normalization method is used for continuous features such as position, lateral offset, velocity, and acceleration to unify them into intervals. Inside:
[0136]
[0137] in, Represents the original feature values. , These are the minimum and maximum values of the feature in the global data, respectively. To prevent the use of tiny constants with zero denominators, normalization is employed to ensure that different vehicle features have a uniform numerical range when input into the network, which is beneficial for stable model training and rapid convergence.
[0138] S30, each of the vehicle interaction graph structures is combined according to the time sequence to obtain a graph sequence, and the graph sequence is input into the spatiotemporal graph neural network to obtain the vehicle trajectory predicted by the spatiotemporal graph neural network.
[0139] In this embodiment, after obtaining the vehicle interaction graph, the interaction graphs at all times are combined in chronological order to obtain a dynamic graph sequence that evolves over time. As input for subsequent spatiotemporal graph neural network modeling, the spatiotemporal graph neural network modeling generates predicted vehicle trajectories after a series of processing steps.
[0140] Compared to traditional recurrent neural networks, spatiotemporal graphical neural networks can effectively solve the gradient vanishing problem in long sequence modeling, while preserving long-term dependency information while ensuring computational efficiency. By recursively updating the temporal features of each vehicle, the model can generate temporally continuous trajectories within the blind zone, avoiding the breaks or abrupt changes caused by relying solely on single-point observations.
[0141] In the technical solution provided in this embodiment, the blind zone area is divided by combining the spatial positions of upstream and downstream detectors, the proposed node and edge features are used to construct the vehicle interaction graph, and the interaction category coding is introduced to distinguish the positional relationship between vehicles. Finally, the vehicle interaction graph structure is combined according to the time sequence to obtain the graph sequence, which is then input into the spatiotemporal graph neural network to realize the reconstruction of vehicle trajectory.
[0142] Second Embodiment
[0143] This embodiment provides a modeling method for a spatiotemporal graph neural network. Compared to traditional fixed-weight aggregation methods, this embodiment offers an adaptive weight allocation approach. This adapts to high-speed car-following scenarios where the importance of the vehicle in front is typically higher than that of the vehicle behind. The model can automatically highlight this relationship through attention parameters. This mechanism improves the adaptability of the trajectory reconstruction model under different traffic densities and scenarios, making the reconstructed trajectory closer to reality. (Refer to...) Figure 3 The model architecture diagram shown includes the following steps:
[0144] Step S31: At time Vehicle interaction diagram The node features are input into the spatiotemporal graph neural network, which uses H attention points for aggregation and updating.
[0145]
[0146] in,
[0147] In the formula, For nodes For nodes Attention weights For nodes The input feature vector, For edge feature vectors, This is the weight matrix. This is a learnable attention parameter vector. For activation function, For nodes The neighborhood group, This indicates the concatenation of vectors. , These are learnable parameters;
[0148] S32, after spatial aggregation As input to the time model, the hidden state of each vehicle node is updated over time using a gated recurrent unit. If a vehicle is absent from certain frames, its state from the previous time step is continued.
[0149]
[0150]
[0151]
[0152]
[0153] In the formula, For nodes At any moment The hidden state, For part-wise multiplication, , , , , , All are learnable parameters;
[0154] S33, based on Simultaneously perform continuous regression and lane classification to obtain lateral offset prediction and lane distribution probability:
[0155]
[0156]
[0157] In the formula, For lateral offset prediction, For lane distribution probability, , These are the predicted velocity values and the predicted acceleration values, respectively. , , , These are the weights of the regression head, the bias of the regression head, the weights of the classification head, and the bias of the classification head, respectively.
[0158] S34, assuming the blind zone time range is... At the beginning of the window At this location, the longitudinal position can be obtained from the current observed trajectory or the arc length after projecting the vehicle onto the centerline of the candidate lane, within the sampling interval. Next, perform discrete kinematics integration to recursively extrapolate the longitudinal position, lateral offset prediction, and lane distribution probability forward and backward:
[0159]
[0160]
[0161]
[0162]
[0163]
[0164]
[0165] in, The longitudinal velocity and acceleration after fusion can be obtained from the regression output. We get the result by weighting the observed values:
[0166]
[0167] in, To balance the weights, These are physical velocities and accelerations obtained from historical observations.
[0168] Forward recursion from Starting from the beginning of the time, the backward recursion is based on... Time start:
[0169]
[0170]
[0171]
[0172] In the formula, and These represent the longitudinal position predictions obtained by forward recursion and backward recursion, respectively. These are the longitudinal velocity prediction values obtained from forward and backward recursion, respectively. These are the predicted longitudinal acceleration values obtained from forward and backward recursion, respectively. The combined longitudinal velocity and acceleration, and These represent the lateral offset predictions obtained by forward recursion and backward recursion, respectively. and Let represent the lane distribution probabilities obtained by forward recursion and the lane distribution probabilities obtained by backward recursion, respectively. The physical velocity after denormalization. The sampling interval;
[0173] S35, within the blind zone time range Define the time weighting coefficient. :
[0174]
[0175] In the formula, For window Inner The timestamp of each sampling moment.
[0176] The output is the longitudinal position prediction as the result of the vehicle trajectory prediction. Longitudinal velocity and acceleration prediction values Lateral offset prediction Lane distribution probability :
[0177]
[0178]
[0179]
[0180]
[0181] For vehicles At any moment The algorithm selects the class corresponding to the highest probability from the predicted lane distribution probability vector as the final lane prediction result. The continuous probability distribution output (multi-class probabilities obtained through softmax) is converted into discrete lane class labels for subsequent trajectory reconstruction and evaluation, thus achieving a mapping from continuous probability distribution to discrete lane decision-making. The final lane class prediction is:
[0182]
[0183] in, For vehicles At any moment Predicted lane category labels, For vehicles Belongs to the The predicted probability of each lane category The total number of lane categories, This is a category indexing operator that maximizes the expression within parentheses.
[0184] Further and optionally, to obtain prediction results at the physical quantity level, the regression output is denormalized, specifically including:
[0185] The vehicle trajectory prediction results are then denormalized.
[0186]
[0187] in, For normalized predicted values, The vehicle trajectory prediction results include longitudinal position prediction, lateral offset prediction, speed prediction, acceleration prediction, and lane distribution probability. and These are the maximum and minimum values of the feature, respectively. It is a numerically stable term.
[0188] Furthermore, and optionally, to ensure the continuity of observation data of the trajectory within and at the boundary of the blind zone, at the entry and exit times of the blind zone... A boundary consistency constraint is applied to ensure that the predicted trajectory aligns with the measured point at the boundary position. During training, supervised samples are selected using blind zone masks, and a comprehensive loss function is defined, including the mean squared errors of lane classification cross-entropy, lateral offset, velocity, and acceleration, in the form:
[0189]
[0190] In the formula, For loss function, This represents the set of training samples within all blind zones. , , and For lane category, lateral offset, velocity, and acceleration in the real dataset, To predict the actual longitudinal position, , , and These represent the lane category distribution probability, lateral offset prediction, speed prediction, and acceleration prediction, respectively. CE represents the cross-entropy loss function, i represents the vehicle index, and k represents the time step index. , , These are the weighting coefficients.
[0191] Verification of Examples
[0192] Based on any of the above embodiments, this embodiment experimentally verifies the method mentioned above on the HighD dataset. In this embodiment, the hyperparameter values during the training process are... , , , , These hyperparameters control the contribution ratio of different loss terms to the overall objective function, thereby balancing the importance of each stage of the task during training and ensuring stable and effective model training. The results are as follows... Figure 4 and Figure 5 As shown,
[0193] To quantitatively evaluate the reconstruction accuracy of the method proposed in this application, mean absolute error (MAE), root mean square error (RMSE), mean absolute percentage error (MAPE), and lane change accuracy were selected as evaluation metrics. Under the conditions of a blind zone longitudinal length of 200 m and a sampling interval of 0.4 s, the method of this application achieved the following reconstruction accuracy on the HighD dataset: MAE = 3.35 m, RMSE = 4.59 m, MAPE = 1.71%, and lane change accuracy of 92.6%.
[0194] The results show that the proposed method maintains high trajectory reconstruction accuracy and lane change recognition accuracy even in sparse detector environments, significantly outperforming traditional methods and demonstrating good robustness and practicality. The proposed method can accurately recover the vehicle's trajectory within blind spots, including dynamic changes in longitudinal position, lateral offset, velocity, and acceleration. The reconstructed trajectory closely matches the real trajectory, correctly capturing the vehicle's lane change behavior and lane keeping characteristics.
[0195] As one implementation scheme, Figure 6 This is a schematic diagram of the hardware operating environment of the computer system involved in the embodiments of this application.
[0196] like Figure 6 As shown, the computer system may include: a processor 1001, such as a CPU; a memory 1005; a user interface 1003; a network interface 1004; and a communication bus 1002. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen or an input unit such as a keyboard; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 1005 may be high-speed RAM or non-volatile memory, such as a disk drive. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0197] Those skilled in the art will understand that Figure 6 The computer system architecture shown does not constitute a limitation on the computer system and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0198] like Figure 6As shown, the memory 1005, as a storage medium, may include an operating system, a network communication module, a user interface module, and computer programs. The operating system is a program that manages and controls the hardware and software resources of the computer system, as well as the operation of the computer programs and other software or programs.
[0199] exist Figure 6 In the computer system shown, the user interface 1003 is mainly used to connect to the terminal and communicate data with the terminal; the network interface 1004 is mainly used to communicate data with the backend server; and the processor 1001 can be used to call the computer program stored in the memory 1005.
[0200] In this embodiment, the computer system includes: a memory 1005, a processor 1001, and a computer program stored in the memory and executable on the processor, wherein:
[0201] When processor 1001 calls a computer program stored in memory 1005, it performs the following operations:
[0202] S10, the time interval between the vehicle entry time collected by the upstream detector and the vehicle exit time detected by the downstream detector, as well as the road surface area between the upstream detector and the downstream detector, is used as the vehicle trajectory reconstruction area.
[0203] S20, using each vehicle in the vehicle trajectory reconstruction area as a node, and the relative distance, relative speed, and interaction category code between vehicles as edge feature vectors, a vehicle interaction graph is constructed, wherein the interaction category code is determined by the lane number and longitudinal position between the target vehicle and other vehicles;
[0204] S30, each of the vehicle interaction graph structures is combined according to the time sequence to obtain a graph sequence, and the graph sequence is input into the spatiotemporal graph neural network to obtain the vehicle trajectory predicted by the spatiotemporal graph neural network.
[0205] Furthermore, those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program includes program instructions and can be stored in a storage medium, which is a computer-readable storage medium. The program instructions are executed by at least one processor in a computer system to implement the process steps of the embodiments of the above methods.
[0206] Therefore, this application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the various steps of the sparse detection environment vehicle trajectory reconstruction method based on spatiotemporal graph neural network as described in the above embodiments.
[0207] The computer-readable storage medium can be any computer-readable storage medium capable of storing program code, such as a USB flash drive, portable hard drive, read-only memory (ROM), magnetic disk, or optical disk.
[0208] It should be noted that, since the storage medium provided in the embodiments of this application is the storage medium used to implement the methods of the embodiments of this application, those skilled in the art can understand the specific structure and variations of the storage medium based on the methods described in the embodiments of this application, and therefore will not be repeated here. All storage media used in the methods of the embodiments of this application fall within the scope of protection of this application.
[0209] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0210] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0211] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0212] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0213] It should be noted that any reference signs placed between parentheses in the claims should not be construed as limiting the claims. The word "comprising" does not exclude the presence of components or steps not listed in the claims. The word "a" or "an" preceding a component does not exclude the presence of a plurality of such components. This application can be implemented by means of hardware comprising several different components and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third, etc., does not indicate any order. These words can be interpreted as names.
[0214] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.
[0215] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A sparse detection environment vehicle trajectory reconstruction method based on a spatio-temporal graph neural network, characterized in that, The method includes the following steps: S10, the time interval between the vehicle entry time collected by the upstream detector and the vehicle exit time collected by the downstream detector, as well as the road surface area between the upstream detector and the downstream detector, is used as the vehicle trajectory reconstruction area. S20, using each vehicle in the vehicle trajectory reconstruction area as a node, and the relative distance, relative speed, and interaction category code between vehicles as edge feature vectors, a vehicle interaction graph is constructed, wherein the interaction category code is determined by the lane number and longitudinal position between the target vehicle and other vehicles; S30, combine each of the vehicle interaction graphs according to the time sequence to obtain a graph sequence, and input the graph sequence into the spatiotemporal graph neural network to obtain the vehicle trajectory predicted by the spatiotemporal graph neural network; In step S30, the spatiotemporal graph neural network, when performing vehicle trajectory prediction, includes the following steps: Step S31: At time Vehicle interaction diagram The node features are input into the spatiotemporal graph neural network, which uses H attention points for aggregation and updating. ; wherein ; In the formula, For nodes For nodes Attention weights For nodes The input feature vector, For edge feature vectors, This is the weight matrix. This is a learnable attention parameter vector. For activation function, For nodes The neighborhood group, This indicates the concatenation of vectors. , These are learnable parameters; S32, the spatially aggregated As input to the temporal model, the hidden state of each vehicle node is updated in time using a gated recurrent unit, which continues the state from the previous time step if the vehicle is absent in some frames: ; ; ; ; In the formula, For nodes At any moment The hidden state, For part-wise product, , , , , , All are learnable parameters; S33, based on Simultaneously conduct continuous quantity regression and lane classification to obtain lateral deviation prediction and lane distribution probability: ; ; In the formula, For lateral offset prediction, For lane distribution probability, , These are the predicted velocity values and the predicted acceleration values, respectively. , , , These are the weights of the regression head, the bias of the regression head, the weights of the classification head, and the bias of the classification head, respectively. S34, assuming the blind zone time range is... At the beginning of the window At this location, the longitudinal position can be obtained from the current observed trajectory or the arc length after projecting the vehicle onto the centerline of the candidate lane, within the sampling interval. Next, perform discrete kinematics integration to recursively extrapolate the longitudinal position, lateral offset prediction, and lane distribution probability forward and backward: ; ; ; ; ; ; where, The longitudinal velocity and acceleration after fusion can be output by the regression of S33 and the observation values weighted ; wherein, is a balancing weight, is the physical velocity and acceleration derived from historical observations; The forward recursion starts from the time instant and the backward recursion starts from the time instant ; ; ; In the formula, and These represent the longitudinal position predictions obtained by forward recursion and backward recursion, respectively. These are the longitudinal velocity prediction values obtained from forward and backward recursion, respectively. These are the predicted longitudinal acceleration values obtained from forward and backward recursion, respectively. The combined longitudinal velocity and acceleration, and These represent the lateral offset predictions obtained by forward recursion and backward recursion, respectively. and Let represent the lane distribution probabilities obtained by forward recursion and the lane distribution probabilities obtained by backward recursion, respectively. The physical velocity after denormalization. The sampling interval; S35, defining a time weight coefficient within a blind area time range : ; In the formula, is a window the first timestamp of the sampling instant; Longitudinal position predictions output as vehicle trajectory prediction results Longitudinal velocity and acceleration predictions Lateral offset predictions And lane distribution probabilities : ; ; ; ; For vehicles At any moment The system selects the category with the highest probability from the predicted lane distribution probability vector as the final lane prediction result, thus achieving a mapping from continuous probability distribution to discrete lane decision-making; the final lane category prediction is: ; in, For vehicles At any moment Predicted lane category labels, For vehicles Belongs to the The predicted probability of each lane category The total number of lane categories, This is a category indexing operator that maximizes the expression within parentheses.
2. The spatio-temporal graph neural network-based sparse detection environment vehicle trajectory reconstruction method of claim 1, wherein, In step S20, the mathematical expression for the edge feature vector is: ; in, and These are the normalized scaling factors, Encode the interaction category, The vertical relative distance, This refers to relative velocity.
3. The spatio-temporal graph neural network-based sparse detection environment vehicle trajectory reconstruction method of claim 1, wherein, In step S20, the mathematical expression for the vehicle interaction diagram includes: ; in: ; ; wherein, is a vehicle interaction graph, is a set of nodes representing all vehicles; is a set of edges representing interaction class codes between vehicles; is an edge feature vector, i is the ith vehicle / node, and j is the jth vehicle / node.
4. The spatio-temporal graph neural network-based sparse detection environment vehicle trajectory reconstruction method of claim 2 or 3, wherein, The interaction category code includes: when and At that time, the vehicle For vehicles The preceding vehicle, the interaction category is encoded as 0; When and the vehicle is a rear vehicle of the vehicle , the interaction category is coded as 1; when and At that time, the vehicle For vehicles The adjacent vehicle in the left front lane has an interaction category code of 2; when and At that time, the vehicle For vehicles The adjacent vehicle in the left rear lane has an interaction category code of 3; when and At that time, the vehicle For vehicles The adjacent vehicle in the right front lane has an interaction category code of 4; when and At that time, the vehicle For vehicles The adjacent vehicle in the right rear lane has an interaction category code of 5. In the formula, This is the lane number where vehicle i is located. Let j be the lane number of the vehicle in lane j. Let i be the longitudinal position of vehicle i. Let j be the longitudinal position of vehicle j.
5. The spatio-temporal graph neural network-based sparse detection environment vehicle trajectory reconstruction method of claim 1, wherein, The spatiotemporal graph neural network, when performing vehicle trajectory prediction, includes the following steps: The vehicle trajectory prediction results are then denormalized. ; in, For normalized predicted values, The vehicle trajectory prediction results include longitudinal position prediction, lateral offset prediction, speed prediction, acceleration prediction, and lane distribution probability. and These are the maximum and minimum values of the feature, respectively. It is a numerically stable term.
6. The sparse detection environment vehicle trajectory reconstruction method based on spatiotemporal graph neural network as described in claim 1 or 5, characterized in that, The loss function of the spatiotemporal graphical neural network during training satisfies the following expression: ; In the formula, For loss function, This represents the set of training samples within all blind zones. , , and For lane category, lateral offset, velocity, and acceleration in the real dataset, To predict the actual longitudinal position, , , and These represent the lane category distribution probability, lateral offset prediction, speed prediction, and acceleration prediction, respectively. CE represents the cross-entropy loss function, i represents the vehicle index, and k represents the time step index. , , These are the weighting coefficients.
7. A computer system, characterized by The computer system includes: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, it implements the steps of the sparse detection environment vehicle trajectory reconstruction method based on spatiotemporal graph neural network as described in any one of claims 1 to 6.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the sparse detection environment vehicle trajectory reconstruction method based on spatiotemporal graph neural networks as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Track prediction method based on adaptive interaction and dynamic intention
CN120995066A
Highway vehicle trajectory prediction method based on multi-scale interactive perception
CN121148158A