Product sales prediction method and system based on AI model

By constructing a linear model of marginal sales and total demand, combined with gradient enhancement decision tree, K-mean clustering and genetic algorithm optimization parameters, the problem of difficulty in sales forecasting of fashion products is solved and more accurate sales and profit forecasts are achieved.

CN119919177AInactive Publication Date: 2025-05-02肇庆宝杰富硒科技有限公司 +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411992221.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-05-02
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Fashion product sales forecasts have become difficult against the backdrop of low inventory strategies and low inventory levels, resulting in severe demand for review.

Method used

Using the product sales forecasting method based on AI model, by constructing a marginal sales model and a linear model of total demand, combining gradient enhancement decision tree, K-mean clustering and genetic algorithm, the parameters of the sales forecasting model are optimized to accurately predict sales and profits.

Benefits of technology

It effectively solves the problem of difficult to predict sales profits. Through a variety of processing optimization parameters, more accurate sales forecasts are achieved, helping enterprises optimize inventory management and pricing decisions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119919177A_ABST
    Figure CN119919177A_ABST
Patent Text Reader

Abstract

The invention belongs to the field of artificial intelligence, and provides a product sales prediction method and system based on an AI model, and the method comprises the steps: controlling the decrease rate of marginal sales, the inventory and the total demand based on a conversion ratio, constructing a marginal sales model, and carrying out the prediction of the marginal sales based on the number of products, the features of the products and the influence of the features on the demands of the products. Constructing a linear model for estimating the total demand, and forming a sales prediction model by the two models; the method comprises the following steps: collecting sales record data and attributes of products, preprocessing the sales record data to form a first data set, performing importance sorting on features in the first data set based on a gradient boosting decision tree, and selecting important features to form a second data set; performing multi-term optimization estimation on the parameters; iterating the expected sales of the marginal sales in different stocks based on the sales prediction model to obtain a final sales profit; the problem that fashion product sales prediction is difficult in the prior art can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence, and in particular to a product sales forecasting method and system based on an AI model. Background Art

[0002] Sales forecasting is a vital task in the fashion retail industry and is an integral part of many core fashion retail processes, including functional areas such as pricing and inventory management, marketing and production sourcing, and finance and accounting. Sales forecasting also provides the basis for regional allocation and replenishment planning. Therefore, the ability to estimate likely sales quantities can lead to improved customer satisfaction, reduced waste, increased sales revenue and more effective and efficient production planning as a post-sales service. In general, accurate sales forecasting is a prerequisite for effectively competing in the fashion industry.

[0003] Currently, the low inventory strategy for fashion products and the low inventory level in each physical store have led to serious review demand issues, making sales forecasting difficult. Summary of the invention

[0004] In view of the above technical problems, the present invention provides a product sales forecasting method and system based on an AI model to solve the problem of difficulty in fashion product sales forecasting in the prior art.

[0005] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present disclosure.

[0006] The present invention discloses a product sales forecasting method based on an AI model, the method comprising:

[0007] Based on the conversion ratio, the rate at which the marginal sales volume decreases, the inventory, and the total demand, a model of marginal sales volume is constructed, wherein the marginal sales volume is defined as the change in sales volume when the inventory increases by one unit, and based on the product quantity, product characteristics, and the effect of the characteristics on the product demand, a linear model for estimating the total demand is constructed, and the model of marginal sales volume is used as the second layer and the linear model of total demand is used as the first layer to form a sales forecasting model;

[0008] Collecting sales record data and attributes of products, preprocessing them to form a first data set, ranking the features in the first data set by importance based on a gradient boosting decision tree, and selecting important features to form a second data set;

[0009] Clustering the second data set based on the K-means clustering algorithm, and using the silhouette coefficient to evaluate the clustering effect to select the optimal number of clusters, and within each cluster, using a genetic algorithm to optimize and estimate the parameters of the sales forecasting model;

[0010] Based on the first layer of the sales forecasting model, the product demand is estimated. Based on the second layer of the sales forecasting model, the marginal sales of each inventory unit is calculated according to the estimated product demand and inventory. The expected sales under different inventories of the marginal sales are iterated to obtain the final sales profit.

[0011] Furthermore, the marginal sales model is expressed as:

[0012]

[0013] Wherein, q is the conversion ratio, q∈[0,1], which is determined by the characteristics of the product, α is the rate of control of the marginal sales decline, I is the inventory, D is the total demand, and S(I-1) represents the sales when the inventory is I-1;

[0014] The linear model of total demand is expressed as:

[0015]

[0016] Where n is the number of products, D i is the demand for product i, β1 is the impact of the feature on product demand, X i is the product characteristic, β0 is a constant;

[0017] When iteratively calculating the final sales profit, calculate

[0018] Furthermore, according to the different sizes of the conversion ratio and the rate of controlling the decline in marginal sales, the products are divided into main products, ordinary products and targeted products, the main products are products having the conversion ratio and rate greater than a threshold, the ordinary products are products having the conversion ratio greater than a threshold and a rate less than a threshold, and the targeted products are products having the conversion ratio and rate less than a threshold.

[0019] Further, the preprocessing includes:

[0020] Delete data with missing values ​​exceeding a preset ratio;

[0021] Fill and normalize continuous data;

[0022] One-hot encode discrete data.

[0023] Further, using the gradient boosting decision tree to rank the features in the first data set by importance includes:

[0024] Initializing features in the first data set, where the features in the first data set include price, size, color, seasonality, supplier code, and product type of the product;

[0025] The GBDT algorithm is trained by constructing multiple decision trees, and during the training process of each decision tree, the contribution of each feature to reducing the error of the sales forecasting model is evaluated;

[0026] Calculate the importance score of each feature for each decision tree, and then calculate the average importance score of each feature for all decision trees to obtain the global importance score of each feature;

[0027] According to the global importance score, the features are sorted from high to low in importance, and important features are selected to form a plurality of the first data sets;

[0028] Based on a five-fold cross-validation method, the prediction performance of different first data sets is evaluated, and by comparing the cross-validation results of different first data sets, the first data set with the smallest mean absolute percentage error is selected.

[0029] Furthermore, clustering the second data set based on the K-means clustering algorithm and evaluating the clustering effect using the silhouette coefficient to select the optimal number of clusters includes:

[0030] Calculating the distance between the feature vectors of two products in the second data set, wherein the feature vector includes continuous features and categorical features,

[0031] Assigning the features to the nearest cluster center based on the distance to group them into clusters, wherein the cluster center is the mean of the features;

[0032] The silhouette coefficient is used to measure the cohesion and separation of clusters to evaluate the clustering effect;

[0033] The number of clusters with the largest silhouette coefficient is selected as the optimal number of clusters.

[0034] Furthermore, the use of a genetic algorithm to optimize and estimate the parameters of the sales forecasting model includes:

[0035] Based on the genetic algorithm, the conversion ratio, the rate of decline of marginal sales, and the influence of characteristics on product demand among the parameters are optimized to minimize the gap between actual sales and predicted sales;

[0036] During optimization, executing: selecting the parameter with better performance based on the fitness function, combining the parameters of two individuals, and randomly changing the parameters;

[0037] Iterative optimization makes the parameters tend to the optimal solution.

[0038] According to another aspect of the present disclosure, a product sales forecasting system based on an AI model is disclosed, comprising:

[0039] A model building module, the model building module is used to build a marginal sales model based on the conversion ratio, the rate of control of marginal sales decline, inventory, and total demand, the marginal sales being defined as the change in sales when inventory increases by one unit, and to build a linear model for estimating the total demand based on product quantity, product characteristics, and the impact of characteristics on product demand, using the marginal sales model as the second layer and the linear model of total demand as the first layer to form a sales forecasting model;

[0040] A data preprocessing module, the data preprocessing module is used to collect sales record data and attributes of products, preprocess them to form a first data set, sort the features in the first data set by importance based on a gradient boosting decision tree, and select important features to form a second data set;

[0041] An optimization module, the optimization module is used to cluster the second data set based on a K-means clustering algorithm, and use a silhouette coefficient to evaluate the clustering effect to select an optimal number of clusters, and use a genetic algorithm to optimize and estimate the parameters of the sales forecasting model within each cluster;

[0042] A forecasting module, wherein the forecasting module estimates the product demand based on the first layer of the sales forecasting model, calculates the marginal sales of each inventory unit based on the estimated product demand and inventory based on the second layer of the sales forecasting model, iterates the expected sales under different inventories of the marginal sales, and obtains the final sales profit

[0043] The technical solution disclosed in this disclosure has the following beneficial effects:

[0044] According to sales, inventory and demand, the sales forecasting model is constructed by using the conversion ratio of inventory to sales, and the concept of marginal sales is constructed. The model obtains the predicted sales by iterating the marginal sales, that is, the sales profit, which solves the problem of difficult prediction of sales profit in the existing technology.

[0045] The parameters of the sales forecasting model are optimized in various ways, which can predict sales more accurately. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] Figure 1 This is a flowchart of a product sales prediction method based on an AI model in an embodiment of this specification;

[0047] Figure 2This is a structural block diagram of a product sales forecasting system based on an AI model in an embodiment of this specification. DETAILED DESCRIPTION

[0048] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as being limited to the examples set forth herein; on the contrary, these embodiments are provided so that the present disclosure will be more comprehensive and complete, and the concepts of the example embodiments are fully conveyed to those skilled in the art. The described features, structures, or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known technical solutions are not shown or described in detail to avoid obscuring various aspects of the present disclosure.

[0049] like Figure 1 As shown, the embodiment of this specification provides a product sales forecasting method based on an AI model, the method is executed in a computer or a server, and the method specifically includes steps S101-104:

[0050] In step S101, a marginal sales model is constructed based on the conversion ratio, the rate of control of marginal sales decline, inventory, and total demand. The marginal sales is defined as the change in sales when the inventory increases by one unit. A linear model for estimating the total demand is constructed based on the product quantity, product characteristics, and the impact of the characteristics on the product demand. The marginal sales model is used as the second layer, and the linear model of total demand is used as the first layer to form a sales forecasting model.

[0051] The marginal sales model is expressed as follows:

[0052]

[0053] Where q is the conversion ratio, α∈[0,1], which is determined by the characteristics of the product, α controls the rate of decline of the marginal sales, I is the inventory, D is the total demand, and S(I-1) represents the sales when the inventory is I-1. The above formula describes the relationship between sales, inventory and demand. When the inventory is I, the sales of the product can be obtained by iterative calculation: Calculating sales and costs will yield the predicted sales profit for the product.

[0054] It is the proportion of demand that is satisfied. When the proportion is small, there is still a lot of demand that is not satisfied, so adding one unit of inventory can bring a larger marginal sales. When the ratio is close to 1, the user's demand for the product has been largely satisfied, and the inventory increase is difficult to convert into sales, resulting in a smaller marginal sales. In general, the marginal sales that decrease as sales increase can be described as: For some products, users have a strong desire to find stores with inventory. Therefore, these products have a higher chance of being discovered, and the rate of decline of marginal sales as sales increase is relatively small. Here, α is used to control the rate of decline. When α approaches infinity, marginal sales will remain at the level of conversion ratio. Combining the inherent characteristics of the product and the impact of potential customers on sales, when the inventory increases by one unit, the final increase in sales units is to decide.

[0055] q and α are important parameters. According to their differences, products are divided into main products, ordinary products and targeted products. The main products are products with q and α greater than the threshold, the ordinary products are products with q greater than the threshold and α less than the threshold, and the targeted products are products with q and α less than the threshold. Main products are products with high customer stickiness and enthusiasm, and they are willing to make efforts to find them. Ordinary products are products with basic or classic styles, and their demand is stable, but when the difficulty of finding them increases, customers will give up looking for them. For example, when a certain ordinary product is out of stock in the physical store that a customer enters, it is unlikely that the customer will go to another store specifically just to find the product. Targeted products are designed for a minority group and have the lowest conversion rate.

[0056] The linear model of total demand for a product is expressed as:

[0057]

[0058] Where n is the number of products, D i is the demand for product i, β1 is the impact of the feature on product demand, X i is the product characteristic, and β0 is a constant. Since the model is used to predict the total sales of new products, and demand is determined by the inherent characteristics of the product, such as price, factory cost, color, etc., sales are not included in X when estimating demand. i Features.

[0059] In step S102, the sales record data and attributes of the product are collected and preprocessed to form a first data set. The features in the first data set are ranked by importance based on a gradient boosting decision tree, and important features are selected to form a second data set.

[0060] The sales record data may include sales volume, price, inventory level, sales date and other information. The collected raw data may be cleaned and preprocessed to handle missing values, outliers, duplicate records, and convert the data into a format suitable for model analysis. When using the gradient boosting decision tree algorithm to evaluate the importance of features in the first data set, the gradient boosting decision tree algorithm will evaluate the contribution of each feature to the model's predictive ability during the process of building the decision tree, and then select features that are more important for sales prediction to form the second data set, which can reduce the amount of calculation and improve the speed and accuracy of model training and prediction.

[0061] In step S103, the second data set is clustered based on the K-means clustering algorithm, and the clustering effect is evaluated using the silhouette coefficient to select the optimal number of clusters, and within each cluster, the parameters of the sales forecasting model are optimized and estimated using a genetic algorithm.

[0062] Among them, the second data set is clustered based on the K-means clustering algorithm, and the products can be divided into different groups (i.e., clusters) according to their characteristics. This method takes into account the heterogeneity between products, that is, different products may have different sales dynamics and demand patterns. Using the silhouette coefficient as an indicator to evaluate the clustering effect can help determine whether the cluster to which each product belongs is reasonable. A cluster with a high silhouette coefficient means that the members within the cluster are highly similar, but the members of other clusters are significantly different. By calculating the silhouette coefficient under different numbers of clusters, the number of clusters that produces the best silhouette coefficient can be selected, thereby determining the number of clusters that best represents the data characteristics. Within each selected cluster, a genetic algorithm is used to optimize the parameters of the sales forecasting model, and the genetic algorithm can search in a complex parameter space to find the parameter set that makes the model prediction fit the actual sales data best. The optimized model parameters not only perform well on the training data, but also can be better generalized to new and unseen data.

[0063] In step S104, based on the first layer of the sales forecasting model, the product demand is estimated, based on the second layer of the sales forecasting model, according to the estimated product demand and inventory, the marginal sales of each inventory unit is calculated, and the expected sales of the marginal sales under different inventories are iterated to obtain the final sales profit.

[0064] Among them, the first layer of the sales forecasting model, i.e., the linear regression model, is used to estimate the total demand D of each product based on the characteristics of the product (such as price, cost, color, etc.). This step does not involve inventory data, and the purpose is to determine the maximum market demand for the product under ideal conditions (i.e., inventory is not restricted). The second layer of the sales forecasting model is used to combine the demand estimate obtained in the first layer with the actual inventory level to calculate the marginal sales of each inventory unit. Marginal sales refers to the change in expected sales when the inventory increases by one unit, which is related to the conversion rate and the rate of decline in the demand satisfaction ratio. Finally, through iterative calculations, the marginal sales and different levels of inventory are combined to obtain the expected sales at each inventory level, thereby predicting the sales of the product. After obtaining the sales forecast, the expected profit can be further estimated, which helps enterprises make pricing decisions, cost control and financial planning. At the same time, enterprises can better formulate inventory management strategies, optimize inventory levels, and reduce inventory backlogs or out-of-stock risks.

[0065] In one embodiment, the preprocessing includes: deleting data with missing values ​​exceeding a preset ratio; filling and normalizing continuous data; and performing one-hot encoding on discrete data.

[0066] Among them, deleting data with missing values ​​exceeding a preset ratio means: if a record (usually a row in a data set) has more than half of its values ​​missing, then the record will be deleted as a whole. When filling and normalizing continuous data, filling means: missing values ​​in continuous data can be filled in different ways, such as using the mean, median, or values ​​predicted by a specific algorithm; normalization means: scaling continuous data to a small, specified range, such as [0,1], to eliminate the effects of different dimensions and improve the convergence speed and accuracy of the algorithm. One-hot encoding of discrete data means: converting categorical variables into a form that can be better handled by machine learning algorithms, by creating a new binary column for each category, where the column value corresponding to one category is 1 and the rest are 0. In addition, continuous data can be price, etc., and discrete data can be product type, color, etc.

[0067] In one embodiment, the features in the first data set are sorted by importance using the gradient boosting decision tree, including: initializing the features in the first data set, the features in the first data set including product price, size, color, seasonal factors, supplier code, and product type; training the GBDT algorithm by constructing multiple decision trees, and during the training process of each decision tree, evaluating the contribution of each feature to reducing the error of the sales forecasting model; calculating the importance score of each feature for each decision tree, and then calculating the average importance score of each feature for all decision trees to obtain a global importance score for each feature; according to the global importance score, sorting the features from high to low in importance, and selecting important features to form multiple first data sets; based on the five-fold cross-validation method, evaluating the prediction performance of different first data sets, and selecting the first data set with the smallest mean absolute percentage error by comparing the cross-validation results of different first data sets.

[0068] Among them, according to the formula m org represents the initial number of features, It is expressed as the importance of the jth feature in a single decision tree, L-1 is the number of non-leaf nodes in the decision tree T, is the indicator function, v t is the feature related to node t, is the square loss corresponding to the reduction due to the split. The global importance of the jth feature is measured by the average importance of the jth feature in a single tree:

[0069]

[0070] H is the number of numbers, T h It refers to the h-th decision tree.

[0071] In one embodiment, the second data set is clustered based on the K-means clustering algorithm, and the silhouette coefficient is used to evaluate the clustering effect to select the optimal number of clusters, including: calculating the distance between the feature vectors of two products in the second data set, the feature vector includes continuous features and categorical features, and assigning the features to the nearest cluster center based on the distance to group them into clusters, and the cluster center is the mean of the features; using the silhouette coefficient to measure the cohesion and separation of the clusters to evaluate the clustering effect; and selecting the cluster number with the largest silhouette coefficient as the optimal cluster number.

[0072] Among them, the products are heterogeneous and have different parameters q and α, so it is necessary to cluster these products and estimate the parameters separately so that each cluster shares the same q, α, β0 and β1. Since the products have both continuous and categorical features, a hybrid K-means clustering algorithm is used, and X1 = (X 11 ,X 12 ,...,X 1m ) T , X2=(X 21 ,X 22 ,...,X 2m ) T , to represent the feature vectors of the two products, then the distance between the two can be expressed as:

[0073]

[0074] Among them, the first mr is a numerical feature, the remaining m-mr are categorical features, w is the significance function of the numerical feature, and δ is the custom distance function of the categorical feature.

[0075] Since if the number of clusters is too small, the differences of the products will not be reflected, but if it is too large, it will lead to overdispersion, the silhouette coefficient used can be defined as:

[0076]

[0077] Among them, a(X i ) is the sample X i The average distance to other samples in its cluster, b(X i ) is the sample X i The average distance to all samples in the nearest cluster, the higher the value of the silhouette coefficient, the better the clustering effect, and the number of clusters with the maximum silhouette coefficient is selected to perform clustering and establish the sales forecasting model.

[0078] In one embodiment, the use of a genetic algorithm to optimize and estimate the parameters of the sales forecasting model includes: based on the genetic algorithm, optimizing the conversion ratio in the parameters, controlling the rate of decline of marginal sales, and the impact of characteristics on product demand to minimize the gap between actual sales and predicted sales; during optimization, executing: selecting the parameters with better performance based on a fitness function, combining the parameters of two individuals, and randomly changing the parameters; and iterative optimization so that the parameters tend toward the optimal solution.

[0079] As can be seen from the above, the present invention constructs a sales forecasting model based on sales, inventory and demand, using the conversion rate from inventory to sales, and constructs the concept of marginal sales. The model obtains predicted sales by iterating marginal sales, that is, sales profit, which well solves the problem of difficult prediction of sales profit in the prior art.

[0080] The parameters of the sales forecasting model are optimized in various ways, which can predict sales more accurately.

[0081] Based on the same content, such as Figure 2 As shown, a product sales forecasting system based on an AI model is provided, the system comprising: a model building module 201, the model building module 201 is used to build a marginal sales model based on a conversion ratio, a rate of controlling a decrease in marginal sales, inventory, and total demand, the marginal sales being defined as the change in sales when inventory increases by one unit, and to build a linear model for estimating the total demand based on product quantity, product features, and the impact of features on product demand, the marginal sales model being used as a second layer, and the total demand linear model being used as a first layer, so as to form a sales forecasting model;

[0082] A data preprocessing module 202, the data preprocessing module 202 is used to collect product sales record data and attributes thereof, preprocess the data to form a first data set, sort the features in the first data set by importance based on a gradient boosting decision tree, and select important features to form a second data set;

[0083] An optimization module 203, the optimization module 203 is used to cluster the second data set based on the K-means clustering algorithm, and use the silhouette coefficient to evaluate the clustering effect to select the optimal number of clusters, and use a genetic algorithm to optimize and estimate the parameters of the sales forecasting model within each cluster;

[0084] The forecasting module 204 estimates the product demand based on the first layer of the sales forecasting model, calculates the marginal sales of each inventory unit based on the estimated product demand and inventory based on the second layer of the sales forecasting model, iterates the expected sales of the marginal sales under different inventories, and obtains the final sales profit.

[0085] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and embodiments are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.

Claims

1. A product sales forecasting method based on AI model, characterized in that: The method comprises: Based on the conversion ratio, the rate at which the marginal sales volume decreases, the inventory, and the total demand, a model of marginal sales volume is constructed, wherein the marginal sales volume is defined as the change in sales volume when the inventory increases by one unit, and based on the product quantity, product characteristics, and the effect of the characteristics on the product demand, a linear model for estimating the total demand is constructed, and the model of marginal sales volume is used as the second layer and the linear model of total demand is used as the first layer to form a sales forecasting model; Collecting sales record data and attributes of products, preprocessing them to form a first data set, ranking the features in the first data set by importance based on a gradient boosting decision tree, and selecting important features to form a second data set; Clustering the second data set based on the K-means clustering algorithm, and using the silhouette coefficient to evaluate the clustering effect to select the optimal number of clusters, and within each cluster, using a genetic algorithm to optimize and estimate the parameters of the sales forecasting model; Based on the first layer of the sales forecasting model, the product demand is estimated. Based on the second layer of the sales forecasting model, the marginal sales of each inventory unit is calculated according to the estimated product demand and inventory. The expected sales under different inventories of the marginal sales are iterated to obtain the final sales profit.

2. The product sales forecasting method based on AI model according to claim 1, characterized in that: According to the different sizes of the conversion ratio and the rate of controlling the decline in marginal sales, products are divided into main products, ordinary products and targeted products. The main products are products with the conversion ratio and rate greater than a threshold, the ordinary products are products with the conversion ratio greater than a threshold and a rate less than a threshold, and the targeted products are products with the conversion ratio and rate less than a threshold.

3. The product sales forecasting method based on AI model according to claim 1, characterized in that: The pre-processing comprises: Delete data with missing values ​​exceeding a preset ratio; Fill and normalize continuous data; One-hot encode discrete data.

4. The product sales forecasting method based on AI model according to claim 1, characterized in that: Using the gradient boosting decision tree to sort the features in the first data set by importance includes: Initializing features in the first data set, where the features in the first data set include price, size, color, seasonality, supplier code, and product type of the product; The GBDT algorithm is trained by constructing multiple decision trees, and during the training process of each decision tree, the contribution of each feature to reducing the error of the sales forecasting model is evaluated; Calculate the importance score of each feature for each decision tree, and then calculate the average importance score of each feature for all decision trees to obtain the global importance score of each feature; According to the global importance score, the features are sorted from high to low in importance, and important features are selected to form a plurality of the first data sets; Based on a five-fold cross-validation method, the prediction performance of different first data sets is evaluated, and by comparing the cross-validation results of different first data sets, the first data set with the smallest mean absolute percentage error is selected.

5. The product sales forecasting method based on AI model according to claim 1, characterized in that: The step of clustering the second data set based on the K-means clustering algorithm and evaluating the clustering effect using the silhouette coefficient to select the optimal number of clusters includes: Calculating the distance between the feature vectors of two products in the second data set, wherein the feature vector includes continuous features and categorical features, Assigning the features to the nearest cluster center based on the distance to group them into clusters, wherein the cluster center is the mean of the features; The silhouette coefficient is used to measure the cohesion and separation of clusters to evaluate the clustering effect; The number of clusters with the largest silhouette coefficient is selected as the optimal number of clusters.

6. The product sales forecasting method based on AI model according to claim 1, characterized in that: The method of using a genetic algorithm to optimize and estimate the parameters of the sales forecasting model includes: Based on the genetic algorithm, the conversion ratio, the rate of decline of marginal sales, and the influence of characteristics on product demand among the parameters are optimized to minimize the gap between actual sales and predicted sales; During optimization, executing: selecting the parameter with better performance based on the fitness function, combining the parameters of two individuals, and randomly changing the parameters; Iterative optimization makes the parameters tend to the optimal solution.

7. A product sales forecasting system based on an AI model, comprising: A model building module, the model building module is used to build a marginal sales model based on the conversion ratio, the rate of control of marginal sales decline, inventory, and total demand, the marginal sales being defined as the change in sales when inventory increases by one unit, and to build a linear model for estimating the total demand based on product quantity, product characteristics, and the impact of characteristics on product demand, using the marginal sales model as the second layer and the linear model of total demand as the first layer to form a sales forecasting model; A data preprocessing module, the data preprocessing module is used to collect sales record data and attributes of products, preprocess them to form a first data set, sort the features in the first data set by importance based on a gradient boosting decision tree, and select important features to form a second data set; An optimization module, the optimization module is used to cluster the second data set based on a K-means clustering algorithm, and use a silhouette coefficient to evaluate the clustering effect to select an optimal number of clusters, and use a genetic algorithm to optimize and estimate the parameters of the sales forecasting model within each cluster; A forecasting module estimates the product demand based on the first layer of the sales forecasting model, calculates the marginal sales of each inventory unit based on the estimated product demand and inventory based on the second layer of the sales forecasting model, iterates the marginal sales to calculate the expected sales under different inventories, and obtains the final sales profit.