In recent years, with the rapid development of e-commerce technology, the scale and number of e-commerce platforms with online retail business as the core are increasing day by day. In the service system, because the content of customer requirements is not consistent, customer service answers are different, and the question and answer service is easy to answer the questions, thus reducing customer satisfaction. Therefore, the optimization of customer service system is worthy of our in-depth study, but also worthy of high attention. Based on seque2SEque algorithm, this paper uses movie dialogue data set combined with knowledge graph technology and Markov algorithm to build a customer service robot with relatively natural response.