With the continuous development of mobile devices, China's O2O (Online to Offline) ecommerce field is developing rapidly, more and more enterprises are joining it, and the competition of major e-commerce platforms is fierce. Customer churn has become a problem that every major platform will encounter now. How to leave old customers and attract new customers is a problem that needs to be solved urgently. All major ecommerce platforms use large amounts of coupons to maintain old users and attract new customers. However, random coupons cause insignificant interference to most users. This topic examines how to push coupons more efficiently. This paper uses the O2O scene related data provided by Alibaba. Through feature engineering, it extracts features from users, merchants, coupons and other aspects, expands the data set, and generates the final data set for XGBoost model training. Through parameter tuning and evaluation and selection of the importance of features, the model is optimized to achieve an effective prediction of the user's use of coupons within a specified time. This article is implemented in Python. The Alibaba company's January-June data was used for processing analysis and modeling, and the use of coupons received by users in July was predicted.