The rapid development of data technology provides technical support for hotels to enhance their competitiveness. This paper combines customer behavior, customer value, word-of-mouth reliability and Boston matrix to construct a three-dimensional variance Boston matrix to achieve customer segmentation. The category gradient is introduced to address the overfitting limitations of the Random Forest algorithm (RF) in terms of both effective handling of category features and ranking enhancement. A two-stage group prediction model is constructed using improved RF and support vector machine (SVM) to accurately predict hotel customer behavior. The results show that the churn rate is extremely high or extremely low when the length of time since the last order in a year is within the range of [0,50000]. In the model performance comparison, the RF-SVM model achieves ROC values of 0.993, 0.997, and 0.999, and the average values of the 3 indicators of G-mean, F-measure, and AUC are all greater than 0.90, with variance less than 0.01, which is better than the comparison model. After adjusting the hotel strategy according to the behavioral prediction results, higher profitability is obtained.