The invention discloses a real-time passenger flow forecasting method and a forecasting system based on rail transit. Firstly, historical passenger flow data of four different periods of ten-day, week, day and hour are obtained. The historical passenger flow data of four different periods are preprocessed to obtain the time series set. Secondly, the ten-day time model, week time model, day time model and hour time model are established according to the time series set. Ten-day-time model, week-time model, day-time model and hour-time model are used to forecast passenger flow, and the first forecast data set, the second forecast data set, the third forecast data set and the fourth forecast data set are obtained respectively. Then, an interactive multi-model filtering algorithm is used to determine a passenger flow prediction model according to the first prediction data set, the second prediction data set, the third prediction data set and the fourth prediction data set. Finally, the real-time passenger flow of rail transit is forecasted according to the passenger flow forecasting model, which improves the accuracy of real-time passenger flow forecasting based on rail transit.