To improve the accuracy of runoff prediction, the prediction method that combines principal component analysis (PCA), spotted hyena optimizer(SHO) algorithm, support vector machine (SVM), and BP neural network were studied. The PCA method was selected for data dimensionality reduction in sample data screening to make the data sample concise and more representative. Then SHO algorithm was used to optimize SVM key parameters and BP neural network weight threshold respectively, and the corresponding runoff prediction model of PCA-SHO-SVM and PCA-SHO-BP were proposed accordingly. Furthermore, SHO-SVM, PCA-SVM, SVM and SHO-BP, PCA-BP, BP models were constructed to compare with these two models, and the prediction of annual runoff and monthly runoff in the dry season of Longtan Station in Yunnan Province were used for verification. The results show that the average relative error of PCA-SHO-SVM and PCA-SHO-BP models is 2.34% and 2.50% for the annual runoff prediction of this station, and 6.15% and 6.08% for the monthly runoff prediction, respectively. The prediction accuracy of both models are better than the other 6 models, with higher prediction accuracy and stronger generalization ability.