Mobile trajectory prediction method and device, vehicle and storage medium
By acquiring and analyzing the movement trajectories of objects in traffic scenarios, and using the node gating coefficients of graph neural networks for feature calculation, the problem that traditional graph neural networks cannot cope with dynamic changes is solved, and more accurate movement trajectory prediction is achieved.
Patent Information
- Application Number
- CN202611162943.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-31
- Publication Date
- 2026-11-27
AI Technical Summary
Traditional graph neural networks cannot cope with real-time dynamic traffic scenarios in motion trajectory prediction, resulting in poor prediction accuracy.
By acquiring the movement trajectories of the first object and surrounding objects, the movement characteristics and influence coefficients are determined. Graph neural networks are used to obtain node gating coefficients, and feature calculations are performed to predict movement trajectories, thereby capturing dynamic interactions in traffic scenarios in real time.
It improves the accuracy of movement trajectory prediction, can adapt to the dynamic changes in traffic scenarios in real time, and enhances the ability to capture dynamic interactions between objects.
Smart Images

Figure CN123169950A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of trajectory prediction technology, and in particular to a method, apparatus, vehicle, and storage medium for predicting mobile trajectories. Background Technology
[0002] Trajectory prediction is crucial for the environmental perception and decision-making planning stages of autonomous driving. Accurate prediction of the movement trajectories of vehicles and pedestrians can effectively avoid road traffic accidents and ensure the safety and stability of vehicle operation.
[0003] Prior art uses GNN (Graph Neural Network) to predict the vehicle's trajectory.
[0004] However, traditional graph neural networks are usually pre-trained and use fixed, predefined static parameters, which cannot cope with real-time dynamic traffic scenarios, resulting in poor accuracy in predicting movement trajectories. Summary of the Invention
[0005] This application provides a method, apparatus, vehicle, and storage medium for predicting movement trajectories, which can improve the accuracy of movement trajectory prediction. The technical solution is as follows: Firstly, a method for predicting movement trajectories is provided, the method comprising: Obtain the first movement trajectory of the first object and the second movement trajectory of the surrounding second objects; Based on the first movement trajectory and each of the second movement trajectories, the first movement characteristics of the first object, the second movement characteristics of each of the second objects, and the influence coefficient are determined. The influence coefficient is used to characterize the influence between the first object and each of the second objects. Based on the second movement feature and the influence coefficient, the node gating coefficients corresponding to the graph neural network are obtained; Using a graph neural network, feature calculation is performed based on the first movement feature and node gating coefficients to obtain the predicted movement trajectory of the first object.
[0006] Secondly, a motion trajectory prediction device is also provided, the device comprising: The first acquisition module is used to acquire the first movement trajectory of the first object and the second movement trajectory of the surrounding second objects; The determination module is used to determine, based on the first movement trajectory and each of the second movement trajectories, a first movement feature of the first object, a second movement feature of each of the second objects, and an influence coefficient, wherein the influence coefficient is used to characterize the influence between the first object and each of the second objects; The second acquisition module is used to acquire the node gating coefficients corresponding to the graph neural network based on the second movement feature and the influence coefficient. The prediction module is used to perform feature calculations based on the first movement feature and the node gating coefficient using the graph neural network to obtain the predicted movement trajectory of the first object.
[0007] Thirdly, a vehicle is also provided for performing the steps of the method of the first aspect.
[0008] Fourthly, a computer program product is also provided, the computer program product including computer instructions, which, when executed by a processor, implement the steps of the method described in the first aspect.
[0009] The technical solution provided in this application brings at least the following beneficial effects: This application obtains the first movement trajectory of a first object and the second movement trajectories of surrounding second objects; based on the first movement trajectory and each of the second movement trajectories, it determines the first movement feature of the first object, the second movement features of each of the second objects, and the influence coefficient; based on the second movement features and the influence coefficient, it obtains the node gating coefficients corresponding to the graph neural network; and using the graph neural network, it performs feature calculation based on the first movement features and the node gating coefficients to obtain the predicted movement trajectory of the first object. In this embodiment, since the first movement trajectory of the first object and the second movement trajectory of the second object represent the dynamic changes of each object in the traffic scene, by obtaining the node gating coefficients corresponding to the graph neural network in real time through the first movement trajectory of the first object and the second movement trajectory of the second object, the node gating coefficients of the graph neural network can couple the dynamic changes of each object in the real-time traffic scene. This allows the graph neural network to capture the dynamic interactions between objects in the traffic scene when predicting the future movement trajectory of the first object, thereby improving the accuracy of movement trajectory prediction. Attached Figure Description
[0010] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0011] Figure 1 This is one of the flowcharts of a motion trajectory prediction method provided in the embodiments of this application; Figure 2 This is a second flowchart of a motion trajectory prediction method provided in the embodiments of this application; Figure 3 This is the third flowchart of a motion trajectory prediction method provided in the embodiments of this application; Figure 4This is a schematic diagram of the structure of a motion trajectory prediction device provided in an embodiment of this application. Detailed Implementation
[0012] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.
[0013] This application provides a method for predicting movement trajectories, which can be applied to vehicles or other computing devices (such as cloud servers or road testing equipment). Figure 1 As shown, the method includes steps 101-104.
[0014] Step 101: Obtain the first movement trajectory of the first object and the second movement trajectory of the surrounding second objects.
[0015] In this embodiment, a road condition dataset can be acquired using a vehicle's sensor system and / or road testing equipment, and a road condition data segment of a preset time interval can be extracted from the dataset. The road condition data segment consists of the movement trajectories of multiple objects, including vehicles and pedestrians. The movement trajectory of the same object within the road condition data segment is continuous in time. The object's movement trajectory can include: the object's position, direction of movement, and speed at time t, where t = 1, 2, ...
[0016] Taking the acquisition of road condition datasets by a vehicle using its sensor system and roadside equipment as an example, the vehicle can communicate with the roadside equipment. The vehicle collects first road condition data through its own sensor system and obtains second road condition data collected by the roadside equipment. After obtaining the second road condition data, the vehicle merges the first and second road condition data to obtain the road condition dataset.
[0017] Taking the example of a cloud server using a vehicle's sensor system and roadside equipment to obtain a road condition dataset, the cloud server communicates with the vehicle and with the roadside equipment. The cloud server obtains the first road condition data collected by the vehicle's sensor system from the vehicle and the second road condition data collected by the roadside equipment from the roadside equipment. The cloud server merges the first and second road condition data to obtain the road condition dataset.
[0018] After acquiring road condition data segments, the movement trajectories of each object can be extracted from these segments. When predicting the movement trajectory of a target vehicle, the target vehicle can be designated as the first object. The movement trajectory of the first object at time t in the road condition data segment is taken as the first movement trajectory of the first object. Based on the comparison between the first movement trajectory and the movement trajectories of other objects in the road condition data segment at time t, objects whose positions are less than a distance threshold from the first object are selected as the second objects. The movement trajectory of the second objects in the road condition data segment at time t is taken as the second movement trajectory of the second objects. There can be multiple second objects, and the distance threshold can be set as needed. The time corresponding to the first movement trajectory and the time corresponding to the second movement trajectory are synchronized in time; that is, the time corresponding to the first movement trajectory and the time corresponding to the second movement trajectory are the same.
[0019] It is understandable that in a traffic scenario, objects are constantly moving. Therefore, at different times, the second objects around the first object can be different or the same, and at time t, the number of second objects around the first object can be one or more.
[0020] In this embodiment of the application, a real-time distance filtering mechanism is used to ensure that the spatiotemporal graph structure subsequently constructed includes a second vehicle that has a potential interaction relationship with the first object, thus eliminating interference from irrelevant vehicles.
[0021] Step 102: Based on the first movement trajectory and each of the second movement trajectories, determine the first movement feature of the first object, the second movement feature of each of the second objects, and the influence coefficient.
[0022] In this embodiment, a spatiotemporal graph structure is constructed based on the first movement trajectory of the first object at time t and the second movement trajectories of each second object. The spatiotemporal graph structure describes the relationships between events or objects in spatial and temporal dimensions, effectively capturing complex spatiotemporal dependencies. The spatiotemporal graph structure includes multiple object nodes and their adjacency relationships. Object nodes represent objects or events, and adjacency relationships represent the relationships between object nodes. Each object node has corresponding movement characteristics. Each object node includes a target node and multiple adjacent nodes. The target node is the node corresponding to the first object i, and the adjacent nodes are the nodes corresponding to the second objects j.
[0023] In this embodiment of the application, when constructing the spatiotemporal graph structure at time t, features can be extracted from the first movement trajectory of the first object at time t to obtain the first movement feature of the target node at time t, denoted as . By extracting features from the second movement trajectory of each second object at time t, the second movement features of each adjacent node at time t are obtained, and these second movement features are denoted as... The first movement feature is used as the movement feature of the target node, and the second movement feature of each second object is used as the movement feature of the adjacent node corresponding to the second object, so as to obtain multiple object nodes and their respective movement features in the spatiotemporal graph structure. By calculating the first movement trajectory and the second movement trajectory at time t, the influence coefficient at time t is obtained. The influence coefficient is used as the adjacency relationship between multiple object nodes in the spatiotemporal graph structure to represent the relationship between object nodes.
[0024] Step 103: Based on the second moving feature and the influence coefficient, obtain the node gating coefficients corresponding to the graph neural network.
[0025] Graph Neural Networks (GNNs) are deep learning models used to process graph-structured data. They can aggregate the feature information of a target node and its neighboring nodes, iteratively updating the feature information of any given node. The node gating coefficient characterizes the fusion ratio between the original feature information of the target node and the feature information of its neighboring nodes when fusing them.
[0026] In this embodiment of the application, the spatiotemporal graph structure at time t is input into the graph neural network. The graph neural network can utilize the second movement feature and influence coefficient in the spatiotemporal graph structure to construct the node gating coefficient corresponding to each object node in the graph neural network.
[0027] Step 104: Using a graph neural network, feature calculation is performed based on the first movement feature and node gating coefficients to obtain the predicted movement trajectory of the first object.
[0028] The encoder of a graph neural network can use node gating coefficients to determine the fusion ratio of the first and second movement features when fusing the first movement feature of a first object and the second movement feature of a second object. Based on the fusion ratio, the first and second movement features are fused to obtain the fused feature. The decoder of the graph neural network decodes the fused feature and outputs the position, velocity, and direction of motion of the first object at future time steps, thereby obtaining the predicted movement trajectory of the first object.
[0029] In this embodiment, since the first movement trajectory of the first object and the second movement trajectory of the second object represent the dynamic changes of each object in the traffic scene, the node gating coefficients corresponding to the graph neural network can be obtained in real time through the first movement trajectory of the first object and the second movement trajectory of the second object. Then, the node gating coefficients of the graph neural network can couple the dynamic changes of each object in the real-time traffic scene, thereby enabling the graph neural network to capture the dynamic interaction between each object in the traffic scene when predicting the future movement trajectory of the first object, thereby improving the accuracy of movement trajectory prediction.
[0030] This application provides another method for predicting movement trajectories, which can be applied to vehicles or other computing devices (such as cloud servers or road test equipment). The method includes steps S1-S6.
[0031] Step S1: Obtain the first movement trajectory of the first object and the second movement trajectory of the surrounding second objects.
[0032] Step S1 can be referred to step 101 above, and will not be repeated here.
[0033] Step S2: Based on the first movement trajectory and each of the second movement trajectories, determine the first movement feature of the first object, the second movement feature of each of the second objects, and the influence coefficient.
[0034] In one possible implementation, the influence coefficient is determined through the following steps: Based on the first movement data and each of the second movement data, the interaction strength between the first object and each of the second objects is determined; based on the target interaction strength in the interaction strength, the influence coefficient is obtained.
[0035] Interaction strength reflects the degree of influence between the target node and its neighboring nodes in the spatiotemporal graph structure. It is understandable that different second objects have different degrees of influence on the first object. Therefore, the interaction strength between the target node and different neighboring nodes can also be different.
[0036] In one possible implementation, determining the interaction strength between the first object and each of the second objects based on the first movement trajectory and each of the second movement trajectories includes: determining the spatial correlation and temporal correlation between the first object and each of the second objects based on the first movement trajectory and each of the second movement trajectories; and fusing the spatial correlation and temporal correlation to obtain the interaction strength.
[0037] Spatial relevance characterizes the spatial correlation between the first object and the second object. Temporal relevance characterizes the temporal correlation between the first object and the second object. In this embodiment, the spatial and temporal relevance between the first object and each of the second objects are fused to fully explore the degree of influence between the first object and each of the second objects.
[0038] In one possible implementation, spatial correlation is determined through the following steps: Based on the first movement trajectory and each of the second movement trajectories, at least two of the following are determined: the relative position, relative velocity, and relative direction of motion between the first object and each of the second objects. At least two of the relative position, relative velocity, and relative motion direction are fused to obtain spatial correlation.
[0039] In some possible implementations, the spatial correlation between the first object and the second object at time t It is determined by the following formula: =
[0040] in, Let i be the spatial correlation between the first object i and the second object j at time t. Let be the relative distance between the first object and the second object at time t. , and Let represent the position coordinates of the first object and the second object at time t, respectively. The relative distance reflects the spatial basis for the interaction between the first and second objects. The closer the first and second objects are, the greater their interaction potential. Let be the relative velocity between the first object and the second object at time t. , and These represent the velocity vectors of the first and second objects at time t, respectively. Relative velocity is used to capture the dynamical difference in velocity between the first and second objects. Let be the direction of relative motion between the first object and the second object at time t. , and These represent the directions of motion of the first object and the second object at time t, respectively. The relative directions of motion characterize the degree of consistency between the directions of motion of the first object and the second object. For distance attenuation, With relative distance The increase followed by exponential decay aligns with the intuitive physical law that "the impact is greater when the vehicle is nearby." (Parameter) Used to control the decay rate For speed difference adjustment term, speed difference adjustment term Used for relative velocity Perform nonlinear mapping to convert relative velocity Converted to a finite gain, where For a smooth, bounded activation function (such as tanh or sigmoid), the parameters are... Used to adjust gain intensity, parameter Used to control relative speed Sensitivity For heading alignment item, heading alignment item The value is set to a maximum of 1 when the relative motion directions of the first and second objects are aligned, and a minimum of 0 when their relative motion directions are opposite. This ensures that a significant interaction strength is generated only when the motion directions of the first and second objects share a common component. When spatial correlation is obtained by fusing relative position and relative velocity, the value of the heading alignment term in the spatial correlation formula is 1; when spatial correlation is obtained by fusing relative position and relative motion direction, the value of the velocity difference adjustment term in the spatial correlation formula is 1; when spatial correlation is obtained by fusing relative velocity and relative motion direction, the value of the distance attenuation term in the spatial correlation formula is 1.
[0041] In some possible implementations, time-series correlation The weighted cosine similarity formula is used to calculate the temporal correlation between the first and second objects at time t, emphasizing the importance of recent behavior. Calculated using the following formula:
[0042] in, Let be the temporal correlation between the first object i and the second object j at time t. The time window length L used for evaluation can be preset, and the weights... It is an exponentially decaying coefficient that decays over time, with parameters... Control weight The decay rate. Time-series correlation. The calculation formula is designed so that the closer the velocities of the first and second objects are within the time window, the higher the temporal correlation. Larger.
[0043] In one possible implementation, the interaction strength is determined by the following formula: , that is
[0044] in, Let t be the interaction strength between the first object i and the second object j. Temporal correlation. As a multiplicative factor in the interaction strength calculation formula, it amplifies the spatial correlation between objects that continuously interact in space (such as the first object and the second object stably following each other), while suppressing the instantaneous and unreliable situations caused by noise or brief fluctuations in the movement trajectory.
[0045] In one possible implementation, the influence coefficient is obtained based on the target interaction intensity in the interaction intensity, including: sorting the interaction intensities from largest to smallest, and selecting the top K items from the sorting results as the target interaction intensity; normalizing the target interaction intensity, and constructing the influence coefficient based on the normalized target interaction intensity, K=1, 2, 3, ...
[0046] To transform the target interaction strength into numerically stable edge weights that can be directly used in the graph neural network, a softmax function with a temperature parameter is used to normalize the target interaction strength, resulting in probabilistic edge weights, i.e., influence coefficients. In this embodiment, the influence coefficients are obtained using the following formula:
[0047] in, The influence coefficient between the first object i and the second object j provides the basic contribution distribution of the second moving feature in the convolution. Let be the set of second vehicles j corresponding to the target interaction intensity, and let the temperature parameter λ be used to control the degree of "kurtosis" in the weight distribution. The larger the value, the greater the proportion of the second object j, which has a higher interaction strength with the first object i, in the aggregation.
[0048] In this embodiment of the application, the interaction intensity is taken into consideration. It is a nonnegative scalar that reflects the magnitude of the spatiotemporal influence between the first and second objects, but the interaction strength... It cannot be directly used as graph convolution weights because the number of second objects around different first objects varies and their scales differ significantly. If interaction strength is used directly... This can lead to imbalances or unstable gradients in the aggregation results. Therefore, by introducing an exponential normalization strategy, the target interaction strength corresponding to the first object is normalized to a probability distribution, i.e., the influence coefficient. In this model, the sum of the weights of the edges emitted by the target node corresponding to the first object to all adjacent nodes corresponding to the target interaction strength is 1, which satisfies the mathematical requirements of graph convolution and enhances the numerical stability of model training. Simultaneously, the temperature parameter... When normalizing the target interaction intensity, the peaking degree of the neighbor node weight distribution corresponding to each target interaction intensity is adjusted so that neighbor nodes with high interaction intensity contribute more during aggregation, while the contribution of low-intensity neighbor nodes is suppressed.
[0049] Step S3: Construct the node context based on the second movement feature and the influence coefficient.
[0050] The node context is constructed using the following formula:
[0051] As a node context, by constructing a node context, the second movement feature of the second object is coupled with the influence coefficient of the graph structure into a single vector for easy subsequent calculation.
[0052] Step S4: Construct the node gating coefficients corresponding to the graph neural network through the node context.
[0053] In this embodiment, a unique adaptive logistic regression method is used to construct the node gating coefficients corresponding to the graph neural network. The node gating coefficients are constructed using the following formula:
[0054] Among them, parameters Control the first The sensitivity of each convolutional layer to different components of the node context, and the bias parameters. Used to control the gating baseline, node gating coefficient The value is between 0 and 1, and is used to scale the node according to the node context. The fundamental weight matrix of each convolutional layer To obtain the time-varying effective weight matrix of the nodes. This allows for dynamic scaling of the weight matrix of the convolutional layer, enabling adaptive feature extraction at the nodes. At the implementation level, scaling is implemented using element-wise multiplication, i.e., by... and Multiply, we get .
[0055] According to the formula for constructing node gating coefficients, when the target interaction intensity is high or the consistency of the second movement feature is high, the node context obtained after aggregation will be... Tendency to activate gating That is, the calculated node gating coefficient approaches 1, thereby improving the gating efficiency of the first node. The ability of each convolutional layer to represent the target node is crucial. Conversely, if the target interaction strength is weak or neighborhood noise dominates, the node gating coefficient approaches 0, which suppresses the contribution of the current convolutional layer's aggregated features and prevents the model from fitting invalid noise. The second movement feature consistency refers to the degree to which the movement features corresponding to the second-object vehicles surrounding the first object are similar and their movement trends are unified. When constructing the node gating coefficients, a small-scale validation set is first used to fix the parameters. and To ensure the stability of the impact coefficient, fine-tuning is then performed through cross-validation. and To balance flexibility and stability.
[0056] Understandably, since any vehicle in the road condition dataset can be used as the first object for trajectory prediction, each convolutional layer of the graph neural network can take the node corresponding to each vehicle as the target node, obtain the target interaction strength between each target node and its surrounding neighboring nodes, and calculate the node gating coefficient of each central node based on the target interaction strength.
[0057] Step S5: Using the online updated graph neural network, feature calculation is performed based on the first moving feature and node gating coefficients to obtain the fused features output by the graph neural network encoder.
[0058] The encoder of a graph neural network can use node gating coefficients to determine the fusion ratio of the first and second motion features when fusing the first motion feature of a first object and the second motion feature of a second object. Based on the fusion ratio, the encoder fuses the first and second motion features and outputs the fused feature of the first object i at time t. .
[0059] Step S6: Decode the fused features using a graph neural network decoder, and convert the fused features output by the graph neural network into the predicted movement trajectory of the first object.
[0060] The fused features are decoded by the graph neural network decoder to output the position, velocity, and direction of motion of the first object at future time t, thereby obtaining the predicted trajectory of the first object after time t.
[0061] In one possible implementation, the decoder's weight matrix is adjusted before decoding the fused features using the graph neural network decoder. In this embodiment, the decoder no longer uses fixed parameters, but instead dynamically scales the decoding weights based on node gating coefficients and novelty, i.e., an adaptive decoding weight matrix. In this embodiment, the decoder weight matrix is adjusted using the following formula:
[0062] in, This is the adjusted decoder weight matrix. This is the basic weight matrix of the decoder. By controlling the amplification ratio of node gating coefficients and novelty contributions to decoding, this design ensures that nodes with high interaction strength or high novelty are prioritized during the decoding stage, while nodes with low interaction strength or low novelty are moderately suppressed to reduce noise interference. Novelty is used to characterize the degree of change in target interaction strength at different times. Novelty will be described later.
[0063] In this embodiment, the predicted movement trajectory of the first object is obtained using the following formula:
[0064] in, It is the predicted trajectory of the first object from time t+1 to time t+T. The fused features from the graph neural network encoder are used to predict the movement trajectory. This includes the vehicle's position, speed, and direction of motion from time t+1 to time t+T. The value of T can be set as needed. By setting T, the sequence length of the future predicted trajectory sequence can be set, such as predicting the trajectory for the next 3 seconds or 50 frames.
[0065] In this embodiment, after obtaining the predicted trajectory, the predicted trajectory is further corrected by combining real-time traffic rule constraints to ensure that the predicted vehicle trajectory conforms to the actual road driving logic. For example, the vehicle position and direction of movement in the predicted trajectory can be mapped to the driving lane, and it can be determined whether the predicted vehicle trajectory exceeds the driving lane range. The vehicle speed in the predicted trajectory is compared with the speed limit of the driving lane to determine whether the vehicle speed in the predicted trajectory exceeds the speed limit of the driving lane. When the vehicle does not exceed the driving lane range and does not exceed the speed limit of the driving lane, the predicted vehicle trajectory conforms to the actual road driving logic.
[0066] In this embodiment, the number of nodes and the length of the time window in the graph neural network during the calculation process can be limited to dynamically control the computational complexity, reduce the computational overhead of the graph neural network on large-scale road networks, and thus achieve long-term real-time trajectory prediction.
[0067] In this embodiment, based on the real-time acquisition of node gating coefficients corresponding to the graph neural network using the real-time first movement trajectory of the first object and the real-time second movement trajectory of the second object, the matrix weights of the decoder are adaptively updated using the node gating coefficients. This allows the decoder to couple the dynamic changes of each object in the real-time traffic scene, ensuring the accuracy of movement trajectory prediction. Furthermore, traffic rules constrain the predicted movement trajectory output by the decoder, further ensuring the accuracy of movement trajectory prediction.
[0068] This application provides another method for predicting movement trajectories, which proposes an online update strategy for graph neural network optimization. Specifically, in one possible implementation, to ensure the graph continuously and stably adapts to the input movement information, this application provides an online update strategy for the graph neural network, thereby optimizing model parameters through the online update strategy, such as... Figure 2 As shown, the method includes steps 201-204.
[0069] Step 201: Obtain the historical interaction intensity at multiple historical moments.
[0070] Historical time tn refers to the time between time t. Historical interaction strength is the target interaction strength between the first vehicle at historical time tn and the second vehicle, n=1,2,...t-1, where the second vehicle around the first vehicle at historical time tn can be the same as or different from the second vehicle around time t.
[0071] Step 202: Determine the average interaction intensity and the change in interaction intensity based on the target interaction intensity and historical interaction intensity.
[0072] The mean interaction intensity reflects the average target interaction intensity within a certain time window, while the change in interaction intensity reflects the difference in target interaction intensity at different times within the same time window. Those skilled in the art can set the size of the time window for calculating the mean interaction intensity and the size of the time window for calculating the change in interaction intensity as needed. For example, based on the target interaction intensity corresponding to the time window [t-5, t], the mean target interaction intensity is determined; based on the target interaction intensity corresponding to the time window [t-1, t], the change in interaction intensity is determined. For instance, the change in interaction intensity corresponding to the time window [t-1, t] is... .
[0073] Step 203: Determine the novelty based on the mean interaction intensity and the change in interaction intensity.
[0074] Novelty characterizes the degree of deviation between the target interaction strength and the historical interaction strength; that is, novelty reflects the substantial change in interaction strength within a short period of time. Novelty is determined by the following formula:
[0075] in, Let be the novelty at time t. Let j be the set of the second vehicles j corresponding to the target interaction intensity. for The number of the second vehicle in the middle, The change in interaction intensity To prevent the denominator from being zero for small positive numbers, The mean of the interaction intensity is used for normalization to avoid scale drift. It can be and The mean.
[0076] Step 204: Update the weight matrix of the encoder in the graph neural network based on novelty.
[0077] Novelty is used in each training step, employing node-based gating. The online gradient descent algorithm is used for the encoder's first... The basic weight matrix of the layer The learning rate of the online gradient descent algorithm is determined by novelty. The online gradient descent algorithm updates the encoder's learning rate based on novelty. The basic weight matrix of the layer The update rules are as follows:
[0078] in, This serves as the base learning rate for the online gradient descent algorithm. Scaling effects used to control novelty For the mini-batch nodes in the Z-th convolutional layer at time t The mean novelty of the nodes in the mini-batch. For any number of nodes in the Z-th convolutional layer, such as 20 to 50 target nodes, calculate... , For equivalent learning rate, For the nodal gradient, The node gating coefficient is used as a multiplier for the gradient in the update rule. This makes nodes with high interaction intensity contribute more to the weight update, amplifies the gradient of nodes with high interaction intensity, focuses on updating the weight during training, suppresses the contribution of nodes with low interaction intensity to the weight update, and reduces the gradient of nodes with low interaction intensity to avoid noise misleading parameter updates.
[0079] The design of the online gradient descent algorithm can amplify the convergence of the learning step size when the distribution of the movement features of object nodes is stable. That is, when the distribution is stable, the mean novelty approaches 0, the denominator of the equivalent learning rate approaches 1, and the equivalent learning rate is approximately... Sufficient learning step size accelerates convergence. When the distribution of movement features of object nodes undergoes abrupt changes, reducing the learning step size prevents divergence. Specifically, in the event of sudden changes in the scenario, the mean novelty increases, the equivalent learning rate decreases, and thus the learning step size is reduced. This constrains the magnitude of node gradient updates, preventing node gradient explosion and training divergence. This update rule maintains differentiability and supports end-to-end joint training of the trajectory prediction model.
[0080] In this embodiment, the node gating coefficient and novelty are generated based on the real-time movement trajectory. Therefore, by introducing the node gating coefficient and novelty into the update rule, the response speed of the graph neural network to sudden scenarios can be improved.
[0081] In this embodiment, by continuously receiving real-time first movement trajectory and each second movement trajectory, and dynamically updating the weight matrix of the graph neural network based on the first movement trajectory and each second movement trajectory, the graph neural network can adapt to real-time changes in the traffic environment, thereby updating the weight matrix value of the graph neural network encoder online. This embodiment uses an online update strategy to ensure the real-time performance of the weight matrix value of the graph neural network encoder.
[0082] This application provides yet another method for predicting movement trajectories. This method can be applied to vehicles or other computing devices (such as cloud servers or road testing equipment), such as... Figure 3 As shown, the method includes steps 301-305: Step 301: Obtain multiple sets of movement trajectory samples.
[0083] Each set of motion trajectory samples includes: the third motion trajectory of the third object and the fourth motion trajectories of multiple fourth objects. The motion trajectory of an object in the motion trajectory sample indicates the object's position, velocity, and direction of movement.
[0084] In one possible implementation, the time interval between time t1 and the current time t for each set of motion trajectory samples is less than a time interval threshold. The third object may be the same object as the first object or a different object. The fourth object may be the same object as the second object or a different object, t1=1, 2, ...
[0085] Step 302: For each group of movement trajectory samples, determine the sample interaction intensity of the movement trajectory samples based on the third and fourth movement trajectory samples.
[0086] The sample interaction strength is used to characterize the influence between the third object and each of the fourth objects. The time of each group of movement trajectory samples can be the same or different.
[0087] In one possible implementation, for each group of movement trajectory samples, the sample interaction strength of the movement trajectory samples is determined based on the third and fourth movement trajectory samples, including the following steps 3021 and 3022.
[0088] Step 3021: For each group of movement trajectory samples, based on the third and fourth movement trajectory samples in the movement trajectory sample, determine the spatial correlation and temporal correlation between the third object and each fourth object in the movement trajectory sample.
[0089] Step 3022: The spatial correlation and temporal correlation between the third object and each of the fourth objects in the motion trajectory sample are fused to obtain the sample interaction strength of the motion trajectory sample.
[0090] In this embodiment of the application, the spatial correlation and temporal correlation between the third object and each of the fourth objects in the motion trajectory sample are fused to fully explore the degree of influence between the third object and each of the fourth objects.
[0091] In one possible implementation, taking time t1 as the moment of the movement trajectory sample as an example, the sample interaction intensity is determined by the following formula:
[0092] in, The sample interaction intensity between the third and fourth objects at time t1. Let t1 be the temporal correlation between the third object and each of the fourth objects. Let t1 be the spatial correlation between the third object and each of the fourth objects.
[0093] in, =
[0094] Let t1 be the relative position between the third and fourth objects. The relative velocities between the third and fourth objects at time t1. Let t1 be the relative direction between the third and fourth objects.
[0095] In some possible implementations, the temporal correlation between the third and fourth objects at time t1 Calculated using the following formula:
[0096] The time window length L used for evaluation can be preset, and the weights... It is a coefficient that decays exponentially over time, parameter Control weight The decay rate, It is the velocity of the third object at time t1-s. It is the velocity of the fourth object at time t1-s.
[0097] Step 303: Determine the retention value for each group of movement trajectory samples based on the maximum value of the sample interaction intensity.
[0098] In this embodiment, after obtaining the sample interaction intensity between the third object and each fourth object in each group of motion trajectory samples, the maximum value of the sample interaction intensity among the sample interaction intensities between the third object and each fourth object in each group of motion trajectory samples is determined. Based on the maximum value of the sample interaction intensity of that group of motion trajectory samples, a retention value is determined. The retention value is used to determine whether to use the motion trajectory samples as training samples for training the graph neural network. The retention value is determined using the following formula:
[0099] in, It is the set of fourth objects in the movement trajectory samples that are around the third object and whose sample interaction strength satisfies the sorting rule. The parameter represents the time interval between time t1 and the current time t of the movement trajectory sample. Used to control the time decay rate. The sorting rule refers to the K items in the sorting result after sorting the interaction strength of each sample from largest to smallest.
[0100] Step 304: Obtain the target movement trajectory sample from multiple sets of movement trajectory samples based on the retained values.
[0101] In this embodiment of the application, For example, a higher retention value is compared with a retention threshold. If the retention value is greater than the retention threshold, the retention value is used as a training sample for training the graph neural network. If the retention value is less than or equal to the retention threshold, the retention value is discarded.
[0102] In one possible implementation, if the retention value is greater than the retention threshold, the movement trajectory sample corresponding to the retention value is stored in a buffer. The larger the retention value of the movement trajectory sample, the longer the movement trajectory sample is stored in the buffer.
[0103] In this embodiment, the total capacity of the buffer can be limited to ensure an upper bound on memory, preventing an excessive number of movement trajectory samples in the buffer from causing insufficient memory space. In this embodiment, when the total number of movement trajectory samples in the buffer exceeds the total capacity of the buffer, movement trajectory samples with low retention values in the buffer can be gradually eliminated based on the retention values of each movement trajectory sample already stored in the buffer.
[0104] Step 305: Train the graph neural network using the target movement trajectory samples to obtain the trained graph neural network.
[0105] During training, a smoothing regularization term is introduced to encourage consistency in the gating coefficients of adjacent nodes. Batch updates based on time windows are used to limit computational overhead and ensure the stability of the graph neural network's numerical training. This avoids numerical anomalies in the features of nodes at different layers of the graph neural network, which could lead to gradient explosion, gradient vanishing, or severe oscillations in the loss function during training, thus ensuring smooth iterative convergence of the model parameters. The specific process of training the graph neural network can be found in prior art and will not be elaborated upon here.
[0106] In this embodiment of the application, the time interval between the time t1 of the moving trajectory sample and the time t of the first moving trajectory is determined. And introduce time intervals when selecting movement trajectory samples. This allows the influence of outdated mobile trajectory samples on the mobile trajectory sample selection process to automatically decrease. At the same time, by obtaining the sample interaction intensity corresponding to the mobile trajectory samples at historical moments, and based on the maximum value of the sample interaction intensity, a fourth vehicle with significant sample interaction intensity around the third vehicle is captured. This enables the subsequent selection of target mobile trajectory samples to prioritize target mobile trajectory samples with high sample interaction intensity, filtering out a large number of low-impact target mobile trajectory samples. As a result, after training the graph neural network based on the target mobile trajectory sample object, the graph neural network focuses on perceiving traffic conflicts, while reducing the computational burden of massive neighborhood information.
[0107] See Figure 4 This application provides a motion trajectory prediction device, which includes: The first acquisition module 401 is used to acquire the first movement trajectory of the first object and the second movement trajectory of the surrounding second objects; The determination module 402 is used to determine the first movement characteristics of the first object, the second movement characteristics of each second object, and the influence coefficient based on the first movement trajectory and each second movement trajectory. The influence coefficient is used to characterize the influence between the first object and each second object. The second acquisition module 403 is used to acquire the node gating coefficients corresponding to the graph neural network based on the second movement feature and the influence coefficient; The prediction module 404 is used to perform feature calculation based on the first movement feature and node gating coefficient using a graph neural network to obtain the predicted movement trajectory of the first object after time t.
[0108] In one possible implementation, the determining module 402 is configured to: Based on the first movement trajectory and each of the second movement trajectories, determine the interaction intensity between the first object and each of the second objects; The influence coefficient is obtained based on the target interaction intensity in the interaction intensity.
[0109] In one possible implementation, the determining module 402 includes: The first determination submodule is used to determine the spatial correlation and temporal correlation between the first object and each of the second objects based on the first movement trajectory and each of the second movement trajectories; The second determining submodule is used to fuse spatial correlation and temporal correlation to obtain the interaction strength.
[0110] In one possible implementation, the first determining submodule is specifically used to determine at least two of the relative position, relative speed and relative direction of motion between the first object and each of the second objects, based on the first moving trajectory and each of the second moving trajectories. The spatial correlation is obtained by fusing at least two of the relative position, relative velocity, and relative direction of motion.
[0111] In one possible implementation, the device further includes: an update module. The update module is used to obtain the historical interaction intensity at multiple historical moments; determine the mean interaction intensity and the change in interaction intensity based on the target interaction intensity and the historical interaction intensity; determine the novelty based on the mean interaction intensity and the change in interaction intensity, and the novelty is used to characterize the degree of deviation between the target interaction intensity and the historical interaction intensity; and update the weight matrix of the encoder in the graph neural network based on the novelty.
[0112] In one possible implementation, the determining module 402 is used for: Sort the interaction intensities from largest to smallest, and select the top K items from the sorting results as the target interaction intensities; The target interaction intensity is normalized, and an influence coefficient is constructed based on the normalized target interaction intensity.
[0113] In one possible implementation, the motion trajectory prediction device further includes: a training module; The training module is used to acquire multiple sets of movement trajectory samples. Each set of movement trajectory samples includes: a third movement trajectory of a third object and multiple fourth movement trajectories of fourth objects. For each set of movement trajectory samples, based on the third and fourth movement trajectory samples, the sample interaction strength is determined. The sample interaction strength is used to characterize the influence between the third object and each of the fourth objects. The retention value of each set of movement trajectory samples is determined according to the maximum value of the sample interaction strength. Based on the retention value, the target movement trajectory sample is obtained from the multiple sets of movement trajectory samples. The graph neural network is trained using the target movement trajectory sample to obtain the trained graph neural network.
[0114] This device obtains the node gating coefficients of the graph neural network in real time through the first movement trajectory of the first object and the second movement trajectory of the second object. Since the first movement trajectory of the first object and the second movement trajectory of the second object represent the dynamic changes of each object in the traffic scene, the node gating coefficients of the graph neural network can couple the dynamic changes of each object in the real-time traffic scene. This allows the graph neural network to capture the dynamic interaction between each object in the traffic scene when predicting the future movement trajectory of the first object, thereby improving the accuracy of movement trajectory prediction.
[0115] It should be noted that the apparatus provided in the above embodiments is only illustrated by the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the apparatus and method embodiments provided in the above embodiments belong to the same concept, and their specific implementation process can be found in the method embodiments, which will not be repeated here.
[0116] In an exemplary embodiment, a vehicle is also provided, which is used to perform any of the above-described motion trajectory prediction methods.
[0117] In an exemplary embodiment, a computer-readable storage medium is also provided, which stores at least one computer program that is loaded and executed by a processor of a computer device to enable the computer to implement any of the above-described motion trajectory prediction methods.
[0118] In one possible implementation, the aforementioned computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CD-ROM), magnetic tape, floppy disk, and optical data storage device, etc.
[0119] In an exemplary embodiment, a computer program product or computer program is also provided, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform any of the above-described motion trajectory prediction methods.
[0120] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, data stored, data displayed, etc.) and signals involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0121] It should be understood that "multiple" as used in this article refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.
[0122] It should be noted that the terms "first," "second," etc. (if applicable) in the specification and claims of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0123] The above description is merely an exemplary embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the principles of this application should be included within the protection scope of this application.
Claims
1. A method for predicting movement trajectories, characterized in that, The method includes: Obtain the first movement trajectory of the first object and the second movement trajectory of the surrounding second objects; Based on the first movement trajectory and each of the second movement trajectories, a first movement feature of the first object, a second movement feature of each of the second objects, and an influence coefficient are determined. The influence coefficient is used to characterize the influence between the first object and each of the second objects. Based on the second movement feature and the influence coefficient, obtain the node gating coefficients corresponding to the graph neural network; Using the graph neural network, feature calculation is performed based on the first movement feature and the node gating coefficient to obtain the predicted movement trajectory of the first object.
2. The method according to claim 1, characterized in that, The influence coefficient is determined through the following steps: Based on the first movement trajectory and each of the second movement trajectories, the interaction intensity between the first object and each of the second objects is determined. The influence coefficient is obtained based on the target interaction intensity in the interaction intensity.
3. The method according to claim 2, characterized in that, The step of determining the interaction strength between the first object and each of the second objects based on the first movement trajectory and each of the second movement trajectories includes: Based on the first movement trajectory and each of the second movement trajectories, determine the spatial correlation and temporal correlation between the first object and each of the second objects; The spatial correlation and the temporal correlation are fused to obtain the interaction strength.
4. The method according to claim 3, characterized in that, The spatial correlation is determined through the following steps: Based on the first movement trajectory and each of the second movement trajectories, at least two of the following are determined: the relative position, relative velocity, and relative direction of motion between the first object and each of the second objects. The spatial correlation is obtained by fusing at least two of the relative position, relative velocity, and relative motion direction.
5. The method according to claim 3, characterized in that, The method further includes: Obtain the historical interaction intensity at multiple historical moments; Based on the target interaction intensity and the historical interaction intensity, determine the average interaction intensity and the amount of change in interaction intensity; Novelty is determined based on the mean interaction intensity and the change in interaction intensity, wherein the novelty is used to characterize the degree of deviation between the target interaction intensity and the historical interaction intensity; Based on the novelty, the weight matrix of the encoder in the graph neural network is updated.
6. The method according to claim 2, characterized in that, The step of obtaining the influence coefficient based on the target interaction intensity in the interaction intensity includes: The interaction intensities are sorted from largest to smallest, and the top K items from the sorting results are selected as the target interaction intensities. The target interaction intensity is normalized, and the influence coefficient is constructed based on the normalized target interaction intensity.
7. The method according to claim 1, characterized in that, The method further includes: Multiple sets of movement trajectory samples are obtained, wherein each set of movement trajectory samples includes: a third movement trajectory of a third object and a plurality of fourth movement trajectories of a fourth object; For each group of movement trajectory samples, the sample interaction intensity of the movement trajectory samples is determined based on the third movement trajectory sample and the fourth movement trajectory sample. The sample interaction intensity is used to characterize the influence between the third object and each of the fourth objects. Based on the maximum value of the sample interaction intensity, determine the retention value for each group of movement trajectory samples; Based on the retained values, a target movement trajectory sample is obtained from multiple sets of movement trajectory samples; The graph neural network is trained using the target movement trajectory samples to obtain the trained graph neural network.
8. A motion trajectory prediction device, characterized in that, The device includes: The first acquisition module is used to acquire the first movement trajectory of the first object at time t and the second movement trajectory of the surrounding second objects; The determination module is used to determine, based on the first movement trajectory and each of the second movement trajectories, a first movement feature of the first object, a second movement feature of each of the second objects, and an influence coefficient, wherein the influence coefficient is used to characterize the influence between the first object and each of the second objects; The second acquisition module is used to acquire the node gating coefficients corresponding to the graph neural network based on the second movement feature and the influence coefficient. The prediction module is used to perform feature calculations based on the first movement feature and the node gating coefficient using the graph neural network to obtain the predicted movement trajectory of the first object.
9. A vehicle, characterized in that, The vehicle is used to perform the method as described in any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, which is loaded and executed by a processor to implement the method as described in any one of claims 1 to 7.
