

In the field of inventory management, due to the rapid development of artificial intelligence technology, especially data mining and machine learning, new research paradigm has been added to inventory decision-making. Compared with demand forecasting based on sales volume in previous studies, existing research aims to more fully utilize various ancillary information related to products to assist decision-making. In addition, compared with the traditional two-step decision-making (predict first and then optimize), the end-to-end (E2E) proposed in recent years can effectively avoid errors caused by the intermediate process. Based on the idea of E2E, this paper builds an end-to-end integration model E2E-Weighted on how to make optimal ordering decisions for e-commerce companies under the conditions of inventory backlog and service level target constraints. This paper also iteratively developed the model solution method KNN-Weighted based on the KNN algorithm. Results proves that as the number of samples increases, the KNN-Weighted algorithm converges to the theoretical optimal value and is better than other traditional algorithms. Furthermore, the E2E-Weighted model is more suitable for situations with high inventory target service levels.