This study developed a deep vein thrombosis (DVT) risk prediction model based on multiple machine learning methods for patients with digestive system tumors undergoing surgical treatment. Data of 1048 patients with digestive system tumors admitted to Shanxi Provincial People's Hospital (College of Shanxi Medical University) from January 2020 to January 2023 were retrospectively analyzed, and 845 cases were screened according to the inclusion and exclusion criteria. The patients were divided into a training group (586 patients), and a validation group (259 patients), then feature selection was performed using six models, including Lasso regression, XGBoost, Random Forest, Decision Tree, Support Vector Machine, and Logistics. Predictive models were subsequently constructed from column-line plots, and the predictive validity of the models was assessed using receiver operating characteristic curves, precision-recall curves, and decision-curve analysis. In the model comparison, the XGBoost model showed the largest area under the curve (AUC) on the validation set (P < 0.05), demonstrating excellent predictive performance and generalization ability. We selected the common characteristic factors in the six models to further develop the column line plots to assess the DVT risk. The model performed well in clinical validation and effectively differentiated high-risk and low-risk patients. The differences in BMI, procedure time, and D-dimer were statistically significant between patients in the thrombus group and those in the non-thrombus group (P < 0.05). However, the AUC of the Xgboost model was found to be greater than that of the column chart model by the Delong test (P < 0.05). BMI, procedure time, and D-dimer are critical predictors of DVT risk in patients with digestive system tumors. Our model is an adequate assessment tool for DVT risk, which can help improve the prevention and treatment of DVT.