Hydrological modeling is a crucial tool in hydrology and water resource management for analyzing runoff evolution patterns. In this study, the process-driven soil and water assessment tool (SWAT) model and data-driven machine learning techniques (XGBoost, random forest, LSTM, BILSTM, and GRU) were employed to simulate runoff at monthly and daily intervals in the Fenhe River basin, situated in the middle reaches of the Yellow River, respectively. The SWAT model demonstrated effective performance in simulating runoff at various scales, with the coefficient of determination (R2) exceeding 0.80 and the Nash–Sutcliffe efficiency (NSE) surpassing 0.79. Sensitivity analysis reveals varying degrees of sensitivity among the model parameters. Furthermore, the deep learning techniques (LSTM, BILSTM, and GRU) exhibited superior simulation generalization capabilities compared to the SWAT model across various scales. Additionally, the generalization abilities of traditional machine learning techniques (XGBoost and random forest) were comparable to the SWAT model. This indicates that deep learning techniques demonstrate remarkable stability and generalization capabilities across various scales. This analysis was motivated by the use of external continuous time series data as input and the application of deep learning techniques to internal mechanisms. Moreover, an integrated modeling approach was used to enhance simulation accuracy by combining the SWAT model with machine learning techniques. The results indicate that the integrated modeling approach improves simulation performance across various scales compared to the single-model approach. This research is significant for improving the efficiency of water resource utilization and management in the Fenhe River basin.