In order to accelerate the low-carbon development process of the electric vehicle industry and adjust the energy composition of the transportation sector, research on the energy consumption of electric vehicles has become the current focus. However, the traditional physical energy consumption model has the defects that it is difficult to obtain the parameters in real time, and lacks the connection with the vehicle driving conditions and traffic characteristics. Therefore, the article first analyzes the relationship between electric vehicle energy consumption and weather factors, social factors, road network line characteristics and other factors, and constructs an energy consumption prediction model that connects the average driving speed at the micro level and the traffic state at the macro level; second, the improved LSTM neural network The network predicts the average speed of electric vehicles under different driving conditions, and calculates the power consumption per unit of mileage by combining the additional energy consumption of air conditioners. Finally, taking the Hangzhou transportation network as an example, the accuracy of the energy consumption prediction model is verified. Compared with the traditional LSTM network and BP network, the improved LSTM network has a root mean square error (RMSE) of 33.2% and 40.2%, respectively. The mean absolute error (MAE) decreased by 34.8% and41.5%, respectively.