A method for assembling luggage includes: hierarchically classifying the luggage according to the characteristics of the luggage and the total number of layers to obtain the classification hierarchy of each line of luggage; S2, numbering the luggage for each classification level, and establishing a knapsack problem model according to the characteristics of the luggage, wherein the knapsack problemmodel takes the maximum distribution profit of all the parcels as an objective function; S3, solving the objective function by adopting a dynamic programming algorithm and a greedy method, and obtaining an assembly scheme ofthe luggage. Through layered classification of goods, and in the process of classification, based on the fragility of bags and other characteristics, for each layer, according to the characteristics of bags and benefits maximization, the knapsack problem model is built, greedy method is used to solve, so as to obtain the assembly plan of the luggage.