Trajectory prediction method of local path query of traffic participants and trajectory token sorting
Patent Information
- Application Number
- CN202611185115.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-06
- Publication Date
- 2026-10-20
- Estimated Expiration
- 2046-08-06
AI Technical Summary
然而,候选生成所使用的路径依据与解码后候选评分所读取的信息可能不一致
本发明根据参与者-车道关系和定向车道后继关系构造有界路径假设,并将参与者-车道种子令牌、路径上下文以及包含路径几何和参与者-路径兼容性的路径描述符融合为路径查询令牌,使支持某一候选未来的路径连续性证据形成目标交通参与者专属的候选级表示,而非仅分散在共享地图特征中。
Smart Images

Figure CN122695793B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of traffic participant motion prediction technology in intelligent driving, specifically to a trajectory prediction method based on traffic participant local path query and trajectory token sorting. Background Technology
[0002] Intelligent driving systems need to predict the future trajectories of traffic participants based on their historical movements, road geometry, and surrounding interactive environment to provide usable motion information for subsequent decision-making and planning. In road scenarios with intersections, merging, diverging, and lane-changing structures, the same traffic participant often has multiple possible future movements. Therefore, the trajectory prediction system not only needs to generate multiple candidate trajectories, but also needs to sort these candidate trajectories and output the selected predicted trajectory when the actual future trajectory is unknown.
[0003] Existing map-aware trajectory prediction methods typically vectorize lane-related map units in high-precision maps or construct lane maps, and encode road geometry and lane topology into shared scene features through message passing, attention, or participant-centric aggregation. While these methods can utilize lane direction and connectivity, the specific lane successor chains supporting a candidate future are usually scattered across shared memory or graph features and may not be persistently retained as candidate-level objects.
[0004] Existing multimodal prediction methods based on target points, intent queries, or motion queries can organize multiple future hypotheses and generate and select trajectories based on candidate target points, mode states, or candidate confidence levels. However, the path criteria used for candidate generation may not be consistent with the information read from the candidate scores after decoding. When scoring based solely on the predicted endpoint or the mode state before decoding, it is difficult to distinguish candidate trajectories with similar endpoints but different intermediate path shapes and lane continuity.
[0005] Therefore, a method for predicting traffic participant trajectories is needed, which enables the path continuity evidence formed by the participant-lane relationship and the directional lane successor relationship of the target traffic participant to continuously enter the candidate-level representation refinement from the candidate construction stage, and to be used together with the actual generated trajectory content for model-side candidate selection after the candidate trajectory is decoded. Summary of the Invention
[0006] The technical problem this invention aims to solve is: in multimodal trajectory prediction in lane-structured traffic scenarios, how to construct definable and transitive candidate-level path representations from the local path continuity evidence formed by the successor relationships of directional lanes for target traffic participants, and how to continuously link these candidate-level path representations from candidate construction and refinement to the decoded candidate trajectory score, so as to output a selected predicted trajectory that simultaneously considers path continuity and the actual generated trajectory content. Therefore, this invention provides a trajectory prediction method based on traffic participant local path query and trajectory token sorting.
[0007] To achieve the above objectives, the technical solution of the present invention is as follows: A trajectory prediction method based on local path query and trajectory token sorting for traffic participants, comprising the following steps: Step S1: Acquire and encode the observation scene data.
[0008] The observation scenario data includes the historical trajectory of the target traffic participant, local lane elements, participant-lane relationship, and directional lane successor relationship. The historical trajectory is encoded to obtain participant memory, and the local lane elements are encoded to obtain lane memory.
[0009] The local lane element refers to the map unit in the local map corresponding to the current observation scene, used to represent the lane geometry and lane topological connections. The directional lane succession relationship refers to the directed topological relationship along the lane's defined driving direction, where one local lane element can directly continue to another local lane element, with the latter local lane element being the successor of the former. The participant memory refers to the hidden feature representation representing the historical movement state of the target traffic participant; the lane memory refers to the hidden feature representation representing the geometry and attribute information of local lane elements.
[0010] Step S2: Determine the participants-lane seeds and construct the bounded path hypothesis.
[0011] Based on the participant-lane relationship, the participant-lane seed of the target traffic participant is determined, and starting from the lane element corresponding to the participant-lane seed, the bounded path hypothesis of the target traffic participant is obtained by extending along the directional lane successor relationship.
[0012] The participant-lane seed refers to a locally compatible lane element determined from the local lane elements by the participant-lane relationship and used to initiate subsequent path expansion. The locally compatible lane element refers to a lane element among the local lane elements that is associated with the target traffic participant by the participant-lane relationship and used as the starting point of the bounded path assumption.
[0013] Specifically, the bounded path assumptions of the target traffic participant are obtained by extending the successor relationship along the directional lane, as follows: The lane elements corresponding to the participant-lane seed are used as starting lane elements, and successor lane elements that satisfy the directional lane successor relationship are connected sequentially. Path branches that repeatedly pass through lane elements, violate the directional lane successor relationship, or exceed the maximum path depth are discarded. For the same target traffic participant in the same observation scenario, the participant-lane seeds are sorted in ascending order of participant-lane distance, descending order of absolute cosine value of heading consistency, and ascending order of lane element identifier. Only when the previous sorting item is the same, the next sorting item is compared, and the order of paths corresponding to different participant-lane seeds is determined according to the sorting result. Within the same participant-lane seed, the order of path branches is determined according to the successor edge center distance and the successor lane element identifier. Bounded path assumptions that do not exceed the preset path capacity are retained according to the sorting result, and the target traffic participant and participant-lane seed corresponding to each bounded path assumption are recorded.
[0014] The path depth refers to the number of successor expansions performed along the directional lane successor relationship starting from the initial lane element corresponding to the participant-lane seed; the path depth containing only the initial lane element is 0, and the path depth containing n lane elements is n-1; the maximum path depth is the upper limit of the path depth. The absolute cosine value of the heading consistency is used to characterize the degree of consistency between the movement direction of the target traffic participant and the direction of the corresponding lane element. The successor edge refers to the directed edge in the lane graph that represents a directional lane successor relationship. The successor edge center distance refers to the Euclidean distance between the centers of the lane elements at both ends of the successor edge. The path branching order refers to the order of the path branches determined by the successor edge center distance and the successor lane element identifier when there are multiple path branches for the same participant-lane seed. The preset path capacity refers to the maximum number of valid bounded path hypotheses that each target traffic participant can retain; each valid bounded path hypothesis generates a path query token, therefore the preset path capacity also limits the upper limit of the number of valid path query tokens for that target traffic participant.
[0015] Step S3: Generate a path query token.
[0016] For each bounded path hypothesis, the participant-lane seed token, the path context obtained by aggregating along the bounded path hypothesis, and the path descriptor containing path geometry and participant-path compatibility are concatenated or feature fused. The concatenated or fused features are then mapped to a preset hidden dimension through a projection layer to obtain the path query token.
[0017] The participant embedding of the target traffic participant, the lane embedding of the locally compatible lane element, and the participant-lane relationship descriptor are input into the seed projection layer to map and obtain a participant-lane seed token. The participant embedding is the hidden vector corresponding to the target traffic participant in the participant memory obtained in step S1 and before path memory fusion. The lane embedding is the hidden vector corresponding to the locally compatible lane element in the lane memory obtained in step S1 and before path memory fusion. The participant-lane relationship descriptor is used to characterize the geometric and directional relationships between the target traffic participant and the corresponding participant-lane seed lane element, including the relative center displacement of the target traffic participant's center with respect to the center of the lane element, the participant-lane distance between the target traffic participant and the lane element, the heading consistency between the target traffic participant's heading and the lane element's direction, the signed lateral and longitudinal offsets of the target traffic participant relative to the lane element's direction, and the position of the target traffic participant relative to the center of the starting lane element corresponding to the participant-lane seed. The participant-lane distance is used to characterize the geometric distance between the target traffic participant's position at the current observation time and the corresponding local lane element. In one specific implementation, the participant-lane distance is the shortest Euclidean distance from the location of the target traffic participant to the finite line segment determined by the beginning and end points of the centerline of the corresponding local lane element. The seed projection layer is a learnable feature mapping layer used to concatenate or fuse the participant embedding, lane embedding, and participant-lane relationship descriptor, and map them to a preset hidden dimension.
[0018] The path context is obtained by assuming statistical path length, path center, path heading, distance statistics, successor edge center distance, and successor edge heading consistency along the bounded path; the path geometry includes the number of lane features, the number of successor edges, path length, relative start position, relative end position, path displacement, average path center, average heading, and distance statistics; the participant-path compatibility includes seed participant-lane distance, heading consistency, signed lateral offset, longitudinal offset, and position relative to the center of the starting lane feature; for each target traffic participant, its path query token is filled into a preset path capacity, and a path query token mask is generated so that the filled path query tokens do not participate in subsequent memory fusion, attention reading, mean aggregation, and candidate scoring.
[0019] Step S4: Execution path memory fusion.
[0020] The path query token is projected onto the same hidden representation space as the participant memory and the lane memory to obtain the path memory. The participant memory, the lane memory, and the path memory are then fused to obtain a fused participant memory, a fused lane memory, and a fused path memory. Specifically: The hidden dimension projection is performed on the path query token to obtain the path memory; the participant memory, the lane memory, and the path memory are used as hidden tokens, and the path-aware relative position features obtained based on the path center and path direction are used for memory update to obtain the fused participant memory, the fused lane memory, and the fused path memory; for each target traffic participant, the fused path memory belonging to the target traffic participant and indicated as valid by the path query token mask is averaged and aggregated, and the aggregation result is projected and added to the fused participant memory of the target traffic participant by residual addition and normalization to obtain the updated fused participant memory of the target traffic participant.
[0021] Step S5: Perform loop query refinement.
[0022] Multiple candidate queries are initialized based on the fused participant memory and the fused path memory for the target traffic participant. Each candidate query reads the fused participant memory, the fused lane memory, and the fused path memory during the iterative refinement process to obtain a corresponding refined candidate query. Each candidate pattern corresponds to one candidate query. The candidate pattern is a future motion hypothesis slot set for the same target traffic participant; the candidate query is a hidden vector that corresponds one-to-one with a candidate pattern and is used as an attention query to read the fused memory and represent the candidate pattern. The initialized candidate queries are called initial candidate queries, and the candidate queries after completing a preset number of iterative refinements are called refined candidate queries. Specifically: Each candidate pattern is input with the fused participant memory and the valid fused path memory belonging to the target traffic participant is used as the key and value to perform attention reading corresponding to each candidate pattern, resulting in an initial candidate query that corresponds one-to-one with each candidate pattern. In each round of the loop refinement, each candidate query is read with the fused participant memory, the fused lane memory, and the fused path memory as the key and value, and residual connection, normalization, and feedforward transformation are performed on the reading results. Candidate interaction is performed between multiple candidate queries of the same target traffic participant, but not between candidate queries of different target traffic participants, to obtain the refined candidate query.
[0023] Step S6: Jointly decode the candidate trajectory and trajectory token status.
[0024] Based on the refined candidate queries, the fused participant memory, the fused lane memory, and the fused path memory, multiple candidate trajectories of the target traffic participant and the trajectory token status corresponding to each candidate trajectory are jointly decoded, and a trajectory token summary of each candidate trajectory is generated according to the trajectory token status.
[0025] The trajectory token state is a decoder-side hidden state generated and retained during the coordinate decoding process of the corresponding candidate trajectory. The corresponding refined candidate query is used as the query vector of the attention mechanism, and the trajectory token state is used as the key and value to perform attention aggregation. The attention aggregation result is then projected to obtain a fixed-length trajectory token digest.
[0026] Step S7: Perform trajectory token-aware candidate sorting.
[0027] For each candidate trajectory, a candidate score is determined based on the corresponding refined candidate query, the trajectory token digest, and the endpoint-aware candidate features obtained from the predicted endpoint of the candidate trajectory. Each candidate score is normalized to a selection probability, and the selected predicted trajectory for the target traffic participant is determined from multiple candidate trajectories based on the selection probability. Specifically: Project candidate features onto the predicted endpoint of the candidate trajectory to obtain the endpoint-aware candidate features; concatenate the corresponding refined candidate query, the trajectory token digest, and the endpoint-aware candidate features to obtain the candidate trajectory ranking features; perform at least one linear transformation, normalization, and nonlinear activation on the candidate trajectory ranking features, and obtain the corresponding scalar candidate score through output layer mapping.
[0028] Exponential normalization is performed on the candidate scores among multiple candidate trajectories for the same target traffic participant to obtain the selection probability of each candidate trajectory; the candidate trajectory with the highest selection probability is determined as the selected predicted trajectory, and the remaining candidate trajectories are sorted according to the selection probability.
[0029] The beneficial effects of this invention are as follows: This invention constructs bounded path hypotheses based on participant-lane relationships and directional lane successor relationships, and integrates participant-lane seed tokens, path contexts, and path descriptors containing path geometry and participant-path compatibility into a path query token. This enables evidence of path continuity supporting a candidate future to form a candidate-level representation specific to the target traffic participant, rather than being scattered across shared map features.
[0030] This invention projects path query tokens into path memories and enables candidate queries to repeatedly read fused participant memories, fused lane memories, and fused path memories during the iterative refinement process, thereby enabling path continuity evidence to continuously participate in candidate representation updates before candidate trajectory coordinates are generated.
[0031] This invention preserves the trajectory token state corresponding to each candidate during the candidate trajectory decoding process, and uses refined candidate query, trajectory token summary and endpoint-aware candidate features together for candidate scoring, so that the scoring criteria simultaneously reflect the path condition context before decoding, the actual generated trajectory content after decoding and candidate endpoint clues.
[0032] This invention establishes a fixed-size path interface by using maximum path depth, preset path capacity, and path query token mask, enabling path memory fusion, cyclic query refinement, and candidate scoring to be performed on a controlled local path set, thus avoiding the transformation of candidate selection into an unbounded lane map search. Attached Figure Description
[0033] Figure 1 This is a flowchart illustrating the overall process of the traffic participant trajectory prediction method of the present invention. Figure 2 This is a schematic diagram illustrating the construction of a local path query token for participants in this invention. Figure 3 This is a schematic diagram illustrating the path memory fusion and loop query refinement of the present invention; Figure 4 This is a schematic diagram of the candidate trajectory sorting for trajectory token sensing according to the present invention; Figure 5 This is a schematic diagram of the candidate trajectory ranking training and inference process of the present invention. Detailed Implementation
[0034] The specific embodiments of the present invention will be further described below with reference to the accompanying drawings and technical solutions.
[0035] like Figure 1 As shown, this embodiment receives the observed scene at the decision-making moment, inputs the observed scene data into the trained trajectory prediction model, and outputs candidate trajectories, candidate scores, and selection probabilities; the steps are as follows: Step S1: Acquire and encode observation scene data. The observation scene data includes the historical trajectory of the target traffic participant, local lane elements, participant-lane relationship, and directional lane successor relationship; the historical trajectory consists of the participant's motion state before the prediction time, the local lane elements come from the local map available at the time of prediction, and the participant-lane relationship and the directional lane successor relationship are determined by the observation scene data. The historical trajectory is encoded to obtain participant memory, and the local lane elements are encoded to obtain lane memory; the acquired dynamic motion information, static lane information, and topological relationship are organized into a unified scene input according to formula (1).
[0036] (1) in, Indicates the observation scene; Indicates the time step from the first observation to the second observation. The historical trajectory of participants at each observation time step; Indicates the length of the observation history; Represents the set of participants; Represents a local set of lane features; This represents the map topology relationship set. Formula (1) organizes dynamic motion information, static lane information, and topology relationships into a unified scene input.
[0037] Furthermore, according to formula (2), the participant-lane relationship set and the subsequent relationship set of the directional lane are combined to form a topological relationship set, providing a relational basis for the construction of subsequent path assumptions. The future actual trajectory does not participate in this step or subsequent reasoning steps.
[0038] (2) in, This represents the set of participant-lane relationships, used to determine participant-lane seeds; This represents the set of successor relationships for directional lanes, used to determine the legal continuation of lane elements that are directly reachable along a specified direction; The operation combines the two types of relations into a topological relation set.
[0039] Step S2: Determine participant-lane seeds and construct bounded path hypotheses. Based on the participant-lane relationships, determine the participant-lane seeds of the target traffic participant, and starting from the lane elements corresponding to the participant-lane seeds, extend along the directional lane successor relationships to obtain the bounded path hypotheses of the target traffic participant. First, according to formula (3), determine the set of participant-lane seeds of the target traffic participant from the participant-lane relationships.
[0040] (3) in, Indicates target traffic participants The set of lane element indexes corresponding to the participants and lane seeds; Indicates the index of the target traffic participants; Indicates a local lane feature index; Indicates that the index is Target traffic participants; Indicates that the index is Local lane elements; when the target traffic participant With local lane elements When a participant-lane relationship exists, index the lane element. join in Formula (3) is used to determine the participant-lane seed for the target traffic participant.
[0041] For each participant-lane seed, the starting lane element is connected to the subsequent lane element along the directional lane successor relationship according to formula (4) to form an ordered lane element sequence. During expansion, path branches that repeatedly pass through lane elements, violate the directional lane successor relationship, or exceed the maximum path depth are discarded. When there are multiple paths for the same target traffic participant in the same observation scenario, the participant-lane seeds are sorted first according to the ascending order of participant-lane distance, the descending order of the absolute cosine value of heading consistency, and the ascending order of lane element identifier. Only when the previous sorting item is the same, the next sorting item is compared, and the order of paths corresponding to different participant-lane seeds is determined according to the sorting result. Within the same participant-lane seed, the order of path branches is determined according to the distance between the center of the successor edge and the successor lane element identifier. Bounded path assumptions not exceeding the preset path capacity are retained according to the sorting result. In one specific implementation, participant-lane seeds are determined through nearest neighbor filtering rather than using a fixed distance threshold, retaining a maximum of four participant-lane seeds. Each participant-lane seed generates a maximum of two bounded path hypotheses from its corresponding starting lane features. Each bounded path hypothesis contains a maximum of four lane features, corresponding to a maximum of three subsequent expansions. On the model side, each target traffic participant reads in a maximum of eight path query tokens. The target traffic participants and participant-lane seeds corresponding to each bounded path hypothesis are recorded. The above sorting uses only observed participant states and map information, without using future real trajectories or decoded scores.
[0042] (4) in, Indicates target traffic participants The The bounded path assumption, Indicates the bounded path hypothesis index; the bounded path hypothesis starts from... Corresponding participants - lane seed starting lane element, path depth Indicates the number of successor expansions and does not exceed the maximum path depth. ,in, This indicates the preset maximum path depth limit, which is the maximum number of successor extensions allowed for a single path; Indicates the successor extended sequence number; Indicates the first The lane features corresponding to the subsequent expansion. The bounded path assumption includes the path depth plus one lane feature, and adjacent lane features must satisfy the directional lane successor relationship. Formula (4) ensures that the bounded path assumption has directionality and finite length.
[0043] like Figure 2As shown, step S3 involves generating a path query token. Following formula (5), the participant embedding of the target traffic participant, the lane embedding of the locally compatible lane element, and the participant-lane relationship descriptor are input into the seed projection layer to map and obtain a participant-lane seed token. The participant-lane relationship descriptor includes the relative center displacement of the target traffic participant's center relative to the center of the lane element, the participant-lane distance between the target traffic participant and the lane element, the heading consistency between the target traffic participant's heading and the lane element's direction, the signed lateral and longitudinal offsets of the target traffic participant relative to the lane element's direction, and the position of the target traffic participant relative to the center of the starting lane element.
[0044] (5) in, Indicates target traffic participants With partial compatibility lane elements Corresponding participant - Lane seed token; Indicates target traffic participants With partial compatibility lane elements Participant-lane relationship descriptor; This represents a learnable seed projection.
[0045] For each retained bounded path hypothesis, the path descriptor is obtained by combining the path geometry and participant-path compatibility according to formula (6). The path geometry includes the number of lane features, the number of successor edges, the path length, the relative start position, the relative end position, the path displacement, the average path center, the average heading, and the distance statistics; the participant-path compatibility includes the seed participant-lane distance, heading consistency, signed lateral offset, longitudinal offset, and position relative to the center of the starting lane feature; the path context is obtained by statistically analyzing the path length, path center, path heading, distance statistics, successor edge center distance, and successor edge heading consistency along the bounded path hypothesis according to formula (7); the participant-lane seed token, the path context, and the path descriptor are concatenated or feature fused according to formula (8), and the concatenated or fused features are mapped to a preset hidden dimension through a projection layer to obtain the path query token.
[0046] (6) in, Indicates target traffic participants The A bounded path hypothesis corresponds to a path descriptor; This function represents a summary of the geometric features of the path. This indicates a function to summarize participant-path compatibility features, denoted by a semicolon "". " indicates feature concatenation operation.
[0047] (7) in, Indicates target traffic participants The Each bounded path assumes a corresponding path context; This function represents the application of deterministic statistics to the bounded path hypothesis, directional lane successor relationships, and corresponding participant-lane seed relationships, and its output is: ; Indicates target traffic participants With the Each bounded path assumption corresponds to a participant-lane relationship descriptor between initial lane elements; Indicates the first Each bounded path assumes a corresponding participant-lane seed index. Statistics include path length, path center, path heading, distance statistics, successor edge center distance, and successor edge heading consistency.
[0048] (8) in, This represents the path query token projection function; Indicates target traffic participants The The path query token corresponds to the bounded path assumption; Indicates target traffic participants The Each bounded path is assumed to correspond to a participant-lane seed token. The path query token is obtained by concatenating or feature fusion of the participant-lane seed token, path context, and path descriptor, and mapping it to a preset hidden dimension through a projection layer.
[0049] Since the number of valid bounded path assumptions may differ among different target traffic participants, path query tokens are filled into the preset path capacity of each target traffic participant according to formula (9), and a path query token mask is generated. Items with a path query token mask of 0 are not involved in subsequent memory fusion, attention reading, mean aggregation, and candidate scoring. Path query tokens are generated before candidate trajectory decoding and represent bounded path assumptions; the trajectory token states described later are generated during candidate trajectory decoding, and the two are not the same object.
[0050] (9) in, Represents a set of path query tokens; Represents the set of indexes of the target traffic participants; This represents the preset path capacity for each target traffic participant; Indicates target traffic participants The actual number of valid bounded path assumptions; when the path index No greater than the number of actual effective bounded path assumptions At that time, path query token mask Indicates target traffic participants The The mask corresponding to the path query token; the path query token is valid when it is 1, otherwise it is a filler item and does not participate in subsequent calculations.
[0051] like Figure 3 As shown, step S4 involves performing path memory fusion. The path query token is projected into the same hidden representation space as the participant memory and the lane memory according to formula (10) to obtain the path memory. According to formula (11), the participant memory, the lane memory, and the path memory are used as hidden tokens, and the path-aware relative position features obtained based on the path center and path direction are used for memory updates to obtain the fused participant memory, the fused lane memory, and the fused path memory.
[0052] (10) in, The function representing the hidden dimension projection of a path query token; This represents the set of path memories obtained by projecting each valid or filled path query token.
[0053] (11) in, This represents the memory fusion function; the input is... , and These are respectively participant memory, lane memory, and route memory; Represents path-aware relative position features; output , , These are respectively fusion of participant memory, fusion of lane memory, and fusion of path memory.
[0054] After scene-level fusion, for each target traffic participant, the fused path memories belonging to the target traffic participant and indicated as valid by the path query token mask are aggregated by mean according to formula (12). The aggregation result is then projected and added to the fused participant memory of the target traffic participant by residual addition and normalization to obtain the updated fused participant memory of the target traffic participant. Thus, the path memory not only participates in scene-level information exchange, but also directly returns the fused participant memory of the corresponding target traffic participant through the fused path memory mean aggregation.
[0055] (12) in, Indicates belonging to the target traffic participant The Effective integration of path memory; This represents the mean aggregation function; Indicates the output projection matrix; Indicates target traffic participants The initial fusion participants' memories; Indicates the layer normalization function; Indicates target traffic participants The memories of participants are obtained by aggregating and integrating effective fusion path memories.
[0056] Step S5: Perform iterative query refinement. Multiple candidate queries are initialized based on the fused participant memory and the fused path memory for the target traffic participant. Each candidate query reads the fused participant memory, the fused lane memory, and the fused path memory during the iterative refinement process to obtain a corresponding refined candidate query. According to formula (13), each candidate pattern uses the fused participant memory as input and the valid fused path memory belonging to the target traffic participant as the key and value to perform attention reading corresponding to each candidate pattern, resulting in an initial candidate query corresponding to each candidate pattern.
[0057] (13) in, Indicates the first Each candidate pattern targets traffic participants. The function that performs attention reading; Indicates the candidate pattern index; Represents the mode projection function; output Indicates target traffic participants The The initial candidate query corresponding to each candidate pattern.
[0058] In the In the refinement process, according to formula (14), each candidate query is read using the fused participant memory, the fused lane memory, and the fused path memory as keys and values, and residual connection, normalization, and feedforward transformation are performed on the read results according to formula (15); according to formula (16), for the same target traffic participant... Candidate interactions are performed between candidate queries to obtain refined candidate queries for this round. These interactions do not mix candidate queries from different target traffic participants. This process is repeated a preset number of times to obtain refined candidate queries.
[0059] (14) in, Indicates target traffic participants The The candidate patterns in the first The candidate queries that are selected in turn; Indicates the current refined round; Indicates target traffic participants The The candidate patterns in the first The scene memory retrieval results were obtained in turn; This represents the attention reading function.
[0060] (15) in, Indicates target traffic participants The The candidate patterns in the first Intermediate candidate queries are obtained through residual connection, normalization, and feedforward transformation. This represents the feedforward transform function.
[0061] (16) in, Indicates target traffic participants In the Except for the first in the cycle Other candidate queries besides the candidate pattern. Including traffic participants with the same target Other candidate pattern indexes besides; Indicates the candidate interaction function; This indicates the number of candidate patterns for the same target traffic participant; Indicates target traffic participants The The candidate patterns in the first The round refines the candidate queries after adding the interaction results. Candidate interactions are only executed between candidate queries for the same target traffic participant, and do not mix candidate queries for different target traffic participants.
[0062] like Figure 4 As shown, step S6 involves jointly decoding the candidate trajectories and trajectory token states. Based on the refined candidate queries, the fused participant memory, the fused lane memory, and the fused path memory, joint decoding is performed to obtain multiple candidate trajectories for the target traffic participant and the trajectory token states corresponding to each candidate trajectory. A trajectory token summary for each candidate trajectory is then generated based on the trajectory token states. According to formula (17), joint decoding is performed for each candidate pattern using the refined candidate queries, the fused participant memory, the fused lane memory, and the fused path memory as inputs. The trajectory token states are generated and retained during the coordinate decoding process of the corresponding candidate trajectory, thus corresponding to the actually generated candidate trajectories.
[0063] (17) in, Indicates target traffic participants The Complete the candidate patterns Refined candidate queries after round-robin refinement This indicates the preset number of iterations for refining the loop; Indicates the joint decoding function; Indicates target traffic participants The Candidate trajectories; Indicates target traffic participants The The candidate trajectory corresponding to the first Track token status Indicates the trajectory token index; This indicates the number of trajectory tokens for each candidate trajectory. The trajectory token state is a decoder-side hidden state generated and retained during the coordinate decoding process of the corresponding candidate trajectory.
[0064] According to formula (18), the corresponding refined candidate query is used as the query vector of the attention mechanism, and the trajectory token state is used as the key and value to perform attention aggregation. The attention aggregation result is then projected to obtain a fixed-length trajectory token digest. The fixed-length trajectory token digest is used to represent the temporal motion content and path following shape of the candidate trajectory.
[0065] (18) in, Represents the trajectory token digest projection function; Indicates target traffic participants The A fixed-length trajectory token digest corresponding to each candidate trajectory.
[0066] Step S7: Perform trajectory token-aware candidate ranking. For each candidate trajectory, determine a candidate score based on the corresponding refined candidate query, the trajectory token digest, and the endpoint-aware candidate features obtained from the predicted endpoint of the candidate trajectory. Normalize each candidate score into a selection probability, and determine the selected predicted trajectory of the target traffic participant from multiple candidate trajectories according to the selection probability. Specifically, as follows: Project the candidate features of the predicted endpoint of the candidate trajectory according to formula (19) to obtain endpoint-aware candidate features; concatenate the corresponding refined candidate query, the trajectory token digest, and the endpoint-aware candidate features according to formula (20) to obtain candidate trajectory ranking features; perform at least one linear transformation, normalization, and nonlinear activation on the candidate trajectory ranking features, and obtain the corresponding scalar candidate score through output layer mapping; perform exponential normalization on the candidate scores among multiple candidate trajectories of the same target traffic participant according to formula (21) to obtain the selection probability of each candidate trajectory, and determine the candidate trajectory with the highest selection probability as the selected predicted trajectory.
[0067] (19) in, Indicates target traffic participants The The candidate trajectories at the end of the prediction time domain at time step The predicted location is at that point. This indicates the time step index at the end of the prediction time domain; Represents the feature projection function of the candidate endpoint; Indicates target traffic participants The Endpoint-aware candidate features corresponding to each candidate trajectory.
[0068] (20) in, This represents the candidate trajectory scoring function; Indicates target traffic participants The Each candidate trajectory is a scalar candidate score obtained by mapping the candidate trajectory ranking features through the output layer.
[0069] (twenty one) in, Indicates target traffic participants The The selection probability corresponds to each candidate trajectory. The exponential function in the formula normalizes the candidate scores of multiple candidate trajectories for the same target traffic participant, making the sum of the selection probabilities equal to 1.
[0070] During the reasoning phase, the overall input-output relationship of the above model is expressed according to formula (22).
[0071] (twenty two) in, This represents the trajectory prediction model used to perform the traffic participant trajectory prediction method. The model parameters of the trajectory prediction model are represented; Formula (22) represents the overall input-output relationship of the model.
[0072] During the inference phase, the candidate mode index with the highest probability is selected according to formula (23), and the corresponding candidate trajectory is output as the selected predicted trajectory for the target traffic participant. The remaining candidate trajectories are sorted according to the selection probability to form the sorted multimodal prediction output. The entire inference process only uses the observation history and map context, and does not use the future real trajectory.
[0073] (twenty three) in, Indicates target traffic participants Select the candidate pattern index with the highest probability; Indicates the index of candidate patterns Perform maximum value index operation; Indicates target traffic participants The selected predicted trajectory; Indicates target traffic participants In the candidate pattern index The candidate trajectories are determined. Formula (23) converts the maximum selection probability into the output of the inference stage.
[0074] like Figure 5 As shown, during the training phase, the model first executes the forward process of steps S1 to S7 above to generate candidate trajectories, trajectory token states, candidate scores, and selection probabilities. According to formula (24), positive candidate trajectories are determined based on the training matching distance between each candidate trajectory and the real future trajectory; the real future trajectory is only used for supervised training.
[0075] (twenty four) in, Indicates target traffic participants The Candidate trajectories in the target traffic participants The last effective prediction time step The predicted location; Indicates target traffic participants The true future trajectory at the last valid prediction time step The location; Indicates target traffic participants The corresponding positive candidate pattern index with the smallest training matching distance; Indicates the index of candidate patterns Perform minimum value index operation; This indicates the target traffic participants identified by valid markers of real future trajectories. The index of the last valid prediction time step. The 2-norm represents the Euclidean distance.
[0076] The interval ranking loss, calculated according to formula (25), is the difference between the selection probabilities of the positive candidate trajectory and other candidate trajectories. Then, the trajectory regression loss, the weighted interval ranking loss, and the auxiliary supervision loss are combined into a joint loss according to formula (26), and the model parameters of the trajectory prediction model are updated based on the joint loss. In a specific implementation, the trajectory regression loss is the loss over the effective future time step, and the auxiliary supervision loss is the auxiliary loss between the predicted velocity direction and the actual heading direction. During inference, the positive candidate trajectory assignment and the actual future trajectory input are removed, and the selection probabilities generated by the model are used directly.
[0077] (25) in, Indicates the ranking loss based on intervals; This represents the number of valid candidate pattern pairs participating in the interval ranking loss normalization. Indicates target traffic participants The The classification supervision indicator corresponding to each candidate pattern, when the target traffic participant candidate patterns The value is 1 if the classification supervision condition is met, and 0 otherwise. Indicates the preset interval; This represents the positive part operator, which truncates negative values; the summation covers all target traffic participants and their candidate patterns.
[0078] (26) Among them, joint losses Weighted interval ranking loss Weighted Trajectory Regression Loss and auxiliary supervision loss composition; Indicates interval ranking loss The weight, Indicates trajectory regression loss The weights; This represents the direction consistency auxiliary supervision loss. In a specific implementation, the weight of the interval ranking loss is 0.1, and the weight of the trajectory regression loss is 0.9.
[0079] In this training embodiment, the trajectory prediction model used to execute the traffic participant trajectory prediction method receives observed scene data and outputs candidate trajectories, candidate scores, and selection probabilities. During training, positive candidate trajectories are determined based on the training matching distance between each candidate trajectory and the real future trajectory; an interval ranking loss is calculated based on the difference in selection probabilities between the positive candidate trajectory and other candidate trajectories; the interval ranking loss is combined with the trajectory regression loss of the candidate trajectories and the auxiliary supervision loss to form a joint loss, and the model parameters of the trajectory prediction model are updated based on the joint loss. During inference, no real future trajectory is input, and the process of determining positive candidate trajectories based on real future trajectories is not executed. Instead, the selected predicted trajectory is determined based on the selection probabilities generated by the trajectory prediction model.
[0080] In the experimental verification, the following was adopted: Motion prediction data. In this embodiment, each sample uses 50 frames of observation data up to time step 49 and predicts 60 future time steps at a sampling rate of 10 Hz. The dataset name, number of frames, and sampling rate described above are for verification purposes and do not limit the implementation of the invention on other observation time domains, prediction time domains, or traffic data.
[0081] In the local training set holdout protocol, the two holdout partitions cover a total of 6000 scenarios and 22258 evaluation participants. Compared to the SIMPL baseline with a shared feature pipeline, this embodiment... The average displacement error, endpoint displacement error, and miss rate decreased by 18.4%, 16.1%, and 6.6%, respectively; six candidates 、 、 Miss rate and They decreased by 19.2%, 24.2%, 24.0%, and 18.3%, respectively.
[0082] exist In the corresponding verification partitioning protocol, this embodiment, relative to the SIMPL baseline, The average displacement error and the endpoint displacement error decreased by 20.4% and 18.8% respectively, and the six-candidate miss rate and The reductions were 19.8% and 7.8% respectively. In the experimental verification of this embodiment, the method achieved a hold-out protocol on the local training set and... The corresponding validation partitioning protocols all improved the top-1 average displacement error and endpoint displacement error of the selected predicted trajectory, as well as the six-candidate miss rate and Brier-minFDE for retaining the candidate trajectory set. The above results are experimental results under the training, data, and evaluation settings of this embodiment, and should not be interpreted as achieving the same proportion under all deployment conditions.
[0083] In component ablation, replacing the complete candidate trajectory score with candidate scores using only endpoints increased the endpoint displacement error by 0.989; removing the path query token increased it by 0.229; and removing loop query refinement increased it by 0.104. This comparison supports path query tokens, loop query refinement, and trajectory token-aware candidate ranking as collaborative techniques, rather than using a single endpoint cue in isolation.
[0084] Preset path capacity sensitivity experiments show that setting the preset path capacity for each target traffic participant to 6 retains 99.87% of generated path query tokens; in one specific implementation, the model defaults to setting the preset path capacity for each target traffic participant to 8. The above values are parameters from the example implementation, used to illustrate that the fixed preset path capacity interface can retain the vast majority of local path assumptions in the experimental data, without limiting the preset path capacity to 6 or 8.
[0085] In the computational overhead experiment, the number of parameters increased from 2.646M to 4.267M, the single-scene inference latency increased from 11.23 ms to 22.88 ms, and the peak GPU memory allocation increased from 389.6 MB to 550.1 MB. These results demonstrate that this embodiment achieves prediction improvements at the cost of increased path memory fusion, cyclic query refinement, and trajectory token-aware candidate ranking computation; this invention does not claim to avoid increasing computational costs.
Claims
1. A trajectory prediction method based on local path query and trajectory token sorting for traffic participants, characterized in that, The specific steps are as follows: Step S1: Acquire and encode the observation scene data; The observation scene data includes the historical trajectory of the target traffic participant, local lane elements, participant-lane relationship, and directional lane successor relationship. The historical trajectory is encoded to obtain participant memory, and the local lane elements are encoded to obtain lane memory. Step S2: Determine the participants-lane seeds and construct bounded path hypotheses; Based on the participant-lane relationship, the participant-lane seed of the target traffic participant is determined, and starting from the lane element corresponding to the participant-lane seed, the bounded path hypothesis of the target traffic participant is obtained by extending along the directional lane successor relationship. Step S3: Generate a path query token; For each bounded path hypothesis, the participant-lane seed token, the path context obtained by aggregating along the bounded path hypothesis, and the path descriptor containing path geometry and participant-path compatibility are concatenated or feature fused, and the concatenated or fused features are mapped to a preset hidden dimension through a projection layer to obtain the path query token. The participant-lane seed refers to a locally compatible lane element determined from the local lane elements by the participant-lane relationship and used to initiate subsequent path expansion; The locally compatible lane element refers to the lane element in the local lane element that is associated with the target traffic participant by the participant-lane relationship and is used as the starting point of the bounded path assumption; Step S4: Execution path memory fusion; The path query token is projected onto the same hidden representation space as the participant memory and the lane memory to obtain the path memory. The participant memory, the lane memory, and the path memory are then fused to obtain the fused participant memory, the fused lane memory, and the fused path memory. Step S5: Perform loop query refinement; Multiple candidate queries are initialized based on the fused participant memory and the fused path memory for the target traffic participant. Each candidate query reads the fused participant memory, the fused lane memory, and the fused path memory during the iterative refinement process to obtain a corresponding refined candidate query. Each candidate pattern corresponds to one candidate query. The candidate pattern is a future motion hypothesis slot set for the same target traffic participant. The candidate query is a hidden vector that corresponds one-to-one with a candidate pattern and is used as an attention query to read the fused memory and represent the candidate pattern. The candidate queries obtained during initialization are called initial candidate queries, and the candidate queries after completing a preset round of cyclic refinement are called refined candidate queries. Step S6: Jointly decode the candidate trajectory and trajectory token status; Based on the refined candidate queries, the fused participant memory, the fused lane memory, and the fused path memory, multiple candidate trajectories of the target traffic participant and the trajectory token status corresponding to each candidate trajectory are jointly decoded, and a trajectory token summary of each candidate trajectory is generated according to the trajectory token status. Step S7: Perform trajectory token-aware candidate sorting; For each candidate trajectory, a candidate score is determined based on the corresponding refined candidate query, the trajectory token digest, and the endpoint-aware candidate features obtained from the predicted endpoint of the candidate trajectory. Each candidate score is normalized into a selection probability, and the selected predicted trajectory of the target traffic participant is determined from multiple candidate trajectories according to the selection probability.
2. The trajectory prediction method based on local path query and trajectory token sorting for traffic participants according to claim 1, characterized in that, In step S1, the local lane element refers to the map unit in the local map corresponding to the current observation scene, which is used to represent the lane geometry and lane topology connection; the directional lane successor relationship refers to the directed topological relationship that can be directly extended from one local lane element to another local lane element along the lane's specified driving direction, where the latter local lane element is the successor lane element of the former local lane element; the participant memory refers to the hidden feature representation that represents the historical movement state of the target traffic participant, and the lane memory refers to the hidden feature representation that represents the geometry and attribute information of the local lane element.
3. The trajectory prediction method based on local path query and trajectory token sorting for traffic participants according to claim 1, characterized in that, In step S2, the bounded path assumptions of the target traffic participants are obtained by extending the successor relationship along the directional lanes, as follows: The lane element corresponding to the participant-lane seed is used as the starting lane element, and subsequent lane elements that satisfy the directional lane successor relationship are connected in sequence; path branches that repeatedly pass through lane elements, violate the directional lane successor relationship, or exceed the maximum path depth are discarded; For the same target traffic participant in the same observation scenario, the participant-lane seeds are sorted in ascending order of participant-lane distance, descending order of absolute cosine value of heading consistency, and ascending order of lane element identifier. Only when the previous sorting item is the same, the next sorting item is compared, and the order of paths corresponding to different participant-lane seeds is determined according to the sorting results. Within the same participant-lane seed, the order of path branches is determined according to the distance between the center of the successor edge and the successor lane element identifier. Based on the sorting results, retain bounded path assumptions that do not exceed the preset path capacity, and record the target traffic participants and participant-lane seeds corresponding to each bounded path assumption.
4. The trajectory prediction method based on local path query and trajectory token sorting for traffic participants according to claim 3, characterized in that, The path depth refers to the number of successor expansions performed along the directional lane successor relationship starting from the initial lane element corresponding to the participant-lane seed; the path depth containing only the initial lane element is 0, and the path depth containing n lane elements is n-1; the maximum path depth is the upper limit of the path depth; the heading consistency absolute cosine value is used to characterize the degree of consistency between the movement direction of the target traffic participant and the direction of the corresponding lane element; the successor edge refers to the directed edge in the lane graph that represents a directional lane successor relationship; the successor edge center distance refers to the Euclidean distance between the centers of the lane elements at both ends of the successor edge; the path branching order refers to the order of the path branches determined by the successor edge center distance and the successor lane element identifier when there are multiple path branches for the same participant-lane seed; the preset path capacity refers to the maximum number of valid bounded path hypotheses retained for each target traffic participant; each valid bounded path hypothesis generates a path query token.
5. The trajectory prediction method based on local path query and trajectory token sorting for traffic participants according to claim 1, characterized in that, In step S3, The participant embedding of the target traffic participant, the lane embedding of the locally compatible lane element, and the participant-lane relationship descriptor are input into the seed projection layer to map and obtain the participant-lane seed token. The participant embedding is the hidden vector corresponding to the target traffic participant in the participant memory obtained in step S1 and before path memory fusion. The lane embedding is the hidden vector corresponding to the locally compatible lane element in the lane memory obtained in step S1 and before path memory fusion. The participant-lane relationship descriptor is used to characterize the geometric and directional relationships between the target traffic participant and the corresponding participant-lane seed lane element, including the relative center displacement of the target traffic participant's center with respect to the center of the lane element, the participant-lane distance between the target traffic participant and the lane element, and the target traffic participant's lane relationship descriptor. The participants' heading consistency with the lane feature direction, the signed lateral and longitudinal offsets of the target traffic participant relative to the lane feature direction, and the position of the target traffic participant relative to the center of the starting lane feature corresponding to the participant-lane seed; the participant-lane distance is used to characterize the geometric distance between the target traffic participant's position at the current observation time and the corresponding local lane feature; in a specific implementation, the participant-lane distance is the shortest Euclidean distance of a finite line segment determined by the target traffic participant's position point to the first and last endpoints of the centerline of the corresponding local lane feature; the seed projection layer is a learnable feature mapping layer used to concatenate or fuse the participant embedding, lane embedding, and participant-lane relationship descriptor, and map them to a preset hidden dimension.
6. The trajectory prediction method based on local path query and trajectory token sorting for traffic participants according to claim 5, characterized in that, The path context is obtained by assuming statistical path length, path center, path heading, distance statistics, successor edge center distance, and successor edge heading consistency along the bounded path; the path geometry includes the number of lane features, the number of successor edges, the path length, the relative start position, the relative end position, the path displacement, the average path center, the average heading, and the distance statistics; the participant-path compatibility includes seed participant-lane distance, heading consistency, signed lateral offset, longitudinal offset, and position relative to the center of the starting lane feature; For each target traffic participant, their path query token is populated to a preset path capacity, and a path query token mask is generated so that the populated path query tokens do not participate in subsequent memory fusion, attention reading, mean aggregation, and candidate scoring.
7. The trajectory prediction method based on local path query and trajectory token sorting for traffic participants according to claim 1, characterized in that, Step S4 is as follows: The hidden dimension projection is performed on the path query token to obtain the path memory; the participant memory, the lane memory, and the path memory are used as hidden tokens, and the path-aware relative position features obtained based on the path center and path direction are used for memory update to obtain the fused participant memory, the fused lane memory, and the fused path memory; for each target traffic participant, the fused path memory belonging to the target traffic participant and indicated as valid by the path query token mask is averaged and aggregated, and the aggregation result is projected and added to the fused participant memory of the target traffic participant by residual addition and normalization to obtain the updated fused participant memory of the target traffic participant.
8. The trajectory prediction method based on local path query and trajectory token sorting for traffic participants according to claim 1, characterized in that, Step S5 is as follows: Each candidate pattern is input with the fusion participant memory, and the valid fusion path memory belonging to the target traffic participant is used as the key and value to perform attention reading corresponding to each candidate pattern, so as to obtain an initial candidate query that corresponds to each candidate pattern. In each round of the cyclic refinement, each candidate query performs attention reading with the fusion participant memory, the fusion lane memory, and the fusion path memory as keys and values, and performs residual connection, normalization, and feedforward transformation on the reading results; The refined candidate queries are obtained by performing candidate interactions between multiple candidate queries for the same target traffic participant, but not between candidate queries for different target traffic participants.
9. The trajectory prediction method based on local path query and trajectory token sorting for traffic participants according to claim 1, characterized in that, In step S6, The trajectory token state is a decoder-side hidden state generated and retained during the coordinate decoding process of the corresponding candidate trajectory; the corresponding refined candidate query is used as the query vector of the attention mechanism, the trajectory token state is used as the key and value to perform attention aggregation, and the attention aggregation result is projected to obtain a fixed-length trajectory token digest.
10. The trajectory prediction method based on local path query and trajectory token sorting for traffic participants according to claim 1, characterized in that, Step S7 is as follows: Project candidate features onto the predicted endpoint of the candidate trajectory to obtain the endpoint-aware candidate features; concatenate the corresponding refined candidate query, the trajectory token digest, and the endpoint-aware candidate features to obtain the candidate trajectory ranking features; The candidate trajectory ranking features are subjected to at least one linear transformation, normalization, and nonlinear activation, and the corresponding scalar candidate scores are obtained by mapping through the output layer. Exponential normalization is performed on the candidate scores among multiple candidate trajectories for the same target traffic participant to obtain the selection probability of each candidate trajectory; the candidate trajectory with the highest selection probability is determined as the selected predicted trajectory, and the remaining candidate trajectories are sorted according to the selection probability.
Citation Information
Patent Citations
Path-based trajectory prediction
CN120418141A
Risk awareness occupation enhanced generative end-to-end trajectory planning method
CN122275948A