Multi-target trajectory prediction method based on fuzzy traffic rule priority evaluation
By adopting a multi-objective trajectory prediction method with graph neural network and attention mechanism in autonomous vehicles, and calculating the priority of fuzzy traffic rules in combination with signal time logic, the priority of autonomous vehicles complying with fuzzy traffic rules in complex traffic environments is solved. The evaluation and dynamic adjustment issues improve the accuracy and safety of trajectory prediction.
Patent Information
- Application Number
- CN202411439559.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-15
- Publication Date
- 2025-02-18
AI Technical Summary
The prior art is difficult to effectively evaluate and dynamically adjust the priority of autonomous vehicles in compliance with fuzzy traffic rules in complex traffic environments, resulting in the impact of the accuracy and safety of trajectory prediction.
A multi-objective trajectory prediction method based on graph neural network is adopted, and traffic participants and map features are extracted in combination with attention mechanisms, predictive embeddings are generated, and the priority of fuzzy traffic rules is calculated through signal time logic, and the trajectory prediction results are dynamically adjusted.
The accuracy and adaptability of trajectory prediction of autonomous vehicles in complex interactive scenarios is improved, especially in high-risk interactive scenarios, and the ability to evaluate and dynamic adjustment of fuzzy traffic rules is enhanced.
Smart Images

Figure CN119479269A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of autonomous driving, and in particular to a multi-target trajectory prediction method based on fuzzy traffic rule priority evaluation. Background Art
[0002] Compliance with traffic rules plays an important role in improving road traffic safety and traffic order. Traffic rules define the behavior of vehicles on the road, including how to pass through intersections and how to change lanes safely. In a mixed human-machine driving environment, understanding traffic rules helps autonomous vehicles accurately predict the behavior of other road users, such as identifying the right of way, thereby ensuring safe and efficient operation.
[0003] However, in some cases, it is necessary to flexibly adjust strategies instead of strictly following traffic rules. Autonomous vehicles must learn to predict these emergencies to better adapt to mixed traffic environments. The question that follows is which rules can be violated moderately, in other words, the rules that vehicles follow should have priorities rather than being followed equally. Vehicles need to dynamically adjust their driving strategies based on the priorities of rules in different scenarios to better adapt to complex traffic environments. Therefore, evaluating the priority of traffic rules can not only deepen the autonomous vehicle's understanding of the behavior of surrounding traffic participants, but also achieve more accurate trajectory prediction.
[0004] At the same time, many traffic environments are characterized by weak rules and strong interactions. Specifically, existing traffic rules contain many ambiguous phrases, which often imply interaction rules that vehicles need to follow, but are not clear and require vehicles to make autonomous decisions. For example, phrases such as "ensure safety and smooth flow" and "do not hinder others" lack clear quantitative standards. This ambiguity makes trajectory prediction more complicated. For autonomous vehicles, the lack of clear traffic rules guidance and learning interactive behaviors is a major challenge, not to mention evaluating rule priorities to assist more accurate trajectory prediction.
[0005] Existing studies have gradually recognized the importance of traffic rules and have made significant progress in trajectory prediction. These studies have attempted to digitize traffic rules, considering rules such as dedicated lane control, traffic lights, lane keeping, and traffic signs and markings, and focusing more on incorporating map and lane connection information into trajectory prediction. However, these rules are relatively clear and are usually given equal weights without considering their priorities. Even in studies that consider priorities, there is a lack of evaluation of fuzzy rules. In general, although evaluating rule priorities, especially rules involving fuzzy constraints and complex interactions, can improve prediction accuracy, this area remains underexplored. Summary of the invention
[0006] The purpose of this invention is to provide a multi-objective trajectory prediction method based on fuzzy traffic rule priority evaluation. Based on graph neural network, a trajectory prediction model is constructed in combination with attention mechanism. In addition to considering the map information and lane connection relationship, two types of fuzzy rules, safety and right of way, are also taken into consideration. The trajectory prediction results are dynamically adjusted based on the priority evaluation of the rules, ultimately achieving more accurate trajectory prediction.
[0007] The purpose of the present invention can be achieved by the following technical solutions:
[0008] A multi-target trajectory prediction method based on fuzzy traffic rule priority evaluation includes the following steps:
[0009] Step 1) Extract traffic participants and map features based on graph neural network and encode spatiotemporal interaction relationships;
[0010] Step 2) Generate prediction embedding using spatiotemporal joint attention;
[0011] Step 3) Based on the prediction embedding, multiple attention mechanisms are used to capture the interactions between traffic participants, between historical trajectories and predicted trajectories, and between different prediction modalities, and decode to generate preliminary predicted trajectories;
[0012] Step 4) Completing the parameters of the fuzzy traffic rules by rule comparison, and calculating the priorities of different rules based on signal time logic;
[0013] Step 5) Combined with the priority evaluation results, dynamically adjust the preliminary prediction trajectory to obtain the final prediction trajectory.
[0014] The step 1) comprises the following steps:
[0015] Step 1.1) Encode traffic participant features to obtain traffic participant embedding
[0016] In the graph neural network, each traffic participant is set as a node. For each traffic participant i at each time step t, its position is set to the origin of the local polar coordinate system, and its direction is defined as the positive direction. In this reference system, the speed is expressed as where v i,t is the magnitude of the velocity, The multi-layer perceptron MLP is used to transform the feature v i,t , c i,t Encoded as the feature embedding of the traffic participant where c i,t Indicates other properties, including length, width, type, D is the encoding dimension;
[0017] Step 1.2) Encode map features to get lane centerline embedding E m ;
[0018] Step 1.3) Use the edge feature encoding method based on the local polar coordinate system to capture the spatiotemporal relationship between nodes: map the node position to the local polar coordinate system, and the edge feature is described by four variables: the Euclidean distance d between the original node and the target node e , the direction of the edge in the local coordinate system of the target node φ e , the relative direction between the original node and the target node ψ e The time difference between the nodes δ e , a two-layer MLP is used to encode the edge features into edge embeddings: Where Y is the number of edges.
[0019] The step 1.2) comprises the following steps:
[0020] Step 1.2.1) Each lane segment is set as a node, and a two-layer MLP is used to encode the length features of the lane segment centerline and lane segment edgeline;
[0021] Step 1.2.2) Use edge indices to define the connection between lanes and centerlines, generate edge features containing lane length, angle, direction difference, and type, and use the attention layer to update the centerline embedding E m ;
[0022] Step 1.2.3) Apply the self-attention mechanism to the updated centerline embedding to process the interaction between centerlines, edge indexes define left adjacency, right adjacency, predecessor and successor connections, and generate corresponding edge features, which are used to optimize the centerline embedding E m ,in M is the number of lane segments.
[0023] The step 2) comprises the following steps:
[0024] Step 2.1) Use two parallel cross-attention modules to process complex spatiotemporal data, where the temporal attention assigns different weights to different time periods of the historical trajectory, and the spatial attention is used to model the interaction between the target vehicle and the lane;
[0025] For each traffic participant i at each time step t, the same learnable query vector is assigned, denoted as {q t,i,k} t∈[1-T,0],i∈[1,N],k∈[1,K] ;
[0026] Use spatial attention to the lane nodes within the preset radius R1 to obtain the query vector
[0027]
[0028] Use temporal attention to traffic participant nodes within a preset time span I1 to obtain the query vector
[0029]
[0030] Among them, q t ,i,k represents the query vector of the kth mode of each traffic participant i at each time step t, T represents the historical trajectory length, N represents the number of traffic participants, K represents the number of modes, MHA represents multi-head attention, is the embedding of traffic participant i at each time step t, E m is the lane centerline embedding, E e For edge embedding;
[0031] Step 2.2) Sum the query vectors processed by the cross-attention module to generate the predicted embedding P t,i,k :
[0032]
[0033] The step 3) comprises the following steps:
[0034] Step 3.1) Modeling the interactive attention between traffic participants:
[0035] Based on the prediction embedding P t,i,k , apply multi-head attention MHA to model the interactions between traffic participants:
[0036]
[0037] Among them, i′ represents all the interaction objects of the i-th traffic participant within the preset radius R2 under the same mode and time step;
[0038] Step 3.2) Modeling self-attention for historical trajectory prediction:
[0039] A self-attention operation is performed on each predicted embedding within a preset time span I2 with the historical predicted embeddings to model the interaction between historical trajectories and predicted trajectories and enhance the prediction of each traffic participant and mode:
[0040]
[0041] Step 3.3) Modeling self-attention of different modalities:
[0042] The interaction between modalities is modeled through the self-attention mechanism to enhance the understanding of different prediction modalities:
[0043]
[0044] Step 3.4) The predicted embedding obtained in step 3.3) Decode through a two-layer MLP to obtain prediction results for multiple future positions as the first prediction trajectory
[0045] Step 3.5) Prediction results Using two-layer MLP encoding, the encoded pattern query vector replaces the learnable pattern query and is passed as input to step 2.2). Steps 2) and 3) are repeated to further refine the accuracy of the trajectory and obtain a preliminary predicted trajectory.
[0046] The step 4) comprises the following steps:
[0047] Step 4.1) Select two types of fuzzy rules, safety and right of way, as the research objects. By comparing different traffic rules, select safety indicators from the perspective of time and space, and set quantitative thresholds considering different interaction objects;
[0048] Step 4.2) According to the selected safety index, the safety rules are represented based on signal time logic STL, and the priority of rule compliance is represented by robustness; the robustness of the right of way is defined as the minimum value of the robustness in the safety rules, indicating the highest priority.
[0049] The selection of the safety index is specifically:
[0050] For the interaction between vehicles and vulnerable road users (VRUs), the collision time TTC is selected as the time indicator and its threshold TTC_V is set. * ; Select the horizontal and vertical relative distance as the spatial index and set the horizontal distance threshold d minlat_v * and the longitudinal distance threshold d minlon_v * ;
[0051] For the interaction between vehicles, select the collision time TTC as the time indicator and set its threshold TTC_M * , where TTC_M * <TTC_V * ; Select the longitudinal relative distance as the spatial indicator and set the longitudinal relative distance threshold d minlon_m * .
[0052] For the interaction between vehicles and vulnerable road users (VRUs), the safety rule φ1∧φ2 is expressed as follows:
[0053] φ1::=G (t,t+F) (ttc(Ego,VRUs)≥TTC_V * )
[0054] φ2::=G (t,t+F) (distancelon(Ego,VRUs)≥d minlon_v * ∧distancelat(Ego,VRUs)≥d minlat_v * )
[0055] For the interaction between vehicles, the safety rule φ3∧φ4 is expressed as follows:
[0056] φ3::=G (t,t+F) (ttc(Ego,Tgt)≥TTC_M * )
[0057] φ4::=G (t,t+F) (distancelon(Ego,Tgt)≥d minlon_m * )
[0058] Among them, φ1 and φ2 are STL formulas representing time index and space index when the vehicle interacts with VRU, φ3 and φ4 are STL formulas representing time index and space index when the vehicles interact with each other; G (t,t+F) It means that it happens every moment from the prediction start time t to the prediction end time t+F; ttc(Ego, VRUs) represents the STL calculation predicate of the TTC between the predicted vehicle Ego and the surrounding VRUs, distancelon(Ego, VRUs) represents the calculation predicate of the longitudinal distance between the predicted vehicle Ego and the surrounding VRUs, and distancelat(Ego, VRUs) represents the calculation predicate of the lateral distance between the predicted vehicle Ego and the surrounding VRUs; ttc(Ego, Tgt) represents the calculation predicate of the TTC between the predicted vehicle Ego and other surrounding vehicles Tgt, and distancelon(Ego, Tgt) represents the calculation predicate of the longitudinal distance between the predicted vehicle Ego and other surrounding vehicles Tgt.
[0059] The priority of the rule compliance is determined by the robustness calculation value. For the target vehicle to be predicted, the robustness r of each safety rule formula φ1, φ2, φ3, φ4 is calculated. t,i,k 1 , r t,i,k 2 , r t,i,k 3 , r t,i,k 4 , where the robustness of φ2 is rt,i,k 2 Divided into r t,i,k 2lat , r t,i,k 2lon :
[0060]
[0061]
[0062]
[0063]
[0064]
[0065] If the robustness value of a rule is less than 0, it means that the rule is violated; the smaller the robustness value, the higher the priority of the rule;
[0066] Robustness of right of way t,i,k 5 Defined as the minimum value of robustness in the safety rules, indicating the highest priority, the robustness of the horizontal and vertical right of way r t,i,k 5lat , r t,i,k 5lon The calculation is as follows:
[0067] r t,i,k 5lat =min(r t,i,k 1 , r t,i,k 2lat , r t,i,k 3 )
[0068] r t,i,k 5lon =min(r t,i,k 1 , r t,i,k 2lon , r t,i,k 3 , r t,i,k 4 )
[0069] The step 5) comprises the following steps:
[0070] Step 5.1) Calculate the robustness gradient of the right-of-way rule:
[0071] For the horizontal or vertical dimension, use the Sigmoid function to convert r t,i,k 5 The robustness values < 0 are normalized to between 0 and 1, and the gradient is calculated accordingly, as follows:
[0072]
[0073] Step 5.2) In the multi-target interaction scenario, the trajectory is adjusted based on the gradient of rule robustness:
[0074] If r t,i,k 5lat or t,i,k 5lon is the minimum value in this scenario, then vehicle i needs to give way in the relative direction, and the adjustment operator η is introduced to represent the giving way behavior:
[0075]
[0076] When the rule robustness in any direction r t,i,k 5 If it is less than 0, it means that the trajectory needs to be adjusted according to the gradient in this direction. t,i,k Adjust the preliminary forecast results with the adjustment rate γ Get the final predicted trajectory F( t:t+F , i,k ):
[0077]
[0078] Step 5.3) Optimal prediction mode selection:
[0079] The Winner-Takes-All strategy is used to optimize the parameters of the trajectory prediction process. Among all possible mode predictions, the mode k closest to the true trajectory is selected according to the following formula: t,i :
[0080]
[0081] The true trajectory is represented by G t,i = {g t+1 ,,g t+2,i , …, g t+F,i},in are the x and y coordinates of the real trajectory respectively;
[0082] Loss function for trajectory prediction Contains the first predicted trajectory and the final predicted trajectory F (t:t+F,i,k) Huber loss
[0083]
[0084]
[0085]
[0086] Among them, T represents the length of historical trajectory, N represents the number of traffic participants, and K represents the number of modes.
[0087] Compared with the prior art, the present invention has the following beneficial effects:
[0088] (1) This paper proposes a fuzzy traffic rule priority calculation method based on robustness evaluation. For the two types of fuzzy rules, safety and right of way, the key parameters are systematically analyzed and supplemented through rule comparison; the traffic rules are formally expressed using signal time logic, and the priorities of the two types of rules are evaluated based on robustness values.
[0089] (2) The present invention proposes a trajectory prediction model combined with rule priority evaluation. The model gives priority to the most dangerous situations, that is, the rules with smaller robustness values have higher priorities, and makes dynamic adjustments accordingly, thereby improving the adaptability of trajectory prediction in complex interaction scenarios, especially in high-risk interaction scenarios.
[0090] (3) This invention improves the accuracy of multi-agent trajectory prediction. By combining multiple spatial and temporal indicators (such as lateral and longitudinal distances, collision time, etc.), the robustness of traffic rules is comprehensively evaluated, and the predicted trajectory is optimized through gradient optimization. Compared with existing mainstream methods, the accuracy is greatly improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0091] Figure 1 is a flow chart of the method of the present invention;
[0092] Figure 2 Schematic diagram of the trajectory prediction process of the present invention. DETAILED DESCRIPTION
[0093] The present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. This embodiment is implemented based on the technical solution of the present invention, and provides a detailed implementation method and specific operation process, but the protection scope of the present invention is not limited to the following embodiments.
[0094] This embodiment provides a multi-target trajectory prediction method based on fuzzy traffic rule priority evaluation. Figure 1 As shown, the following steps are included:
[0095] Step 1) Extract traffic participants and map features based on graph neural network and encode spatiotemporal interaction relationships, such as Figure 2 The input part is shown in the figure.
[0096] Step 1.1) Encode traffic participant features to obtain traffic participant embedding
[0097] In the graph neural network, each traffic participant is set as a node. For each traffic participant i at each time step t, its position is set to the origin of the local polar coordinate system, and its direction is defined as the positive direction. In this reference system, the speed is expressed as where v i,t is the magnitude of the velocity, The direction of speed is represented by a multi-layer perceptron (MLP). i,t , c i,t Encoded as the feature embedding of the traffic participant where c i,t Indicates other properties, including length, width, type, D is the encoding dimension.
[0098] Step 1.2) Encode map features to get lane centerline embedding E m .
[0099] Step 1.2.1) Each lane segment is set as a node, and a two-layer MLP is used to encode the length features of the lane segment centerline and lane segment edgeline;
[0100] Step 1.2.2) Use edge indices to define the connection between lanes and centerlines, generate edge features containing lane length, angle, direction difference, and type, and use the attention layer to update the centerline embedding E m ;
[0101] Step 1.2.3) Apply a self-attention mechanism to the updated centerline embedding to handle the interaction between centerlines. The edge index defines the left adjacency, right adjacency, predecessor and successor connections, and generates corresponding edge features, which are used to optimize the centerline embedding E m ,in M is the number of lane segments.
[0102] Step 1.3) uses an edge feature encoding method based on a local polar coordinate system to capture the spatiotemporal relationship between nodes.
[0103] The node positions are mapped to the local polar coordinate system, and the edge features are described by four variables: the Euclidean distance d between the original node and the target node e , the direction of the edge in the local coordinate system of the target node φ e , the relative direction between the original node and the target node ψ e The time difference between the nodes δ e , a two-layer MLP is used to encode the edge features into edge embeddings: Where Y is the number of edges.
[0104] Step 2) Generate prediction embedding using spatiotemporal joint attention, such as Figure 2 The coding part is shown in the figure.
[0105] Step 2.1) uses two parallel cross-attention modules to process complex spatiotemporal data. Pedestrians, vehicles, and other traffic participants often exhibit fixed motion patterns while moving. For example, the driving speed, direction, and motion trend of the previous time step can help infer the motion position of the next time step. Therefore, temporal attention can assign different weights to different time periods of the historical trajectory. On the other hand, spatial attention is used to model the interaction between the target vehicle and the lane.
[0106] For each traffic participant i at each time step t, the same learnable query vector is assigned, denoted as {q t,i,k} t∈[1-T,0],i∈[1,N],k∈[1,K] .
[0107] Use spatial attention on lane nodes within the preset radius R1, as shown in formula (1), to obtain the query vector
[0108] Use temporal attention on the traffic participant nodes within the preset time span I1, as shown in formula (2), to obtain the query vector
[0109]
[0110]
[0111] Among them, q t ,i,k represents the query vector of the kth mode of each traffic participant i at each time step t, T represents the historical trajectory length, N represents the number of traffic participants, K represents the number of modes, MHA represents multi-head attention, is the embedding of traffic participant i at each time step t, E m is the lane centerline embedding, E e For edge embedding;
[0112] Step 2.2) Sum the query vectors processed by the cross-attention module to generate the predicted embedding P t,i,k :
[0113]
[0114] Step 3) Based on the prediction embedding, multiple attention mechanisms are used to capture the interactions between traffic participants, between historical trajectories and predicted trajectories, and between different prediction modalities, and decode to generate preliminary prediction trajectories, such as Figure 2 The decoding part is shown in the figure.
[0115] Step 3.1) Modeling the interactive attention between traffic participants:
[0116] In actual traffic scenarios, the movement of vehicles or pedestrians inevitably requires interaction with surrounding traffic participants. Therefore, the self-attention mechanism is used to integrate the mutual influence of traffic participants within a certain range. t,i,k , apply multi-head attention MHA to model the interactions between traffic participants:
[0117]
[0118] Among them, i′ represents all the interacting objects within the preset radius R of the i-th traffic participant under the same mode and time step.
[0119] Step 3.2) Modeling self-attention for historical trajectory prediction:
[0120] There is a strong correlation and consistency between historical trajectory predictions and future trajectory predictions. This problem is often ignored in many studies, resulting in interference in the continuity of predictions. Therefore, the historical prediction information is incorporated into the current prediction process, and the dynamic correlation between continuous predictions is effectively modeled through the attention mechanism. Each prediction embedding is self-attentioned with the historical prediction embedding within a preset time span I2 to model the interaction between historical and predicted trajectories and enhance the prediction of each traffic participant and mode:
[0121]
[0122] Step 3.3) Modeling self-attention of different modalities:
[0123] In complex trajectory prediction tasks, the future trajectory of traffic participants may have multiple prediction modes. For example, a vehicle may have multiple potential motion paths in an intersection scenario, such as going straight, turning left or right, etc. The interaction between the modes is modeled through the self-attention mechanism to enhance the understanding of different prediction modes, such as formula (6), thereby generating a more accurate final prediction:
[0124]
[0125] Step 3.4) The predicted embedding obtained in step 3.3) Decode through a two-layer MLP to obtain prediction results for multiple future positions as the first prediction trajectory
[0126] Step 3.5) To further improve the quality of trajectory prediction, the prediction results Using two-layer MLP encoding, the encoded pattern query vector replaces the learnable pattern query and is passed as input to step 2.2). Steps 2) and 3) are repeated to further refine the accuracy of the trajectory and obtain a preliminary predicted trajectory.
[0127] Step 4) Completing the parameters of fuzzy traffic rules through rule comparison, and calculating the priority of different rules based on signal time logic.
[0128] Step 4.1) Select two types of fuzzy rules, safety and right of way, as the research objects. By comparing different traffic rules, select safety indicators from the perspective of time and space, and set quantitative thresholds considering different interaction objects.
[0129] For the interaction between vehicles and vulnerable road users (VRUs), the time-to-collision (TTC) is selected as the time indicator and its threshold TTC_V is set. * is 1.6 seconds; select the horizontal and vertical relative distances as the spatial indicators and set the horizontal distance threshold d minlat_v * Set the longitudinal distance threshold d to 1.5 meters. minlon_v * is the distance traveled by the vehicle in 2 seconds.
[0130] For the interaction between vehicles, select the collision time TTC as the time indicator and set its threshold TTC_M * is 1.5 seconds; select the longitudinal relative distance as the spatial indicator and set the longitudinal relative distance threshold d minlon_m * is the distance traveled by the vehicle in 2 seconds.
[0131] Step 4.2) According to the selected safety index, the safety rules are expressed based on Signal Temporal Logic (STL), and robustness is used to express the priority of rule compliance; the robustness of the right of way is defined as the minimum value of the robustness in the safety rules, indicating the highest priority.
[0132] Step 4.2.1) Use STL to express security rules.
[0133] For the interaction between vehicles and vulnerable road users (VRUs), the safety rule φ1∧φ2 is expressed as follows:
[0134] φ1::=G (t,t+F) (ttc(Ego,VRUs)≥TTC_V * ) (7)
[0135]
[0136] For the interaction between vehicles, the safety rule φ3∧φ4 is expressed as follows:
[0137] φ3::=G (t,t+F) (ttc(Ego,Tgt)≥TTC_M * (9)
[0138] φ4::=G (t,t+F) (distancelon(Ego,Tgt)≥d minlon_m * ) (10)
[0139] Among them, φ1 and φ2 are STL formulas representing time index and space index when the vehicle interacts with VRU, φ3 and φ4 are STL formulas representing time index and space index when the vehicles interact with each other; G (t,t+F) It means that it happens every moment from the prediction start time t to the prediction end time t+F; ttc(Ego, VRUs) represents the STL calculation predicate of the TTC between the predicted vehicle Ego and the surrounding VRUs, distancelon(Ego, VRUs) represents the calculation predicate of the longitudinal distance between the predicted vehicle Ego and the surrounding VRUs, and distancelat(Ego, VRUs) represents the calculation predicate of the lateral distance between the predicted vehicle Ego and the surrounding VRUs; ttc(Ego, Tgt) represents the calculation predicate of the TTC between the predicted vehicle Ego and other surrounding vehicles Tgt, and distancelon(Ego, Tgt) represents the calculation predicate of the longitudinal distance between the predicted vehicle Ego and other surrounding vehicles Tgt.
[0140] Step 4.2.2) The priority of rule compliance is determined by the robustness calculation value. For the target vehicle to be predicted, calculate the robustness r of each safety rule formula φ1, φ2, φ3, φ4 t,i,k 1 , r t,i,k 2 , r t,i,k 3 , r t,i,k 4 , where, since the motion of the vehicle involves two-dimensional calculation, both the lateral and longitudinal directions need to be considered simultaneously, therefore, the robustness of φ2 is r t,i,k 2 Divided into r t,i,k 2lat , r t,i,k 2lon :
[0141]
[0142]
[0143]
[0144]
[0145]
[0146] If the robustness value of a rule is less than 0, it means that the rule is violated; the smaller the robustness value, the higher the priority of the rule; otherwise, it means that the vehicle has a larger margin to comply with the rule and the priority is lower.
[0147] Robustness of right of way t,i,k 5 Defined as the minimum value of robustness in the safety rules, indicating the highest priority, the robustness of the horizontal and vertical right of way r t,i,k 5lat , r t,i,k 5lon The calculation is as follows:
[0148]
[0149] Step 5) Combined with the priority evaluation results, dynamically adjust the preliminary prediction trajectory to obtain the final prediction trajectory, such as Figure 2 The optimization section is shown in Figure 2.
[0150] Step 5.1) Calculate the robustness gradient of the right-of-way rule:
[0151] For the horizontal or vertical dimension, use the Sigmoid function to convert r t,i,k 5 The robustness values < 0 are normalized to between 0 and 1, and the gradient is calculated accordingly, as follows:
[0152]
[0153] Step 5.2) In the multi-target interaction scenario, the trajectory is adjusted based on the gradient of rule robustness:
[0154] If r t,i,k 5lat or t,i,k 5lon is the minimum value in this scenario, then vehicle i needs to give way in the opposite direction. The adjustment operator η is introduced to represent the yielding behavior, as shown in formula (17). If r t,i 5 <0, then η is -1; otherwise it is 0:
[0155]
[0156] When the rule robustness in any direction r t,i,k 5 If it is less than 0, it means that the trajectory needs to be adjusted according to the gradient. t,i,k Adjust the preliminary forecast results with the adjustment rate γ As shown in formula (18), the final predicted trajectory F is obtained (t:t+F,i,k) :
[0157]
[0158] Step 5.3) Optimal prediction mode selection:
[0159] The Winner-Takes-All strategy is used to optimize the parameters of the trajectory prediction process. Among all possible modal predictions, the mode k closest to the true trajectory is selected according to the following formula: t,i , as shown in formula (19), this process ensures that the optimization focuses on the predicted mode that is closest to the true trajectory.
[0160]
[0161] The true trajectory is represented by G t,i = {g t+1 ,,g t+2,i , …, g t+F,i},in are the x and y coordinates of the real trajectory respectively.
[0162] Loss function for trajectory prediction Contains the first predicted trajectory and the final predicted trajectory F (t:t+F,i,k) Huber loss
[0163]
[0164] Among them, T represents the length of historical trajectory, N represents the number of traffic participants, and K represents the number of modes.
[0165] The model is trained, verified, and tested on the INTERACTION multi-target prediction dataset, using 1 second of historical trajectory to predict the next 3 seconds.
[0166] Select the minimum joint average displacement error (Minimum Joint Average Displacement Error, minJointADE) and the minimum joint final displacement error (Minimum Joint Final Displacement Error, mInJointFDE) is used as an evaluation index to indicate the accuracy of trajectory prediction results. As shown in Table 1, compared with other mainstream trajectory prediction models, the present invention improves minJointADE by 6.6%-61.18% and minJointFDE by 8.13-65.31%.
[0167]
[0168] Table 1 Comparison of the accuracy of the proposed method and the mainstream trajectory prediction model
[0169] Adoption Method minJointADE minJointFDE MoliNet 0.729 2.554 THOMAS 0.416 0.968 L-GCN 0.393 1.249 AutoBot 0.312 1.015 HGT-Joint 0.307 1.056 Traj-MAE 0.306 0.966 HDGT 0.303 0.958 The present invention 0.283 0.886
[0170] The preferred specific embodiments of the present invention are described in detail above. It should be understood that a person skilled in the art can make many modifications and changes based on the concept of the present invention without creative work. Therefore, any technical solution that can be obtained by a person skilled in the art through logical analysis, reasoning, or limited experiments based on the concept of the present invention on the basis of the prior art should be within the scope of protection determined by the claims.
Claims
1. A multi-target trajectory prediction method based on fuzzy traffic rule priority evaluation, characterized in that: The following steps are involved: Step 1) Extract traffic participants and map features based on graph neural network and encode spatiotemporal interaction relationships; Step 2) Generate prediction embedding using spatiotemporal joint attention; Step 3) Based on the prediction embedding, multiple attention mechanisms are used to capture the interactions between traffic participants, between historical trajectories and predicted trajectories, and between different prediction modalities, and decode to generate preliminary predicted trajectories; Step 4) Completing the parameters of the fuzzy traffic rules by rule comparison, and calculating the priorities of different rules based on signal time logic; Step 5) Combined with the priority evaluation results, dynamically adjust the preliminary prediction trajectory to obtain the final prediction trajectory.
2. A multi-target trajectory prediction method based on fuzzy traffic rule priority evaluation according to claim 1, characterized in that: The step 1) comprises the following steps: Step 1.1) Encode traffic participant features to obtain traffic participant embedding In the graph neural network, each traffic participant is set as a node. For each traffic participant i at each time step t, its position is set to the origin of the local polar coordinate system, and its direction is defined as the positive direction. In this reference system, the speed is expressed as where v i,t is the magnitude of the velocity, As the direction of speed, a multi-layer perceptron MLP is used to transform the feature Encoded as the feature embedding of the traffic participant where c i,t Indicates other properties, including length, width, type, D is the encoding dimension; Step 1.2) Encode map features to get lane centerline embedding E m ; Step 1.3) Use the edge feature encoding method based on the local polar coordinate system to capture the spatiotemporal relationship between nodes: map the node position to the local polar coordinate system, and the edge feature is described by four variables: the Euclidean distance d between the original node and the target node e , the direction of the edge in the local coordinate system of the target node φ e , the relative direction between the original node and the target node ψ e The time difference between the nodes δ e , a two-layer MLP is used to encode the edge features into edge embeddings: Where Y is the number of edges.
3. The multi-target trajectory prediction method based on fuzzy traffic rule priority evaluation according to claim 2 is characterized in that: The step 1.2) comprises the following steps: Step 1.2.1) Each lane segment is set as a node, and a two-layer MLP is used to encode the length features of the lane segment centerline and lane segment edgeline; Step 1.2.2) Use edge indices to define the connection between lanes and centerlines, generate edge features containing lane length, angle, direction difference, and type, and use the attention layer to update the centerline embedding E m ; Step 1.2.3) Apply the self-attention mechanism to the updated centerline embedding to process the interaction between centerlines, edge indexes define left adjacency, right adjacency, predecessor and successor connections, and generate corresponding edge features, which are used to optimize the centerline embedding E m ,in M is the number of lane segments.
4. The multi-target trajectory prediction method based on fuzzy traffic rule priority evaluation according to claim 1 is characterized in that: The step 2) comprises the following steps: Step 2.1) Use two parallel cross-attention modules to process complex spatiotemporal data, where the temporal attention assigns different weights to different time periods of the historical trajectory, and the spatial attention is used to model the interaction between the target vehicle and the lane; For each traffic participant i at each time step t, the same learnable query vector is assigned, denoted as {q t,i,k } t∈[1-T,0],i∈[1,N],k∈[1,K] ; Use spatial attention to the lane nodes within the preset radius R1 to obtain the query vector Use temporal attention to traffic participant nodes within a preset time span I1 to obtain the query vector Among them, q t,i,k represents the query vector of the kth mode of each traffic participant i at each time step t, T represents the historical trajectory length, N represents the number of traffic participants, K represents the number of modes, MHA represents multi-head attention, is the embedding of traffic participant i at each time step t, E m is the lane centerline embedding, E e For edge embedding; Step 2.2) Sum the query vectors processed by the cross-attention module to generate the predicted embedding Pt ,i,k :
5. A multi-target trajectory prediction method based on fuzzy traffic rule priority evaluation according to claim 4, characterized in that: The step 3) comprises the following steps: Step 3.1) Modeling the interactive attention between traffic participants: Based on the prediction embedding P t,i,k , apply multi-head attention MHA to model the interactions between traffic participants: Among them, i′ represents all the interaction objects of the i-th traffic participant within the preset radius R2 under the same mode and time step; Step 3.2) Modeling self-attention for historical trajectory prediction: A self-attention operation is performed on each predicted embedding within a preset time span I2 with the historical predicted embeddings to model the interaction between historical trajectories and predicted trajectories and enhance the prediction of each traffic participant and mode: Step 3.3) Modeling self-attention of different modalities: The interaction between modalities is modeled through the self-attention mechanism to enhance the understanding of different prediction modalities: Step 3.4) The predicted embedding obtained in step 3.3) Decode through a two-layer MLP to obtain prediction results for multiple future positions as the first prediction trajectory Step 3.5) Prediction results Using two-layer MLP encoding, the encoded pattern query vector replaces the learnable pattern query and is passed as input to step 2.2). Steps 2) and 3) are repeated to further refine the accuracy of the trajectory and obtain a preliminary predicted trajectory.
6. A multi-target trajectory prediction method based on fuzzy traffic rule priority evaluation according to claim 5, characterized in that: The step 4) comprises the following steps: Step 4.1) Select two types of fuzzy rules, safety and right of way, as the research objects. By comparing different traffic rules, select safety indicators from the perspective of time and space, and set quantitative thresholds considering different interaction objects; Step 4.2) According to the selected safety index, the safety rules are represented based on signal time logic STL, and the priority of rule compliance is represented by robustness; the robustness of the right of way is defined as the minimum value of the robustness in the safety rules, indicating the highest priority.
7. A multi-target trajectory prediction method based on fuzzy traffic rule priority evaluation according to claim 6, characterized in that: The selection of the safety index is specifically: For the interaction between vehicles and vulnerable road users (VRUs), the collision time TTC is selected as the time indicator and its threshold TTC_V is set. * ; Select the horizontal and vertical relative distance as the spatial index and set the horizontal distance threshold d minlat_v * and the longitudinal distance threshold d minlon_v * ; For the interaction between vehicles, select the collision time TTC as the time indicator and set its threshold TTC_M * , where TTC_M * <TTC_V * ; Select the longitudinal relative distance as the spatial indicator and set the longitudinal relative distance threshold d minlon_m * .
8. The multi-target trajectory prediction method based on fuzzy traffic rule priority evaluation according to claim 7 is characterized in that: For the interaction between vehicles and vulnerable road users (VRUs), the safety rule φ1∧φ2 is expressed as follows: φ1::=G (t,t+F) (ttc(Ego, VRUs)≥TTC_V * ) φ2::=G (t,t+F) (distancelon(Ego, VRUs)≥d minlon_v *∧distance(Ego, VRUs)≥d minlat_v * ) For the interaction between vehicles, the safety rule φ3∧φ4 is expressed as follows: φ3::=G (t,t+F) (ttc(Ego,Tgt)≥TTC M * ) φ4::=G (t,t+F) (distancelon(Ego,Tgt)≥d minlon_m * ) Among them, φ1 and φ2 are STL formulas representing time index and space index when the vehicle interacts with VRU, φ3 and φ4 are STL formulas representing time index and space index when the vehicles interact with each other; G (t,t+F) It means that it happens every moment from the prediction start time t to the prediction end time t+F; ttc(Ego, VRUs) represents the STL calculation predicate of the TTC between the predicted vehicle Ego and the surrounding VRUs, distancelon(Ego, VRUs) represents the calculation predicate of the longitudinal distance between the predicted vehicle Ego and the surrounding VRUs, and distancelat(Ego, VRUs) represents the calculation predicate of the lateral distance between the predicted vehicle Ego and the surrounding VRUs; ttc(Ego, Tgt) represents the calculation predicate of the TTC between the predicted vehicle Ego and other surrounding vehicles Tgt, and distancelon(Ego, Tgt) represents the calculation predicate of the longitudinal distance between the predicted vehicle Ego and other surrounding vehicles Tgt.
9. The multi-target trajectory prediction method based on fuzzy traffic rule priority evaluation according to claim 8 is characterized in that: The priority of the rule compliance is determined by the robustness calculation value. For the target vehicle to be predicted, the robustness r of each safety rule formula φ1, φ2, φ3, φ4 is calculated. t,i,k 1 , r t,i,k 2 , r t,i,k 3 , r t,i,k 4 , where the robustness of φ2 is r t,i,k 2 Divided into r t,i,k 2lat , r t,i,k 2lon : If the robustness value of a rule is less than 0, it means that the rule is violated; the smaller the robustness value, the higher the priority of the rule; Robustness of right of way t,i,k 5 Defined as the minimum value of robustness in the safety rules, indicating the highest priority, the robustness of the horizontal and vertical right of way r t,i,k 5lat , r t,i,k 5lon The calculation is as follows: r t,i,k 5lat =min(r t,i,k 1 ,r t,i,k 2lat ,r t,i,k 3 ) r t,i,k 5lon =min(r t,i,k 1 ,r t,i,k 2lon ,r t,i,k 3 ,r t,i,k 4 )。 10. The multi-target trajectory prediction method based on fuzzy traffic rule priority evaluation according to claim 9 is characterized in that: The step 5) comprises the following steps: Step 5.1) Calculate the robustness gradient of the right-of-way rule: For the horizontal or vertical dimension, use the Sigmoid function to convert r t,i,k 5 The robustness values < 0 are normalized to between 0 and 1, and the gradient is calculated accordingly, as follows: Step 5.2) In the multi-target interaction scenario, the trajectory is adjusted based on the gradient of rule robustness: If r t,i,k 5lat or t,i,k 5lon is the minimum value in this scenario, then vehicle i needs to give way in the relative direction, and the adjustment operator η is introduced to represent the giving way behavior: When the rule robustness in any direction r t,i,k 5 If it is less than 0, it means that the trajectory needs to be adjusted according to the gradient in this direction. t,i,k Adjust the preliminary forecast results with the adjustment rate γ Get the final predicted trajectory F (t:t+F,i,k) : Step 5.3) Optimal prediction mode selection: The Winner-Takes-All strategy is used to optimize the parameters of the trajectory prediction process. Among all possible mode predictions, the mode k closest to the true trajectory is selected according to the following formula: t,i : The true trajectory is represented by G t,i = {g t+1 , g t+2,i , …, g t+F,i },in are the x and y coordinates of the real trajectory respectively; The loss function L of trajectory prediction includes the first predicted trajectory and the final predicted trajectory F (t:t+F,i,k) Huber loss Among them, T represents the length of historical trajectory, N represents the number of traffic participants, and K represents the number of modes.
Citation Information
Cited By
Risk matrix construction method based on DIP-IMM-KF algorithm driving
CN120257025A
Method for testing automatic driving vehicle in closed field with self-adaptive adjustment of interaction difficulty
CN121723440A