This paper analyzes the time-varying patterns of urban bus passenger flow and predicts future short-term bus passenger flow, which helps public transport managers to predict bus passenger flow in advance and adjust bus scheduling plans. This paper constructs a short-term passenger flow forecasting method based on the Gradient Boosting Decision Tree (GBDT) model and introduces the three-structured Parzen Estimator Approach (TPE) to optimize the parameter space. Results showed that the prediction model proposed in this paper can make full use of the multi-feature vector data to predict the various passenger flow pattern and has a lower prediction error compared with the GBDT base model and other models. The model can further improve the accuracy of short-time passenger flow prediction and provide important quantitative data support for bus operation guarantee and transport scheduling plan optimization.