With the increasing scale of e-commerce and logistics, factors such as the types, quantities, and volumes of goods sorted in logistics have made the sorting process more difficult. A single serial logistics workshop sorting method cannot meet the growing business needs, with low sorting speed and inability to make reasonable use of sorting machine resources. This article proposes a distributed logistics system commodity sorting algorithm, which sorts multiple types of goods through multiple machines and divides the sorting task into multiple stages for processing. We present the Distributed Dynamic Programming Memetic System (DDPMS): (1) Parallel sorting process architecture realizes multi-stage parallel acceleration, and dynamic programming algorithm plans the execution order of commodity sorting tasks to reduce total sorting time. (2) The meme algorithm first initializes the sorting machine scheduling scheme through an improved dragonfly algorithm, and the mutation operator prevents the solution from falling into local optima. (3) And a local reinforcement search optimization solution based on fuzzy Q-Learning was designed, using the Softmax Green strategy to cope with more complex machine resource sizes and quantities. Improve resource utilization, reduce sorting time, and ensure system load balancing. Through experimental verification, the execution efficiency of distributed sorting technology has been improved by 2 and 4 times compared to traditional algorithms; By comparing the improved Dragonfly algorithm with different numbers of sorting machines and single machine instances, the algorithm converges to a more optimal solution compared to the baseline algorithm. Fuzzy Q-Learning also has advantages in terms of search ability and efficiency.