| A user’s portrait is a virtual representation of a real user.It is a target model built on a series of real data that can be used to describe users’ needs,personalized preferences,and user interests.With the development of the Internet in recent years,the e-commerce platforms of all walks of life have sprung up,and the market competition has become increasingly fierce.In order to improve the competitiveness of e-commerce platforms,ecommerce platforms need to meet the needs of different users as much as possible.Therefore,the e-commerce platform needs to analyze the data of platform to form a corresponding user’s portrait.At present,various e-commerce platforms on the market generally use batch processing to process the users’ data to form users’ portraits,which leads to the lack of real-time user images.For the real-time demand,the e-commerce platform generates real-time statistical analysis of users’ data by stream processing the users’ real-time incremental data.This method leads to the one-sidedness of the results of real-time statistical analysis.In addition,offline users’ portraits and real-time statistical analysis of e-commerce platforms need to adopt different computing frameworks.Under most business scenarios,the business logic of the platform is often the same in batch processing and stream processing.The inconsistency of the computing framework will place additional burdens and costs on the platform.In view of the above problems,this thesis designs a Flink-based e-commerce realtime user portrait system.The system combines offline users’ portraits with real-time statistical analysis of users’ data,so that the formed users’ images are real-time and comprehensive.In addition,the system uses the combination of Flink framework stream processing and batch processing to achieve the unity of the system computing framework.Specifically,the system is mainly divided into four modules:data acquisition,real-time calculation,data storage and data application.The data acquisition module uses Flume+Kafka to collect data from the e-commerce platform in real time.The real-time computing module uses the Flink calculation framework to combine stream processing and batch processing,and invokes rules or models to process the collected users’ data to label users in real time.Real-time update ensures the real-time nature of user tags.The data storage module is mainly used to store the results generated by the analysis.Data application modules use SpringBoot and SpringCloud frameworks to query real-time data in the database according to business needs.Vue.js is used to show the final result.The e-commerce platform operator grasps the needs of different users in real time through the real-time user portrait system.In addition,they can achieve accurate marketing and real-time recommendation for different users,which can effectively improve the competitiveness of the platform. |