In today’s rapid development of digital economy, e-commerce platforms are facing the challenges of diversified user demands and fierce competition. Traditional marketing methods have problems such as high cost, poor effect, low conversion rate, and it is difficult to meet the demand for personalized services. For the problems of poor accuracy of user group division and poor marketing effect of e-commerce platform, this paper proposes an improved K-means clustering algorithm integrating genetic algorithm. The method optimizes cluster center selection by genetic algorithm, which solves the local optimal problem caused by the randomness of the initial point selection of traditional K-means algorithm. Based on 4000 user consumption data, the study constructed a user portrait model containing 8 dimensions, such as gender, age, average monthly total consumption, etc., and utilized the improved algorithm to divide the user groups. The experimental results show that the improved algorithm achieves an average accuracy of 90.16% on the Iris dataset and 80.94% on the Wine dataset, which is 13.41% and 14.37% higher than the traditional method, respectively. The user groups were successfully divided into four clusters, with the highvalue user group spending an average of 3,500 yuan, accounting for 11.08% of the total. The study formulated differentiated marketing strategies for different user groups, providing an effective solution for e-commerce platforms to achieve precision marketing.