The invention discloses a warehouse location allocation method based on two-factor optimization, the invention is guided by factor weight replay, First, according to the storage status of the currentwarehouse materials, A static mapping table of the original material stacking method is formed, the information of operators' experience and habits in slicing for a period of time is formed into the first standardized data which can be referenced, At that same time, base on the material stacking rule, Material outbound correlation and material flow frequency, A material association dynamic map table is formed, As a second standardized reference, Finally, based on the small weight of the two-factor product, select the appropriate mapping table and obtain the location of the goods to be warehoused, and guide the goods storage from the static mapping table according to the original material stacking mode to the dynamic mapping table of the material association according to the results of thetwo-factor weight repetition, and finally realize the transformation of the original material storage mode of the warehouse.