This paper aims to investigate the application of heuristic algorithms to optimize pricing and replenishment strategies in retail markets, using vegetable products as an example. Traditional optimization methods are usually unable to solve complex real-world retail decision problems. Heuristic algorithms offer a promising solution by providing near-optimal results in a reasonable time. In this paper, the DPSO algorithm is combined with Genetic Algorithm (GA) and Simulated Annealing (SA) to create a comprehensive optimization framework. This hybrid optimization approach embodies the synergy among DPSO, GA and SA, and is able to dynamically adjust pricing and replenishment strategies. Experimental results demonstrate the effectiveness of this optimization strategy to maximize supermarket profitability while satisfying consumer and retailer demands. Finally, the transformative power of heuristic algorithms in retail management is exemplified and the utilization of data-driven strategies associated with them is advocated for better and sustainable development.