In this paper, the problem of automatic pricing and replenishment decision-making of vegetable commodities is studied, and the LSTM model is used to predict and optimize it, and the replenishment volume and pricing strategy to maximize the revenue of supermarkets are proposed. Calculating the total annual sales volume of each category and each vegetable, the distribution law of most vegetables with strong seasonal periodicity and high sales volume from September 2022 to January 2023 can be obtained, and finally the correlation coefficient between different categories and different single products of vegetable commodities is obtained through the Pearson correlation coefficient algorithm, among which the highest correlation coefficient between different categories is mosaic and cauliflower. The coefficient was 0.75, and the highest correlation coefficient between different single items was 0.99 for green eggplant (1) and purple round eggplant. According to the cost-plus pricing algorithm and formula, the cost-plus pricing of each vegetable category is calculated, and then the relationship between the total sales of each vegetable category and the cost-plus pricing can be obtained through visual analysis. Then, the LSTM time series model was constructed to predict the total daily replenishment of each vegetable category in the coming week, and finally the linear programming model was used to maximize the revenue as the objective function to finalize the total daily replenishment and pricing strategy, and the maximum revenue was 75,624 yuan.