The invention provides an improved heterogeneous
pedestrian trajectory prediction method under a
federated learning framework. The method comprises the following steps: firstly, dividing a
pedestrian data set through a
random matrix to ensure that each
client obtains heterogeneous data so as to increase the diversity of the data; next, local training is carried out on each
client, the
client can adopt a social space-time diagram
convolutional neural network (Social-STGCNN) or a social
attention network (STGAT), the adaptability of the model to local data is improved through fine adjustment of a private
data set, and meanwhile similarity calculation is added into a
loss function to maintain the stability of the model; and then, dynamically allocating weights by using a dynamic weight aggregation
algorithm according to contribution indexes such as an average
displacement error (ADE) and a final
displacement error (FDE) so as to realize
knowledge sharing of the heterogeneous model. Next, performing weighted average on client
model parameters in the same group (namely, the same model type), updating a
global model in the group, and transmitting the
global model to each client in the group to ensure the consistency of initial parameters of the next round of training; and then knowledge
distillation is carried out among different groups, and the consistency of prediction results when the heterogeneous model processes the same data is ensured by aligning model output. And finally, continuously optimizing the
global model through multiple rounds of training until a preset training target is reached, and performing evaluation on the
test set to improve the prediction precision and robustness of the model.