Trajectory prediction method, device and storage medium
Patent Information
- Application Number
- CN202611149821.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-31
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2046-07-31
AI Technical Summary
[0005]本发明实施例提供了一种轨迹预测方法、设备及存储介质,以解决目前的预测方法预测不准确的问题
[0018]本发明实施例中,为了能够准确地预测轨迹,预先训练了图引导时空扩散模型,且图引导时空扩散模型中包括注意力引导图卷积模块、时空特征融合模块和双向扩散解码器模块,注意力引导图卷积模块可以根据二维轨迹序列集生成动态交互拓扑,并根据动态交互拓扑生成时空图特征。从而可以量化抢修现场人员交互行为,为后续特征提取提分准确的空间先验限制。时空特征融合模块可以根据时空图特征生成全局时空条件特征,为后续的双向扩散解码器模块提供约束条件。双向扩散解码器模块则可以根据全局时空条件特征进行轨迹预测,从而提高轨迹的预测准确度。
Smart Images

Figure CN122692922B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of deep learning technology, and in particular to a trajectory prediction method, device, and storage medium. Background Technology
[0002] In emergency response scenarios involving sudden power equipment failures, extremely high demands are placed on the safety management and collaborative efficiency of on-site operations. Due to the concentration of personnel at repair sites and the dynamically changing work environment, accurately predicting the movement trajectories of on-site personnel, repair vehicles, and nearby pedestrians is crucial for implementing proactive safety management and conducting dynamic intelligent dispatching.
[0003] Currently, most trajectory prediction methods rely on physical dynamics or shallow machine learning modeling, often assuming that personnel movement follows constant velocity or simple force rules, making it difficult to effectively represent the complex group interactions and long-term temporal dependencies at emergency repair sites. With the continuous development of deep neural networks in trajectory prediction, prediction methods based on graph convolutional networks and Transformers have been widely applied. Graph convolutional network-based prediction methods can enhance the extraction of spatial interaction features, while Transformer-based prediction methods can improve the ability to capture global temporal features.
[0004] However, current trajectory prediction methods suffer from prediction biases in confined physical spaces such as substations, leading to inaccurate final trajectory predictions. Summary of the Invention
[0005] This invention provides a trajectory prediction method, device, and storage medium to solve the problem of inaccurate prediction in current prediction methods.
[0006] In a first aspect, embodiments of the present invention provide a trajectory prediction method, comprising: Obtain a set of two-dimensional trajectory sequences of all moving targets at the power supply site to be repaired within a set time period; wherein, the set of two-dimensional trajectory sequences includes the movement trajectory sequence of each moving target; The two-dimensional trajectory sequence set is input into a pre-trained graph-guided spatiotemporal diffusion model to obtain the optimal predicted trajectory; The graph-guided spatiotemporal diffusion model includes an attention-guided graph convolution module, a spatiotemporal feature fusion module, and a bidirectional diffusion decoder module. The attention-guided graph convolution module is used to generate a dynamic interactive topology based on the two-dimensional trajectory sequence set, and to generate spatiotemporal graph features based on the dynamic interactive topology. The spatiotemporal feature fusion module is used to generate global spatiotemporal condition features based on the spatiotemporal graph features. The bidirectional diffusion decoder module is used to perform trajectory prediction based on the global spatiotemporal condition features.
[0007] In one possible implementation, the trajectory prediction method further includes: Based on the optimal predicted trajectory and the work extension and physical contour of the rescue device at the power site to be repaired, a safety envelope is generated; wherein, the rescue device includes a vehicle; Based on the safety envelope and a high-precision map of the power site to be repaired, it is determined whether there is a risk of collision; wherein, the high-precision map includes the location of live equipment, the location of high-voltage danger zones, and the location of potholes; If a collision risk is identified, an early warning will be issued.
[0008] In one possible implementation, generating a safety envelope based on the optimal predicted trajectory and the physical contours of the work extension and rescue equipment at the power site to be repaired includes: Using the coordinates of each time step on the optimal predicted trajectory as the center, a safety envelope for future time periods is generated based on the operational expansion of the power site to be repaired and the physical contour of the rescue device.
[0009] In one possible implementation, the attention-guided graph convolution module is used to construct the dynamic interaction topology based on the Euclidean distance between all adjacent moving targets and a preset safety perception threshold; the attention-guided graph convolution module is also used to generate the spatiotemporal graph features based on the attention weights between all adjacent moving targets and the dynamic interaction topology.
[0010] In one possible implementation, the dynamic interaction topology includes adjacency matrix elements between all the moving targets and all adjacent moving targets, wherein the adjacency matrix elements between adjacent moving targets are determined based on the Euclidean distance between the adjacent moving targets and a preset security perception threshold.
[0011] In one possible implementation, the attention weights between adjacent moving targets are determined as follows: The Euclidean distance between adjacent moving targets is converted into attention weights between adjacent moving targets based on the Gaussian radial kernel function.
[0012] In one possible implementation, the bidirectional diffusion decoder module includes a forward noise-adding network and a backward noise-denoising network. Gaussian noise is added during the iterative training of the bidirectional diffusion decoder module, and the optimal network parameters of the bidirectional diffusion decoder module are determined based on minimizing the noise-denoising loss function. During the training of the bidirectional diffusion decoder module, noisy perturbation features are added to the global spatiotemporal condition features to form noisy global spatiotemporal condition features. Based on the output deviation of the forward noise-adding network under the global spatiotemporal condition features and the noisy global spatiotemporal condition features, a stability regularization loss function is constructed.
[0013] In one possible implementation, the graph-guided spatiotemporal diffusion model further includes a joint loss function, which is the sum of the average displacement error and the endpoint displacement error. The average displacement error is the L2 norm of the difference between the true trajectory sequence of all moving targets and the predicted optimal trajectory sequence. The endpoint displacement error is the sum of the L2 norms of the difference between the true endpoint coordinates of all moving targets at the final prediction time and the endpoint coordinates of the predicted optimal trajectory.
[0014] Secondly, embodiments of the present invention provide a trajectory prediction device, comprising: The acquisition module is used to acquire a set of two-dimensional trajectory sequences of all moving targets at the power repair site during a set time period; wherein, the set of two-dimensional trajectory sequences includes the movement trajectory sequence of each moving target; The prediction module is used to input the two-dimensional trajectory sequence set into a pre-trained graph-guided spatiotemporal diffusion model to obtain the optimal predicted trajectory; The graph-guided spatiotemporal diffusion model includes an attention-guided graph convolution module, a spatiotemporal feature fusion module, and a bidirectional diffusion decoder module. The attention-guided graph convolution module is used to generate a dynamic interactive topology based on the two-dimensional trajectory sequence set, and to generate spatiotemporal graph features based on the dynamic interactive topology. The spatiotemporal feature fusion module is used to generate global spatiotemporal condition features based on the spatiotemporal graph features. The bidirectional diffusion decoder module is used to perform trajectory prediction based on the global spatiotemporal condition features.
[0015] Thirdly, embodiments of the present invention provide an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the method described in the first aspect or any possible implementation thereof.
[0016] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method described in the first aspect or any possible implementation thereof.
[0017] Fifthly, embodiments of the present invention provide a computer program product, including a computer program that, when executed by a processor, implements the method described in the first aspect or any possible implementation thereof.
[0018] In this embodiment of the invention, to accurately predict trajectories, a graph-guided spatiotemporal diffusion model is pre-trained. This model includes an attention-guided graph convolution module, a spatiotemporal feature fusion module, and a bidirectional diffusion decoder module. The attention-guided graph convolution module generates a dynamic interaction topology based on a two-dimensional trajectory sequence set and generates spatiotemporal graph features based on this topology. This quantifies the interactive behavior of personnel at the repair site, providing spatial prior constraints for subsequent feature extraction to improve accuracy. The spatiotemporal feature fusion module generates global spatiotemporal conditional features based on the spatiotemporal graph features, providing constraints for the subsequent bidirectional diffusion decoder module. The bidirectional diffusion decoder module then performs trajectory prediction based on these global spatiotemporal conditional features, thereby improving the accuracy of trajectory prediction. Attached Figure Description
[0019] Figure 1 This is a flowchart illustrating the implementation of the trajectory prediction method provided in this embodiment of the invention. Figure 2 This is a line graph comparing the average displacement error (ADE) of each algorithm provided in the embodiments of the present invention; Figure 3 This is a line graph comparing the final displacement error (FDE) of each algorithm provided in the embodiments of the present invention; Figure 4 This is a schematic diagram of the trajectory prediction device provided in an embodiment of the present invention; Figure 5 This is a schematic diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0020] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings.
[0021] As introduced in the background section, current deep learning methods mostly construct deterministic regression models, resulting in single and averaging trajectories that fail to accurately represent the multimodal motion characteristics of repair personnel facing sudden obstacles or dynamic avoidance. While some models incorporate diffusion models to alleviate the trajectory simplification issue and improve the quality of multimodal sequence generation, their ability to deeply fuse spatiotemporal features and jointly model complex group interactions is insufficient, leading to prediction biases in confined spaces such as substations. Furthermore, repair sites are often accompanied by severe weather conditions or strong electromagnetic interference, making measurement data highly susceptible to noise contamination.
[0022] To address the problems of existing deterministic models having a single output, insufficient modeling of group interactions in confined spaces, and poor robustness under complex electromagnetic interference at emergency repair sites, this invention provides a trajectory prediction method, device, equipment, and storage medium.
[0023] See Figure 1The flowchart illustrating the trajectory prediction method provided in this embodiment of the invention is shown below: S110. Obtain the two-dimensional trajectory sequence set of all moving targets at the power repair site during a set time period.
[0024] The two-dimensional trajectory sequence set includes the movement trajectory sequences of each moving target.
[0025] At power repair sites, there are multiple moving targets, such as repair personnel and supporting vehicles. All moving targets are equipped with BeiDou high-precision positioning terminals, enabling real-time acquisition of the two-dimensional physical coordinates and spatiotemporal position status of all moving targets on site.
[0026] For example, at an emergency repair site, suppose there is... N A dynamically moving target. Discretize the total observation period into... There are 1 time step, and the duration of each time step is 1 / 2. At that moment , No. The two-dimensional physical coordinates of a target are defined as follows: Therefore, during the observation period within, no. The sequence of movement trajectories of the targets is represented as follows: All on site The set of two-dimensional trajectory sequences of targets is represented as follows: .
[0027] S120. Input the two-dimensional trajectory sequence set into the pre-trained graph-guided spatiotemporal diffusion model to obtain the optimal predicted trajectory.
[0028] In some embodiments, the graph-guided spatiotemporal diffusion model includes an attention-guided graph convolution module, a spatiotemporal feature fusion module, and a bidirectional diffusion decoder module.
[0029] Among them, the attention-guided graph convolution module is used to generate dynamic interactive topology based on the two-dimensional trajectory sequence set, and generate spatiotemporal graph features based on the dynamic interactive topology; the spatiotemporal feature fusion module is used to generate global spatiotemporal condition features based on spatiotemporal graph features; and the bidirectional diffusion decoder module is used to perform trajectory prediction based on global spatiotemporal condition features.
[0030] In some embodiments, the attention-guided graph convolution module is used to construct a dynamic interaction topology based on the Euclidean distance between all adjacent moving targets and a preset safety-aware threshold. The attention-guided graph convolution module can also generate spatiotemporal graph features based on the attention weights between all adjacent moving targets and the dynamic interaction topology.
[0031] In this embodiment, the dynamic interaction topology includes adjacency matrix elements between all moving targets and all adjacent moving targets. The adjacency matrix elements between adjacent moving targets are determined based on the Euclidean distance between adjacent moving targets and a preset security perception threshold.
[0032] Specifically, during emergency repairs, the movement of mobile targets is restricted by collaborative operations and safety avoidance. Therefore, in order to quantify this spatial physical constraint, the physical topology of all mobile targets on site can be converted into a dynamic interactive topology.
[0033] For example, at time , No. The first goal and the first The Euclidean distance between moving targets is expressed as: ,in, and These represent the position vectors of the corresponding moving target in the two-dimensional physical coordinate system at time t.
[0034] Assuming the safety perception threshold at the emergency repair site is set based on physical procedures, then... (This threshold can be dynamically configured according to the hazard level of the specific substation area.) When the Euclidean distance between moving targets is less than this threshold, interaction and avoidance requirements arise. Therefore, the adjacency matrix elements in the time-varying graph structure are constructed. Represented as: ; Therefore, the dynamic interactive topology can be constructed as follows: Among them, vertex set Indicating the scene One goal. E t It includes all the adjacency matrix elements. .
[0035] This results in a dynamic interactive topology network that includes restrictions on repair personnel and vehicles. This dynamic interactive topology not only reflects static spatial distances but also implicitly includes the cooperative and exclusionary relationships in the repair operation.
[0036] In some embodiments, the method for determining the attention weights between adjacent moving targets is to convert the Euclidean distance between adjacent moving targets into attention weights between adjacent moving targets based on the Gaussian radial kernel function.
[0037] In this embodiment, the attention weights between adjacent moving targets can be dynamically calculated using a Gaussian radial basis function (RBF) combined with the Euclidean distance between the moving targets. At time step t, the two-dimensional spatial Euclidean distance between moving target i and moving target j is first calculated. Then, the obtained Euclidean distance is substituted into the Gaussian kernel function formula to convert it into initial weights, ensuring that moving targets that are spatially closer have higher weights for mutual avoidance. To conform to real physical laws, a perceptual safety threshold is introduced, and the weights of weak associations below this threshold are directly set to zero, thereby dynamically locking in the effective interactive neighbor set N(i) of moving target i. Finally, these retained weights are normalized and smoothed using the Laplace matrix to obtain the attention weights between all adjacent moving targets. .
[0038] Obtain the attention weights among all adjacent moving targets. and dynamic interactive topology , E t The adjacency matrix elements include all adjacent moving targets. Then, the attention-guided graph convolutional module can construct the aggregated spatiotemporal graph features. , , in, Represents a non-linear activation function. Indicates the moving target The set of neighboring nodes, The learnable feature transformation weight matrix is built into the attention-guided graph convolution module. The attention weights between adjacent moving targets, These are the adjacency matrix elements between adjacent moving targets. Let t be the position vector of the moving target in the two-dimensional physical coordinate system at time t.
[0039] For example, the attention-guided graph convolutional module can be a GCN network.
[0040] By addressing the complex dynamic avoidance and collaborative interactions of personnel at power emergency repair sites, this method breaks through the limitations of traditional constraints based on static graphs or fixed physical distances. It proposes first constructing a dynamic interaction topology based on the Euclidean distance between targets and a set safety perception threshold. Then, by introducing an attention mechanism, it adaptively evaluates and assigns attention weights between adjacent moving targets. This method can dynamically quantify the impact intensity of personnel interactions at the repair site, providing accurate spatial prior constraints for subsequent high-dimensional feature extraction.
[0041] In some embodiments, the spatiotemporal feature fusion module is used to generate global spatiotemporal conditional features based on spatiotemporal graph features. The spatiotemporal feature fusion module can be a spatiotemporal Transformer module, which includes a sinusoidal position coding unit and a multi-head attention mechanism network unit.
[0042] In this embodiment, to enable the model to have a global perspective in the time dimension, the above-mentioned graph features are... With sine position encoding Deep stitching is then performed. Subsequently, it is fed into a Multi-Head Self-Attention (MHSA) network.
[0043] In the specific self-attention calculation process, the concatenated features are mapped to a query matrix. Q ), key matrix (Key, K ) and value matrix (Value, V By scaling the dot product attention formula, long-term dependency characteristics can be extracted: ; in, This represents the dimension of the key vector. After parallel computation via a multi-head mechanism, the complete global spatiotemporal conditional features are extracted. for: ; Captured at this stage It will be directly used in the bidirectional diffusion decoder module for trajectory prediction.
[0044] In some embodiments, the bidirectional diffusion decoder module includes a forward denoising network and a backward denoising network. Gaussian noise is added during the iterative training of the bidirectional diffusion decoder module, and the optimal network parameters of the bidirectional diffusion decoder module are determined based on minimizing the denoising loss function. During the training of the bidirectional diffusion decoder module, noisy perturbation features are added to the global spatiotemporal conditional features to form noisy global spatiotemporal conditional features. Stability regularization loss functions are constructed based on the output deviation of the forward denoising network under the global spatiotemporal conditional features and the noisy global spatiotemporal conditional features, respectively.
[0045] In this embodiment, the bidirectional diffusion decoder module is based on a diffusion mechanism. By alternately performing forward noise addition and reverse noise reduction, the graph-guided spatiotemporal diffusion model can gradually approximate the conditional probability distribution of the future trajectory of the moving target.
[0046] In the forward noise addition process, to adapt to the noise interference present in the real environment, the diffusion step is randomly sampled in each training iteration based on the Stochastic Gradient Descent (SGD) criterion.k And inject Gaussian noise Define diffusion step The state transition probability at time is: , in, This is the variance scheduling parameter. During the training phase, the algorithm randomly samples the diffusion step. And inject Gaussian noise By minimizing denoising loss To find the optimal parameters of the denoising neural network : ,in, .
[0047] In this embodiment, to improve the robustness of the graph-guided spatiotemporal diffusion model in the harsh communication environment of power repair sites, a noise-resistant training mechanism is introduced. This involves adding noisy perturbation features to the global spatiotemporal condition features. : ; in, To control the perturbation intensity, hyperparameters are defined. Next, the deviation between the noisy features and the clean features used to denoise the network output is calculated, and stability loss regularization is applied. ; This mechanism forces the denoising network to output a consistent denoising gradient even when faced with dirty data input, ensuring that the algorithm can still converge to a stable prediction solution space under non-ideal observation conditions.
[0048] To address the shortcomings of existing deterministic regression models (such as Social-GAN) that output single trajectories and struggle to reconstruct multimodal motion characteristics, this invention concatenates aggregated spatiotemporal graph features with sinusoidal position codes and feeds them into a Multi-Head Self-Attention (MHSA) network to extract global spatiotemporal conditional features. Subsequently, these features are used as prerequisite constraints and deeply coupled into a Markov diffusion process that alternately performs forward denoising and backward denoising. By minimizing the denoising loss, the conditional probability distribution of the target's future trajectory is gradually approximated, thus replacing traditional direct coordinate fitting and achieving multimodal trajectory generation that conforms to the laws of physical motion.
[0049] Furthermore, considering that power repair sites are often accompanied by severe weather or strong electromagnetic interference, the measurement coordinates of sensors such as BeiDou are highly susceptible to noise contamination. This invention artificially constructs noisy perturbation features during the training phase of the diffusion model, introducing a random perturbation term following a Gaussian distribution into the global spatiotemporal condition features. Simultaneously, the deviation between the noisy perturbation features and the clean features is calculated to denoise the network output, and this deviation is used to construct a "stability loss" for regularization. This mechanism forces the model to extract noise-invariant features, enabling the algorithm to converge smoothly even under non-ideal and dirty data observation conditions.
[0050] Furthermore, addressing the issue of endpoint divergence caused by excessive variance in pure diffusion models during trajectory generation—a pain point that is difficult to resolve with endpoint guidance alone—this invention introduces an adjustment factor into the model's joint loss function to dynamically balance the average displacement error (ADE) and endpoint displacement error (FDE). In the inference testing phase, starting from a standard Gaussian distribution, a pre-trained denoising network is used for multi-step iterations to generate multiple (e.g., 20) independent candidate predicted trajectories in parallel. Subsequently, using an endpoint intent guidance screening mechanism (Best-of-20 sampling strategy), the globally optimal trajectory with the smallest displacement deviation from the actual work destination (endpoint) of the repair personnel is accurately locked and output from the multimodal divergent candidate solution set. This innovation cleverly embeds endpoint guidance into the diffusion sampling screening loop, achieving high-precision locking of the final work target point while preserving the model's ability to explore multimodal avoidance intentions.
[0051] In this embodiment, the training process of the graph-guided spatiotemporal diffusion model in this invention is not a simple end-to-end fitting, but rather an iterative optimization algorithm with a step decay strategy. The specific training process is as follows: First, perform parameter initialization, initializing the parameters of the denoising neural network. Set the maximum number of training epochs to 2500 and the initial learning rate to [value missing]. Then select the Adam optimizer. Set the batch size to 32.
[0052] Then, data loading and noise addition are performed, and a batch of real trajectory data and corresponding historical observation features are extracted from the historical sample library. From uniform distribution Number of random sampling diffusion steps And sample noise from a standard Gaussian distribution. .
[0053] Next, noise-resistant perturbation injection is performed. To execute noise-resistant training, according to the formula... Construct noisy perturbation features.
[0054] Next, forward propagation and loss calculation are performed on the noisy trajectory. Time step and spatiotemporal characteristics Simultaneously fed into the noise reduction network Calculate the base denoising loss separately. and stability loss And calculate the gradient of the total loss function.
[0055] Next, backpropagation and weight updates are performed, using the Adam optimizer to adjust the network parameters based on the calculated loss gradient. Perform backpropagation updates.
[0056] Finally, learning rate decay and early stopping are implemented. A step decay strategy is introduced during training, where the learning rate is decayed by 50% every 400 epochs. Simultaneously, the ADE and FDE errors on the validation set are monitored. If the error no longer decreases after 200 consecutive epochs, early stopping is triggered to preserve the current optimal model weights. He / She withdrew from training.
[0057] In some embodiments, since emergency repair operations have extremely high requirements for collision avoidance decision-making, a joint loss function is added to the solution link. The joint loss function is the sum of the average displacement error and the endpoint displacement error. The average displacement error is the L2 norm of the difference between the true trajectory sequence of all moving targets and the predicted optimal trajectory sequence. The endpoint displacement error is the sum of the L2 norms of the difference between the true endpoint coordinates of all moving targets at the final prediction time and the endpoint coordinates of the predicted optimal trajectory.
[0058] In this embodiment, a dynamic adjustment factor is also introduced into the joint loss function to dynamically balance the average displacement error and the endpoint displacement error. The joint loss function L... total for: ; Where N is the total number of all moving targets. and These are the actual trajectory sequence and the optimal predicted trajectory sequence for the i-th target, respectively. To predict the final moment of a future time window, and These represent the true endpoint coordinates of the moving target at the final predicted time and the endpoint coordinates of the optimal predicted trajectory, respectively. It is a dynamic adjustment factor used to flexibly balance the proportion of average displacement error and endpoint displacement error in the total loss during training.
[0059] In this embodiment, in order to satisfy the optimal solution for multimodal characteristics, the model abandons the single deterministic output and instead adopts the Best-of-20 optimal candidate sampling strategy.
[0060] Specifically, it will generate Candidate predicted trajectories These trajectories exhibit a physically consistent fan-shaped divergent distribution in space, encompassing various potential intentions such as "left detour" and "right detour." Finally, the optimal trajectory with the smallest deviation from the actual target is selected based on the terminal intention guidance formula. : , This strategy ensures that the algorithm can lock in the globally optimal solution with a very high probability that is highly consistent with the actual work intentions of the repair personnel in a multimodal distribution.
[0061] In some embodiments, to better apply the predicted trajectory to power emergency repair sites, a safety envelope can be generated based on the optimal predicted trajectory and the operational extent and physical contours of the rescue equipment at the power site to be repaired. Then, based on the safety envelope and a high-precision map of the power site to be repaired, the presence of collision risk is determined. Finally, if a collision risk is determined, an early warning is issued.
[0062] The rescue equipment includes vehicles, and the high-precision map includes the locations of electrical equipment, high-voltage danger zones, and pits.
[0063] For example, the vehicle may include a crane or an insulated boom truck. A high-precision inertial navigation unit (IMU) and an ultra-wideband (UWB) positioning tag are installed in the vehicle. These hardware sensors are responsible for acquiring the two-dimensional or three-dimensional physical coordinates of the target in real time at a fixed sampling frequency.
[0064] In this embodiment, the safety envelope for future time periods can be generated based on the coordinates of each time step on the optimal predicted trajectory as the center, and the operational expansion of the power site to be repaired and the physical contour of the rescue device.
[0065] The generated safety envelope is spatially intersected with a high-precision 3D map of the site. If the safety envelope corresponding to the predicted trajectory overlaps with the envelope of a live hazardous area or other moving target within the next 3 seconds, a collision risk is identified. Once a collision risk is identified, a vibration or voice alarm command is sent to the smart devices of relevant personnel. For emergency repair vehicles with autonomous driving assistance functions, a physical safety circuit breaker can be triggered directly by issuing an emergency braking or forced deceleration command.
[0066] Furthermore, to verify the accuracy of the prediction method provided in this invention, model training and inference are performed based on a deep learning framework. To comprehensively evaluate the model's predictive ability for complex group interactions, this invention uses five publicly available industry benchmark datasets (ETH, HOTEL, ZARA1, ZARA2, UNIV) that include regular motion, local avoidance, and high-density interactions for cross-validation. The graph-guided spatiotemporal diffusion model provided in this invention is compared horizontally with existing traditional deep learning algorithms (Social-GAN, STGAT) and cutting-edge diffusion benchmark models (MID, DiffTraj).
[0067] The system hyperparameters are configured as follows: The number of historical trajectory observation frames is set. Frames, number of frames for future trajectory prediction Frame. The hidden layer feature dimension of the network model is set to 256, and the total number of steps in the diffusion generation process is set to [number missing]. And the Best-of-20 strategy is used for multimodal candidate sampling.
[0068] By introducing the average displacement error (ADE) and the final displacement error (FDE) as core evaluation indicators, such as Figure 2 and Figure 3 As shown, the model provided by this invention maintains the lowest global FDE and ADE levels across all five publicly available industry benchmark datasets. It should be noted that the graph-guided spatiotemporal diffusion model provided by this invention is GB-SDT as shown in the figure.
[0069] Figure 2 The exhibited local fluctuations actually reflect the deep coupling between the diffusion generation mechanism and the topological complexity of the scene space. In the HOTEL scene, which lacks complex interactions, the spatial prior constraints are strong, and the model prediction shows a highly convergent trend, with an ADE as low as 0.14m. Conversely, in regions such as UNIV, which contain high-density nonlinear interactions, in order to explore and cover the potential multimodal avoidance intentions of the target, the diffusion network actively releases the generation variance, resulting in a reasonable upward shift of the intermediate path deviation (ADE) to 0.75m. This phenomenon profoundly reveals the inherent engineering trade-off that the algorithm constructs between broadening the coverage of multimodal intentions and suppressing intermediate transient deviations. Figure 3The model of this invention maintains the lowest global FDE level in all five scenarios, demonstrating significant endpoint trajectory convergence capability. Notably, in confined space scenarios with regular motion, such as HOTEL, the FDE index of GB-SDT drops to 0.08m, further reducing it by approximately 86.2% compared to the current second-best performing diffusion baseline network (DiffTraj). These error distribution characteristics indicate that, thanks to the deep coupling between the bidirectional denoising decoding process and the endpoint intent guidance mechanism, the proposed model can effectively overcome the temporal accumulation defects of errors in the traditional autoregressive generation process, achieving high-precision locking of the final work target point for repair personnel.
[0070] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0071] The following are device embodiments of the present invention. For details not described in detail, please refer to the corresponding method embodiments described above.
[0072] Figure 4 A schematic diagram of the trajectory prediction device provided in an embodiment of the present invention is shown. For ease of explanation, only the parts related to the embodiment of the present invention are shown, and are described in detail below: like Figure 4 As shown, the trajectory prediction device includes: The acquisition module 410 is used to acquire a set of two-dimensional trajectory sequences of all moving targets at the power repair site during a set time period; wherein, the set of two-dimensional trajectory sequences includes the movement trajectory sequence of each moving target; Prediction module 420 is used to input the two-dimensional trajectory sequence set into a pre-trained graph-guided spatiotemporal diffusion model to obtain the optimal predicted trajectory; The graph-guided spatiotemporal diffusion model includes an attention-guided graph convolution module, a spatiotemporal feature fusion module, and a bidirectional diffusion decoder module. The attention-guided graph convolution module is used to generate a dynamic interactive topology based on the two-dimensional trajectory sequence set, and to generate spatiotemporal graph features based on the dynamic interactive topology. The spatiotemporal feature fusion module is used to generate global spatiotemporal condition features based on the spatiotemporal graph features. The bidirectional diffusion decoder module is used to perform trajectory prediction based on the global spatiotemporal condition features.
[0073] Figure 5 This is a schematic diagram of an electronic device provided in an embodiment of the present invention. For example... Figure 5As shown, the electronic device 5 of this embodiment includes a processor 50 and a memory 51. The memory 51 stores a computer program 52. When the processor 50 executes the computer program 52, it implements the steps in the various method embodiments described above. Alternatively, when the processor 50 executes the computer program 52, it implements the functions of each module / unit in the various device embodiments described above.
[0074] For example, computer program 52 may be divided into one or more modules / units, which are stored in memory 51 and executed by processor 50 to complete the present invention. The one or more modules / units may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of computer program 52 in electronic device 5.
[0075] Electronic device 5 may include, but is not limited to, processor 50 and memory 51. Those skilled in the art will understand that... Figure 5 This is merely an example of electronic device 5 and does not constitute a limitation on electronic device 5. It may include more or fewer components than shown, or combine certain components, or different components. For example, electronic device 5 may also include input / output devices, network access devices, buses, etc.
[0076] The processor 50 can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.
[0077] The memory 51 can be an internal storage unit of the electronic device 5, such as a hard disk or RAM. The memory 51 can also be an external storage device of the electronic device 5, such as a plug-in hard disk, Smart Media Card (SMC), Secure Digital (SD) card, or Flash Card. Furthermore, the memory 51 can include both internal and external storage units of the electronic device 5. The memory 51 is used to store the computer program 52 and other programs and data required by the electronic device 5. The memory 51 can also be used to temporarily store data that has been output or will be output.
[0078] For the sake of simplicity and clarity, only the above-described functional modules / units are used as examples. In practical applications, the functions described above can be assigned to different functional modules / units as needed. These modules / units can be implemented in hardware, software, or a combination of both.
[0079] This invention also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the methods described in the above-described method embodiments.
[0080] This invention also provides a computer program product, including a computer program. When the computer program is executed by a processor, it implements the methods described in the above-described method embodiments.
[0081] Computer programs include computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. Computer-readable media can include: any entity or device capable of carrying computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc.
[0082] In the above embodiments, the descriptions of each embodiment have their own emphasis. Parts not detailed or described in a particular embodiment can be referred to in the relevant descriptions of other embodiments. Unless otherwise specified or in conflict with logic, the terminology and / or descriptions between different embodiments are consistent and can be referenced interchangeably. Technical features in different embodiments can be combined to form new embodiments based on their inherent logical relationships.
[0083] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. A trajectory prediction method, characterized in that, include: Obtain a set of two-dimensional trajectory sequences of all moving targets at the power supply site to be repaired within a set time period; wherein, the set of two-dimensional trajectory sequences includes the movement trajectory sequence of each moving target; The two-dimensional trajectory sequence set is input into a pre-trained graph-guided spatiotemporal diffusion model to obtain the optimal predicted trajectory; The graph-guided spatiotemporal diffusion model includes an attention-guided graph convolution module, a spatiotemporal feature fusion module, and a bidirectional diffusion decoder module. The attention-guided graph convolution module generates a dynamic interaction topology based on the two-dimensional trajectory sequence set and generates spatiotemporal graph features based on the dynamic interaction topology. The spatiotemporal feature fusion module generates global spatiotemporal conditional features based on the spatiotemporal graph features. The bidirectional diffusion decoder module performs trajectory prediction based on the global spatiotemporal conditional features. The bidirectional diffusion decoder module includes a forward noise-adding network and a backward noise-denoising network. Gaussian noise is added during the iterative training of the bidirectional diffusion decoder module, and the optimal network parameters of the bidirectional diffusion decoder module are determined based on minimizing the noise loss function. The attention-guided graph convolution module is used to generate dynamic interaction topology based on all adjacent moving targets. The dynamic interaction topology is constructed based on the Euclidean distance between targets and a preset safety awareness threshold. The attention-guided graph convolution module is also used to generate the spatiotemporal graph features based on the attention weights between all adjacent moving targets and the dynamic interaction topology. The dynamic interaction topology includes adjacency matrix elements between all moving targets and all adjacent moving targets, and the adjacency matrix elements between adjacent moving targets are determined based on the Euclidean distance between adjacent moving targets and the preset safety awareness threshold. During the training of the bidirectional diffusion decoder module, noisy perturbation features are added to the global spatiotemporal condition features to form noisy global spatiotemporal condition features, and a stability regularization loss function is constructed based on the output deviation of the forward noisy network under the global spatiotemporal condition features and the noisy global spatiotemporal condition features. The method for determining the attention weights between adjacent moving targets is as follows: The Euclidean distance between adjacent moving targets is converted into attention weights between adjacent moving targets based on the Gaussian radial kernel function.
2. The trajectory prediction method according to claim 1, characterized in that, The trajectory prediction method further includes: Based on the optimal predicted trajectory and the work extension and physical contour of the rescue device at the power site to be repaired, a safety envelope is generated; wherein, the rescue device includes a vehicle; Based on the safety envelope and a high-precision map of the power site to be repaired, it is determined whether there is a risk of collision; wherein, the high-precision map includes the location of live equipment, the location of high-voltage danger zones, and the location of potholes; If a collision risk is identified, an early warning will be issued.
3. The trajectory prediction method according to claim 2, characterized in that, The generation of a safety envelope based on the optimal predicted trajectory and the physical contours of the work extension and rescue equipment at the power site to be repaired includes: Using the coordinates of each time step on the optimal predicted trajectory as the center, a safety envelope for future time periods is generated based on the operational expansion of the power site to be repaired and the physical contour of the rescue device.
4. The trajectory prediction method according to any one of claims 1-3, characterized in that, The graph-guided spatiotemporal diffusion model also includes a joint loss function, which is the sum of the average displacement error and the endpoint displacement error. The average displacement error is the L2 norm of the difference between the true trajectory sequence of all moving targets and the predicted optimal trajectory sequence. The endpoint displacement error is the sum of the L2 norms of the difference between the true endpoint coordinates of all moving targets at the final prediction time and the endpoint coordinates of the predicted optimal trajectory.
5. An electronic device, characterized in that, It includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the method as described in any one of claims 1 to 4.
6. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method as described in any one of claims 1 to 4.
