Signal intersection motorcycle trajectory prediction method, system, equipment and medium
By using the PINN sub-model and XGBoost residual learning in signalized intersection scenarios, combined with motorcycle kinematic constraints, the accuracy problem of motorcycle trajectory prediction in complex traffic scenarios is solved, and effective modeling and prediction of the high mobility and strong interactivity of motorcycles are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- XI'AN UNIVERSITY OF ARCHITECTURE AND TECHNOLOGY
- Filing Date
- 2026-03-31
- Publication Date
- 2026-05-15
AI Technical Summary
Existing technologies for predicting motorcycle trajectories at signalized intersections lack accuracy, especially in complex traffic scenarios where they struggle to accurately depict the high mobility and strong interactivity of motorcycles. This results in predictions that do not conform to actual motion patterns. Furthermore, existing methods often employ a single modeling paradigm, failing to effectively integrate vehicle operating status and spatial interaction relationships.
By employing a pre-trained PINN sub-model combined with XGBoost residual learning, initial features are constructed by extracting the motorcycle's trajectory, operating state parameters, and relative spatial relationship features of vehicles within the spatial perception range. Furthermore, kinematic physical constraints of the motorcycle are introduced, and combined with the residual learning strategy, efficient modeling and prediction of complex interactive scenarios are achieved.
It significantly improves the accuracy of predicting the future trajectory of motorcycles, effectively integrates vehicle operating status, spatial interaction relationships and data-driven prediction results, overcomes the shortcomings of insufficient information utilization under a single modeling paradigm, and improves the physical rationality and accuracy of the prediction results.
Smart Images

Figure CN122050152A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent transportation technology, and in particular to a method, system, device and medium for predicting the trajectory of motorcycles at signalized intersections. Background Technology
[0002] With the rapid development of Intelligent Transportation Systems (ITS), traffic operation status perception and traffic participant behavior prediction have become important technical supports for improving road traffic efficiency and traffic safety. Trajectory prediction, as a key link in traffic behavior modeling, can provide basic data support for applications such as traffic conflict identification, signal control optimization, and proactive safety warning, and has significant research and engineering application value in urban signalized intersection scenarios.
[0003] In signalized intersection environments, traffic participants are diverse and their operational states change frequently. Motorcycles, in particular, exhibit greater uncertainty and nonlinearity in their trajectories compared to ordinary motor vehicles due to their small size, high maneuverability, flexible acceleration and deceleration, and diverse travel paths. Influenced by factors such as signal phase changes, interference from surrounding vehicles, and differences in driver behavior, motorcycles are prone to complex behaviors at intersections, including sudden stops, overtaking, and lane changes, making them a high-risk group for traffic conflicts and accidents. Therefore, accurately predicting the future trajectory of motorcycles in signalized intersection scenarios is crucial for improving intersection safety and refining management.
[0004] Existing vehicle trajectory prediction methods can be mainly divided into three categories: physical model-based methods, data-driven methods, and hybrid model methods.
[0005] Physically-based methods typically rely on vehicle kinematics or dynamics equations to predict future trajectories by modeling changes in vehicle position, speed, and heading. These methods offer advantages such as clear physical meaning and strong interpretability. However, in real-world traffic environments, they often require idealized assumptions about driving behavior, making it difficult to accurately depict the complex and dynamic traffic interactions at signalized intersections, thus limiting prediction accuracy in complex scenarios. Data-driven methods learn motion patterns from large amounts of historical trajectory data using machine learning or deep learning models, such as support vector machines, random forests, XGBoost, and various neural network models. These methods possess strong nonlinear modeling capabilities and can adapt to complex traffic scenarios to some extent. However, purely data-driven models often lack constraints on the physical laws of vehicle motion. When training data is insufficient or the scenario varies significantly, they are prone to producing predictions that do not conform to actual motion laws, exhibiting problems such as trajectory abrupt changes and speed discontinuities, thus affecting the model's generalization ability and stability.
[0006] In recent years, Physics-Informed Neural Networks (PINNs), as a method that incorporates physical constraints into the neural network training process, have been increasingly applied to the fields of dynamics modeling and trajectory prediction. By embedding the residuals of physical equations into the loss function, PINN ensures the physical consistency of prediction results while enabling data-driven modeling, thus alleviating to some extent the dependence of purely data-driven models on data scale and quality.
[0007] However, PINN still has limitations in feature representation and training efficiency when processing high-dimensional, highly nonlinear traffic behavior data. In particular, there are relatively few dedicated methods for predicting motorcycle trajectories at signalized intersections in existing research. Most existing trajectory prediction studies focus on motor vehicles or pedestrians, and there is a lack of methods for predicting motorcycle trajectories in signalized intersection scenarios. Motorcycles have characteristics such as high mobility, strong interactivity, and significant influence from traffic signals during operation. Their movement patterns are fundamentally different from those of motor vehicles or pedestrians. Current methods often adopt a single modeling paradigm in model design, which cannot effectively integrate the differences, thus limiting the prediction accuracy and engineering practicality of the model in complex traffic scenarios. Summary of the Invention
[0008] The purpose of this invention is to address the shortcomings of the prior art by providing a method, system, device, and medium for predicting the trajectory of motorcycles at signalized intersections, thereby solving the problems in the prior art.
[0009] The present invention specifically provides the following technical solution: A method for predicting the trajectory of a motorcycle at a signalized intersection includes: Collect video data from road signal-controlled intersections at different time periods; The vehicle trajectory coordinates, vehicle operation status parameters, and relative spatial relationship features of the motorcycle within the motorcycle's spatial perception range are extracted from video data of different time periods at road signal-controlled intersections as initial features. The initial features are input into the pre-trained PINN sub-model, and the predicted values of the motorcycle trajectory coordinates at multiple future time steps are predicted based on the mapping relationship obtained by training; wherein, the mapping relationship is obtained according to the correlation between the historical initial features and the predicted values of the motorcycle trajectory coordinates. The initial features are concatenated with the predicted values of the motorcycle trajectory coordinates along the feature dimension, and the concatenated vector is subjected to residual learning to predict the residual sequence. The predicted motorcycle trajectory coordinates are additively fused with the residual sequence to obtain the motorcycle trajectory prediction result.
[0010] Preferably, the mapping relationship is obtained based on the correlation between historical initial features and predicted motorcycle trajectory coordinates, specifically as follows: Based on the initial characteristics of history As input to the pre-trained PINN sub-model, it is used for forward prediction to obtain the mapping relationship; the specific expression is: ; in, These are the predicted coordinates of the motorcycle's trajectory over N consecutive time steps in the future. θ These are the network parameters of the PINN sub-model. This is the mapping function for the PINN submodel.
[0011] Preferably, the pre-training process of the PINN sub-model is as follows: When training the PINN sub-model using historical initial features and predicted motorcycle trajectory coordinates at multiple future time steps, the mean square error between the predicted and actual motorcycle trajectory coordinates of the PINN sub-model is introduced as a data loss term. Furthermore, physical constraints based on vehicle kinematics equations are introduced, and a physical constraint loss term is constructed using these physical constraints. Among them, data loss items The specific expression is: ; In the formula, , For the PINN sub-model in the 1st The predicted values of the motorcycle trajectory coordinates output at each prediction time step. , These are the corresponding actual trajectory coordinates. The prediction time window length is 30 frames; Among these, physical constraints include: positional continuity constraints. Speed consistency constraints Corner smoothness constraint and acceleration smoothing constraints The specific expression is: ; ; ; ; In the formula, This is the first location point in the predicted coordinate values of the motorcycle trajectory. This is the last point in the historical trajectory; These are the first two position points of the predicted motorcycle trajectory coordinates; For time step; The true velocity vector at the end of the historical trajectory; The first value is calculated based on the predicted velocity direction of the motorcycle trajectory coordinates. The heading angle at each time step; for Approximate acceleration at time t; The number of discrete trajectory points; The total loss function of the PINN sub-model is obtained by weighting the data loss term and the physical constraint loss term, and the PINN sub-model is pre-trained using the total loss function of the PINN sub-model. The specific expression is: In the formula: For trajectory regression data loss; These are physical constraints for position continuity, velocity consistency, and rotational smoothness, respectively; constants are 0.1, 0.05, 0.02, and 10. -4 These are the corresponding preset weighting coefficients.
[0012] Preferably, the initial features are extracted from video data of the road signal-controlled intersection at different time periods, including the coordinates of the motorcycle's trajectory points, vehicle operating status parameters, and the relative spatial relationship features of the motorcycle within its spatial perception range. Specifically: In the video of a signalized intersection, the area where motorcycles travel is taken as the region of interest (ROI), and all types of vehicles within the ROI are tracked to extract continuous trajectory points as vehicle trajectories. All types of vehicle operation status parameters are obtained based on continuous trajectory points, and a signal control intersection vehicle operation trajectory database is constructed using the operation status parameters, vehicle trajectory and corresponding signal phase information. Based on the current vehicle trajectory position of the motorcycle in the signal control intersection vehicle operation trajectory database, other vehicles within the set spatial perception range are selected as references to obtain the relative spatial relationship characteristics of vehicles within the motorcycle's spatial perception range. The initial features are the motorcycle's trajectory, vehicle operating status parameters, and the relative spatial relationship features of vehicles within the motorcycle's spatial perception range.
[0013] Preferably, other vehicles within the specified range are selected as references to obtain the relative spatial relationship features of vehicles within the motorcycle's spatial perception range, specifically: For each surrounding vehicle within the spatial perception range of the motorcycle, acquire the spatial positional relationship characteristics of the surrounding vehicles relative to the motorcycle, including relative lateral displacement, relative longitudinal displacement, and relative Euclidean distance. When there are multiple surrounding vehicles within the perception range, they are sorted from closest to furthest from the motorcycle in terms of spatial distance, and the vehicles closest to the motorcycle are selected to construct spatial position relationship features.
[0014] Preferably, the initial predicted values of the motorcycle trajectory coordinates are concatenated along the feature dimension, and the concatenated vector is subjected to residual learning to predict the residual sequence, specifically as follows: The initial features and the predicted motorcycle trajectory coordinates are concatenated along the feature dimension to construct the input vector of the XGBoost residual learning model. The XGBoost residual learning model employs a multi-output regression structure. The concatenated vectors are subjected to residual learning using the XGBoost residual learning model, and the learned mapping relationship is used to predict the residual sequence; the specific expression of the mapping relationship is as follows: ; in To predict the residuals, ϕ represents the parameters of the XGBoost residual learning model. This is the mapping function for the XGBoost residual learning model.
[0015] Preferably, Kalman filtering is used to smooth the vehicle trajectory formed by continuous trajectory points and to remove abnormal trajectory points whose speed changes exceed a threshold.
[0016] This invention provides a motorcycle trajectory prediction system for signalized intersections, comprising: The data acquisition module is used to collect video data from road signal control intersections at different time periods; The feature extraction module is used to extract the coordinates of the motorcycle's trajectory points, vehicle operation status parameters, and the relative spatial relationship features of the motorcycle within its spatial perception range from video data of different time periods at road signal-controlled intersections, as initial features. The initial prediction module is used to input initial features into the pre-trained PINN sub-model and predict the motorcycle trajectory coordinates at multiple future time steps based on the mapping relationship obtained from the training; wherein, the mapping relationship is obtained based on the correlation between historical initial features and the predicted motorcycle trajectory coordinates. The residual prediction module concatenates the initial features with the predicted values of the motorcycle trajectory coordinates along the feature dimension, and performs residual learning on the concatenated vector to predict the residual sequence. The trajectory fusion prediction module is used to additively fuse the predicted trajectory coordinates with the residual sequence to obtain the motorcycle trajectory prediction result.
[0017] The present invention provides a computer device, including a memory and a processor. The memory stores a program, and when the program is executed by the processor, the processor performs the steps of the above-described method for predicting the trajectory of a motorcycle at a signalized intersection.
[0018] The present invention provides a storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the above-described method for predicting the trajectory of a motorcycle at a signalized intersection.
[0019] Compared with the prior art, the present invention has the following significant advantages: This invention fully considers the characteristics of motorcycles in signal-controlled intersections, such as high mobility, strong interactivity, and significant influence from traffic signals. By extracting the motorcycle's trajectory, vehicle operating state parameters, and relative spatial relationship features of vehicles within the motorcycle's spatial perception range as initial features, a richer initial feature representation is constructed. Combining pre-trained mapping relationships and residual learning strategies, the initial features are concatenated with the predicted trajectory coordinates. Residual learning is then used to further correct prediction biases, achieving efficient modeling of motion patterns in complex interactive scenarios. This invention effectively integrates vehicle operating state, spatial interaction relationships, data-driven prediction results, and physical constraint information. While ensuring the physical rationality of trajectory prediction, it effectively corrects nonlinear prediction errors in complex traffic scenarios, overcoming the shortcomings of existing methods that do not fully utilize information under a single modeling paradigm, and significantly improving the accuracy of motorcycle future trajectory prediction results. Attached Figure Description
[0020] Figure 1 This is a flowchart illustrating a method for predicting the trajectory of a motorcycle at a signalized intersection, according to an embodiment of this application. Figure 2 This is a technical roadmap of an embodiment of this application; Figure 3 This is a comparison diagram of two random trajectories according to an embodiment of this application; wherein, Figure 3 (a) is the first trajectory diagram. Figure 3 (b) is the second trajectory diagram. Detailed Implementation
[0021] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0022] like Figure 1 and Figure 2As shown in this embodiment, a method for predicting the trajectory of a motorcycle at a signalized intersection includes: Step 1: Collect video data of the road signal control intersection at different time periods.
[0023] Video acquisition at signal-controlled intersections based on high-precision cameras: S1.1 Camera Selection and Deployment: Select high-precision industrial cameras with a resolution of at least 4K, a frame rate of at least 30 fps, and adjustable shutter speed. Based on the geometry and traffic flow characteristics of the signal control intersection, deploy 2–4 cameras within the intersection area to achieve comprehensive coverage of the approach lanes, exit lanes, and conflict zones. The camera installation height should be set at 8–12 m, with an installation angle of 30–45° to the horizontal. A time synchronization device should be used to ensure the time consistency of video data acquisition from multiple cameras.
[0024] S1.2 Acquisition Parameter Settings: Based on the actual lighting conditions at the intersection, the camera exposure time is set to 1 / 500 s–1 / 1000 s, and the gain range is 0–12 dB to ensure a clear outline of the motorcycle target. The video acquisition period covers the morning peak, off-peak, and evening peak hours, and the signal control information for the corresponding time periods is recorded simultaneously, including the signal phase type and phase duration.
[0025] S1.3 Video Preprocessing: The acquired raw video data is subjected to distortion correction, noise reduction and image enhancement processing. Gaussian filtering is used to suppress noise and histogram equalization is used to enhance image contrast, providing high-quality video input for subsequent trajectory extraction.
[0026] Step 2: Extract the coordinates of the motorcycle's trajectory points, vehicle operation status parameters, and the relative spatial relationship features of the motorcycle within its spatial perception range from the video data of different time periods at the road signal control intersection, as the initial features.
[0027] Vehicle trajectory extraction at signal-controlled intersections based on DataFromSky: Video import and parameter configuration: Import the pre-processed video into the DataFromSky video analysis system, set the video resolution and frame rate parameters to be consistent with the acquisition device, enable the dynamic target recognition module, set the target type to motorcycle, and enable the data anonymization processing function.
[0028] Region of Interest (ROI) Delineation: In the video of a signalized intersection, the main area where motorcycles travel is designated as the ROI, while pedestrian and non-motorized vehicle areas are excluded to reduce background interference.
[0029] Trajectory Extraction and Optimization: DataFromSky's multi-target tracking algorithm is used to track all types of vehicles within the ROI, extracting the planar coordinates and timestamp information of continuous trajectory points as vehicle trajectories; Kalman filtering is used to smooth the vehicle trajectories formed by continuous trajectory points, and abnormal trajectory points with speed changes exceeding the threshold are removed.
[0030] Trajectory data output: The processed trajectory data is output in a structured format. Each trajectory data includes a unique vehicle identifier, a timestamp, and corresponding planar coordinate information.
[0031] The calculation of operational status parameters is based on continuous trajectory points to obtain all types of vehicle operational status parameters, including Track ID (vehicle ID), Type (vehicle type), Entrance (intersection entrance), Entry Time (vehicle entry time s), Turn (driving direction: 1 straight, 2 right turn, 3 left turn), Exit Time (vehicle exit time s), TraveledDistance (total distance traveled by the vehicle at the intersection m), Avg Speed (average vehicle speed km / h), x (horizontal coordinate m), y (vertical coordinate m), Speed (instantaneous vehicle speed km / h), Tan Acc (acceleration m / s2), Lat Acc (lateral acceleration m / s2), Time (time s), Angle (turning angle rad), and Session (morning and evening peak hours: V1 and V2 are evening peak hours, V3 and V4 are morning peak hours).
[0032] Data cleaning and completion: Statistical methods are used to remove abnormal data that do not conform to the actual operating characteristics of vehicles, and missing trajectory points are interpolated to complete the data, so as to ensure the continuity and integrity of the trajectory data.
[0033] Database Construction: A database of vehicle trajectory data at signalized intersections is constructed. This database is built using operational status parameters, vehicle trajectories, and corresponding signal phase information to provide data support for model training.
[0034] Step 3: Input the initial features into the pre-trained PINN sub-model, and predict the motorcycle trajectory coordinates for multiple future time steps based on the mapping relationship obtained from the training; wherein, the mapping relationship is obtained based on the correlation between the historical initial features and the predicted motorcycle trajectory coordinates.
[0035] Based on the constructed motorcycle trajectory database, a sliding time window method is used to construct model training samples.
[0036] The initial features are the motorcycle's trajectory information at the current moment and several historical moments, vehicle operating state parameters, and the relative spatial relationship characteristics of vehicles within the motorcycle's spatial perception range. These initial features also include the motorcycle's own historical trajectory information and its relative spatial relationship characteristics with surrounding vehicles, used to characterize the motorcycle's operating state in a signalized intersection scenario. When constructing the initial features of the model, to depict the local traffic environment of the motorcycle in a signalized intersection scenario, the relative spatial relationship characteristics of surrounding vehicles are introduced. Specifically:
[0037] Specifically, using the current position of the motorcycle to be predicted based on the vehicle trajectory database of signalized intersections as a reference point, a predefined spatial perception range is set around it, and other vehicles within this range are selected as surrounding vehicle objects, i.e., as references. For each surrounding vehicle within the motorcycle's spatial perception range, the spatial positional relationship characteristics of the surrounding vehicles relative to the motorcycle are obtained, including relative lateral displacement, relative longitudinal displacement, and relative Euclidean distance.
[0038] When there are multiple surrounding vehicles within the perception range, they are sorted from closest to furthest from the motorcycle in terms of spatial distance, and the 8 closest vehicles are selected to participate in feature construction. When there are insufficient surrounding vehicles, missing features are filled with zero values to ensure the consistency of the initial feature dimensions of the model.
[0039] The relative spatial relationship features of surrounding vehicles, together with the motorcycle's own historical trajectory and operating status features, constitute the model input, which is used to enhance the model's ability to perceive complex traffic environments. The above features only participate in the data-driven learning process and are not directly used for physical constraint modeling.
[0040] The model output is a sequence of trajectory coordinates of the motorcycle over multiple consecutive time steps in the future, which is the two-dimensional position coordinates of the predicted future trajectory points.
[0041] The completed data samples are divided into training, validation, and test sets according to vehicle IDs. This is used for model training, parameter selection, and performance evaluation, while preventing the trajectory of the same vehicle from entering different data sets and causing data leakage.
[0042] The overall structure of the PINN-XGBoost trajectory prediction model adopts a fusion architecture based on physical constraints and residual compensation, including: PINN sub-model: used to learn the basic trajectory prediction results that conform to the kinematic laws of motorcycles; XGBoost sub-model: used to learn the nonlinear error characteristics in the basic prediction results; Fusion output module: used to fuse the prediction results of the two sub-models to obtain the final trajectory prediction result.
[0043] The model guides the data learning process with physical constraints and improves the trajectory prediction accuracy in complex traffic scenarios through residual compensation.
[0044] Among them, the construction of the PINN sub-model and the design of physical constraints are as follows: The PINN sub-model adopts a multi-layer fully connected neural network structure. The input layer receives the historical trajectory of the motorcycle and its relative spatial relationship with surrounding vehicles. The output layer predicts the trajectory coordinates for multiple future time steps. This is the basic prediction result used to learn the future trajectory of the motorcycle. Its core idea is to introduce vehicle kinematic physical constraints into the data-driven neural network model to improve the physical consistency and generalization ability of trajectory prediction.
[0045] To ensure that the predicted trajectory conforms to the actual motion laws of a motorcycle, two-dimensional kinematic constraints of the motorcycle are introduced during model training, including the physical consistency relationship between position, velocity, and acceleration: ; Where x(t) and y(t) represent the position of the motorcycle in the planar coordinate system, and v(t), a(t), θ(t) and These represent the motorcycle's speed, acceleration, heading angle, and angular velocity at the current moment, respectively.
[0046] PINN sub-model forward mapping: Let X be the historical initial feature vector corresponding to the k-th sample. k As the input to the pre-trained PINN sub-model, this feature vector consists of the motorcycle's historical trajectory information constructed by a sliding time window and its relative spatial relationship features with surrounding vehicles; the forward prediction process of the PINN sub-model can be represented as: ; in, ∈ This is a sequence of predicted coordinates for a two-dimensional motorcycle trajectory over N consecutive time steps in the future. θ These are the network parameters of the PINN sub-model. This is the mapping function for the PINN submodel.
[0047] When training the PINN sub-model using historical initial features and motorcycle trajectory coordinates from multiple future time steps, a mean square error between the predicted and actual motorcycle trajectory coordinates of the PINN sub-model is introduced as a data loss term to measure the error between the predicted and actual motorcycle trajectory coordinates. Furthermore, a physical constraint residual based on the vehicle kinematics equations is introduced to construct a physical constraint loss term.
[0048] Among them, data loss items The specific expression is: ; In the formula, The prediction time window length is 30 frames; The model predicts the first Predicted values of motorcycle trajectory coordinates at each time step; These are the corresponding actual trajectory coordinates.
[0049] Specifically, the physical constraint loss term includes: (1) Positional continuity constraint : Constraints on the geometric connection between the predicted trajectory start point and the historical trajectory end point: ; In the formula: This is the first location point of the predicted trajectory; This is the last point in the historical trajectory.
[0050] (2) Speed Consistency Constraint : The initial velocity is predicted by approximating it using finite difference, and it is constrained to remain consistent with the velocity at the end of the historical time step: ; In the formula: These are the first two positions of the predicted trajectory; ; This represents the true velocity vector at the end of the historical trajectory.
[0051] (3) Corner smoothness constraint : Unreasonable sharp turns are suppressed by penalizing the change in heading angle between adjacent time steps: ; In the formula: The first [item] is calculated based on the predicted trajectory velocity direction. The heading angle at each time step.
[0052] (4) Acceleration smoothing constraint : To eliminate non-physical jitter in the predicted trajectory and conform to vehicle dynamics characteristics, acceleration constraints are introduced. This term penalizes abrupt acceleration / deceleration behavior by minimizing the L2 norm of the second-order finite difference:
[0053] ; in, The number of discrete trajectory points; for The approximate acceleration at time t is calculated from the discrete position coordinates: ; PINN's overall training objective function Defined as the weighted sum of data loss and physical consistency constraint loss: ; In the formula: For trajectory regression data loss; These are physical constraints for position continuity, velocity consistency, and rotational smoothness, respectively; constants are 0.1, 0.05, 0.02, and 10. -4 These are the corresponding preset weighting coefficients.
[0054] The trained PINN sub-model is used to predict the training samples, and the residual between the predicted trajectory and the true trajectory is calculated to construct a residual sample set.
[0055] Step 4: Concatenate the initial features with the predicted values of the motorcycle trajectory coordinates along the feature dimension, and perform residual learning on the concatenated vector to predict the residual sequence.
[0056] Construction of XGBoost-based residual learning model: After obtaining the basic prediction results of the PINN sub-model for the future trajectory of the motorcycle, in order to further characterize the prediction bias caused by nonlinear behavior, interaction and noise factors in complex traffic environment, an XGBoost-based residual learning model is introduced to model and correct the PINN prediction error.
[0057] Residual definition: Let the true future trajectory corresponding to the k-th sample be... The prediction results output by the PINN sub-model are The corresponding prediction residual is defined as: ; in, ∈ This represents the predicted residual sequence of two-dimensional trajectory coordinates over the next N time steps.
[0058] The input features of the residual XGBoost model consist of two parts: the initial features (consistent with the PINN input) and the predicted values of the motorcycle trajectory coordinates. The feature vectors are concatenated along the feature dimension to construct the input vector of the residual model. The specific expression is: ; This feature construction method enables the residual XGBoost model to explicitly utilize PINN prediction results while perceiving the original motion state, thereby learning systematic prediction biases more accurately.
[0059] Residual XGBoost Model Form: The residual prediction model adopts a multi-output XGBoost regression structure, and its mapping relationship can be expressed as: ; in To predict the residuals, ϕ represents the parameters of the XGBoost residual learning model. This is the mapping function for the XGBoost residual learning model.
[0060] The model uses a CART regression tree as the base learner and gradually fits the residual error through a gradient boosting strategy. The loss function is in the form of mean squared error (MSE). ; Step 5: Additively fuse the predicted trajectory coordinates with the residual sequence to obtain the motorcycle trajectory prediction result.
[0061] PINN–XGBoost Additive Residual Fusion Strategy: After obtaining the prediction results of the PINN sub-model and the residual XGBoost model, an additive residual fusion strategy is used to generate the final motorcycle trajectory prediction result.
[0062] Let the output of the PINN sub-model be... The residual XGBoost model output is The final fusion prediction result is defined as: ; This fusion method does not introduce additional learnable fusion weights, has a simple structure and high stability, and can effectively correct complex nonlinear residuals using XGBoost while maintaining the physical consistency of PINN.
[0063] The training process of the PINN–XGBoost fusion model is described below. It adopts a phased training strategy, as follows: 1. PINN sub-model training phase: The PINN sub-model is trained using the training set data. The basic trajectory prediction model is obtained by minimizing the combined loss function of data loss and physical constraint loss.
[0064] 2. Residual Construction Stage: The trained PINN sub-model is used to predict the training set samples, and the residual between the actual trajectory and the PINN prediction result is calculated to construct the residual training sample set.
[0065] 3. Residual XGBoost model training phase: using the concatenated feature vectors As input, to predict residuals For the output, train a multi-output XGBoost regression model.
[0066] 4. Fusion Prediction Stage: In the model inference stage, the PINN sub-model first generates the basic prediction results, then the residual XGBoost model predicts the corresponding residual terms, and finally the prediction results of the motorcycle's future trajectory are obtained through additive fusion.
[0067] After training the PINN sub-model, the independent XGBoost model, and the PINN–XGBoost fusion model, the trajectory prediction performance of different models is compared and evaluated based on the training set and the test set to verify the effectiveness and superiority of the proposed method.
[0068] Trajectory prediction result generation: For any motorcycle sample to be predicted, the future trajectory prediction result is generated sequentially using the PINN sub-model, the independent XGBoost model, and the PINN–XGBoost fusion model.
[0069] The fusion model employs an additive residual fusion strategy, where the prediction results are obtained by superimposing the basic prediction results of the PINN sub-model and the prediction results of the residual XGBoost model, thus balancing physical consistency and data-driven capabilities.
[0070] To comprehensively evaluate the model's performance in trajectory prediction tasks, the following metrics were selected as the primary evaluation indicators: Average displacement error (ADE): ; This indicator reflects the average spatial deviation between the predicted trajectory and the actual trajectory over the entire prediction time interval.
[0071] Endpoint displacement error (FDE): ; Used to measure the spatial error of the predicted trajectory at the final moment.
[0072] Mean Absolute Error (MAE): ; Root Mean Square Error (RMSE): ; Velocity Error (MAE): Calculated based on the first-order difference between adjacent trajectory points, the predicted velocity is measured using the mean absolute error (MAE) to determine the deviation between the predicted and actual velocities. The specific expression is as follows: ; Comparative analysis of the experimental results on the test and training sets reveals that: the PINN sub-model can guarantee the rationality of the predicted trajectory in terms of physical continuity, but its fitting ability to nonlinear disturbances in complex traffic environments is limited; the independent XGBoost model performs well in spatial position prediction accuracy, but has certain shortcomings in terms of velocity and motion continuity; the PINN–XGBoost fusion model achieves the best results in major indicators such as ADE, FDE, MAE, RMSE, and velocity error, indicating that this fusion method can effectively combine the advantages of physical constraint models and data-driven models to achieve higher accuracy and more stable trajectory prediction.
[0073] The above content presents the following effects: The PINN sub-model, by introducing motorcycle kinematic constraints, maintains good continuity and stability of the predicted trajectory in both time and space dimensions, effectively avoiding physical inconsistencies that may occur in purely data-driven models. Simultaneously, the residual XGBoost model learns to address complex nonlinear disturbances that are difficult for PINN to characterize, improving the model's adaptability to uncertain behaviors in real-world traffic environments and resulting in superior performance of the fusion model in metrics such as speed error. The fusion structure is simple, and the model training and deployment costs are low: This invention employs an additive residual fusion method, directly superimposing the outputs of the PINN sub-model and the residual XGBoost model to generate the final prediction result. This eliminates the need for additional learnable fusion weights or complex decision networks, resulting in a clear model structure and simple implementation. This design not only reduces the difficulty of model training and parameter tuning but also improves the stability and reproducibility of the model in practical engineering deployments. The model has strong versatility and is easy to extend and apply: The proposed trajectory prediction method uses the motorcycle's historical operating state and trajectory information as input, without relying on specific intersection topologies or dedicated sensor configurations, exhibiting good versatility. The model can be reused in different signalized intersection scenarios and can be extended to trajectory prediction tasks for other non-motorized vehicles or vehicle types as needed, demonstrating high engineering and promotion value. Its practical value is outstanding, possessing potential for real-world traffic applications: the high-precision trajectory prediction results obtained based on the method of this invention can provide reliable data support for intersection operation status analysis, traffic conflict risk assessment, and intelligent traffic management systems, helping to improve the operational efficiency and safety level of signalized intersections, especially having a positive impact on the safety of vulnerable road users such as motorcycles.
[0074] Example 1: Motorcycle trajectory prediction at a crossroads in a city Experimental environment: Hardware environment: CPU is Intel Core i9-13980HX, GPU is NVIDIA RTX 4060, memory is 64GB; Software environment: Operating system is Windows 11, programming language is Python 3.9, deep learning framework is TensorFlow 2.8, trajectory extraction software is Datafromsky FLOW 4.0.
[0075] Video Acquisition: Four high-precision cameras (4K resolution, 30fps) were deployed at the intersection of Wenyi Road in Xi'an, installed at a height of 10m and an angle of 35°. A time synchronization device was used to ensure simultaneous acquisition by multiple devices. The acquisition period was weekday morning rush hour (7:00-9:00) and evening rush hour (17:00-19:00), with one hour of acquisition for each period, for a total of four video segments. The camera exposure time was adjusted to 1 / 800s and the gain value to 8dB to ensure clear vehicle targets. The acquired raw video was preprocessed with equalization.
[0076] Trajectory Extraction: Import the preprocessed video into the Datafromsky FLOW system, configuring the parameters to match the acquisition equipment; delineate the ROI to cover the intersection's approach lanes, exit lanes, and conflict areas; use AI tracking algorithms to extract trajectory points for various vehicles, employ Kalman filtering to smooth the trajectories, and remove outliers with speed changes exceeding 10 m / s; output trajectory data in CSV format, including fields such as vehicle type, ID, timestamp, x-coordinate, and y-coordinate.
[0077] Database construction: Supplementing motorcycle operating status parameters (speed, acceleration, heading angle), using the 3σ criterion to remove outliers, and using linear interpolation to complete missing data; constructing a trajectory database based on MySQL, including a basic information table, a trajectory point information table, an operating status table, and a signal control information table; performing descriptive statistics on the database data.
[0078] Data Description: The data contains 16 key fields, with core information categorized into four types based on function, as detailed below: **Identification Features:** Includes a Track ID field, a unique code for each motorcycle, used to connect the continuous trajectory sequences of a single motorcycle at the intersection, ensuring the correlation of time-series data. **Spatiotemporal Features:** Includes three fields: Time, x (horizontal coordinate), and y (vertical coordinate), forming the core foundation for trajectory description. Time records the moment the vehicle is within the intersection area (unit: seconds), while x and y establish a local coordinate system (unit: meters) with the intersection entrance lane as the origin, accurately locating the vehicle's real-time spatial position. **Kinematic and Dynamic Features:** Includes four fields: Speed, Tan Acc (longitudinal acceleration), Lat Acc (lateral acceleration), and Angle (turning angle), characterizing the dynamic characteristics of motorcycle movement. Speed reflects the vehicle's real-time speed (unit: km / h), Tan Acc and Lat Acc describe the vehicle's acceleration along the direction of travel and perpendicular to the direction of travel, respectively (unit: m / s²), and Angle records the angle between the vehicle's direction of travel and true north (unit: rad). Behavioral and Time-Period Characteristics: Includes two fields: Turn (driving direction) and Session (peak hours), reflecting the differences in scenarios. Turn is a categorical variable, with 1 representing straight ahead, 2 representing right turn, and 3 representing left turn; Session is a categorical variable, with V1 and V2 corresponding to the evening peak (17:00-19:00), and V3 and V4 corresponding to the morning peak (7:00-9:00); as shown in Table 1.
[0079] Table 1 Original feature variables of the data Descriptive statistics: Descriptive statistics were performed on the core variables, and the results are shown in the table below. The data distribution characteristics can be further interpreted in conjunction with the actual scenario of the intersection, as shown in Tables 2, 3, 4 and 5.
[0080] Table 2. Descriptive statistics of continuous variables for all types of vehicles. Table 3. Descriptive statistics of categorical variables for all types of vehicle operating trajectories. Table 4. Descriptive statistics of continuous variables related to motorcycles Table 5. Descriptive Statistics of Category Variables for Motorcycles Sample Overview and Category Composition: This invention observed a total of 374,292 trajectory sample points, covering 1,864 vehicle IDs. In terms of vehicle type composition, motorcycles accounted for the highest proportion at 52.60%, followed by cars, while bicycles and buses accounted for less than 4%, indicating that this intersection has a significant motorcycle-intensive traffic characteristic. Regarding driving intentions, going straight was dominant, while left and right turns were relatively evenly distributed. Furthermore, the sample proportion during the evening rush hour was slightly higher than during the morning rush hour, reflecting the more pronounced traffic pressure during the evening rush hour.
[0081] Spatiotemporal and kinematic characteristics of the full sample: Spatiotemporal scale: The average distance traveled by all vehicles within the intersection was 27.90 m, indicating a relatively large total time step span for traversing the intersection. Velocity and acceleration: The average instantaneous speed of the full sample was 14.60 km / h, and the average acceleration was 0.43 m / s². Notably, the full sample contained extreme instantaneous speeds (66.44 km / h) and extremely large negative accelerations (-23.01 m / s²), suggesting that in mixed traffic flow, some vehicles exhibited drastic speed fluctuations or emergency avoidance behaviors, increasing the complexity of the environment.
[0082] For the motorcycle, the primary focus of this invention, its trajectory data exhibits higher regularity and uniqueness: Spatiotemporal travel pattern: The average time for a motorcycle to pass through an intersection is 8.70 seconds. Its average x-coordinate is -4.30m, and its average y-coordinate is 7.80m. Combining the boundaries of its minimum and maximum values (x: -29.60~6.17m; y: -0.21~29.57m), the motorcycle's travel trajectory within the intersection is clearly delineated. Kinematic stability: The average instantaneous speed of the motorcycle is 13.89 km / h, and its standard deviation (5.21 km / h) is much lower than the standard deviation of the entire sample. The maximum speed is only 22.36 km / h, consistent with the speed limit rules for non-motorized vehicles / motorcycles at intersections, and its operating state is more stable than mixed flow. Its average acceleration is 0.72 m / s², and the average lateral acceleration is only 0.08 m / s², indicating that the motorcycle mainly uses small-amplitude linear acceleration during passage. Turning Intent and Timing: The average turning angle for motorcycles was 4.70 rad. In terms of turning distribution, the percentage of straight-going traffic (69.88%) was the same as the overall sample, but the percentage of left-turning traffic (21.62%) was significantly higher than the overall sample average, suggesting a higher penetration rate of motorcycles on left-turn routes. Furthermore, motorcycle activity was more frequent during the evening rush hour, accounting for 59.03% of all motorcycles.
[0083] Model building and training: Data sample construction and prediction target definition: Based on the constructed motorcycle trajectory database, each trajectory is sliced into samples in chronological order.
[0084] Using the motorcycle's current operating state and historical trajectory features as input, and incorporating its relative spatial relationship with surrounding vehicles, the model predicts its trajectory over a future period. The prediction objective is defined as a sequence of two-dimensional trajectory point coordinates for 30 consecutive time steps, i.e.:
[0085] ; Each time step outputs the motorcycle's position (x, y) in a planar coordinate system, describing the short-term trajectory evolution. The final output of the model has a dimension of 60, corresponding to the two-dimensional position coordinates of 30 time steps.
[0086] The dataset was split using a two-step splitting method: First, 20% of the samples from the original feature set X and label set Y were split as the test set, and the remaining 80% were used as temporary data; then, the temporary data was split again, with 20% split as the validation set and the remaining 80% as the training set. Finally, the training set, validation set, and test set accounted for 64%, 16%, and 20% of the original data, respectively, and a fixed random seed of random_state=42 was set to ensure that the splitting results were reproducible.
[0087] PINN Sub-model Construction and Training: First, a trajectory prediction sub-model based on the Physical Information Neural Network (PINN) is constructed. This model adopts a fully connected feedforward neural network structure, consisting of an input layer, several hidden layers, and an output layer. The network parameters are trained using the backpropagation algorithm. The PINN sub-model takes historical trajectory and vehicle operating state features as input, and integrates the relative spatial relationship features of surrounding vehicles to directly regress the trajectory point coordinates for the next 30 time steps. During model training, a physical consistency constraint based on the motorcycle's own kinematics is introduced to impose continuity constraints on the predicted trajectory in terms of position, velocity, and acceleration, ensuring that the model's prediction results maintain physical consistency in the time dimension, thereby reducing unreasonable trajectory jumps.
[0088] The PINN sub-model uses the Adam optimizer for parameter updates, with the learning rate automatically set by the program and continuously iterated during training until the model converges. After training, PINN trajectory prediction results are obtained on the training, validation, and test sets, respectively.
[0089] Independent XGBoost Model Construction and Training: To compare the performance of different models in trajectory prediction tasks, an independent XGBoost multi-output regression model was constructed. This model was trained using only the original initial features and did not incorporate the prediction results from PINN.
[0090] The XGBoost model employs a gradient boosting tree structure and simultaneously predicts the 2D trajectory coordinates for the next 30 time steps using a multi-output regression approach. Key model parameters include the number of trees, maximum depth, learning rate, and subsampling ratio. During training, mean squared error is used as the optimization objective function. After training, the trajectory prediction results of the independent XGBoost model on the training, validation, and test sets are obtained for subsequent performance comparison and analysis.
[0091] Construction and training of PINN–XGBoost residual fusion model: Based on the PINN sub-model and the independent XGBoost model, a PINN–XGBoost fusion model based on residual learning is further constructed.
[0092] First, the trained PINN sub-model is used to predict the samples, and the residuals between the predicted results and the actual trajectories are calculated: ; in, The predicted trajectory for the PINN sub-model. This is the actual trajectory.
[0093] Subsequently, the PINN predictions are concatenated with the original initial features as new feature inputs to train the residual XGBoost model, which learns the nonlinear error components that PINN failed to capture. The residual XGBoost model also employs a multi-output regression structure to predict the residual trajectories for the next 30 time steps.
[0094] In the prediction phase, the final output of the fusion model is obtained through additive residuals: ; in, This represents the prediction results of the residual XGBoost model.
[0095] This fusion strategy maintains the physical consistency of the PINN model while fully utilizing XGBoost's ability to fit complex nonlinear errors, thereby improving the overall trajectory prediction accuracy.
[0096] Model Training Completion and Prediction Output: After training the PINN sub-model, the independent XGBoost model, and the PINN–XGBoost residual fusion model, trajectory predictions were performed on both the training and test sets. The trajectory points for the next 30 time steps output by the model were connected in chronological order to form a complete short-term trajectory prediction result, providing a foundation for subsequent performance evaluation and comparative analysis.
[0097] Model Testing and Result Analysis: To verify the effectiveness of the motorcycle trajectory prediction method based on the PINN–XGBoost fusion model proposed in this invention, comparative experiments and performance evaluations were conducted on the PINN standalone model, the independent XGBoost model, and the PINN–XGBoost residual fusion model under the same dataset conditions. Model prediction performance was measured using indicators such as average displacement error (ADE), final displacement error (FDE), mean absolute error (MAE), root mean square error (RMSE), velocity error, and acceleration error. The definitions and calculation methods of these evaluation indicators have been given above.
[0098] To ensure the reproducibility of experimental results, the main parameter settings for the three types of models are explained in a unified manner.
[0099] The PINN sub-model employs a multi-layer fully connected neural network structure for trajectory regression prediction; both the independent XGBoost model and the residual XGBoost model use a multi-output regression approach to jointly predict trajectory points at multiple future time steps; the fusion model uses an additive residual fusion strategy, superimposing the prediction results of PINN with the residuals predicted by XGBoost to generate the final trajectory prediction result. Specific parameter configurations for each model are shown in Tables 6, 7, and 8.
[0100] Table 6 PINN Trajectory Prediction Model Parameter Configuration Table 7 Parameter Configuration for Independent XGBoost Multi-Output Trajectory Prediction Model Table 8 Parameter Configuration of PINN–Residual XGBoost Fusion Model To objectively evaluate the performance differences of different models in predicting motorcycle trajectories at signalized intersections, predictions were performed on the validation and test sets for the PINN standalone model, the independent XGBoost model, and the PINN–XGBoost residual fusion model. Average displacement error (ADE), final displacement error (FDE), mean absolute error (MAE), root mean square error (RMSE), and velocity mean absolute error (Velocity MAE) were used as evaluation metrics. The results are shown in Table 9 below.
[0101] Table 9. Comparison of prediction performance of different models on the validation set As shown in Table 9, the PINN–XGBoost residual fusion model achieves the best results across all position-related metrics (ADE, FDE, MAE, RMSE), significantly outperforming both the PINN standalone model and the independent XGBoost model. Furthermore, the fusion model exhibits a significantly lower velocity error than the standalone model, indicating that while maintaining trajectory prediction accuracy, it better characterizes the velocity changes during motorcycle motion, resulting in a smoother and more reasonable predicted trajectory over time.
[0102] To further analyze the generalization ability of the models, the predictive performance of the three models was compared and analyzed on the test set using the same evaluation index. The results are shown in Table 10.
[0103] Table 10. Comparison of prediction performance of different models on the test set As shown in Table 10, the PINN–XGBoost fusion model outperforms the comparative models in all metrics on the test set, and the error difference between the test and validation sets is small, indicating that the model has good generalization performance while maintaining strong fitting ability. In contrast, the independent XGBoost model is better than the PINN model alone in terms of position error, but its velocity error is still relatively large, indicating that the method relying solely on data-driven approaches has certain shortcomings in characterizing the temporal continuity of the trajectory.
[0104] Comprehensive Analysis: The experimental results demonstrate that the PINN–XGBoost residual fusion trajectory prediction model proposed in this invention exhibits significant advantages in predicting motorcycle trajectories at signalized intersections. While maintaining the physical consistency and trajectory smoothness of the PINN model, this model introduces XGBoost to compensate for nonlinear residuals, effectively mitigating the predictive limitations of a single model in complex traffic scenarios and achieving stable and significant performance improvements across multiple evaluation metrics.
[0105] Several trajectories were randomly selected, and their actual trajectories and predicted trajectories from various models were plotted for comparison. Figure 3 As shown in the figure. The experimental results above demonstrate that the method of the present invention has good prediction accuracy and engineering applicability, and can provide reliable trajectory prediction technology support for intersection traffic operation analysis and intelligent transportation system applications.
[0106] This invention proposes a motorcycle trajectory prediction system for signalized intersections, comprising: The system comprises the following modules: a data acquisition module for collecting video data from road signal-controlled intersections at different time periods; a feature extraction module for extracting the coordinates of motorcycle trajectory points, vehicle operating status parameters, and relative spatial relationship features of vehicles within the motorcycle's spatial perception range from the video data at different time periods, using these as initial features; an initial prediction module for inputting the initial features into a pre-trained PINN sub-model and predicting motorcycle trajectory coordinates for multiple future time steps based on the training-derived mapping relationship, where the mapping relationship is obtained based on the correlation between historical initial features and predicted motorcycle trajectory coordinates; a residual prediction module for concatenating the initial features and predicted motorcycle trajectory coordinates along the feature dimension, and performing residual learning on the concatenated vector to predict the residual sequence; and a trajectory fusion prediction module for additively fusing the predicted trajectory coordinates and the residual sequence to obtain the motorcycle trajectory prediction result.
[0107] The present invention also provides a computer device, including a memory and a processor, wherein the memory stores a program, and when the program is executed by the processor, the processor performs the steps of a method for predicting the trajectory of a motorcycle at a signalized intersection.
[0108] According to the disclosed embodiments, the computer device can communicate with one or more external devices (e.g., keyboard, pointing device, Bluetooth communication, etc.) or with any device that enables the computing device to communicate with one or more other computing devices (e.g., router, demodulator, etc.).
[0109] The present invention also provides a storage medium storing a computer program thereon, characterized in that the computer program, when executed by a processor, implements the steps of a method for predicting the trajectory of a motorcycle at a signalized intersection.
[0110] According to the disclosed embodiments, the storage medium can be a non-volatile computer-readable storage medium, such as, but not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this invention, the storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0111] The above description, in conjunction with specific preferred embodiments, provides a more detailed explanation of the present invention. For those skilled in the art, various simple deductions or substitutions can be made without departing from the concept of the present invention, and all such deductions or substitutions should be considered to fall within the scope of protection of the present invention.
Claims
1. A method for predicting the trajectory of a motorcycle at a signalized intersection, characterized in that, include: Collect video data from road signal-controlled intersections at different time periods; The vehicle trajectory coordinates, vehicle operation status parameters, and relative spatial relationship features of the motorcycle within the motorcycle's spatial perception range are extracted from video data of different time periods at road signal-controlled intersections as initial features. The initial features are input into the pre-trained PINN sub-model, and the predicted values of the motorcycle trajectory coordinates at multiple future time steps are predicted based on the mapping relationship obtained by training; wherein, the mapping relationship is obtained according to the correlation between the historical initial features and the predicted values of the motorcycle trajectory coordinates. The initial features are concatenated with the predicted values of the motorcycle trajectory coordinates along the feature dimension, and the concatenated vector is subjected to residual learning to predict the residual sequence. The predicted motorcycle trajectory coordinates are additively fused with the residual sequence to obtain the motorcycle trajectory prediction result.
2. The method for predicting the trajectory of a motorcycle at a signalized intersection as described in claim 1, characterized in that, The mapping relationship is obtained based on the correlation between historical initial features and predicted motorcycle trajectory coordinates, specifically: Based on the initial characteristics of history As input to the pre-trained PINN sub-model, it performs forward prediction to obtain the mapping relationship; The specific expression is: ; in, These are the predicted coordinates of the motorcycle's trajectory over N consecutive time steps in the future. θ These are the network parameters of the PINN sub-model. This is the mapping function for the PINN submodel.
3. The method for predicting the trajectory of a motorcycle at a signalized intersection as described in claim 2, characterized in that, The pre-training process of the PINN sub-model is as follows: When training the PINN sub-model using historical initial features and predicted motorcycle trajectory coordinates at multiple future time steps, the mean square error between the predicted and actual motorcycle trajectory coordinates of the PINN sub-model is introduced as a data loss term. Furthermore, physical constraints based on vehicle kinematics equations are introduced, and a physical constraint loss term is constructed using these physical constraints. Among them, data loss items The specific expression is: ; In the formula, , For the PINN sub-model in the 1st The predicted values of the motorcycle trajectory coordinates output at each prediction time step. , These are the corresponding actual trajectory coordinates. The prediction time window length is 30 frames; Among them, physical constraints include: positional continuity constraints Speed consistency constraints Corner smoothness constraint and acceleration smoothing constraints The specific expression is: ; ; ; ; In the formula, This is the first location point of the predicted trajectory; This is the last point in the historical trajectory; These are the first two positions of the predicted trajectory; For time step; The true velocity vector at the end of the historical trajectory; The first [item] is calculated based on the predicted trajectory velocity direction. The heading angle at each time step; for Approximate acceleration at time t; The number of discrete trajectory points; The total loss function of the PINN sub-model is obtained by weighting the data loss term and the physical constraint loss term, and the PINN sub-model is pre-trained using the total loss function of the PINN sub-model. The specific expression is: In the formula: For trajectory regression data loss; These are physical constraints for position continuity, velocity consistency, and rotational smoothness, respectively; constants are 0.1, 0.05, 0.02, and 10. -4 These are the corresponding preset weighting coefficients.
4. The method for predicting the trajectory of a motorcycle at a signalized intersection as described in claim 1, characterized in that, The initial features are obtained by extracting the coordinates of the motorcycle's trajectory points, vehicle operating status parameters, and relative spatial relationship features of the motorcycle within its spatial perception range from video data of different time periods at the road signal-controlled intersection. Specifically: In the video of a signalized intersection, the area where motorcycles travel is taken as the region of interest (ROI), and all types of vehicles within the ROI are tracked to extract continuous trajectory points. All types of vehicle operation status parameters are obtained based on continuous trajectory points, and a signal control intersection vehicle operation trajectory database is constructed using the operation status parameters, vehicle trajectory and corresponding signal phase information. Based on the current vehicle trajectory position of the motorcycle in the signal control intersection vehicle operation trajectory database, other vehicles within the set spatial perception range are selected as references to obtain the relative spatial relationship characteristics of vehicles within the motorcycle's spatial perception range. The initial features are the motorcycle's trajectory, vehicle operating status parameters, and the relative spatial relationship features of vehicles within the motorcycle's spatial perception range.
5. The method for predicting the trajectory of a motorcycle at a signalized intersection as described in claim 4, characterized in that, Other vehicles within the specified range are selected as references to obtain the relative spatial relationship features of vehicles within the motorcycle's spatial perception range, specifically: For each surrounding vehicle within the spatial perception range of the motorcycle, acquire the spatial positional relationship characteristics of the surrounding vehicles relative to the motorcycle, including relative lateral displacement, relative longitudinal displacement, and relative Euclidean distance. When there are multiple surrounding vehicles within the perception range, they are sorted from closest to furthest from the motorcycle in terms of spatial distance, and the vehicles closest to the motorcycle are selected to construct spatial position relationship features.
6. The method for predicting the trajectory of a motorcycle at a signalized intersection as described in claim 1, characterized in that, The initial predicted values of the motorcycle trajectory coordinates are concatenated along the feature dimension, and the concatenated vector is subjected to residual learning to predict the residual sequence, specifically as follows: The initial features and the predicted motorcycle trajectory coordinates are concatenated along the feature dimension to construct the input vector of the XGBoost residual learning model. The XGBoost residual learning model employs a multi-output regression structure. The concatenated vectors are subjected to residual learning using the XGBoost residual learning model, and the learned mapping relationship is used to predict the residual sequence; the specific expression of the mapping relationship is as follows: ; in To predict the residuals, ϕ represents the parameters of the XGBoost residual learning model. This is the mapping function for the XGBoost residual learning model.
7. The method for predicting the trajectory of a motorcycle at a signalized intersection as described in claim 4, characterized in that, Kalman filtering is used to smooth the vehicle trajectory composed of continuous trajectory points and to remove abnormal trajectory points whose speed changes exceed the threshold.
8. A motorcycle trajectory prediction system for signalized intersections, characterized in that, include: The data acquisition module is used to collect video data from road signal control intersections at different time periods; The feature extraction module is used to extract the coordinates of the motorcycle's trajectory points, vehicle operation status parameters, and the relative spatial relationship features of the motorcycle within its spatial perception range from video data of different time periods at road signal-controlled intersections, as initial features. The initial prediction module is used to input initial features into the pre-trained PINN sub-model and predict the motorcycle trajectory coordinates at multiple future time steps based on the mapping relationship obtained from the training; wherein, the mapping relationship is obtained based on the correlation between historical initial features and the predicted motorcycle trajectory coordinates. The residual prediction module concatenates the initial features with the predicted values of the motorcycle trajectory coordinates along the feature dimension, and performs residual learning on the concatenated vector to predict the residual sequence. The trajectory fusion prediction module is used to additively fuse the predicted trajectory coordinates with the residual sequence to obtain the motorcycle trajectory prediction result.
9. A computer device, characterized in that, The system includes a memory and a processor, wherein the memory stores a program that, when executed by the processor, causes the processor to perform the steps of a method for predicting the trajectory of a motorcycle at a signalized intersection as described in any one of claims 1 to 7.
10. A storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the method for predicting the trajectory of a motorcycle at a signalized intersection as described in any one of claims 1 to 7.