For auto drive system, accurate prediction of vehicle trajectory is the key to improve roadsafety and driving comfort. Based on Long Short Term Memory (LSTM) network and attentionmechanism, this article proposes an improved vehicle trajectory prediction model. By introducingspatiotemporal attention mechanism, this model can adaptively aggregate vehicle historicaltrajectories and surrounding environmental information, thereby more accurately predicting futuretrajectories. The experimental results show that compared with traditional LSTM models, this modelexhibits lower root mean square error at all prediction time points, and its performance improvementis more significant in long-term prediction tasks. This confirms the effectiveness of attentionmechanisms in addressing the long-term dependency problem of vehicle trajectory prediction.