In order to improve the prediction effect of users'online purchase behaviors,3groups of features are constructed and ex-tracted from the user-products online interaction data by fitting with function,counting,adding,calculating the mean,calcu-lating the ratio,setting non-numeric categorical features,combining and deriving once,etc.The feature engineering for this business scenario is set up,and a weighted heterogeneous ensemble model based on Stacking is proposed.The performance rank-ing information of the first-layer heterogeneous base classifiers of the Stacking ensemble framework on the dataset is transformed into a set of constraints,which are added to the LPBoost algorithm in the second-layer of the stacking ensemble framework.The goal programming problem of the improved LPBoost algorithm is solved to obtain the better combination weight of the base classi-fiers,and the weighted ensemble model is constructed to predict the user's purchase behavior.The user behavior data set officially released by Alibaba Cloud Tianchi is used for experimental verification,and the F1 value of 8.51%is obtained,which is superior to comparison schemes.