Intelligent pedestrian trajectory prediction method and system based on improved leapfrog diffusion model

By improving the leap diffusion model, introducing attention mechanism and consistency detection, the problem of insufficient integration of social characteristics and temporal characteristics is solved, and the accuracy and consistency of pedestrian trajectory prediction are improved.

CN120449084AInactive Publication Date: 2025-08-08WUXI UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510521986.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-24
Publication Date
2025-08-08
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing leap-frog diffusion model fails to fully consider the intrinsic relationship between social characteristics and temporal characteristics in pedestrian trajectory prediction, and lacks effective detection of the consistency of the predicted trajectory and the real trajectory, resulting in insufficient prediction accuracy.

Method used

Build an improved leap-diffusion model, introduce a feature extraction module of attention mechanism, combine social features and temporal features to fusion, and improve prediction accuracy through consistency detection and denoising optimization modules.

Benefits of technology

Through social features, time feature extraction is guided by combining consistency detection and denoising optimization, prediction results are generated that are closer to the real trajectory, which improves the accuracy and consistency of pedestrian trajectory prediction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120449084A_ABST
    Figure CN120449084A_ABST
Patent Text Reader

Abstract

The invention provides a pedestrian trajectory intelligent prediction method and system based on an improved leapfrog diffusion model, and relates to the technical field of pedestrian trajectory prediction. The method comprises the following steps: constructing an improved leapfrog diffusion model, inputting preprocessed data into the improved leapfrog diffusion model, extracting social features of pedestrian trajectory data by using a feature extraction module in the model, introducing an attention mechanism, and guiding time feature extraction and fusion by using the social features to obtain fused time features; estimating an average position and a standard deviation of prediction trajectory distribution based on the social features and the fused time features, generating a normalized position matrix, obtaining an initial pedestrian prediction trajectory, and denoising the initial pedestrian prediction trajectory by using an initial denoising module to obtain a pedestrian prediction trajectory; and according to a consistency detection result, whether the initial denoising module is optimized by using the denoising optimization module is judged, so that a predicted trajectory closer to a real trajectory is generated. According to the method, the improved leapfrog diffusion model is utilized on the whole, the final pedestrian prediction trajectory is generated, and the trajectory prediction accuracy is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of pedestrian trajectory prediction, and more specifically, relates to an intelligent pedestrian trajectory prediction method and system based on an improved frog leaping diffusion model. Background Art

[0002] Pedestrian trajectory prediction uses observed historical trajectories and surrounding environment information to predict the future trajectory of a target pedestrian. This technology has important applications, particularly in areas such as autonomous driving and robot navigation, where it can help reduce collision risks.

[0003] Early pedestrian trajectory prediction primarily relied on deterministic methods, such as social force models, RNN-based methods, and frequency analysis. However, due to the uncertainty of pedestrian motion, these traditional methods struggle to meet prediction requirements in complex scenarios in practical applications. To address this issue, techniques based on deep generative models have been utilized for stochastic trajectory prediction, such as generative adversarial networks (GANs) and variational autoencoders (VAEs). GANs generate future trajectory distributions through adversarial training of generators and discriminators; VAEs use variational inference to learn the probability distribution of trajectories. Furthermore, heatmaps have been used to model future trajectory distributions on rasterized images. Although these methods have improved trajectory prediction accuracy to a certain extent, they still suffer from limited ability to model complex distributions when dealing with complex scenarios.

[0004] In recent years, diffusion models have been increasingly applied to time series analysis and trajectory prediction. They add noise to real future trajectories through a forward diffusion process, then recover the trajectories from the noise using a conditional denoising process. Through a series of denoising steps, the latent distribution of the trajectories is learned and refined. While diffusion models excel at learning complex distributions, they suffer from long inference times and limited prediction accuracy in trajectory prediction. The Leapfrog Diffusion model introduces a leapfrog initializer that directly learns an expressive multimodal distribution to initialize the denoised future trajectories, skipping numerous denoising steps and significantly accelerating inference speed. However, the Leapfrog Diffusion model, also known as the leapfrog diffusion model, still has some limitations when predicting pedestrian trajectories in complex real-world scenarios. The Leapfrog Diffusion model fails to fully consider the inherent connection between social and temporal features in pedestrian motion and lacks an effective mechanism for detecting consistency between predicted and true trajectories. This results in significant discrepancies between predicted and actual trajectories, impacting pedestrian trajectory prediction accuracy. Summary of the Invention

[0005] In order to solve the problem of low accuracy of current intelligent pedestrian trajectory prediction methods, the present invention provides an intelligent pedestrian trajectory prediction method based on an improved frog leaping diffusion model to improve the accuracy of pedestrian trajectory prediction.

[0006] In order to achieve the above technical effects, the technical solutions of the present invention are as follows:

[0007] Collect pedestrian trajectory data and preprocess the data;

[0008] Constructing an improved frog leaping diffusion model, wherein the improved frog leaping diffusion model includes a feature extraction module combined with an attention mechanism, an initial denoising module, and a denoising optimization module;

[0009] The preprocessed data is input into the improved frog leap diffusion model. The feature extraction module is used to extract the social features of pedestrian trajectory data. The attention mechanism is introduced to use the social features to guide the extraction and fusion of temporal features to obtain the fused temporal features.

[0010] Based on the social features and the fused temporal features, the mean position and standard deviation of the predicted trajectory distribution are estimated to generate a normalized position matrix and obtain the initial pedestrian predicted trajectory. The initial pedestrian predicted trajectory is denoised using the initial denoising module to obtain the pedestrian predicted trajectory.

[0011] The pedestrian prediction trajectory is checked for consistency. If the consistency check passes, the pedestrian prediction trajectory is used as the final prediction trajectory. If the consistency check fails, the initial denoising module is optimized using the denoising optimization module, and the pedestrian prediction trajectory is denoised again until the consistency check passes to obtain the final pedestrian prediction trajectory.

[0012] Furthermore, in the feature extraction module, a social encoder is used to extract social features from pedestrian trajectory data, and the social features satisfy the expression:

[0013]

[0014] Where, f q (·) represents the query embedding function, f k (·) represents the key embedding function, f v (·) represents the value embedding function, d represents the embedding dimension, X represents the past trajectory of the pedestrian to be predicted, and X N represents the past trajectories of surrounding pedestrians;

[0015] Perform feature selection on the social features, normalize the selected social features, and use a neural network layer to perform linear transformation to obtain a social feature subset; the expression of the social feature subset is:

[0016] G=W·[d norm ,vnorm ] T +b

[0017] Where G represents the social feature subset, [d norm ,v norm ] T Represents the normalized distance and speed feature vectors, W represents the weight matrix, b represents the bias vector, and T represents the matrix transpose operation.

[0018] Furthermore, in the feature extraction module, the process of obtaining the fused time features is as follows:

[0019] According to the time encoder and gate unit, the time feature is extracted and expressed as:

[0020] H=f GRU (f conv1D (X))

[0021] Where H represents the time characteristic, f GRU (·) represents the gated recurrent unit, f conv1D (·) represents a one-dimensional convolutional feature encoder, and X represents the past trajectory of the pedestrian to be predicted;

[0022] The attention mechanism is introduced to calculate the association weights between social features and time features. The expression is:

[0023]

[0024] In the formula, H represents the time feature, G represents the social feature subset, β represents the association weight between social features and time features, and d represents the feature dimension;

[0025] According to the calculated association weight, the social features and time features are weightedly fused to obtain the fused time features, which are expressed as:

[0026]

[0027] in, Represents the fused temporal features.

[0028] Based on the above technical features, by introducing the attention mechanism and using social features to guide the extraction and fusion of temporal features, the improved frog-leaping diffusion model can automatically adjust the importance of social features and temporal features in the fusion process according to the actual situation of pedestrian movement. At the same time, social features provide contextual information for temporal feature extraction, enabling the improved frog-leaping diffusion model module to more accurately capture the characteristics of pedestrian movement, thereby improving the accuracy of pedestrian trajectory prediction.

[0029] Furthermore, the process of obtaining the initial pedestrian prediction trajectory is as follows:

[0030] Based on the social features and the fused temporal features, the average position of the predicted trajectory distribution is estimated, which is expressed as:

[0031]

[0032] Where μ θ represents the average position of the predicted trajectory distribution, f μ (·) represents the operation of estimating the average position of the predicted trajectory distribution, X represents the past trajectory of the pedestrian to be predicted, and X N represents the past trajectories of surrounding pedestrians, f fusion (·) represents a multilayer perceptron, Represents social characteristics, Represents the fused temporal features, T f represents the number of time steps of the predicted future trajectory, f fusion (·) represents a multilayer perceptron;

[0033] Estimate the standard deviation of the predicted trajectory distribution, expressed as:

[0034]

[0035] Where, σ θ represents the standard deviation of the predicted trajectory distribution, f σ (·) represents the operation of estimating the standard deviation of the distribution of predicted trajectories;

[0036] The normalized position matrix is generated using the mean position of the predicted trajectory distribution and the standard deviation of the predicted trajectory distribution. The process is:

[0037] The encoder is used to convert the standard deviation of the predicted trajectory distribution into a high-dimensional embedding of the standard deviation, which is expressed as:

[0038]

[0039] Where, A high-dimensional embedding representing the standard deviation, f encode represents the encoder;

[0040] Based on the high-dimensional embedding of social features, fused time features, and standard deviation, the normalized position matrix is calculated, which is expressed as:

[0041]

[0042] Where, represents the normalized position matrix containing K samples, represents the normalized position matrix of the kth sample, Represents the operation of calculating the normalized position matrix;

[0043] Generate the initial pedestrian prediction trajectory, the expression is:

[0044]

[0045] Where, represents the initial pedestrian prediction trajectory.

[0046] Furthermore, the initial pedestrian prediction trajectory is denoised using the initial denoising module, and the process of obtaining the pedestrian prediction trajectory is as follows:

[0047] First, the context encoder is used to obtain the context conditions of the pedestrian's historical trajectory, which is expressed as:

[0048] C=f context (X,X N )

[0049] Where C represents the context condition, f context (·) represents the context encoder, X represents the pedestrian’s historical trajectory, X N Indicates the trajectory of surrounding pedestrians;

[0050] Next, based on the contextual conditions and the initial pedestrian prediction trajectory, the noise is estimated, which is expressed as:

[0051]

[0052] Where, represents the noise contained in the initial pedestrian prediction trajectory estimated using a multi-layer perceptron, τ represents the current time step, and f ε (·) represents a multilayer perceptron;

[0053] Finally, the estimated noise is used to obtain the pedestrian prediction trajectory, which is expressed as:

[0054]

[0055] Where, represents the pedestrian prediction trajectory after denoising, a τ-1 represents the adjustment factor, represents the cumulative adjustment factor, and z represents the noise term.

[0056] Furthermore, the pedestrian predicted trajectory is checked for consistency by calculating the mean square error between the predicted and actual trajectories. The expression of the mean square error is:

[0057]

[0058] Where MSE stands for mean square error, T f represents the number of time steps of the predicted trajectory, represents the coordinates of the predicted trajectory at time t, Pt represents the coordinates of the true trajectory at time t;

[0059] Set a threshold for the mean square error between the predicted and actual pedestrian trajectories. If the calculated mean square error exceeds the set threshold, the consistency check fails. If the calculated mean square error does not exceed the set threshold, the consistency check passes.

[0060] Furthermore, if the consistency test fails, the initial denoising module is optimized using the denoising optimization module. The process is as follows:

[0061] First, Gaussian noise is gradually added to the true trajectory. The mean square error and the randomly added noise are used to construct a loss function. The loss function is used to evaluate the deviation between the true trajectory and the predicted trajectory. The expression is:

[0062] L(θ)=λ·MSE+(1-λ)·L NE

[0063]

[0064] Among them, θ represents the initial denoising module parameters, λ represents the weight coefficient, L(θ) represents the loss function, and L NE represents the original loss function, ε represents the noise added to the true trajectory, f ε (·) represents the function of estimating noise, f context (·) represents the context encoder, represents the initial pedestrian prediction trajectory, τ represents the current time step;

[0065] Next, the gradient of the loss function with respect to the parameters of the initial denoising module is calculated, and the parameters of the initial denoising module are optimized using the gradient descent algorithm. The parameters include the weight matrix and bias vector of the multilayer perceptron used in the initial denoising module. The expression for parameter optimization is:

[0066]

[0067] Among them, θ new represents the optimized initial denoising module parameters, θ represents the initial denoising module parameters, η1 represents the learning rate, represents the gradient of the loss function with respect to the parameter θ.

[0068] Based on the above technical means, the initial pedestrian prediction trajectory is denoised using the initial denoising module, effectively reducing the noise in the predicted trajectory and improving the accuracy of the predicted trajectory; the initial denoising module is optimized through the denoising optimization module, and the parameters in the initial denoising module are continuously optimized according to the gradient of the loss function to generate a prediction result that is closer to the actual trajectory, further improving the accuracy of the predicted trajectory.

[0069] Furthermore, the pedestrian trajectory intelligent prediction method further includes:

[0070] Adjust the pedestrian prediction trajectory; the process is:

[0071] According to the predicted trajectory of the pedestrian and its surrounding pedestrians, the distance between pedestrians is calculated. The distance calculation expression is:

[0072]

[0073] Where, represents the horizontal coordinate of the predicted trajectory of pedestrian i at time t, represents the ordinate of the predicted trajectory of pedestrian i at time t, represents the horizontal coordinate of the predicted trajectory of pedestrian j at time t, represents the ordinate of the predicted trajectory of pedestrian j at time t, represents the distance between pedestrian i and pedestrian j;

[0074] Set a distance threshold to determine whether the distance between pedestrians exceeds the set distance threshold. If so, it means that no collision will occur and there is no need to adjust the pedestrian's predicted trajectory. Otherwise, adjust the pedestrian's predicted trajectory according to the comprehensive loss function. The process is as follows:

[0075] Considering the severity of collisions between pedestrians and the rationality of the predicted trajectories, a comprehensive benefit function is constructed.

[0076] Calculate the gradient of the comprehensive benefit function with respect to the pedestrian's predicted trajectory. According to the Nash equilibrium strategy of game theory, the gradient ascent method is used to adjust the pedestrian's predicted trajectory. The expression of the adjusted predicted trajectory is:

[0077]

[0078] in, represents the predicted trajectory of pedestrian i after the nth adjustment, η2 represents the learning rate, represents the gradient of the profit function with respect to the predicted trajectory;

[0079] The adjusted pedestrian prediction trajectory is used as a new input and the pedestrian prediction trajectory is repeatedly adjusted until the distance between pedestrians exceeds the set distance threshold, and the adjusted prediction trajectory is output.

[0080] Furthermore, the constructed comprehensive benefit function includes: a collision benefit function and a trajectory rationality function; wherein the expression of the collision benefit function is:

[0081]

[0082] Where, d threshIndicates the set distance threshold, U i represents the inflationary return function, represents the indicator function, when hour, when hour,

[0083] The expression of the trajectory rationality function is:

[0084]

[0085] Where, represents the trajectory rationality function, represents the speed of pedestrian i at time t, and represents the predicted coordinates of pedestrian i at time t, and represents the predicted coordinates of pedestrian i at time t-1, Δt represents the time interval, a1 and a2 represent weight coefficients, q represents the obstacle, Indicates the distance from the predicted trajectory point to the obstacle, v max Indicates the maximum reasonable speed for pedestrians;

[0086] The expression of the comprehensive income function is:

[0087]

[0088] Where U represents the comprehensive benefit function, ω1 represents the weight coefficient, and ω2 represents the weight coefficient.

[0089] The present invention also provides an intelligent pedestrian trajectory prediction system based on an improved frog leap diffusion model, comprising:

[0090] Data acquisition module, used to collect pedestrian trajectory data and pre-process the data;

[0091] A model construction module is used to construct an improved frog-leaping diffusion model, which includes a feature extraction module combined with an attention mechanism, an initial denoising module, and a denoising optimization module. The model receives preprocessed data, uses the feature extraction module to extract social features of pedestrian trajectory data, introduces an attention mechanism, uses the social features to guide temporal feature extraction and fusion, and obtains fused temporal features.

[0092] The trajectory generation module is used to estimate the mean position and standard deviation of the predicted trajectory distribution based on the social features and the fused temporal features, generate a normalized position matrix, and obtain the initial pedestrian predicted trajectory. The initial pedestrian predicted trajectory is denoised using the initial denoising module to obtain the pedestrian predicted trajectory.

[0093] The detection optimization module is used to perform consistency detection on the pedestrian predicted trajectory. If the consistency detection passes, the pedestrian predicted trajectory is used as the final predicted trajectory. If the consistency detection fails, the denoising optimization module is used to optimize the initial denoising module and the pedestrian predicted trajectory is denoised again until the consistency detection passes to obtain the final pedestrian predicted trajectory.

[0094] Compared with the prior art, the beneficial effects of this method are:

[0095] The present invention provides an intelligent pedestrian trajectory prediction method based on an improved frog-leaping diffusion model. First, pedestrian trajectory data is collected and preprocessed. An improved frog-leaping diffusion model is constructed and the preprocessed data is input into the improved frog-leaping diffusion model. A feature extraction module is used to extract social features of the pedestrian trajectory data. An attention mechanism is introduced to use the social features to guide the extraction and fusion of temporal features, and the social features provide contextual information for the temporal feature extraction. Based on the social features and the fused temporal features, the average position and standard deviation of the predicted trajectory distribution are estimated to generate a normalized position matrix and obtain an initial pedestrian predicted trajectory. The initial pedestrian predicted trajectory is denoised using an initial denoising module to obtain a pedestrian predicted trajectory. Based on the consistency test results, it is determined whether the initial denoising module should be optimized using a denoising optimization module, thereby generating a prediction result that is closer to the actual trajectory. The present invention generally uses the improved frog-leaping diffusion model to generate the final pedestrian predicted trajectory and improve the accuracy of the predicted trajectory. BRIEF DESCRIPTION OF THE DRAWINGS

[0096] Figure 1 A flowchart showing an intelligent pedestrian trajectory prediction method based on an improved frog-leaping diffusion model proposed in an embodiment of the present invention;

[0097] Figure 2 A flowchart showing another method for intelligently predicting pedestrian trajectories based on an improved frog-leaping diffusion model proposed in an embodiment of the present invention;

[0098] Figure 3 A flowchart showing the adjustment of the predicted pedestrian trajectory proposed in an embodiment of the present invention;

[0099] Figure 4 The figure shows a structural diagram of an intelligent pedestrian trajectory prediction system based on an improved frog leaping diffusion model proposed in an embodiment of the present invention. DETAILED DESCRIPTION

[0100] The accompanying drawings are for illustrative purposes only and are not to be construed as limiting this patent;

[0101] In order to better illustrate this embodiment, some parts of the drawings may be omitted, enlarged, or reduced, and do not represent the actual size;

[0102] It is understandable to those skilled in the art that descriptions of certain well-known contents may be omitted in the drawings.

[0103] The technical solution of the present invention is further described below with reference to the accompanying drawings and embodiments.

[0104] The positional relationships described in the drawings are for illustrative purposes only and should not be construed as limiting this patent;

[0105] Example 1

[0106] This embodiment proposes an intelligent pedestrian trajectory prediction method based on an improved frog leap diffusion model. Figure 1 The method proposed in this embodiment generally includes the following steps:

[0107] S1: Collect pedestrian trajectory data and preprocess the data;

[0108] S2: constructing an improved frog leaping diffusion model, wherein the improved frog leaping diffusion model includes a feature extraction module combined with an attention mechanism, an initial denoising module, and a denoising optimization module;

[0109] S3: The preprocessed data is input into the improved frog leaping diffusion model. The feature extraction module is used to extract the social features of the pedestrian trajectory data. The attention mechanism is introduced to use the social features to guide the extraction and fusion of temporal features to obtain the fused temporal features.

[0110] S4: Estimate the mean position and standard deviation of the predicted trajectory distribution based on the social features and the fused temporal features, generate a normalized position matrix, and obtain the initial pedestrian predicted trajectory. Denoise the initial pedestrian predicted trajectory using the initial denoising module to obtain the pedestrian predicted trajectory.

[0111] S5: Perform consistency check on the pedestrian predicted trajectory. If the consistency check passes, the pedestrian predicted trajectory is used as the final predicted trajectory. If the consistency check fails, the initial denoising module is optimized using the denoising optimization module, and the pedestrian predicted trajectory is denoised again until the consistency check passes to obtain the final pedestrian predicted trajectory.

[0112] In this example, a vehicle-mounted camera and radar were used to record pedestrian trajectory data on the street over different time periods. To ensure the accuracy and stability of data collection, the camera resolution used was no less than 1080p, and the radar equipment had a ranging accuracy of ±0.1 meter.

[0113] The collected data includes 30,000 pedestrian trajectories, each containing 1 to 10 minutes of pedestrian movement data, with a sampling frequency of 5Hz. Data collection occurs during various time periods on weekdays and weekends, primarily between 8:00 AM and 12:00 PM, 12:00 PM and 6:00 PM, and 10:00 PM to 8:00 PM, ensuring that diverse pedestrian flows and behavior patterns are captured. Data collection takes place in diverse areas, such as sidewalks, intersections, and bus stops. Each trajectory records information such as the pedestrian's location coordinates, speed, acceleration, and heading angle. Furthermore, behavioral characteristics such as dwell time and frequent changes in walking direction are recorded.

[0114] The collected data is pre-processed to remove abnormal trajectory points caused by occlusion, equipment failure, and data that clearly does not conform to the laws of pedestrian movement. The collected data is cleaned. First, data outlier detection is performed. The normal walking speed range is generally defined as 0.5-2m / s. If the speed of a pedestrian in a certain trajectory exceeds 2 times the normal walking speed, the data point is judged as an outlier. The acceleration range of a normal pedestrian is generally -1m / s. 2 Up to 1m / s 2 If the acceleration of a pedestrian in a particular trajectory changes by more than three times the normal acceleration, the data point is considered an outlier. If the position of a pedestrian in a particular trajectory suddenly jumps, the data point is considered an outlier. Detected outliers are linearly interpolated using the normal data from adjacent time points to restore reasonable trajectory data.

[0115] For example, if the speed at a certain time point is abnormal, linear interpolation is performed using normal speed data of three previous and subsequent time points to obtain a reasonable speed value at that time point.

[0116] A median filter algorithm is used to process noise in the collected data. A time window consisting of three time points before and after each data point is selected, and the data within the window is sorted. The median value is taken as the value for that data point. For example, if the position coordinates of a particular time point differ significantly from those of the previous and next time points, a median filter algorithm is used for smoothing, effectively removing noise and preserving the true trend of pedestrian movement.

[0117] The preprocessed data is divided into training set and test set in a ratio of 7:3. Subsequent training and testing are used for diffusion model training and performance evaluation to ensure that the model has good generalization ability and reliability.

[0118] In this embodiment, when predicting pedestrian trajectories, accurately extracting pedestrian motion features is the key to achieving high-precision predictions. In existing pedestrian trajectory prediction models, feature extraction is divided into two independent parts: social features and temporal features. Social features mainly focus on the relative positions, speeds, directions, etc. between pedestrians, while temporal features focus on the historical trajectory changes of pedestrians themselves. However, the existing separate feature extraction method ignores the potential impact of social features on temporal features, making it difficult for the model to accurately capture the true laws of pedestrian motion in complex scenarios and unable to accurately reflect the interactive relationships between pedestrians when predicting pedestrian trajectories. For example, in crowded scenes such as shopping malls or streets, pedestrians may change their movement direction or speed due to the behavior of surrounding pedestrians. Existing models are unable to capture such dynamic changes, resulting in a large deviation between the predicted trajectory and the actual trajectory. This deviation may cause errors such as collisions or path planning in practical applications such as autonomous driving and drone navigation.

[0119] Separate feature extraction methods fail to fully utilize the effective information in the data, resulting in a biased understanding of pedestrian movement trends in the original leapfrog diffusion model. To address this issue, this embodiment proposes a feature extraction module that incorporates an attention mechanism. This module innovates on the social encoder and temporal encoder architecture of the original leapfrog diffusion model, enabling the extracted features to better reflect pedestrian movement characteristics, thereby improving the accuracy of the model's prediction of pedestrian trajectories.

[0120] The feature extraction module combined with the attention mechanism proposed in this embodiment introduces a guidance mechanism for the extraction of temporal features using social features on the basis of the social encoder and temporal encoder architecture of the original frog leaping diffusion model. When the temporal encoder processes the pedestrian historical trajectory data, the social features extracted by the social encoder are used as important auxiliary information to guide the extraction of spatiotemporal features. The attention mechanism is used to calculate the association weights between social features and temporal features, and the importance of social features and temporal features in the fusion process is automatically adjusted according to the actual situation of pedestrian movement. For pedestrians who are close to each other and have a stable relative speed, the impact of social features on temporal features is more significant, and the attention mechanism sets a higher weight for social features. In this way, social features can provide additional contextual information for temporal feature extraction, help the model better read the interactive relationship between pedestrians, more accurately capture the characteristics of pedestrian movement, and better adapt to complex scenes. It provides richer and more accurate feature information for subsequent trajectory prediction, thereby improving the accuracy of the model in predicting pedestrian trajectories.

[0121] In this embodiment, in the feature extraction module, a social encoder is used to extract social features from pedestrian trajectory data. The social features satisfy the expression:

[0122]

[0123] Where, f q (·) represents the query embedding function, f k (·) represents the key embedding function, f v (·) represents the value embedding function, d represents the embedding dimension, X represents the past trajectory of the pedestrian to be predicted, and X N Represents the past trajectories of surrounding pedestrians.

[0124] In this embodiment, feature selection is performed on social features, focusing on those with a significant impact on temporal feature extraction and removing those with less significant impact or redundant information, thereby obtaining a more targeted subset of social features. Furthermore, to prevent certain features from dominating the subsequent fusion process due to large differences in their numerical ranges, the selected raw social features need to be normalized.

[0125] Perform feature selection on the social features, normalize the selected social features, and use a neural network layer to perform linear transformation to obtain a social feature subset; the expression of the social feature subset is:

[0126] G=W·[d norm ,v norm ] T +b

[0127] Where G represents the social feature subset, [d norm ,v norm ] T Represents the normalized distance and speed feature vectors, W represents the weight matrix, b represents the bias vector, and T represents the matrix transpose operation.

[0128] In this embodiment, the process of obtaining the fused time features is as follows:

[0129] According to the time encoder and gate unit, the time feature is extracted and expressed as:

[0130] H=f GRU (f conv1D (X))

[0131] Where H represents the time characteristic, f GRU (·) represents the gated recurrent unit, f conv1D (·) represents a one-dimensional convolutional feature encoder, X represents the past trajectory of the pedestrian to be predicted; the convolution kernel size of the one-dimensional convolutional feature encoder is 3, and the number of output channels is 64. The hidden layer size in the gated recurrent unit is set to 128

[0132] The attention mechanism is introduced to calculate the association weights between social features and time features. The expression is:

[0133]

[0134] In the formula, H represents the time feature, G represents the social feature subset, β represents the association weight between social features and time features, and d represents the feature dimension;

[0135] According to the calculated association weight, the social features and time features are weightedly fused to obtain the fused time features, which are expressed as:

[0136]

[0137] in, Represents the fused temporal features.

[0138] By introducing an attention mechanism, the improved leapfrog diffusion model can capture the relationships between pedestrians from different representation subspaces, focusing on the interactions between pedestrians at different distances and in different movement directions. It can effectively extract original social features such as relative positions, speed differences, and movement direction differences between pedestrians.

[0139] In this embodiment, the process of obtaining the predicted pedestrian trajectory is as follows:

[0140] Based on the social features and the fused temporal features, the average position of the predicted trajectory distribution is estimated by inputting the concatenated social and temporal embeddings. The expression is:

[0141]

[0142] Where μ θ represents the average position of the predicted trajectory distribution, f μ (·) represents the operation of estimating the average position of the predicted trajectory distribution, X represents the past trajectory of the pedestrian to be predicted, and X N represents the past trajectories of surrounding pedestrians, f fusion (·) represents a multilayer perceptron, Represents social characteristics, Represents the fused temporal features, T f represents the number of time steps of the predicted future trajectory;

[0143] Estimate the standard deviation of the predicted trajectory distribution, expressed as:

[0144]

[0145] Where, σ θ represents the standard deviation of the predicted trajectory distribution, f σ (·) represents the operation of estimating the standard deviation of the distribution of predicted trajectories;

[0146] The normalized position matrix is generated using the mean position of the predicted trajectory distribution and the standard deviation of the predicted trajectory distribution. The process is:

[0147] The encoder is used to convert the standard deviation of the predicted trajectory distribution into a high-dimensional embedding of the standard deviation, which is expressed as:

[0148]

[0149] Where, A high-dimensional embedding representing the standard deviation, f encode represents the encoder;

[0150] Based on the high-dimensional embedding of social features, fused time features, and standard deviation, the normalized position matrix is calculated, which is expressed as:

[0151]

[0152] Where, represents the normalized position matrix containing K samples, represents the normalized position matrix of the kth sample, Represents the operation of calculating the normalized position matrix;

[0153] Generate the initial pedestrian prediction trajectory, the expression is:

[0154]

[0155] Where, represents the initial pedestrian prediction trajectory.

[0156] In this embodiment, the initial denoising module is used to denoise the initial pedestrian predicted trajectory. The process of obtaining the pedestrian predicted trajectory is as follows:

[0157] First, the context encoder is used to obtain the context conditions of the pedestrian's historical trajectory, which is expressed as:

[0158] C=f context (X,X N )

[0159] Where C represents the context condition, f context (·) represents the context encoder, X represents the pedestrian’s historical trajectory, X N Indicates the trajectory of surrounding pedestrians;

[0160] Next, based on the contextual conditions and the initial pedestrian prediction trajectory, the noise is estimated, which is expressed as:

[0161]

[0162] Where, represents the noise contained in the initial pedestrian prediction trajectory estimated using a multi-layer perceptron, τ represents the current time step, and f ε (·) represents a multilayer perceptron;

[0163] Finally, the estimated noise is used to obtain the pedestrian prediction trajectory, which is expressed as:

[0164]

[0165] Where, represents the pedestrian prediction trajectory after denoising, a τ-1 represents the adjustment factor, represents the cumulative adjustment factor, and z represents the noise term.

[0166] In this embodiment, the consistency test result of the pedestrian predicted trajectory is an important indicator to measure the prediction accuracy. In actual application scenarios, due to factors such as data noise, limitations of the model structure, and complex pedestrian movement patterns, the output predicted trajectory often deviates from the actual trajectory. The existing frog-leaping diffusion model lacks an effective consistency detection mechanism and cannot promptly detect and correct the error between the predicted trajectory and the actual trajectory, resulting in limited prediction accuracy of the model in complex scenarios. When the pedestrian movement pattern is changeable, the deviation between the predicted trajectory and the actual trajectory will be further amplified, resulting in path planning errors or collision risks between pedestrians.

[0167] After the improved leapfrog diffusion model outputs a predicted trajectory, the mean squared error (MSE) is used to calculate the similarity between the predicted and true trajectories. MSE intuitively reflects the average difference between two trajectories at each time point and is a widely used metric for measuring data similarity.

[0168] In this embodiment, the pedestrian predicted trajectory is checked for consistency by calculating the mean square error between the predicted pedestrian trajectory and the actual trajectory. The expression of the mean square error is:

[0169]

[0170] Where MSE stands for mean square error, T f represents the number of time steps of the predicted trajectory, represents the coordinates of the predicted trajectory at time t, P t represents the coordinates of the true trajectory at time t;

[0171] Set a threshold for the mean squared error (MSE) between the predicted and actual pedestrian trajectories. If the MSE exceeds the threshold, the consistency check fails. If the MSE does not exceed the threshold, the consistency check passes. If the MSE exceeds the threshold, there is a significant discrepancy between the predicted and actual trajectories, indicating that the predicted and actual trajectories are inconsistent.

[0172] For example, assume that the number of time steps between the predicted pedestrian trajectory and the actual pedestrian trajectory is Tf = 10, and the threshold for the mean squared error between the predicted and actual pedestrian trajectories is set to 0.5. At t = 5, the coordinates of the actual trajectory are (3, 5) and the predicted trajectory are (3.5, 5.2). The error at this moment is 0.29. The summation and average of the errors over 10 time steps yields an MSE of 0.53. This mean squared error is greater than the set threshold, so the initial denoising module is optimized using the denoising optimization module.

[0173] In this embodiment, a new loss function is constructed by weighting the consistency detection indicator MSE with the loss function of the denoising module in the original model. By adjusting the weight coefficient, the model can flexibly control the degree of emphasis on the consistency between the predicted trajectory and the true trajectory. The parameters of the initial denoising module are continuously updated according to the gradient of the loss function, and the initial denoising module can better adjust according to the difference between the predicted trajectory and the true trajectory. In the subsequent prediction process, noise can be removed more accurately while retaining valid information related to the true trajectory, thereby generating a prediction result that is closer to the true trajectory and improving the accuracy of the model prediction.

[0174] If the consistency test fails, the denoising optimization module is used to optimize the initial denoising module. The optimization process is as follows:

[0175] First, Gaussian noise is gradually added to the true trajectory. The mean square error and the randomly added noise are used to construct a loss function. The loss function is used to evaluate the deviation between the true trajectory and the predicted trajectory. The expression is:

[0176] L(θ)=λ·MSE+(1-λ)·L NE

[0177]

[0178] Among them, θ represents the initial denoising module parameters, λ represents the weight coefficient, L(θ) represents the loss function, and L NE represents the original loss function, ε represents the noise added to the true trajectory, f ε (·) represents the function of estimating noise, f context (·) represents the context encoder, represents the initial pedestrian prediction trajectory, τ represents the current time step;

[0179] Next, the gradient of the loss function with respect to the parameters of the initial denoising module is calculated, and the parameters of the initial denoising module are optimized using the gradient descent algorithm. The parameters include the weight matrix and bias vector of the multilayer perceptron used in the initial denoising module. The expression after parameter optimization is:

[0180]

[0181] Among them, θnew represents the optimized initial denoising module parameters, θ represents the initial denoising module parameters, η1 represents the learning rate, represents the gradient of the loss function with respect to the parameter θ.

[0182] For example, the weight coefficient λ in the loss function is set to 0.6, and the learning rate is set to 0.001. In the early stage of optimizing the initial denoising module using the denoising optimization module, the initial prediction accuracy of the improved leapfrog diffusion model is low, and the MSE value is large. The gradient descent algorithm will quickly adjust the parameters of the initial denoising module according to the gradient of the loss function, so that the initial denoising module can effectively remove noise. As the optimization proceeds, the MSE value gradually decreases, and the amplitude of the parameter adjustment will also gradually become smaller to avoid over-adjustment and overfitting of the model. The gradient is recalculated and the parameters are updated during each optimization process, so that the denoising module can be continuously optimized to improve the accuracy of the predicted trajectory.

[0183] In this embodiment, the expression for adding Gaussian noise to the true trajectory is:

[0184]

[0185] Where a τ It represents the parameter related to the diffusion step τ, with a value range of [0,1], which is used to control the degree of noise addition. represents the noise vector that conforms to the standard normal distribution, P τ represents the pedestrian trajectory after noise addition, and P represents the pedestrian trajectory before noise addition.

[0186] As the number of noise addition steps increases, a τ As the noise gradually decreases, the added noise gradually increases, and the difference between the pedestrian trajectory after noise addition and the pedestrian trajectory before noise addition becomes larger and larger, and eventually becomes a highly random noise trajectory.

[0187] Example 2

[0188] In this embodiment, another intelligent pedestrian trajectory prediction method based on the improved frog leap diffusion model is proposed. Figure 2 The flowchart of the method shown in FIG. 1 further includes, compared with Example 1, the following steps: S6: adjusting the predicted trajectory of the pedestrian.

[0189] In this embodiment, if Figure 3 The flowchart of adjusting the pedestrian prediction trajectory is shown in FIG. 1 . The process of adjusting the pedestrian prediction trajectory is as follows:

[0190] S601: Calculate the distance between pedestrians based on the predicted trajectories of the pedestrian and its surrounding pedestrians. The distance calculation expression is:

[0191]

[0192] Where, represents the horizontal coordinate of the predicted trajectory of pedestrian i at time t, represents the ordinate of the predicted trajectory of pedestrian i at time t, represents the horizontal coordinate of the predicted trajectory of pedestrian j at time t, represents the ordinate of the predicted trajectory of pedestrian j at time t, represents the distance between pedestrian i and pedestrian j;

[0193] S602: Set a distance threshold and determine whether the distance between pedestrians exceeds the set distance threshold. If so, it means that no collision occurs and there is no need to adjust the predicted trajectory of the pedestrians. Otherwise, execute S603;

[0194] S603: Comprehensively considering the severity of collisions between pedestrians on predicted trajectories and the rationality of the predicted trajectories, and defining a comprehensive benefit function;

[0195] The comprehensive benefit function includes: a collision benefit function and a trajectory rationality function; wherein the expression of the collision benefit function is:

[0196]

[0197] Where, d thresh Indicates the set distance threshold, U i represents the inflationary return function, represents the indicator function, when hour, when hour,

[0198] The expression of the trajectory rationality function is:

[0199]

[0200] Where, represents the trajectory rationality function, represents the speed of pedestrian i at time t, and represents the predicted coordinates of pedestrian i at time t, and represents the predicted coordinates of pedestrian i at time t-1, Δt represents the time interval, a1 and a2 represent weight coefficients, q represents the obstacle, Indicates the distance from the predicted trajectory point to the obstacle, v max Indicates the maximum reasonable speed for pedestrians;

[0201] In this embodiment, a1+a2=1, and the obstacle set Q={q1,q2,…,qn}.

[0202] The expression of the comprehensive income function is:

[0203]

[0204] Where U represents the comprehensive benefit function, ω1 represents the weight coefficient, and ω2 represents the weight coefficient.

[0205] S604: Calculate the gradient of the comprehensive benefit function with respect to the predicted trajectory. Based on the Nash equilibrium strategy of game theory, use the gradient ascent method to adjust the pedestrian's predicted trajectory. The expression of the adjusted predicted trajectory is:

[0206]

[0207] in, represents the predicted trajectory of pedestrian i after the nth adjustment, η2 represents the learning rate, represents the gradient of the profit function with respect to the predicted trajectory;

[0208] S605: Use the adjusted predicted trajectory of each pedestrian as a new input and repeat steps S601-S604 until the distance between pedestrians exceeds the set distance threshold, and output the adjusted predicted trajectory.

[0209] In this embodiment, in a multi-pedestrian trajectory prediction scenario, ensuring that the predicted trajectories of different pedestrians do not conflict is one of the practical challenges. In real life, for example, in places with high traffic volume, such as shopping malls, pedestrian movement trajectories are complex and changeable, and the predicted trajectories of different pedestrians can easily collide. Existing trajectory prediction methods ignore the mutual influence between pedestrians when processing multiple pedestrian trajectories, treating each pedestrian's trajectory separately without performing collision detection and adjustment on the predicted trajectories. This results in frequent conflicts in the predicted results in practical applications, failing to truly reflect the actual movement of pedestrians. This can lead to conflicting prediction results in practical applications and fails to meet practical needs.

[0210] In this embodiment, in the scenario of parallel prediction of multiple pedestrian trajectories, the predicted trajectories of different pedestrians are used as strategies of the game participants, and a comprehensive benefit function is defined for each pedestrian. The comprehensive benefit function comprehensively considers multiple factors such as whether the predicted trajectory will collide, its adaptability to the surrounding environment, and its coordination with other pedestrian movement patterns. Adaptability to the surrounding environment includes whether it is close to the edge of the road, whether it is within the permitted walking area, etc. The Nash equilibrium solution method in game theory is used to find the optimal strategy combination for all pedestrian predicted trajectories. Under this optimal strategy combination, any pedestrian cannot improve his or her own benefits by changing his or her predicted trajectory alone. For predicted trajectories that may collide, targeted adjustments are made based on the analysis results of game theory. At the same time, during the adjustment process, ensure that the adjusted trajectory complies with the basic pedestrian movement laws and behavioral constraints.

[0211] For example, let the predicted trajectory of pedestrian A be The predicted trajectory of pedestrian B is The predicted trajectory of pedestrian C is At t = 5 seconds, the trajectory distance between pedestrian A and pedestrian B Trajectory distance between pedestrian A and pedestrian C And the trajectory distance between pedestrian B and pedestrian C Set the distance threshold to 0.8m. When , it is judged that there is a collision risk between the trajectories of pedestrian A and pedestrian B.

[0212] For example, the weight coefficients ω1 = 0.6 and ω2 = 0.4 are set. ω1 is relatively large, indicating the high importance of collision avoidance in crowded environments like shopping malls. When a potential collision between pedestrians A and B is detected, pedestrian A's overall benefit function is significantly reduced.

[0213] In order to ensure that the adjusted trajectory conforms to the actual scene, the trajectory rationality function introduces the judgment of the distance to obstacles. If the predicted trajectory of pedestrian A is farther away from the obstacle, the The closer it is to 1, the more reasonable the surface predicted trajectory is in avoiding obstacles. This parameter indicates the rationality of pedestrian speed. When pedestrian A's speed is at the set maximum speed, this parameter is 1. The further the speed deviates from the maximum speed, the smaller the value. For example, if pedestrian A's predicted trajectory always follows the mall aisle toward the target store, and decelerates appropriately when passing popular stores, conforming to the mall's walking logic, the calculated trajectory rationality value is high. However, if pedestrian A's trajectory exhibits unreasonable behavior, such as crossing a store wall, the trajectory rationality value is low.

[0214] In this embodiment, by adjusting the predicted trajectories of pedestrians multiple times, the predicted trajectories of all pedestrians gradually reach a collision-avoiding and reasonable state. Pedestrians avoid potential collision points by changing their walking direction or adjusting their walking speed and path, while ensuring that the adjusted trajectories are consistent with the actual environment and the walking habits of pedestrians.

[0215] Example 3

[0216] In this example, the improved frog-leaping diffusion model is trained and tested using a training set and a test set. The historical pedestrian trajectory data from the test set is input, and the improved frog-leaping diffusion model outputs predicted pedestrian trajectories. The model's performance is evaluated by calculating the average displacement error (ADE) and the final displacement error (FDE) between the predicted and true trajectories.

[0217] By comparing the prediction results with the original frog-leaping diffusion model and other benchmark models, in a shopping mall environment, the average displacement error (ADE) was reduced by 18% compared with the original model, and the final displacement error (FDE) was reduced by 14%. At the same time, more than 85% of potential collisions were avoided, effectively improving the accuracy and reliability of pedestrian trajectory prediction.

[0218] Example 4

[0219] In this embodiment, a pedestrian trajectory intelligent prediction system based on an improved frog leap diffusion model is provided. Figure 4 The structural diagram of the system shown includes:

[0220] Data acquisition module, used to collect pedestrian trajectory data and pre-process the data;

[0221] A model construction module, used to construct an improved frog leaping diffusion model, wherein the improved frog leaping diffusion model includes a feature extraction module combined with an attention mechanism, an initial denoising module, and a denoising optimization module;

[0222] Receive the preprocessed data, use the feature extraction module to extract the social features of the pedestrian trajectory data, introduce the attention mechanism, use the social features to guide the extraction and fusion of temporal features, and obtain the fused temporal features;

[0223] The trajectory generation module is used to estimate the mean position and standard deviation of the predicted trajectory distribution based on the social features and the fused temporal features, generate a normalized position matrix, and obtain the initial pedestrian predicted trajectory. The initial pedestrian predicted trajectory is denoised using the initial denoising module to obtain the pedestrian predicted trajectory.

[0224] The detection optimization module is used to perform consistency detection on the pedestrian predicted trajectory. If the consistency detection passes, the pedestrian predicted trajectory is used as the final predicted trajectory. If the consistency detection fails, the denoising optimization module is used to optimize the initial denoising module and the pedestrian predicted trajectory is denoised again until the consistency detection passes to obtain the final pedestrian predicted trajectory.

[0225] The embodiments are provided merely to illustrate the present invention and are not intended to limit the embodiments of the present invention. Those skilled in the art will appreciate that other variations or modifications may be made based on the above description. It is not necessary and impossible to enumerate all embodiments here. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the claims.

Claims

1. An intelligent pedestrian trajectory prediction method based on an improved frog leap diffusion model, characterized in that: The following steps are involved: Collect pedestrian trajectory data and preprocess the data; Constructing an improved frog leaping diffusion model, wherein the improved frog leaping diffusion model includes a feature extraction module combined with an attention mechanism, an initial denoising module, and a denoising optimization module; The preprocessed data is input into the improved frog leap diffusion model. The feature extraction module is used to extract the social features of pedestrian trajectory data. The attention mechanism is introduced to use the social features to guide the extraction and fusion of temporal features to obtain the fused temporal features. Based on the social features and the fused temporal features, the mean position and standard deviation of the predicted trajectory distribution are estimated to generate a normalized position matrix and obtain the initial pedestrian predicted trajectory. The initial pedestrian predicted trajectory is denoised using the initial denoising module to obtain the pedestrian predicted trajectory. Perform consistency check on the pedestrian prediction trajectory. If the consistency check passes, the pedestrian prediction trajectory will be used as the final prediction trajectory. If the consistency test fails, the initial denoising module is optimized using the denoising optimization module, and the pedestrian prediction trajectory is denoised again until the consistency test passes, and the final pedestrian prediction trajectory is obtained.

2. The method for intelligently predicting pedestrian trajectories based on the improved frog leaping diffusion model according to claim 1 is characterized in that: In the feature extraction module, a social encoder is used to extract social features from pedestrian trajectory data. The social features satisfy the expression: Where, f q (·) represents the query embedding function, f k (·) represents the key embedding function, f v (·) represents the value embedding function, d represents the embedding dimension, X represents the past trajectory of the pedestrian to be predicted, and X N represents the past trajectories of surrounding pedestrians; Perform feature selection on the social features, normalize the selected social features, and use a neural network layer to perform linear transformation to obtain a social feature subset; the expression of the social feature subset is: G=W·[d norm ,v norm ] T +b Where G represents the social feature subset, [d norm ,v norm ] T Represents the normalized distance and speed feature vectors, W represents the weight matrix, b represents the bias vector, and T represents the matrix transpose operation.

3. The method for intelligently predicting pedestrian trajectories based on the improved frog leaping diffusion model according to claim 2 is characterized in that: In the feature extraction module, the process of obtaining the fused time features is as follows: According to the time encoder and gate unit, the time feature is extracted and expressed as: H=f GRU (f conv1D (X)) Where H represents the time characteristic, f GRU (·) represents the gated recurrent unit, f conv1D (·) represents a one-dimensional convolutional feature encoder, and X represents the past trajectory of the pedestrian to be predicted; The attention mechanism is introduced to calculate the association weights between social features and time features. The expression is: In the formula, H represents the time feature, G represents the social feature subset, β represents the association weight between social features and time features, and d represents the feature dimension; According to the calculated association weight, the social features and time features are weightedly fused to obtain the fused time features, which are expressed as: in, Represents the fused temporal features.

4. The method for intelligently predicting pedestrian trajectories based on the improved frog leaping diffusion model according to claim 3 is characterized in that: The process of obtaining the initial pedestrian prediction trajectory is: Based on the social features and the fused temporal features, the average position of the predicted trajectory distribution is estimated, which is expressed as: Where μ θ represents the average position of the predicted trajectory distribution, f μ (·) represents the operation of estimating the average position of the predicted trajectory distribution, X represents the past trajectory of the pedestrian to be predicted, and X N represents the past trajectories of surrounding pedestrians, f fusion (·) represents a multilayer perceptron, Represents social characteristics, Represents the fused temporal features, T f represents the number of time steps of the predicted future trajectory; Estimate the standard deviation of the predicted trajectory distribution, expressed as: Where, σ θ represents the standard deviation of the predicted trajectory distribution, f σ (·) represents the operation of estimating the standard deviation of the distribution of predicted trajectories; The normalized position matrix is generated using the mean position of the predicted trajectory distribution and the standard deviation of the predicted trajectory distribution. The process is: The encoder is used to convert the standard deviation of the predicted trajectory distribution into a high-dimensional embedding of the standard deviation, which is expressed as: Where, A high-dimensional embedding representing the standard deviation, f encode represents the encoder; Based on the high-dimensional embedding of social features, fused time features, and standard deviation, the normalized position matrix is calculated, which is expressed as: Where, represents the normalized position matrix containing K samples, represents the normalized position matrix of the kth sample, Represents the operation of calculating the normalized position matrix; Generate the initial pedestrian prediction trajectory, the expression is: Where, represents the initial pedestrian prediction trajectory.

5. The method for intelligently predicting pedestrian trajectories based on the improved frog leaping diffusion model according to claim 4 is characterized in that: The initial denoising module is used to denoise the initial pedestrian prediction trajectory. The process of obtaining the pedestrian prediction trajectory is as follows: First, the context encoder is used to obtain the context conditions of the pedestrian's historical trajectory, which is expressed as: C=f context (X,X N ) Where C represents the context condition, f context (·) represents the context encoder, X represents the pedestrian’s historical trajectory, X N Indicates the trajectory of surrounding pedestrians; Next, based on the contextual conditions and the initial pedestrian prediction trajectory, the noise is estimated, which is expressed as: Where, represents the noise contained in the initial pedestrian prediction trajectory estimated using a multi-layer perceptron, τ represents the current time step, and f ε (·) represents a multilayer perceptron; Finally, the estimated noise is used to obtain the pedestrian prediction trajectory, which is expressed as: Where, represents the pedestrian prediction trajectory after denoising, a τ-1 represents the adjustment factor, represents the cumulative adjustment factor, and z represents the noise term.

6. The method for intelligently predicting pedestrian trajectories based on the improved frog leaping diffusion model according to claim 5 is characterized in that: The pedestrian prediction trajectory is checked for consistency by calculating the mean square error between the predicted and actual trajectories. The expression of the mean square error is: Where, MSE represents mean square error, T f represents the number of time steps of the predicted trajectory, represents the coordinates of the predicted trajectory at time t, P t represents the coordinates of the true trajectory at time t; Set a threshold for the mean square error between the predicted and actual pedestrian trajectories. If the calculated mean square error exceeds the set threshold, the consistency check fails. If the calculated mean square error does not exceed the set threshold, the consistency check passes.

7. The method for intelligently predicting pedestrian trajectories based on the improved frog leaping diffusion model according to claim 6, characterized in that: If the consistency check fails, the initial denoising module is optimized using the denoising optimization module. The process is as follows: First, Gaussian noise is gradually added to the true trajectory. The mean square error and the randomly added noise are used to construct a loss function. The loss function is used to evaluate the deviation between the true trajectory and the predicted trajectory. The expression is: L(θ)=λ·MSE+(1-λ)·L NE Among them, θ represents the initial denoising module parameters, λ represents the weight coefficient, L(θ) represents the loss function, and L NE represents the original loss function, ε represents the noise added to the true trajectory, f ε (·) represents the function of estimating noise, f context (·) represents the context encoder, represents the initial pedestrian prediction trajectory, τ represents the current time step; Next, the gradient of the loss function with respect to the parameters of the initial denoising module is calculated, and the parameters of the initial denoising module are optimized using the gradient descent algorithm. The parameters include the weight matrix and bias vector of the multilayer perceptron used in the initial denoising module. The expression for parameter optimization is: Among them, θ new represents the optimized initial denoising module parameters, θ represents the initial denoising module parameters, η1 represents the learning rate, represents the gradient of the loss function with respect to the parameter θ.

8. The method for intelligently predicting pedestrian trajectories based on the improved frog leaping diffusion model according to claim 5 is characterized in that: The intelligent pedestrian trajectory prediction method further includes: Adjust the pedestrian prediction trajectory; the process is: According to the predicted trajectory of the pedestrian and its surrounding pedestrians, the distance between pedestrians is calculated. The distance calculation expression is: Where, represents the horizontal coordinate of the predicted trajectory of pedestrian i at time t, represents the ordinate of the predicted trajectory of pedestrian i at time t, represents the horizontal coordinate of the predicted trajectory of pedestrian j at time t, represents the ordinate of the predicted trajectory of pedestrian j at time t, represents the distance between pedestrian i and pedestrian j; Set a distance threshold to determine whether the distance between pedestrians exceeds the set distance threshold. If so, it means that no collision will occur and there is no need to adjust the pedestrian's predicted trajectory. Otherwise, adjust the pedestrian's predicted trajectory according to the comprehensive loss function. The process is as follows: Considering the severity of collisions between pedestrians and the rationality of the predicted trajectories, a comprehensive benefit function is constructed. Calculate the gradient of the comprehensive benefit function with respect to the pedestrian's predicted trajectory. According to the Nash equilibrium strategy of game theory, the gradient ascent method is used to adjust the pedestrian's predicted trajectory. The expression of the adjusted predicted trajectory is: in, represents the predicted trajectory of pedestrian i after the nth adjustment, η2 represents the learning rate, represents the gradient of the profit function with respect to the predicted trajectory; The adjusted pedestrian prediction trajectory is used as a new input and the pedestrian prediction trajectory is repeatedly adjusted until the distance between pedestrians exceeds the set distance threshold, and the adjusted prediction trajectory is output.

9. The method for intelligently predicting pedestrian trajectories based on the improved frog leaping diffusion model according to claim 8, characterized in that: The constructed comprehensive benefit function includes: a collision benefit function and a trajectory rationality function; wherein the expression of the collision benefit function is: Where, d thresh Indicates the set distance threshold, U i represents the inflationary return function, represents the indicator function, when hour, when hour, The expression of the trajectory rationality function is: Where, represents the trajectory rationality function, represents the speed of pedestrian i at time t, and represents the predicted coordinates of pedestrian i at time t, and represents the predicted coordinates of pedestrian i at time t-1, Δt represents the time interval, a1 and a2 represent weight coefficients, q represents the obstacle, Indicates the distance from the predicted trajectory point to the obstacle, v max Indicates the maximum reasonable speed for pedestrians; The expression of the comprehensive income function is: Where U represents the comprehensive benefit function, ω1 represents the weight coefficient, and ω2 represents the weight coefficient.

10. A pedestrian trajectory intelligent prediction system based on an improved frog-leaping diffusion model, used to implement the pedestrian trajectory intelligent prediction method based on an improved frog-leaping diffusion model as described in any one of claims 1 to 9, characterized in that: include: Data acquisition module, used to collect pedestrian trajectory data and pre-process the data; A model construction module, used to construct an improved frog leaping diffusion model, wherein the improved frog leaping diffusion model includes a feature extraction module combined with an attention mechanism, an initial denoising module, and a denoising optimization module; Receive the preprocessed data, use the feature extraction module to extract the social features of the pedestrian trajectory data, introduce the attention mechanism, use the social features to guide the extraction and fusion of temporal features, and obtain the fused temporal features; The trajectory generation module is used to estimate the mean position and standard deviation of the predicted trajectory distribution based on the social features and the fused temporal features, generate a normalized position matrix, and obtain the initial pedestrian predicted trajectory. The initial pedestrian predicted trajectory is denoised using the initial denoising module to obtain the pedestrian predicted trajectory. The detection optimization module is used to perform consistency detection on the pedestrian predicted trajectory. If the consistency detection passes, the pedestrian predicted trajectory is used as the final predicted trajectory; If the consistency test fails, the initial denoising module is optimized using the denoising optimization module, and the pedestrian prediction trajectory is denoised again until the consistency test passes, and the final pedestrian prediction trajectory is obtained.