With the development of China's economy and society, urban construction is constantly improving, urban rail transit is becoming more mature, and people's demand for travel quality is getting higher and higher. However, the imperfect operation and management leads to the contradiction between supply and demand of urban rail transit. Passenger flow data of rail transit is the basis of operation scheduling, and accurate prediction can effectively improve the utilization rate of operating energy. In this paper, through data mining of passenger flow data, the law of passenger flow in time dimension is analyzed, and three different forecasting models are established for rail transit passenger flow data. Finally, the forecasting effects of each model are compared. The characteristics of passenger flow are analyzed in the time dimension, which shows the different changing rules of passenger flow on working days and rest days. In the discussion of the three forecasting methods, firstly, the time series forecasting method is realized by SPSS software, and the final model parameters are determined by unit root test, autocorrelation analysis, partial autocorrelation analysis and Bayesian information criterion. After that, the regression prediction model of support vector machine and BP neural network model are established by MATLAB. The former maps nonlinear passenger flow data into high-dimensional space to find linear relationship for prediction, while the latter realizes passenger flow prediction by establishing neural network model. Finally, by comparing the three prediction models, the results show that the average absolute error of BP neural network prediction method is 13%, which is 44% and 10% lower than that of time series method and support vector machine method, respectively, with high accuracy.