Vehicle trajectory reconstruction method and device based on interpretable attention

CN122388237BActive Publication Date: 2026-08-18CCCC FIRST HIGHWAY CONSULTANTS CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202610848094.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-06-12
Publication Date
2026-08-18
Estimated Expiration
2046-06-12

AI Technical Summary

Technical Problem

[0008]为了克服现有的车辆轨迹重构过程中存在的处理交通震荡(如拥堵导致的频繁启停)等非线性场景时,无法有效捕捉车辆在时空维度上的动态演化特征,导致重构精度不足等问题,本发明提供了一种基于可解释注意力的车辆轨迹重构方法及装置

Benefits of technology

本发明通过获取第一车辆在多个时间步的轨迹数据,并根据第二车辆为前序车辆或后序车辆选择对应的第一深度学习模型或第二深度学习模型,实现了对前序和后序人驾车辆分别采用针对性模型进行重构,提升了重构的准确性,同时,本发明通过编码器中的双向长短期记忆网络提取第一车辆轨迹的前后向时序依赖特征,并结合解码器将上一时间步的预测位置与注意力上下文向量融合进行自回归解码,实现了对车辆轨迹连续平滑的生成,能够有效捕捉交通震荡区域的非线性演化特征;并且,本发明通过注意力模块基于欧几里得距离计算解码器当前隐藏状态与编码特征中预设邻近时间步轨迹数据之间的相关性权重,实现了注意力机制的计算效率提升和可解释性增强;通过误差预测模块基于第一车辆的速度和加速度预测误差值,并根据解码器的输出和误差值生成最终重构轨迹,实现了对初始重构轨迹的系统性校正,进一步提升了重构精度。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122388237B_ABST
    Figure CN122388237B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of vehicle trajectory construction, and discloses a vehicle trajectory reconstruction method and device based on an interpretable attention, which comprises the following steps: obtaining trajectory data of a first vehicle at multiple time steps; determining a relative position relationship between a second vehicle and the first vehicle, wherein the relative position relationship comprises the second vehicle being a preceding vehicle or a following vehicle of the first vehicle; determining a target model from a first pre-trained deep learning model and a second pre-trained deep learning model according to the relative position relationship, wherein the first deep learning model is used for reconstructing a preceding vehicle trajectory, and the second deep learning model is used for reconstructing a following vehicle trajectory; and inputting the trajectory data into the target model to obtain a reconstructed trajectory of the second vehicle. The present application realizes the reconstruction of the preceding and following vehicles by using targeted models respectively, thereby improving the accuracy of the reconstruction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of vehicle trajectory reconstruction technology, and in particular to a method and apparatus for reconstructing vehicle trajectories based on interpretable attention. Background Technology

[0002] Vehicle trajectories, as a crucial source of high-precision microscopic traffic data, are of great significance for traffic flow theory research, traffic simulation verification, and traffic emission estimation. Trajectory data can not only deduce speed and acceleration distributions but also assess traffic operation status through indicators such as vehicle queue length and flow rate. Therefore, reconstructing full-sample vehicle trajectories using known traffic data has become a research hotspot in the field of intelligent transportation.

[0003] Current vehicle trajectory reconstruction technologies primarily rely on two types of data sources: fixed-point sensor data and mobile sensor data. The former mainly includes induction coil data and video detection data, while the latter mainly includes GPS data, mobile phone signaling data, and vehicle kinematic data provided by intelligent connected vehicles.

[0004] Early research largely relied on data from fixed-point sensors, such as using adaptive smoothing methods with spatiotemporal low-pass filters to reconstruct traffic dynamics characteristics or using point velocity data to estimate travel time. However, fixed sensors typically only provide macroscopic statistical data at cross-sectional levels and cannot provide continuous spatiotemporal vehicle trajectories. While video detection technology can extract trajectories, it is limited by the field of view of cameras, cannot cover long road sections, and the construction and maintenance costs of high-density deployment across the entire road network are extremely high.

[0005] With the increasing prevalence of vehicle-mounted sensors, methods for reconstructing the trajectories of human-driven vehicles based on mobile sensor data are gradually emerging. For example, some studies utilize the trajectory of a probe vehicle combined with shock wave boundary models or cellular automata to reconstruct traffic flow. However, these methods are highly dependent on the market penetration rate (MPR) of vehicles. Literature data shows that the popularization of highly automated vehicles is a long process, and for the next few decades, road traffic will remain a mix of connected and automated vehicles (CAVs) and human-driven vehicles (HVs). At low penetration rates, mobile data samples are sparse and measurement errors exist, leading to insufficient reconstruction accuracy.

[0006] Furthermore, to compensate for the limitations of single data sources, existing technologies have begun to explore the integration of multi-source data (fixed data + mobile data). Some scholars utilize data assimilation frameworks or integrated macro-micro models for trajectory reconstruction. However, most existing multi-source data reconstruction methods rely on traditional traffic flow theory models (such as the Wiedemann car-following model and the Intelligent Driver Model (IDM). While these physical models perform reasonably well in describing steady traffic flow, they struggle to capture the nonlinear evolution characteristics of vehicles in the spatiotemporal dimensions when faced with complex traffic oscillations (such as frequent starts and stops due to congestion). Moreover, model parameter calibration is difficult, easily leading to significant deviations between the reconstructed trajectory and the actual trajectory.

[0007] Therefore, there is an urgent need in this field for a vehicle trajectory reconstruction method that can effectively integrate multi-source data and accurately handle traffic oscillations in environments with low penetration of mixed traffic flows. Summary of the Invention

[0008] To overcome the problems of insufficient reconstruction accuracy caused by the inability to effectively capture the dynamic evolution characteristics of vehicles in the spatiotemporal dimension when dealing with nonlinear scenarios such as traffic oscillations (such as frequent starts and stops caused by congestion), this invention provides a vehicle trajectory reconstruction method and device based on interpretable attention.

[0009] In a first aspect, the present invention provides a vehicle trajectory reconstruction method based on interpretable attention, the method comprising:

[0010] Acquire trajectory data of the first vehicle at multiple time steps; the first vehicle is an intelligent connected vehicle; Determine the relative positional relationship between the second vehicle and the first vehicle, wherein the relative positional relationship includes that the second vehicle is either the preceding or following vehicle of the first vehicle; and the second vehicle is a human-driven vehicle. Based on the relative positional relationship, a target model is determined from a pre-trained first deep learning model and a second deep learning model; wherein, the first deep learning model is used to reconstruct the trajectory of the preceding vehicle, and the second deep learning model is used to reconstruct the trajectory of the following vehicle. The trajectory data is input into the target model to obtain the reconstructed trajectory of the second vehicle; The target model includes an encoder, a decoder, an attention module, and an error prediction module; The encoder is used to extract features from the trajectory data to obtain encoded features, and the encoder includes a bidirectional long short-term memory network. The decoder is used to perform decoding based on the encoded features. The input of the decoder at the first time step is the final output of the encoder. The initial hidden state and initial cell state of the decoder are initialized by the final hidden state of the encoder. The attention module is used to calculate the correlation weight between the current hidden state of the decoder and the trajectory data of the preset neighboring time steps in the encoded features based on Euclidean distance during the decoding process of the decoder. The decoder fuses the predicted position generated in the previous time step with the context vector generated by the attention module and uses it as the input of the current time step. The error prediction module is used to predict error values ​​based on the speed and acceleration of the first vehicle, and to correct the trajectory predicted by the decoder according to the output of the decoder and the error values, thereby generating the reconstructed trajectory of the second vehicle.

[0011] According to a specific implementation, in the above method, when the second vehicle is the successor vehicle of the first vehicle, the target model is the second deep learning model; when the attention module calculates the relevance weight, the preset neighboring time step in the associated encoded features is a preset number of historical time steps before the current time step of the first vehicle.

[0012] According to a specific implementation, in the above method, when the second vehicle is the preceding vehicle of the first vehicle, the target model is the first deep learning model; when the attention module calculates the relevance weight, the preset neighboring time step in the associated encoded features is a preset number of future time steps after the first vehicle at the current time step.

[0013] According to one specific implementation, in the above method, the encoder further includes a fully connected layer, which is disposed before the bidirectional long short-term memory network and is used to map the trajectory data from a one-dimensional space to a high-dimensional space; the fully connected layer uses a leaky rectified linear unit as the activation function.

[0014] According to one specific implementation, the method further includes: Using the reconstructed trajectory of the second vehicle as the new trajectory data of the first vehicle, the reconstructed trajectory of the third vehicle adjacent to the second vehicle is reconstructed, and this process is repeated until the reconstructed trajectories of the adjacent vehicles overlap or the preset maximum reconstruction level is reached.

[0015] According to one specific implementation, in the above method, the error prediction module includes a one-dimensional convolutional neural network and a long short-term memory network, specifically used for: The velocity sequence and acceleration sequence of the first vehicle are spliced ​​together; The concatenated data is then processed using the one-dimensional convolutional neural network to extract features. The error value is generated by the Long Short-Term Memory network based on the extracted features.

[0016] According to one specific implementation, in the above method, the process of the attention module calculating the relevance weights includes: The hidden state of the decoder is converted into a one-dimensional vector through a fully connected layer; Calculate the Euclidean distance between the one-dimensional vector and the trajectory data of each time step in the preset neighboring time steps; The negative value of the Euclidean distance is input into the softmax function to obtain the correlation weights at each time step.

[0017] According to one specific implementation, in the above method, the process of the decoder generating the predicted position includes: For the first time step, the final output of the encoder is fused with the first context vector generated by the attention module and then input into the decoder to generate the first predicted position; For the i-th time step, i≥2, the i-1-th predicted position is fused with the i-th context vector and then input into the decoder to generate the i-th predicted position; Repeat the above steps until predicted locations for multiple time steps are generated.

[0018] According to a specific implementation, in the above method, after the error prediction module generates the error value, it adds the preliminary predicted position output by the decoder to the error value to obtain the reconstructed trajectory of the second vehicle.

[0019] In a second aspect, the present invention provides a vehicle trajectory reconstruction device based on interpretable attention, comprising: The data acquisition module is used to acquire trajectory data of the first vehicle at multiple time steps; the first vehicle is an intelligent connected vehicle. A relationship determination module is used to determine the relative positional relationship between the second vehicle and the first vehicle, wherein the relative positional relationship includes that the second vehicle is either the preceding or following vehicle of the first vehicle; and the second vehicle is a human-driven vehicle. The model selection module is used to determine the target model from the pre-trained first deep learning model and the second deep learning model based on the relative positional relationship. The trajectory reconstruction module is used to input the trajectory data into the target model to obtain the reconstructed trajectory of the second vehicle; The deep learning model includes an encoder, a decoder, an attention module, and an error prediction module. The encoder is used to extract features from the trajectory data to obtain encoded features, and the encoder includes a bidirectional long short-term memory network. The decoder is used to perform decoding based on the encoded features. The input of the decoder at the first time step is the final output of the encoder. The initial hidden state and initial cell state of the decoder are initialized by the final hidden state of the encoder. The attention module is used to calculate the correlation weight between the current hidden state of the decoder and the trajectory data of the preset neighboring time steps in the encoded features based on Euclidean distance during the decoding process of the decoder. The decoder fuses the predicted position generated in the previous time step with the context vector generated by the attention module and uses it as the input of the current time step. The error prediction module is used to predict error values ​​based on the speed and acceleration of the first vehicle, and to correct the trajectory predicted by the decoder according to the output of the decoder and the error values, thereby generating the reconstructed trajectory of the second vehicle.

[0020] Compared with the prior art, the beneficial effects of the present invention are as follows: This invention acquires trajectory data of a first vehicle at multiple time steps and selects a corresponding first or second deep learning model based on whether the second vehicle is the preceding or following vehicle. This enables targeted model reconstruction for both preceding and following human-driven vehicles, improving reconstruction accuracy. Furthermore, the invention extracts forward and backward temporal dependency features of the first vehicle's trajectory through a bidirectional long short-term memory network in the encoder and combines this with autoregressive decoding by fusing the predicted position from the previous time step with the attention context vector. This achieves continuous and smooth generation of vehicle trajectories, effectively capturing the nonlinear evolution characteristics of traffic oscillation areas. Additionally, the invention improves computational efficiency and interpretability of the attention mechanism by calculating the correlation weight between the current hidden state of the decoder and the pre-set trajectory data from neighboring time steps in the encoded features using an attention module based on Euclidean distance. Finally, the error prediction module predicts error values ​​based on the speed and acceleration of the first vehicle and generates the final reconstructed trajectory based on the decoder's output and the error values, achieving systematic correction of the initial reconstructed trajectory and further improving reconstruction accuracy. Attached Figure Description

[0021] Figure 1 This is a spatiotemporal schematic diagram of mixed traffic flow provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of the trajectory reconstruction rules for human-driven vehicles provided in an embodiment of the present invention; Figure 3 A flowchart illustrating a vehicle trajectory reconstruction method based on interpretable attention, provided in an embodiment of the present invention; Figure 4 A schematic diagram of the structure of the target model provided in the embodiments of the present invention. Figure 5 A schematic diagram of the single-post-processor human-vehicle trajectory reconstruction results based on NGSIM and High-Sim datasets provided in an embodiment of the present invention; Figure 6 This is the trajectory reconstruction result of a single preceding human-driven vehicle based on NGSIM and High-Sim datasets provided in the embodiments of the present invention; Figure 7 This is a schematic diagram illustrating the trajectory of a multi-driver vehicle under different market penetration rates, provided as an embodiment of the present invention. Detailed Implementation

[0022] The present invention will now be described in further detail with reference to specific embodiments. However, this should not be construed as limiting the scope of the present invention to the following embodiments; all technologies implemented based on the content of the present invention fall within the scope of the present invention.

[0023] Unless otherwise specified, the terms "upper," "lower," "left," "right," "center," "inner," and "outer," etc., used in the description of specific embodiments of the present invention to indicate orientation or positional relationships, are based on the orientation or positional relationships shown in the accompanying drawings, or the orientation or positional relationship in which the product / equipment / device is usually placed during use. These terms are merely for the purpose of facilitating the description of the present invention or simplifying the description in specific embodiments, and for enabling those skilled in the art to quickly understand the solution, and do not indicate or imply that a particular device / component / element must have a specific orientation, or be constructed and operated in a specific positional relationship. Therefore, they should not be construed as limitations on the present invention.

[0024] Furthermore, the use of terms such as "horizontal," "vertical," "suspended," "parallel," and "coaxial" does not imply that the corresponding device / component / element must be absolutely horizontal, vertical, suspended, parallel, or coaxial. Slight tilt or deviation is permissible, as long as it does not affect the normal function of the relevant component. For example, "horizontal" simply means that its direction is more horizontal relative to "vertical," not that the structure must be perfectly horizontal; a slight tilt is acceptable. "Coaxial" means that two components are arranged as coaxially as possible, allowing them to move coaxially or approximately coaxially when their relative positions change. Alternatively, it can be simplified to mean that the corresponding device / component / element, when arranged in "horizontal," "vertical," "suspended," "parallel," or "coaxial" directions, can have an error / deviation of ±10% relative to the corresponding direction, more preferably within ±8%, more preferably within ±6%, more preferably within ±5%, and more preferably within ±4%. For example, the deviation in the "coaxial" direction is controlled within 0.2-1mm, preferably within 0.2-0.5mm. As long as the corresponding device / component / element is within the error / deviation range, it can still achieve its function in the solution of the present invention.

[0025] Furthermore, the use of terms such as "first," "second," and "third" in terminology is merely for distinguishing descriptions of identical or similar components and should not be interpreted as emphasizing or implying the relative importance of a particular component.

[0026] Furthermore, in the description of the embodiments of the present invention, "several", "more than", and "a number of" represent at least two. The number can be any number, such as two, three, four, five, six, seven, eight, or nine, and can even exceed nine.

[0027] Furthermore, in this embodiment of the invention, "at least one" refers to one or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The character " / " generally indicates an "or" relationship between the preceding and following related objects, but it does not exclude the possibility of indicating an "and" relationship. The specific meaning can be understood in conjunction with the context.

[0028] Furthermore, in embodiments of the present invention, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, for example, a process, method, system, product, or device that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such process, method, product, or device.

[0029] It should be noted that the deep learning model involved in the embodiments of this invention refers to a trainable model built on a neural network architecture, which learns the mapping relationship between input and output through a large amount of sample data. Specifically, the deep learning model in this invention includes an encoder, a decoder, an attention module, and an error prediction module. The encoder maps the input sequence to a high-dimensional feature representation; the decoder generates the target sequence step by step based on the encoder's output; the attention module dynamically calculates the importance weights of each part of the input sequence to the current decoding step; and the error prediction module estimates the deviation between the model's initial output and the true value. A bidirectional long short-term memory network (LSTM) is a network structure composed of forward LSTM units and backward LSTM units, capable of simultaneously capturing past and future temporal dependencies in sequence data. Euclidean distance refers to the straight-line distance between two vectors, its physical meaning corresponding to the actual distance between two spatial points.

[0030] Furthermore, the preset neighboring time step involved in this embodiment of the invention refers to a fixed number of consecutive time steps selected forward or backward from the current time step. This preset neighboring time step can be configured according to the actual application scenario and data sampling frequency. For example, when the data sampling frequency is 10Hz, 10 time steps correspond to a 1-second time window, which can effectively cover the typical range of reaction time in vehicle driving behavior. The preset number of historical time steps is similar to the above and will not be described in detail here.

[0031] The vehicle trajectory reconstruction method provided by this invention can be applied to mixed traffic flow scenarios, particularly road traffic environments where intelligent connected vehicles and human-driven vehicles coexist. In this scenario, intelligent connected vehicles can collect their own trajectory data in real time and share the data with roadside computing devices or cloud servers through vehicle-to-infrastructure (V2I) communication or vehicle-to-vehicle (V2V) communication. The method of this invention runs on the aforementioned roadside computing devices or cloud servers, and is used to reconstruct unknown human-driven vehicle trajectories based on known intelligent connected vehicle trajectories, thereby providing high-precision full-sample trajectory data for traffic condition assessment, traffic light optimization, and autonomous driving decision-making.

[0032] Please refer to Figure 1 It shows a spatiotemporal schematic diagram of mixed traffic flow provided by an embodiment of the present invention, in which the red curve represents intelligent connected vehicles (CAVs) and the black dashed line represents manually driven vehicles (HVs).

[0033] The method proposed in this invention reconstructs the trajectory of an unknown manually driven vehicle using known trajectories of intelligent connected vehicles. That is, the input to the method is the trajectory provided by the intelligent connected vehicle. Output the trajectory of human-driven vehicles It can be represented by the following formula:

[0034]

[0035] In the formula, Indicates shared ownership The trajectory at each time step.

[0036] In addition, it can also be found from Figure 1 In (a), it is observed that HV4 and HV7 are following vehicles of CAV1 and CAV2, while HV3 and HV6 are preceding vehicles of CAV1 and CAV2. This indicates that when reconstructing the trajectories of human-driven vehicles, it is necessary to consider the different motion characteristics of preceding and following vehicles of intelligent connected vehicles separately. When mixed traffic flows enter the traffic oscillation zone, the distance between adjacent vehicles is small, and the driving behavior of the preceding vehicle will affect the following vehicle; therefore, adjacent vehicles can be considered as car following pairs. Taking the reconstruction of the trajectory of HV4 as an example, Figure 1 (b) indicates that CAV1 in the first... HV4 enters the traffic oscillation region at the [number] time step, while HV4 requires several more time steps to enter the traffic oscillation region, i.e., HV4 enters the traffic oscillation region at the [number] time step. The position of CAV1 at the nth time step is equal to the position of CAV1 at the nth time step. The position of each time step.

[0037] The above analysis indicates that when reconstructing subsequent human-driven vehicle trajectories, attention should be paid to multiple historical time steps ( The motion trajectory of intelligent connected vehicles is crucial for reconstructing the first... The impact of measuring subsequent human-vehicle trajectory points at each time step. Similarly, when reconstructing preceding human-vehicle trajectories using the trajectory of intelligent connected vehicles, the analysis process is similar to the above, but it requires greater attention to the future multi-time step (time step) of the intelligent connected vehicle. The trajectory points are crucial for reconstructing the preceding human-driven vehicle sequence. The influence of the preceding time step on the trajectory points of the human-driven vehicle.

[0038] Based on the problems described in the reconstruction of human-driven vehicle trajectories and Figure 1 It can be inferred that HV3 and HV4 can be directly reconstructed from the high-precision real vehicle trajectories provided by CAV1. However, for human-driven vehicles whose preceding and following sequences are not intelligent connected vehicles, such as HV2 and HV5, the trajectories provided by intelligent connected vehicles cannot be directly used. Therefore, before explaining the details of the trajectory reconstruction method, it is necessary to first formulate trajectory reconstruction rules.

[0039] The human-driven vehicle trajectory reconstruction rules followed by this invention are as follows: Figure 2As shown. Taking CAV1 as an example, its provided trajectory data is used as model input to reconstruct the trajectories of the preceding human-driven vehicle HV3 and the following human-driven vehicle HV4. Next, using the trajectories of HV3 and HV4 as input, the trajectories of HV2 and HV5 are output. Finally, the above steps are repeated until the reconstructed trajectories overlap.

[0040] It is understandable that overlap means that the trajectories reconstructed from different directions (e.g., the farthest vehicle reconstructed forward and the farthest vehicle reconstructed backward) coincide or intersect in spatial location, indicating that the trajectories of all vehicles have been completely covered.

[0041] The technical solutions provided by the embodiments of the present invention will be described and explained in detail below with reference to the accompanying drawings.

[0042] Please refer to Figure 3 This illustrates a flowchart of a vehicle trajectory reconstruction method based on interpretable attention provided by an embodiment of the present invention. Figure 3 As shown, the method includes the following steps.

[0043] Step 1: Obtain the trajectory data of the first vehicle at multiple time steps.

[0044] Specifically, the computing device receives trajectory data sent by the first vehicle through a communication interface. This trajectory data contains the position information of the first vehicle at multiple consecutive sampling times. For example, the first vehicle may be an intelligent connected vehicle equipped with positioning devices such as a Global Positioning System (GPS) or an Inertial Measurement Unit (INS), which records its spatial coordinates in real time at a sampling frequency of 10Hz and uploads them to the roadside edge computing node via 5G mobile communication technology or dedicated short-range communication technology. The trajectory data from multiple time steps constitute a time series, denoted as […]. ,in This represents the total number of time steps. This represents the position of the first vehicle at time step t.

[0045] Optionally, after acquiring the trajectory data, the computing device also preprocesses the trajectory data. Preprocessing includes, but is not limited to, data cleaning, outlier removal, and normalization. For example, a Savitzky-Golay filter is used to smooth and reduce noise in the position sequence, eliminating high-frequency noise caused by sensor measurement errors. This preprocessing improves the accuracy and stability of subsequent model processing.

[0046] Step 2: Determine the relative positional relationship between the second vehicle and the first vehicle, including whether the second vehicle is the preceding or following vehicle of the first vehicle.

[0047] Specifically, the computing device identifies a second vehicle adjacent to the first vehicle based on the trajectory data of the first vehicle and the vehicle position information collected by the roadside sensing device, and determines whether the second vehicle is in front of or behind the first vehicle. For example, after obtaining the lane information and position coordinates of the first vehicle, the computing device filters the vehicles in the same lane that are closest to the first vehicle. If the vehicle is in front of the first vehicle, it is determined to be the preceding vehicle; if it is behind the first vehicle, it is determined to be the following vehicle. This relative positional relationship determines the calculation direction of the subsequent attention module and the selection of the target model.

[0048] Alternatively, in one possible implementation, the computing device can also assist in determining the relative positional relationship by analyzing the headway between vehicles. When the headway is less than a preset threshold (e.g., 2 seconds), it is determined that the two vehicles are in a following state. At this time, determining the relative positional relationship has higher accuracy and necessity for trajectory reconstruction.

[0049] Step 3: Determine the target model from the pre-trained first deep learning model and second deep learning model based on the relative positional relationship.

[0050] Specifically, the computing device pre-stores two independent deep learning models. The first deep learning model is specifically designed to reconstruct the trajectory of the preceding vehicle (i.e., the person-driven vehicle in front of the first vehicle), and during its training phase, it uses the trajectory data of the first vehicle at multiple future time steps as a reference for the attention module. The second deep learning model is specifically designed to reconstruct the trajectory of the following vehicle (i.e., the person-driven vehicle behind the first vehicle), and during its training phase, it uses the trajectory data of the first vehicle at multiple past time steps as a reference for the attention module. When step 2 determines that the second vehicle is the preceding vehicle of the first vehicle, the computing device selects the first deep learning model as the target model; when the second vehicle is the following vehicle of the first vehicle, the second deep learning model is selected as the target model.

[0051] Step 4: Input the trajectory data into the target model to obtain the reconstructed trajectory of the second vehicle.

[0052] Specifically, the computing device takes the trajectory data of the first vehicle obtained in step 1 as input and feeds it into the target model determined in step 3. This target model is trained on a large number of historical trajectory samples to learn the mapping relationship from the trajectory of the first vehicle to the trajectory of the second vehicle. The output of the model is the reconstructed position sequence of the second vehicle at each time step.

[0053] The target model includes an encoder, decoder, attention module, and error prediction module. Please refer to [reference needed]. Figure 4 This diagram illustrates the structure of the target model provided in an embodiment of the present invention. Each module will be described in detail below.

[0054] The encoder is used to extract features from trajectory data to obtain encoded features. The encoder includes a bidirectional long short-term memory network.

[0055] Specifically, the encoder receives the trajectory data of the first vehicle at T time steps. As input, the trajectory data is first upscaled through a fully connected layer, mapping it from a one-dimensional space to a high-dimensional feature space to enhance its representational power. This fully connected layer uses a leaky rectified linear unit (LER) as the activation function. Subsequently, the upscaled feature sequence is fed into a bidirectional long short-term memory (LSTM) network. The bidirectional LSM network consists of forward LSM units and backward LSM units, with the forward units arranged in chronological order. arrive Processing the sequence to capture information from past moments; the backward unit proceeds in reverse chronological order. arrive The sequence is processed to capture information from future time steps. The hidden states output from both directions are concatenated at each time step to form an encoded feature matrix containing bidirectional contextual information. .

[0056] In one possible implementation, the encoder's input data is This data is input into the fully connected layer (FC layer) to obtain FC layers can Mapping from one-dimensional space to a higher-dimensional space, thus providing This adds more information and enhances the information content of univariate time series data. To enable neurons in the fully connected layer to work synergistically in output computation, this layer uses a Leaky ReLU as the activation function. It should be noted that when adding fully connected layers in subsequent models, the Leaky ReLU activation function is used by default. Secondly, considering the time step... The HV position is correlated with the CAV position at past and future time steps, so a bidirectional LSTM (Bi-LSTM) is used as the core layer of the encoder. Compared to the original LSTM, Bi-LSTM consists of two LSTM layers in opposite directions, which can more accurately describe the sequence dependencies between different time step positions. Finally, the hidden state of the last layer of Bi-LSTM is... The input is fed into the fully connected layer, generating the encoder's output data. The above process is shown in equations (3) to (5):

[0057]

[0058]

[0059] In the formula, This represents the hidden state matrix of the Bi-LSTM. .

[0060] Alternatively, in one possible implementation, the bidirectional long short-term memory network can be stacked in multiple layers, with the hidden states output by each layer serving as input to the next. Increasing the network depth allows for the extraction of higher-level and more abstract feature representations. The encoder's final output... By hiding the state of the last time step This is obtained after inputting a fully connected layer.

[0061] Through the encoder structure described above, the embodiments of the present invention can fully exploit the temporal dependencies in the first vehicle trajectory data, especially the nonlinear evolution characteristics of vehicle motion in traffic oscillation regions, providing rich and accurate contextual information for the subsequent decoding process.

[0062] Furthermore, the decoder is used for decoding based on the encoded features. The input of the decoder at the first time step is the final output of the encoder. The initial hidden state and initial cell state of the decoder are initialized by the final hidden state of the encoder.

[0063] Specifically, the decoder employs a recurrent neural network structure based on a long short-term memory network to generate the predicted position of the second vehicle step by step in chronological order. The decoder is initialized as follows: the hidden state of the encoder at the last time step is initialized... As the initial hidden state of the decoder's long short-term memory unit and initial cell state The encoder's final output After processing by the fully connected layer, it serves as the input to the decoder at the first time step. .

[0064] Alternatively, in one possible implementation, the decoder also employs a teacher-forced training strategy. During the model training phase, the decoder can use a mix of real labeled values ​​and its own generated predictions as input at each step to accelerate model convergence and improve training stability.

[0065] In one possible implementation, the decoder uses a Seq2seq-based model to process natural language tasks, with a fixed initial label. However, this approach is not suitable for time series data prediction because it typically does not require vector representations (such as word embeddings or one-hot encoding). This approach, however, results in a lack of initial labels for the time series data. Currently, when predicting time series data using a Seq2seq model, the decoder input typically takes two forms: the first is to directly use the encoder output as the decoder input; the second is to copy the hidden state of the last unit of the encoder. Each time step, of which This refers to the data step size of the output time series. However, both methods have drawbacks: the first method is only applicable when the input and output data have the same duration; furthermore, neither method considers the correlation between data points at adjacent time steps in the time series.

[0066] Based on the above analysis, the decoder is constructed using natural language processing techniques. Specifically, the first step is the encoder output... Input data for the first time step of the decoder This data is input into the fully connected layer. The second step involves the decoder's hidden state at the first time step. Obtained through a module consisting of LSTM and fully connected layers. Third step, The input is fed into the proposed Att-SM layer to obtain the decoder's output at the first time step. This is achieved by repeating the second and third steps described above. The output vector can be obtained in one step. The decoder construction algorithm is shown in Algorithm 1.

[0067] Algorithm 1. Decoder Construction enter: : Output data length, The output of the last unit of the encoder Output: : Represents the HV trajectory output by the Seq2seq architecture based on ATT-DM. initialization:

[0068]

[0069] =

[0070] while do

[0071]

[0072]

[0073]

[0074]

[0075]

[0076]

[0077] Furthermore, the attention module is used during the decoder's decoding process to calculate the correlation weight between the decoder's current hidden state and the trajectory data of preset neighboring time steps in the encoded features, based on Euclidean distance. The decoder fuses the predicted position generated in the previous time step with the context vector generated by the attention module and uses it as the input for the current time step.

[0078] Traditional attention mechanisms simply multiply the hidden state vector of the decoder at each time step with the hidden state matrix of the encoder and calculate the similarity using the SoftMax function. For example, the calculation process of the dot product attention mechanism at time step t can be represented by formulas (6)-(7):

[0079]

[0080] As can be seen from the above equation, the characteristic of traditional attention mechanisms is that the scoring function used by the dot product attention mechanism only considers the hidden state vector of the decoder at time step t. With the encoder's hidden state matrix ( The products are multiplied, and the dot product score is normalized to between 0 and 1 using the SoftMax function. However, the dot product attention mechanism has the following drawbacks: 1) Low computational efficiency: although its complexity is linear. (in This is for the trajectory of intelligent connected vehicles, but the computation speed is still relatively slow. This is because the number of location points required for trajectory reconstruction typically reaches hundreds, far exceeding the sentence size in natural language processing (when the vehicle trajectory sampling frequency is 10). Even at lower levels). 2) Lack of interpretability: Traditional attention mechanisms are always used to compare the similarity between the hidden state vectors of the encoder and decoder. However, the hidden state vectors, which are intermediate representations and have no clear physical meaning, are usually large in dimension (such as 128, 256, etc.), and will cause the hidden state vectors to fail to effectively characterize the trajectory changes of people and vehicles when crossing traffic oscillation areas.

[0081] Therefore, to better characterize the correlation between the trajectory of the preceding vehicle and the following vehicle traversing a traffic oscillation zone, this invention proposes an Attention Mechanism Based on Distance Measurement (ATT-DM). Compared to traditional attention mechanisms, the inputs to ATT-DM are the trajectories of the CAVs. With one-dimensional hidden state .in Represents the original hidden state vector The result after transformation from high-dimensional space to one-dimensional space via a fully connected layer. Furthermore, ATT-DM achieves optimizations in the following two aspects: 1) Improved computational efficiency: Based on the analysis results in Section 2, during the reconstruction of the... When tracing the time step HV trajectory, use the nearest neighbor. The 10 CAV locations at each time step. These are the locations selected when reconstructing the preceding HV trajectory. The CAV trajectory at each time step is selected when reconstructing the subsequent HV trajectory. 1) CAV trajectory at time step 1. 2) Interpretability: The HV trajectory at time step 1 is calculated using Euclidean distance. The similarity between a location point and the 10 adjacent time step locations of CAV.

[0082] Specifically, the operation process of the attention module provided in this embodiment of the invention is as follows: First, regarding the hidden state of the decoder at time step t... By using a fully connected layer, it is mapped from a high-dimensional feature space to a one-dimensional space to obtain scalar values. This one-dimensional mapping gives the subsequent distance calculations a clear physical meaning, namely, a numerical comparison of spatial location points. Secondly, based on the relative positional relationship determined in step S120, encoding features corresponding to preset neighboring time steps are selected from the encoding feature matrix. When the second vehicle is a vehicle following the first vehicle, encoding features from the 10 historical time steps prior to the current time step are selected; when the second vehicle is a vehicle preceding the first vehicle, encoding features from the 10 future time steps following the current time step are selected. Thirdly, calculations are performed separately... The coding features corresponding to each selected time step above The Euclidean distance between them is given by the following formula: When the second vehicle is the following vehicle. ; When the second vehicle is the preceding vehicle. .

[0083] Then, the negative value of the Euclidean distance is input into the softmax function to calculate the attention weights at each time step, as shown in the following formula: When the second vehicle is the following vehicle. ; When the second vehicle is the preceding vehicle. .

[0084] Finally, the calculated attention weights are summed with the corresponding encoded features to generate a context vector. .

[0085] When generating the predicted position at the current time step, the decoder will use the predicted position generated at the previous time step. (The initial input is used for the first time step) and the context vector generated by the attention module. The vectors are concatenated or added together, and the resulting vector serves as the input to the decoder at the current time step. Based on this input, the hidden state, and the cell state from the previous time step, the decoder calculates the predicted position for the current time step using Long Short-Term Memory (LSTM) units. .

[0086] Alternatively, in one possible implementation, the calculation of the Euclidean distance described above can be replaced by Manhattan distance or Chebyshev distance, both of which fall under the category of similarity measures based on spatial distance. This invention adopts Euclidean distance as the preferred solution because its physical meaning is the most intuitive and directly corresponds to the actual meaning of spatial location coordinates.

[0087] Through the above-mentioned attention mechanism based on Euclidean distance, the embodiments of the present invention achieve the following technical effects: First, the computational complexity is reduced from O(T) of traditional dot product attention to O(10), which greatly reduces the computational overhead and enables the model to process real-time trajectory data with high sampling frequency (such as 10Hz); Second, the physical meaning of the attention weights is clear (i.e., the degree of spatial proximity), which makes the model's decision-making process interpretable and can intuitively show the influence relationship between the historical trajectory of the first vehicle and the current motion of the second vehicle.

[0088] Furthermore, the error prediction module is used to predict the error value of the initial reconstructed trajectory based on the speed and acceleration of the first vehicle, and to generate the reconstructed trajectory of the second vehicle based on the decoder output and the error value.

[0089] Specifically, the error prediction module receives the velocity and acceleration sequences of the first vehicle at multiple time steps as input. These two sequences can be obtained by performing first-order and second-order difference calculations on the position sequence of the first vehicle. The core network structure of the error prediction module includes a one-dimensional convolutional neural network and a long short-term memory network. First, the velocity and acceleration sequences are concatenated to form a multi-channel input tensor. Second, the concatenated tensor is used for feature extraction by a one-dimensional convolutional neural network. The kernel size is set to 3, and the stride is set to 1. Through the stacking of multiple convolutional layers, the local correlation features between velocity and acceleration are extracted. Then, the feature sequence output by the convolutional layers is input to the long short-term memory network. This network captures the temporal dependencies in the feature sequence and outputs an error prediction sequence with the same length as the decoder output sequence. Finally, the decoder outputs the preliminary predicted position sequence. With error prediction sequence The corresponding time steps are added together to obtain the final reconstructed trajectory of the second vehicle.

[0090] On the one hand, it is considered that the vehicle trajectory is correlated with its motion state (i.e., speed and acceleration). On the other hand, even if the trajectory of the driver-vehicle is reconstructed through the first part of the model, the error between the actual trajectory and the reconstructed trajectory still exists. Therefore, it is necessary to combine the acceleration and speed of the intelligent connected vehicle at each time step to predict the trajectory error. In addition, considering that the trajectory reconstruction error of the master vehicle and the speed and acceleration of the slave vehicle are all time series data, and the input data are multivariate time series, this embodiment of the invention combines a one-dimensional convolutional neural network with LSTM to construct a trajectory error prediction module. The working process of this error prediction module is shown in the following formula:

[0091]

[0092]

[0093] The first and second parts of the proposed model's output are obtained using Algorithm 1 and Formula (10), respectively. Now, the final output of the model, i.e., the reconstructed human-driven vehicle trajectory, can be expressed as:

[0094] Alternatively, in one possible implementation, the error prediction module can also adopt the following alternative structure: instead of using a convolutional neural network, a multi-layer long short-term memory network is used directly to process the velocity and acceleration sequences, which can also extract motion state features and predict error values.

[0095] Through the aforementioned error prediction module, this embodiment of the invention can systematically correct the initial output of the decoder using vehicle motion state information (speed and acceleration). Since there is an inherent physical correlation between vehicle motion state and trajectory position, this correction can effectively reduce reconstruction errors, especially in traffic oscillation areas, and can more accurately characterize the speed fluctuations and acceleration / deceleration behavior of vehicles driven by pedestrians.

[0096] Optionally, in one possible implementation, when the second vehicle is a vehicle following the first vehicle, the attention module, when calculating the relevance weights, uses a preset number of historical time steps in the associated encoded features as the number of time steps prior to the current time step for the first vehicle. This implementation is based on the fundamental principle of car-following behavior, namely, that the driving behavior of the following vehicle is mainly influenced by the historical motion state of the preceding vehicle. For example, when a following vehicle is driving behind a preceding vehicle, the driver of the following vehicle adjusts its accelerator and brake operations based on the speed and distance changes of the preceding vehicle over the past few seconds.

[0097] Optionally, in one possible implementation, when the second vehicle is the preceding vehicle of the first vehicle, the attention module, when calculating the relevance weights, uses a preset number of future time steps in the associated encoded features as the first vehicle's current time step. This implementation addresses the specific scenario of preceding vehicle trajectory reconstruction, namely, using the future motion information of the following vehicle (intelligent connected vehicle) to infer the historical trajectory of the preceding vehicle (human-driven vehicle). For example, during traffic congestion dissipation, the starting behavior of the preceding vehicle can be inferred from the following vehicle's following response.

[0098] Optionally, in one possible implementation, the preset number is preferably 10 time steps. This value is selected based on the following considerations: when the trajectory data sampling frequency is 10Hz, 10 time steps correspond to a 1-second time window. Numerous traffic flow studies have shown that drivers' reaction time is typically between 0.8 and 1.2 seconds, therefore a 1-second time window can effectively cover the driver's following reaction cycle. Of course, at other sampling frequencies, this preset number can be adjusted accordingly; for example, when the sampling frequency is 5Hz, the preset number can be set to 5 time steps.

[0099] Optionally, in one possible implementation, the method of the present invention further includes a cascaded reconstruction step. Specifically, the reconstructed trajectory of the second vehicle is used as new trajectory data for the first vehicle and input into a deep learning model to reconstruct the reconstructed trajectory of the third vehicle adjacent to the second vehicle. This operation is repeated until the reconstructed trajectories of adjacent vehicles overlap or a preset maximum reconstruction level is reached. For example, in a convoy of multiple consecutive vehicles, the trajectories of the preceding and following human-driven vehicles are first reconstructed using the trajectories of the intelligent connected vehicles; then, these two newly reconstructed human-driven vehicles are treated as "virtual probe vehicles," and the process continues to expand outwards to reconstruct the trajectories of more distant human-driven vehicles. Through this cascaded approach, embodiments of the present invention can achieve complete reconstruction of the trajectories of all vehicle samples under low penetration conditions. The preset maximum reconstruction level can be configured according to computational resources and accuracy requirements, for example, set to 3 levels to avoid excessive error accumulation.

[0100] It should be noted that the first vehicle refers to an intelligent connected vehicle or detection vehicle capable of providing high-precision, real-world trajectory data, which serves as input to the deep learning model. The second and third vehicles both refer to human-driven vehicles whose trajectories are unknown and require model reconstruction. Specifically, the second vehicle is a human-driven vehicle directly adjacent to the first vehicle (i.e., having a direct following relationship); the third vehicle is a human-driven vehicle adjacent to the second vehicle but not adjacent to the first vehicle. In other words, during the cascaded reconstruction process, all target vehicles being reconstructed are human-driven vehicles, while the vehicles providing input data can be intelligent connected vehicles (such as the first vehicle) or already reconstructed human-driven vehicles (such as the second vehicle). This process continues, progressively expanding the reconstruction scope until a stopping condition is met, such as overlapping reconstructed trajectories of two adjacent vehicles or reaching a preset maximum reconstruction level.

[0101] Alternatively, in one possible implementation, the decoder generates the reconstructed trajectory of the second vehicle as follows: For the first time step (t=1), the encoder's final output is... The first context vector generated by the attention module The vector is fused, and the fused vector is input into the decoder. The decoder outputs the first predicted position. For the i-th time step (i≥2), the predicted position of the (i-1)-th time step is... With the i-th context vector The vector is fused, and the fused vector is input into the decoder. The decoder outputs the i-th predicted position. Repeat the above steps until a sequence of predicted locations at multiple time steps (e.g., T time steps) is generated. This process achieves a complete mapping from known encoded features to the unknown target sequence.

[0102] Optionally, in one possible implementation, after the error prediction module generates the error value, it adds the preliminary predicted position output by the decoder to the corresponding error value to obtain the reconstructed trajectory of the second vehicle. This addition operation can be represented as follows: ,in This represents the initial prediction position of the decoder at time step t. This refers to the error value output by the error prediction module at time step t. This is the final reconstructed position. Through this residual correction method, the error prediction module can compensate for system biases caused by insufficient modeling capabilities of the decoder itself, further improving reconstruction accuracy.

[0103] Based on the above technical solutions, this invention acquires trajectory data of the first vehicle at multiple time steps and selects the corresponding first or second deep learning model based on whether the second vehicle is the preceding or following vehicle. This enables targeted model reconstruction for both preceding and following human-driven vehicles, improving reconstruction accuracy. Simultaneously, this invention extracts the forward and backward temporal dependency features of the first vehicle's trajectory through a bidirectional long short-term memory network in the encoder, and combines this with the decoder to fuse the predicted position of the previous time step with the attention context vector for autoregressive decoding. This achieves continuous and smooth generation of vehicle trajectories, effectively capturing the nonlinear evolution characteristics of traffic oscillation areas. Furthermore, this invention improves the computational efficiency and interpretability of the attention mechanism by calculating the correlation weight between the current hidden state of the decoder and the preset adjacent time step trajectory data in the encoded features using the attention module based on Euclidean distance. Finally, the error prediction module predicts error values ​​based on the speed and acceleration of the first vehicle and generates the final reconstructed trajectory based on the decoder's output and the error values, achieving systematic correction of the initial reconstructed trajectory and further improving reconstruction accuracy.

[0104] The vehicle trajectory reconstruction method provided in this embodiment of the invention will be further introduced and explained below with reference to specific experimental verification processes.

[0105] To verify the effectiveness of the vehicle trajectory reconstruction method proposed in this invention, simulation tests were conducted using five datasets. First, the five datasets are briefly described. Next, the hyperparameter tuning results, training settings, and performance evaluation metrics of the proposed method are presented. Finally, two different types of experiments were designed to verify and test the performance of the proposed model. The first type of experiment reconstructs the trajectory of a preceding or subsequent human-driven vehicle from the trajectory of an intelligent connected vehicle. The second type of experiment reconstructs the trajectory of an unknown human-driven vehicle from the known trajectory of another human-driven vehicle; that is, the input data is not real data but simulated data generated by the proposed model, thereby verifying the method's ability to suppress accumulated errors.

[0106] Since the vehicle trajectory reconstruction method proposed in this invention is based on deep learning, it is necessary to verify the model's performance and stability on multiple datasets. By analyzing existing datasets, the following five datasets were selected: Next Generation Simulation Dataset (NGSIM), HighD dataset, HIGH-Sim dataset, LITUD dataset, and Waymo dataset. The NGSIM, HighD, and HIGH-Sim datasets were collected by video equipment, while the LITUD and Waymo datasets were collected by vehicle-mounted sensors. Therefore, all five datasets can be used for the first type of experiment, while the second type of experiment can only use the NGSIM, HIGH-Sim, and LITUD datasets. The sizes of each dataset are: 214,800 data points, 27,900 data points, 1,248,000 data points, 2,406,140 data points, and 235,440 data points, respectively. All data were processed using the Savitzky-Golay filtering method.

[0107] Mean Squared Error (MSE) was chosen as the loss function for the proposed model because trajectory construction can be categorized as a regression problem in deep learning. Furthermore, Mean Absolute Percentage Error (MAPE) was used as the evaluation metric because its result can be expressed as a percentage, making MAPE easier to understand. The formulas for calculating MSE and MAPE are as follows:

[0108]

[0109] In the formula This indicates the total number of time steps at the HV location. Indicates the first The actual location value at each time step. Indicates the first The predicted location value at each time step.

[0110] The trajectory reconstruction method proposed in this invention has two key parameters that need to be calibrated: the number of decoder layers. and hidden state The number of features. To obtain the optimal combination of the two parameters, in and A grid search was performed within the interval. The optimal number of decoder layers was ultimately determined to be 3, and the optimal number of hidden state features was 64. Furthermore, this embodiment uses a mini-batch size of 128 and employs the Adam optimizer (learning rate = ...). , , , , And enable early stopping during training, which is triggered when no progress is made for three consecutive epochs, in order to avoid overfitting.

[0111] To evaluate the performance of the proposed model, several representative time series models were selected for comparative experiments, including basic LSTM, temporal convolutional neural network (TCN), fully connected LSTM (FC-LSTM), Transformer, sequence-to-sequence model based on dot product attention (S2S-DotAtt), the proposed method without an error prediction module (CA-S2S-E), and the complete proposed method (Cascaded Attention Seq2seq for Trajectory Reconstruction, CA-S2S). The corresponding results are shown in Table 1. Table 1 shows that the proposed method not only outperforms other models in the reconstruction of preceding human-vehicle trajectories but also has advantages in the reconstruction of subsequent human-vehicle trajectories. On the HighD dataset, this embodiment reduces the mean squared error of the reconstruction to 0.1 × 10⁻⁶. -4 The mean absolute errors were 1.06% and 1.29%, respectively, significantly lower than other models. Furthermore, when reconstructing preceding human-vehicle trajectories in the NGSIM and LITUD datasets, Proposed-E's mean squared error and absolute error were higher than the Transformer and S2S-DotAtt models; however, when reconstructing subsequent human-vehicle trajectories in the NGSIM dataset, Proposed-E's mean squared error and absolute error were higher than the S2S-DotAtt model. These experimental results demonstrate that the error prediction module can indeed further reduce the trajectory reconstruction error of human-vehicles. On the other hand, the error in reconstructing preceding human-vehicle trajectories is generally greater than that in reconstructing subsequent human-vehicle trajectories, indicating that the proposed ATT-DM method can better capture the trajectory changes of the preceding vehicle over the past few time steps when reconstructing subsequent human-vehicle trajectories compared to reconstructing preceding human-vehicle trajectories.

[0112] Table 1. Examples of MSE and MAPE for reconstructed preceding / following human-vehicle trajectories using different methods on five datasets.

[0113] To compare the performance of ATT-DM and the dot product algorithm, vehicle-following pairs traversing traffic oscillation regions were extracted from the NGSIM and High-Sim datasets. These two sets of vehicle-following pairs were used for preceding and subsequent human-vehicle trajectory reconstruction, respectively. Figure 5 It displays the trajectory, speed, and acceleration of the reconstructed human-driven vehicle. Figure 5 (a)-(b) are the results from the NGSIM dataset. Figure 5(a) It can be seen that the mean square error of the reconstructed subsequent human-driven vehicle trajectory is 3.74 meters, which is close to the actual trajectory value. Figure 5 (b) shows the similarity between the HV position within the current time step and the positions of the preceding vehicle within the previous ten time steps. The whiter the square, the higher the correlation. Following the blue arrows, it can be observed that when the target vehicle is traveling at a constant speed (0-5 seconds, 15-18 seconds interval), the position at the current time step is most similar to the position of the preceding vehicle at the 10th time step, with the similarity decreasing over time. However, when subsequent vehicles cross the traffic oscillation zone, the similarity between the position of the subsequent vehicles at the current time step and the positions of the preceding vehicles in the previous ten time steps remains consistent. This is because the speed of the subsequent vehicles and the connected vehicles is approximately zero in the traffic oscillation zone, and the positions of the two vehicles do not change, thus maintaining a constant similarity. Figure 5 (c)-(d) show the vehicle velocity and acceleration obtained by differentiating the reconstructed subsequent human-driven vehicle trajectory. The mean square error of velocity is 0.32 m / s, and the mean square error of acceleration is 0.28 m / s², which are close to the actual vehicle velocity and acceleration. Figure 5 Tables (e)-(h) present the test results for the High-Sim dataset. Unlike the NGISM dataset, the vehicle-following pairs extracted from this dataset traverse multiple traffic fluctuation zones and involve more complex road environments. Figure 5 As shown in (f), the proposed trajectory reconstruction method can still effectively capture the similarity features between the position of the following human-driven vehicle at the current time step and the position of the intelligent connected vehicle in the past ten steps.

[0114] Figure 6 This paper presents the results of reconstructing the trajectories of preceding human-driven vehicles using car-following pairs extracted from the NGSIM and High-Sim datasets. It can be seen that the method designed in this embodiment can also effectively reconstruct the trajectories of preceding human-driven vehicles, but there are two differences: i) The similarity trend when reconstructing the trajectory of preceding human-driven vehicles is opposite to the similarity trend when reconstructing the trajectory of subsequent human-driven vehicles. This is because the position of the preceding vehicle at the current time step has a higher similarity to the position of the subsequent vehicle in the next few time steps, but a lower similarity to the position of the preceding vehicle at the current time step. This is consistent with the results obtained above. ii) Although the mean square error of the reconstructed trajectory and velocity of preceding human-driven vehicles is small compared to the real data, the mean square error of acceleration is large and fluctuates significantly, such as... Figure 6 (d) and Figure 6 As shown in (h).

[0115] The proposed method is compared with three representative attention mechanisms (dot product, Bahdanau model, and Luong model) to assess their computational efficiency. It is important to note that only the running time (RMA) of the attention mechanism is evaluated, excluding the training and inference times of different models. The results are shown in Table 2. Compared to the other three attention mechanisms, ATT-DM reduces runtime by 14.5%–23.1% on the HighD dataset, 4.4%–16.6% on the NGSIM dataset, 1.47%–11.8% on the High-Sim dataset, 6.4%–22.6% on the LITUD dataset, and 8.3%–15.3% on the High-Sim dataset.

[0116] Table 2. Example of runtime comparison for four attention mechanisms

[0117] To verify the performance of the proposed method in reconstructing the trajectories of multiple vehicles, a road segment containing traffic fluctuations was extracted from the NGSIM dataset. This segment consisted of 29 vehicles. Given that most current research focuses on reconstructing vehicle trajectories under low market penetration (MPR) conditions, this embodiment sets the MPR of intelligent connected vehicles to 5%, 10%, and 15%, respectively. Experimental results are as follows: Figure 7 As shown: Figure 7 (ac) shows the trajectory reconstruction results under the 5% MPR condition. Figure 7 (df) shows the trajectory reconstruction results under the 10% MPR condition. Figure 7 (hi) Displays the trajectory reconstruction results under the 15% MPR condition. Additionally, Figure 7 The first column is a spatial distribution map of the reconstructed multi-vehicle trajectories. The second column also presents a spatial distribution map, but the colors depend on the speed of each vehicle. The third column uses a box plot to show the distribution of trajectory errors for each reconstructed vehicle.

[0118] from Figure 7 It can be seen that as the market penetration rate of intelligent connected vehicles gradually increases, the mean square error of the reconstructed trajectory decreases from 10.7 meters to 5.8 meters, and the trajectory error per vehicle also gradually decreases. For example... Figure 7 As shown in (c), when the market penetration rate of intelligent connected vehicles is 5%, the positional error between the reconstructed 12th and 25th human-driven vehicles exceeds 30 meters. Figure 7 As shown in (i), when the market penetration rate of intelligent connected vehicles is 15%, the positional error between the reconstructed 12th and 25th human-driven vehicles is reduced to approximately 20 meters. Furthermore, as... Figure 7 (b) Figure 7 (e) and Figure 7 As shown in (h), when a vehicle enters the traffic fluctuation area, the vehicle trajectory color changes from blue to red, indicating a decrease in speed. When the vehicle leaves the traffic fluctuation area, the trajectory color changes from red to blue, indicating an increase in speed. To more intuitively evaluate the performance of the proposed trajectory reconstruction method, Table 3 presents the mean square error of the reconstructed trajectory, mean square error of speed, and mean square error of acceleration for human-driven vehicles under different market penetration rates of intelligent connected vehicles. The above experimental results all demonstrate that the proposed method can not only effectively reconstruct the trajectory of human-driven vehicles but also accurately characterize the speed fluctuations of human-driven vehicles.

[0119] Table 3. Root mean square error of reconstructed human-driven vehicle trajectory, velocity, and acceleration

[0120] Corresponding to the above method embodiments, this invention also provides a vehicle trajectory reconstruction device based on interpretable attention. This device can be applied to roadside edge computing nodes, cloud servers, or in-vehicle computing units. The device includes: a data acquisition module, a relationship determination module, an encoding module, a decoding module, an attention module, and an error prediction module.

[0121] The data acquisition module is used to acquire trajectory data of the first vehicle at multiple time steps. The specific implementation of this module can be found in the description of step 1, and will not be repeated here.

[0122] The relationship determination module is used to determine the relative positional relationship between the second vehicle and the first vehicle. This relative positional relationship includes whether the second vehicle is a preceding or succeeding vehicle of the first vehicle. The specific implementation of this module can be found in the description of step 2, and will not be repeated here.

[0123] The model selection module is used to determine the target model from the pre-trained first deep learning model and second deep learning model based on the relative positional relationship. The specific implementation of this module can be found in step 3, and will not be repeated here.

[0124] The trajectory reconstruction module is used to input the trajectory data into the target model to obtain the reconstructed trajectory of the second vehicle. The specific implementation of this module can be found in the description of step 4, and will not be repeated here.

[0125] The terms “unit”, “module”, etc., used in this specification may be used to refer to computer-related entities, hardware, firmware, combinations of hardware and software, software, or software in execution.

[0126] Those skilled in the art will recognize that the various illustrative logical blocks and steps described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the invention. In the several embodiments provided by the present invention, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for example, the division of modules is merely a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interface; the indirect coupling or communication connection of apparatus or modules may be electrical, mechanical, or other forms.

[0127] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0128] In addition, the functional modules in the various embodiments of the present invention can be integrated into one processing module, or each module can exist physically separately, or two or more units can be integrated into one module.

[0129] In the above embodiments, the functions of each functional module can be implemented entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions (programs). When the computer program instructions (programs) are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., digital video discs, DVDs), or semiconductor media (e.g., solid-state disks, SSDs), etc.

[0130] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, essentially, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, ROM, RAM, magnetic disks, or optical disks.

[0131] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. An interpretable attention-based vehicle trajectory reconstruction method, characterized in that, The method includes: Acquire trajectory data of the first vehicle at multiple time steps; the first vehicle is an intelligent connected vehicle; Determine the relative positional relationship between the second vehicle and the first vehicle, wherein the relative positional relationship includes that the second vehicle is either the preceding or following vehicle of the first vehicle; and the second vehicle is a human-driven vehicle. Based on the relative positional relationship, a target model is determined from a pre-trained first deep learning model and a second deep learning model; wherein, the first deep learning model is used to reconstruct the trajectory of the preceding vehicle, and the second deep learning model is used to reconstruct the trajectory of the following vehicle. The trajectory data is input into the target model to obtain the reconstructed trajectory of the second vehicle; The target model includes an encoder, a decoder, an attention module, and an error prediction module; The encoder is used to extract features from the trajectory data to obtain encoded features, and the encoder includes a bidirectional long short-term memory network. The decoder is used to perform decoding based on the encoded features. The input of the decoder at the first time step is the final output of the encoder. The initial hidden state and initial cell state of the decoder are initialized by the final hidden state of the encoder. The attention module is used to calculate the correlation weight between the current hidden state of the decoder and the trajectory data of the preset neighboring time steps in the encoded features based on Euclidean distance during the decoding process of the decoder. The decoder fuses the predicted position generated in the previous time step with the context vector generated by the attention module and uses it as the input of the current time step. The error prediction module is used to predict error values ​​based on the speed and acceleration of the first vehicle, and to correct the trajectory predicted by the decoder according to the output of the decoder and the error values, thereby generating the reconstructed trajectory of the second vehicle. Wherein, when the second vehicle is the vehicle following the first vehicle, the target model is the second deep learning model; when the attention module calculates the relevance weight, the preset neighbor time step in the associated encoded feature is a preset number of historical time steps before the current time step for the first vehicle; When the second vehicle is the preceding vehicle of the first vehicle, the target model is the first deep learning model; when the attention module calculates the relevance weight, the preset neighbor time step in the associated encoded feature is a preset number of future time steps after the current time step for the first vehicle.

2. The interpretable attention-based vehicle trajectory reconstruction method according to claim 1, characterized in that, The encoder further includes a fully connected layer, which is placed before the bidirectional long short-term memory network and is used to map the trajectory data from a one-dimensional space to a high-dimensional space; the fully connected layer uses a leaky rectified linear unit as the activation function.

3. The interpretable attention-based vehicle trajectory reconstruction method of claim 1, wherein, The method further includes: Using the reconstructed trajectory of the second vehicle as the new trajectory data of the first vehicle, the reconstructed trajectory of the third vehicle adjacent to the second vehicle is reconstructed, and this process is repeated until the reconstructed trajectories of the adjacent vehicles overlap or the preset maximum reconstruction level is reached.

4. The interpretable attention-based vehicle trajectory reconstruction method of claim 1, wherein, The error prediction module includes a one-dimensional convolutional neural network and a long short-term memory network, specifically used for: The velocity sequence and acceleration sequence of the first vehicle are spliced ​​together; The concatenated data is then processed using the one-dimensional convolutional neural network to extract features. The error value is generated by the Long Short-Term Memory network based on the extracted features.

5. The vehicle trajectory reconstruction method based on interpretable attention according to claim 1, characterized in that, The process by which the attention module calculates the relevance weights includes: The hidden state of the decoder is converted into a one-dimensional vector through a fully connected layer; Calculate the Euclidean distance between the one-dimensional vector and the trajectory data of each time step in the preset neighboring time steps; The negative value of the Euclidean distance is input into the softmax function to obtain the correlation weights at each time step.

6. The vehicle trajectory reconstruction method based on interpretable attention according to claim 1, characterized in that, The process by which the decoder generates the predicted location includes: For the first time step, the final output of the encoder is fused with the first context vector generated by the attention module and then input into the decoder to generate the first predicted position; For the i-th time step, i≥2, the i-1-th predicted position is fused with the i-th context vector and then input into the decoder to generate the i-th predicted position; Repeat the above steps until predicted locations for multiple time steps are generated.

7. The vehicle trajectory reconstruction method based on interpretable attention according to claim 1, characterized in that, After generating the error value, the error prediction module adds the preliminary predicted position output by the decoder to the error value to obtain the reconstructed trajectory of the second vehicle.

8. A vehicle trajectory reconstruction device based on interpretable attention, characterized in that, include: The data acquisition module is used to acquire trajectory data of the first vehicle at multiple time steps; The first vehicle is an intelligent connected vehicle; A relationship determination module is used to determine the relative positional relationship between the second vehicle and the first vehicle, wherein the relative positional relationship includes that the second vehicle is either the preceding or following vehicle of the first vehicle; and the second vehicle is a human-driven vehicle. The model selection module is used to determine the target model from the pre-trained first deep learning model and the second deep learning model based on the relative positional relationship. The trajectory reconstruction module is used to input the trajectory data into the target model to obtain the reconstructed trajectory of the second vehicle; The deep learning model includes an encoder, a decoder, an attention module, and an error prediction module. The encoder is used to extract features from the trajectory data to obtain encoded features, and the encoder includes a bidirectional long short-term memory network. The decoder is used to perform decoding based on the encoded features. The input of the decoder at the first time step is the final output of the encoder. The initial hidden state and initial cell state of the decoder are initialized by the final hidden state of the encoder. The attention module is used to calculate the correlation weight between the current hidden state of the decoder and the trajectory data of the preset neighboring time steps in the encoded features based on Euclidean distance during the decoding process of the decoder. The decoder fuses the predicted position generated in the previous time step with the context vector generated by the attention module and uses it as the input of the current time step. The error prediction module is used to predict error values ​​based on the speed and acceleration of the first vehicle, and to correct the trajectory predicted by the decoder according to the output of the decoder and the error values, thereby generating the reconstructed trajectory of the second vehicle. Wherein, when the second vehicle is the vehicle following the first vehicle, the target model is the second deep learning model; when the attention module calculates the relevance weight, the preset neighbor time step in the associated encoded feature is a preset number of historical time steps before the current time step for the first vehicle; When the second vehicle is the preceding vehicle of the first vehicle, the target model is the first deep learning model; when the attention module calculates the relevance weight, the preset neighbor time step in the associated encoded feature is a preset number of future time steps after the current time step for the first vehicle.

Citation Information

Patent Citations

  • Trajectory prediction method and device for moving target

    CN118397037A

  • Multi-modal trajectory prediction method based on conditional variation auto-encoder

    CN122087694A