The user behavior log of e-commerce platform contains a wide range of data, which can be roughly divided into three types: user basic information, merchant information and user behavior information. Behavioral information includes clicks, favorites, shopping carts and purchases. Because of the asymmetry of online shopping information, the virtuality of trading environment, the incomplete perception of goods and the unsynchronization of trading process, consumers are faced with many uncertainties in the process of online shopping. According to the specific research problems, this paper applies the real consumer behavior data in the e-commerce data platform to build a model to predict consumer behavior. The consumer behavior sequence and other characteristics are analyzed by two machine learning methods respectively. First, the consumer behavior sequence based on time sequence is analyzed. Add the obtained probability value as a new feature to other feature sets as the input of NB (Naive Bayes) model, and train the model to get the probability of whether consumers will buy, and then get the final judgment result of the model. The results show that the fusion model has a balanced performance for consumer behavior sequences with different lengths, and its accuracy can be kept at around 0.9. The research on the problems raised in this paper can also be extended to other fields.