With the rapid development of e-commerce and mobile communication, e-commerce platform has been widely used in various industries. How much e-commerce stores, whether it can guarantee the security of transaction information, whether it can analyze and study structured and unstructured data, and whether it can guarantee the security of stored data are all the key factors we need to consider. In this paper, the data and e-commerce security together, and to analyze the security system of e-commerce and discuss the prevention of hidden security policy. When the emergence of e-commerce big data technology can effectively solve the problems existing in e-commerce security, the Hadoop structure is introduced through Apache Hadoop and the Hadoop product Yarn is analyzed with emphasis. From the perspective of electronic security data, the hidden dangers of e-commerce can be effectively analyzed, and the security system of e-commerce can be effectively improved. This article starts with the analysis of the existing electronic commerce system, summarizes its characteristics, and analyzes and solves its existing problems. Firstly, the characteristics of the relational database My Structured Query Language (MySQL) and the distributed database HBase are analyzed, their respective advantages and disadvantages are summarized, and the advantages and disadvantages of each are taken into account when storing data. My SQL is used to store structured business data in the system, while HBase is used to store unstructured data such as pictures. These two storage mechanisms together constitute a data storage subsystem. Secondly, considering the large amount of data in the e-commerce system and the complex calculation of the data mining algorithm, this paper uses Map Reduce to realize the parallelization of the data mining algorithm and builds a Hadoop-based commodity recommendation subsystem on this basis. We use JavaEE technology to design a full-featured web mall system. Finally, based on the impact of cloud computing, mobile e-commerce is analyzed, including relevant theories, service mode, architecture, core technology, and the application in e-commerce, which can realize e-commerce precision marketing, find the optimal path of logistics, and take effective security measures to avoid transaction risks. This method can avoid the disadvantages of the traditional e-commerce, where large-scale data cannot be processed in a timely manner, realize the value of mining data behind, and realize the precision marketing of e-commerce enterprises.