The application relates to a commodity sales prediction method and
system, and belongs to the technical field of sales prediction. The method comprises the following steps: obtaining a historical sales sequence and attribute information of a target commodity, identifying a cold-start commodity based on sequence length; training a
time sequence representation
encoder through self-
supervised learning based on the sales sequence of a non-cold-start commodity, and extracting a
time sequence representation representing sales change rules; for the cold-start commodity, extracting the
time sequence representation through the
encoder and calculating a
quality score, determining a similar commodity set based on the attribute information and generating a migration representation, calculating a dynamic historical information proportion according to the historical sales sequence length and the
quality score, fusing the time sequence representation and the migration representation to obtain a fused representation, and outputting a future sales prediction value that has been trend calibrated based on the fused representation. Through self-
supervised learning, general time sequence rules are extracted, external migration information is dynamically fused based on the historical sales sequence, and the accuracy and stability of commodity sales prediction in a cold-start
scenario are effectively improved.