Abstract The rapid development of China’s economy, especially the rapid rise of the logistics and distribution industry in recent years, coupled with the rise of e-commerce in recent years, has created a huge impact on the traditional logistics industry. Aiming at the sorting system of small and medium-sized logistics distribution centrer, this paper proposes an item allocation strategy based on customer demand in combination with practical application requirements and adopts the direct dynamic clustering algorithm based on hierarchical clustering. As a clustering index, all items in the distribution centre are clustered and the final clustering result is obtained. The results show that the maximum value of segmentation using the single connection method is 5.8, reflecting that the distribution distance is more advantageous; the maximum value of the segmentation method using the median method is 2.94, and the minimum value is 2.35, which reflects that the result of the algorithm is relatively uniform. A reasonable item allocation strategy has a certain positive effect and influence on the development of modern logistics and the service quality of the logistics industry.