With the rapid development of urban traffic, it is very important to achieve accurate short-term traffic flow forecasting. Firstly, with the problem of short-term traffic flow forecasting, the key features that affect the traffic flow are extracted and the KNN non-parametric regression method is used for forecasting. Secondly, in order to solve the problem of dynamic traffic flow assignment, we build a simulation model and achieved good results. Finally, we use the case of short-term flow forecasting in airport to carry out a data experiment. The experimental results show that the traffic flow of traffic nodes and routes can be forecasted completely by using KNN algorithm combined with discrete event simulation technology, and the results are more credible.