E-commerce user segmentation is the basis for enterprises to accurately formulate marketing strategies and successfully manage their customer base. With the rapid development of e-commerce, this paper improves the traditional K-means clustering algorithm and proposes a SAPK-means algorithm, which effectively excludes the noisy data and isolated points in the dataset and obtains the high-quality initial clustering center. Company A’s e-commerce platform is used to apply the SAPK-means algorithm for customer segmentation, and the results are analyzed in detail before proposing targeted marketing strategies. The customized marketing strategy’s effect is evaluated through sales and platform user satisfaction. Through experimental testing, this paper concludes that the five types of segmented customer groups account for 9.46%, 18.43%, 36.95%, 21.91%, and 13.24% of the total number of samples, respectively, known as the “platinum customer group”, “gold customer group “Platinum customer group”, “Gold customer group”, “Silver customer group”, “Copper customer group” and “Iron customer group”, respectively.