Product information prediction model construction method and product information prediction method
By using Embedding network and DNN network to process historical categories and continuous variables in the product information prediction model, the problem of low accuracy of information prediction in traditional methods is solved, and high accuracy prediction of product information of multiple categories is achieved.
Patent Information
- Application Number
- CN202010711613.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-07-22
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2040-07-22
AI Technical Summary
Traditional machine learning methods have low accuracy in information prediction when processing information in multiple product categories.
By obtaining the historical product information data of the SKU to be predicted, the historical category variables and continuous variables are input into the initial product information prediction model, which includes the Embedding network and the DNN network. The Embedding network converts historical category variables into category feature vectors, and the DNN network processes the spliced feature vectors to generate prediction results. According to the preset loss function and prediction results, update the model parameters to improve prediction accuracy.
By effectively processing historical category variables, a product information prediction model can improve the accuracy of information prediction, and accurate prediction of product information of multiple categories is achieved.
Smart Images

Figure CN113971471B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a product information prediction model construction method and a product information prediction method. Background Art
[0002] With the development of computer technology, product information forecasting technology has emerged. Product information forecasting technology is mainly used to use big data to predict product information in the future. Big data refers to a collection of data that cannot be captured, managed and processed by conventional software tools within a certain time frame. It is a massive, high-growth and diversified information asset that requires new processing models to have stronger decision-making power, insight discovery and process optimization capabilities. By using big data to predict product information in the future, it can provide a basis for planning and decision-making.
[0003] In traditional technology, product information prediction is performed by analyzing product data using machine learning. Machine learning can perform feature engineering on product data to obtain predicted product information based on the characteristics of the product data.
[0004] However, the machine learning methods in traditional technologies cannot handle a wide variety of product category information well, and there is a problem of low information prediction accuracy. Summary of the invention
[0005] Based on this, it is necessary to provide a product information prediction model construction method and a product information prediction method that can improve the accuracy of information prediction in response to the above technical problems.
[0006] A method for constructing a product information prediction model, the method comprising:
[0007] Obtain historical product information data of the SKU (Stock keeping Unit) to be predicted;
[0008] Inputting historical categorical variables and historical continuous variables in the historical product information data into an initial product information prediction model, wherein the initial product information prediction model includes an Embedding network and a DNN (Deep Neural Networks) network;
[0009] Convert historical categorical variables into categorical feature vectors through the Embedding network;
[0010] Concatenate the category feature vector and the historical continuous variable to obtain the feature vector to be trained, input the feature vector to be trained into the DNN network, and obtain the prediction result of the product information to be compared;
[0011] Determine the current descending gradient of the model parameters in the initial product information prediction model according to the preset loss function and the prediction result of the product information to be compared;
[0012] The model parameters are updated according to the current descent gradient to obtain the product information prediction model.
[0013] In one embodiment, converting the historical category variables into category feature vectors through the Embedding network includes:
[0014] The historical categorical variables are converted into integer labels through the Embedding network, and the integer labels are encoded and converted to obtain the categorical variable encoding vector corresponding to the historical categorical variables. The categorical variable encoding vector is subjected to matrix operation according to the preset weight vector to obtain the categorical feature vector used to represent the historical categorical variables.
[0015] In one embodiment, according to a preset loss function and the prediction result of the product information to be compared, determining the current descending gradient of the model parameters in the initial product information prediction model includes:
[0016] Calculate the current gradient of the model parameters in the initial product information prediction model according to the preset loss function and the prediction result of the product information to be compared;
[0017] The historical gradient of the model parameters in the initial product information prediction model is obtained, and the current descent gradient of the model parameters in the initial product information prediction model is calculated based on the historical gradient and the current gradient.
[0018] A product information prediction method, the method comprising:
[0019] Obtain product information data of the SKU to be predicted;
[0020] The product category variables and product continuous variables in the product information data are input into the trained product information prediction model to obtain the product information prediction result of the SKU to be predicted. The trained product information prediction model is constructed according to the above-mentioned product information prediction model construction method.
[0021] In one embodiment, the product category variables and product continuous variables in the product information data are input into the trained product information prediction model to obtain the product information prediction result of the SKU to be predicted, including:
[0022] Inputting the product category variables and the product continuous variables in the product information data into at least two trained product information prediction models to obtain product information prediction results corresponding to each product information prediction model;
[0023] Calculate the average of the product information prediction results corresponding to each product information prediction model to obtain an average product information prediction result;
[0024] Obtaining time attribute information and category attribute information corresponding to the average product information prediction result;
[0025] The average product information prediction result is adjusted according to the time attribute information and the category attribute information to obtain the product information prediction result of the SKU to be predicted.
[0026] In one embodiment, the average product information prediction result is adjusted according to the time attribute information and the category attribute information to obtain the product information prediction result of the SKU to be predicted, including:
[0027] Query preset time adjustment information according to time attribute information, and query preset category adjustment information according to category attribute information;
[0028] When the corresponding target time information is found in the preset time adjustment information, the time adjustment coefficient of the target time information is obtained from the preset time adjustment information, and the average product information prediction result is adjusted according to the time adjustment coefficient to obtain the product information prediction result of the SKU to be predicted;
[0029] When the corresponding target category information is found in the preset category adjustment information, the category adjustment coefficient of the target category information is obtained from the preset category adjustment information, and the average product information prediction result is adjusted according to the category adjustment coefficient to obtain the product information prediction result of the SKU to be predicted.
[0030] In one embodiment, after the product category variables and product continuous variables in the product information data are input into the trained product information prediction model to obtain the product information prediction result of the SKU to be predicted, the method further includes:
[0031] Get the real results of the product information of the SKU to be predicted;
[0032] Compare the actual product information results with the product information prediction results to obtain the evaluation results of the product information prediction model;
[0033] The product information prediction model is adjusted based on the evaluation results.
[0034] A product information prediction model construction device, the device comprising:
[0035] The acquisition module is used to obtain the historical product information data of the SKU to be predicted;
[0036] An input module, used to input historical categorical variables and historical continuous variables in historical product information data into an initial product information prediction model, where the initial product information prediction model includes an Embedding network and a DNN network;
[0037] The variable conversion module is used to convert historical categorical variables into categorical feature vectors through the Embedding network;
[0038] The training module is used to concatenate the category feature vector and the historical continuous variable to obtain the feature vector to be trained, and input the feature vector to be trained into the DNN network to obtain the prediction result of the product information to be compared;
[0039] A processing module, used to determine the current descending gradient of the model parameters in the initial product information prediction model according to a preset loss function and the prediction result of the product information to be compared;
[0040] The updating module is used to update the model parameters according to the current descent gradient to obtain the product information prediction model.
[0041] A product information prediction device, comprising:
[0042] A data acquisition module is used to obtain product information data of the SKU to be predicted;
[0043] The prediction module is used to input the product category variables and product continuous variables in the product information data into the trained product information prediction model to obtain the product information prediction result of the SKU to be predicted. The trained product information prediction model is constructed according to the above-mentioned product information prediction model construction method.
[0044] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0045] Obtain historical product information data of the SKU to be predicted;
[0046] Inputting historical categorical variables and historical continuous variables in the historical product information data into an initial product information prediction model, the initial product information prediction model includes an Embedding network and a DNN network;
[0047] Convert historical categorical variables into categorical feature vectors through the Embedding network;
[0048] Concatenate the category feature vector and the historical continuous variable to obtain the feature vector to be trained, input the feature vector to be trained into the DNN network, and obtain the prediction result of the product information to be compared;
[0049] Determine the current descending gradient of the model parameters in the initial product information prediction model according to the preset loss function and the prediction result of the product information to be compared;
[0050] The model parameters are updated according to the current descent gradient to obtain the product information prediction model.
[0051] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0052] Obtain product information data of the SKU to be predicted;
[0053] The product category variables and product continuous variables in the product information data are input into the trained product information prediction model to obtain the product information prediction result of the SKU to be predicted. The trained product information prediction model is constructed according to the above-mentioned product information prediction model construction method.
[0054] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following steps:
[0055] Obtain historical product information data of the SKU to be predicted;
[0056] Inputting historical categorical variables and historical continuous variables in the historical product information data into an initial product information prediction model, the initial product information prediction model includes an Embedding network and a DNN network;
[0057] Convert historical categorical variables into categorical feature vectors through the Embedding network;
[0058] Concatenate the category feature vector and the historical continuous variable to obtain the feature vector to be trained, input the feature vector to be trained into the DNN network, and obtain the prediction result of the product information to be compared;
[0059] Determine the current descending gradient of the model parameters in the initial product information prediction model according to the preset loss function and the prediction result of the product information to be compared;
[0060] The model parameters are updated according to the current descent gradient to obtain the product information prediction model.
[0061] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following steps:
[0062] Obtain product information data of the SKU to be predicted;
[0063] The product category variables and product continuous variables in the product information data are input into the trained product information prediction model to obtain the product information prediction result of the SKU to be predicted. The trained product information prediction model is constructed according to the above-mentioned product information prediction model construction method.
[0064] The above-mentioned product information prediction model construction method and product information prediction method convert historical category variables into category feature vectors through the Embedding network in the initial product information prediction model, concatenate the category feature vectors and the historical continuous variables to obtain the feature vectors to be trained, input the feature vectors to be trained into the DNN network in the initial product information prediction model, obtain the prediction results of the product information to be compared, determine the current descent gradient of the model parameters in the initial product information prediction model according to the preset loss function and the prediction results of the product information to be compared, update the model parameters according to the current descent gradient, and obtain the product information prediction model. The whole process can effectively utilize the historical category variables in the historical product information data of the SKU to be predicted, obtain the category feature vectors used to represent the historical category variables by processing the historical category variables, realize the processing of historical product information data of many types of SKU to be predicted, construct a product information prediction model that can improve the accuracy of information prediction, and realize accurate information prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0065] Figure 1 A diagram of an application environment of a product information prediction model construction method and a product information prediction method in one embodiment;
[0066] Figure 2 A schematic diagram of a process for constructing a product information prediction model in one embodiment;
[0067] Figure 3 A schematic diagram of a method for constructing a product information prediction model in one embodiment;
[0068] Figure 4 is a flow chart of a product information prediction method in one embodiment;
[0069] Figure 5 is a flow chart of a product information prediction method in another embodiment;
[0070] Figure 6 A structural block diagram of a device for building a product information prediction model in one embodiment;
[0071] Figure 7 is a structural block diagram of a product information prediction device in one embodiment;
[0072] Figure 8 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0073] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0074] The product information prediction model construction method and product information prediction method provided in this application can be applied to Figure 1 In the application environment shown. The terminal 102 communicates with the server 104 through the network. The server 104 obtains the product information data of the SKU to be predicted, inputs the product category variables and the product continuous variables in the product information data into the trained product information prediction model, obtains the product information prediction result of the SKU to be predicted, and pushes the product information prediction result of the SKU to be predicted to the terminal 102. The trained product information prediction model is constructed in the following manner: obtaining the historical product information data of the SKU to be predicted, inputting the historical category variables and the historical continuous variables in the historical product information data into the initial product information prediction model, the initial product information prediction model includes an Embedding network and a DNN network, converting the historical category variables into category feature vectors through the Embedding network, concatenating the category feature vectors and the historical continuous variables to obtain the feature vectors to be trained, inputting the feature vectors to be trained into the DNN network, obtaining the prediction result of the product information to be compared, determining the current descent gradient of the model parameters in the initial product information prediction model according to the preset loss function and the prediction result of the product information to be compared, updating the model parameters according to the current descent gradient, and obtaining the product information prediction model. The terminal 102 may be, but is not limited to, various personal computers, laptop computers, smart phones, tablet computers, and portable wearable devices, and the server 104 may be implemented as an independent server or a server cluster consisting of multiple servers.
[0075] In one embodiment, Figure 2 As shown in the figure, a method for constructing a product information prediction model is provided, and the method is applied to Figure 1 The server in the example is used to illustrate the following steps:
[0076] Step 202: Obtain historical product information data of the SKU to be predicted.
[0077] Among them, the SKU to be predicted refers to the inventory type to be predicted. The inventory type is represented by SKU. The SKUs of different inventory types are different. Different inventory types can be distinguished by the SKU code in the historical product information data. Different inventory types correspond to SKU codes one by one. Product information data refers to the product feature information of the inventory type, including SKU code, SKU category information, price, size, sales lead time, etc. For example, the coding basis of SKU code can be product classification and used materials. For example, SKU1 code: 2.608.657.551 is a machine part, its product category belongs to "decoration-grade circular saw blade", the material used is "wood", and the origin is "China". SKU2 code: 2.607.335.686 is a machine part, its product category belongs to "battery charger", the material used is "nickel-chromium battery charger", and the origin is "Poland".
[0078] Specifically, the server obtains historical product information data of the SKU to be predicted from a preset inventory database, and stores the historical product information data of the SKU to be predicted in the preset inventory database.
[0079] Step 204, inputting the historical categorical variables and the historical continuous variables in the historical product information data into the initial product information prediction model, the initial product information prediction model includes an Embedding network and a DNN network.
[0080] Among them, historical categorical variables refer to variables used to represent the category of the SKU to be predicted. For example, historical categorical variables can specifically refer to SKU codes, material categories, usage categories, source categories, functional categories, etc., period categories, etc., and period categories can specifically refer to the sales time period of the corresponding SKU to be predicted. For example, the period category can specifically be XXXX year XX month XX day. Historical continuous variables are used to represent the characteristics of the SKU to be predicted. For example, historical continuous variables can specifically refer to sliding window features, and sliding window features can specifically be sales in the corresponding month of the previous quarter, sales in the corresponding month of the same period last year, etc. For another example, historical continuous variables can specifically refer to holiday features, and holiday features are used to characterize the holiday situation corresponding to the time node. For example, holiday features can specifically refer to the proportion of holiday days in the month corresponding to the time node. For example, sliding window features can be represented by normalized sales values, and holiday features can be represented by the proportion of holiday days.
[0081] Among them, the initial product information prediction model includes Embedding network and DNN network. Embedding network can convert categorical variables into dense numerical vectors to characterize the correlation between different values of categorical variables. DNN network refers to deep neural network. The usual DNN network includes input layer, hidden layer and output layer. Generally speaking, the first layer is the input layer, the last layer is the output layer, and the remaining intermediate layers are hidden layers. The layers are fully connected.
[0082] Specifically, the server will input the historical categorical variables and historical continuous variables in the historical product information data into the initial product information prediction model. The initial product information prediction model includes an Embedding network and a DNN network. When using the initial product information prediction model for processing, the historical categorical variables will first be converted into categorical feature vectors through the Embedding network in the initial product information prediction model, and then the categorical feature vectors will be spliced with the historical continuous variables. Finally, the spliced categorical feature vectors and historical continuous variables will be processed through the DNN network in the initial product information prediction model.
[0083] Step 206, converting the historical category variables into category feature vectors through the Embedding network.
[0084] Among them, the category feature vector refers to a dense numerical vector used to identify historical category variables.
[0085] Specifically, when using the initial product information prediction model for processing, the historical categorical variables are first converted into integer labels through the Embedding network, and then the integer labels are encoded to obtain the categorical variable encoding vector corresponding to the historical categorical variables, and finally the categorical variable encoding vector is converted into a categorical feature vector.
[0086] Step 208, concatenate the category feature vector and the historical continuous variable to obtain the feature vector to be trained, input the feature vector to be trained into the DNN network, and obtain the prediction result of the product information to be compared.
[0087] The DNN network includes an input layer, a hidden layer, and an output layer. For example, Figure 3As shown, the DNN network can include two hidden layers (Dense_1, Dense_2) and an output layer (Output). The two hidden layers can be fully connected layers, and both use Relu as the activation function (Relu = max(0,X)). In order to control the overfitting of the model, a Dropout layer is added between the two hidden layers and between the second hidden layer and the output layer. The output layer uses sigmoid as the activation function. Among them, the input of Dense_1 is the concatenated feature vector to be trained. Steps ① and ② represent the process of obtaining the feature vector to be trained. For example, assuming that L represents the number of hidden layers in the model, l{1, 2, ..., L} is the hidden layer identifier, and z (l) Identify the input vector of layer l, y (l) Identifies the output vector of layer l, y (0) =X represents the input layer vector, W (l) and b (l) represents the weight and bias term of layer l, i identifies the hidden layer neuron, and p identifies the probability of each independent hidden layer neuron being retained in the network (assuming p = 0.5). The forward propagation process of the DNN network in the initial product information prediction model is: Among them, f is the activation function, the activation function of the two hidden layers in the middle is Relu, and the activation function of the output layer is sigmoid.
[0088] Specifically, the server will concatenate the category feature vector and the historical continuous variable to obtain the feature vector to be trained, input the feature vector to be trained into the DNN network, and obtain the prediction result of the product information to be compared.
[0089] Step 210, determining the current descent gradient of the model parameters in the initial product information prediction model according to the preset loss function and the prediction result of the product information to be compared.
[0090] The preset loss function refers to the loss function of the preset initial product information prediction model.
[0091] Specifically, the server will obtain the loss function corresponding to the current initial product information prediction model based on the preset loss function and the prediction result of the product information to be compared, calculate the current gradient of the model parameters in the initial product information prediction model by obtaining the partial derivative of the loss function with respect to the model parameters in the initial product information prediction model, obtain the historical gradient of the initial product information prediction model, calculate the first-order momentum and the second-order momentum based on the historical gradient, and calculate the current descent gradient based on the current gradient, the first-order momentum, the second-order momentum and the preset gradient coefficient. The preset gradient coefficient can be set as needed.
[0092] For example, assuming that the preset loss function is MSE and the model parameters are W and b, then Here, predict refers to the prediction result of the product information to be compared. By taking the partial derivative of the loss function with respect to the model parameters in the initial product information prediction model, the current gradient of the model parameters in the initial product information prediction model can be obtained as: According to the historical gradient, the first-order momentum can be calculated as: Calculate the second-order momentum as: Thus, the current descent gradient is calculated based on the current gradient, first-order momentum, second-order momentum and preset gradient coefficient. for:
[0093]
[0094] Step 212, update the model parameters according to the current descent gradient to obtain a product information prediction model.
[0095] Specifically, after obtaining the current descent gradient, the server will update the model parameters according to the current descent gradient to obtain the product information prediction model. For example, when the descent gradient is When the model parameters are W and b, the server updates the model parameters according to the current descent gradient:
[0096] The above-mentioned product information prediction model construction method converts historical category variables into category feature vectors through the Embedding network in the initial product information prediction model, concatenates the category feature vectors and the historical continuous variables to obtain the feature vector to be trained, inputs the feature vector to be trained into the DNN network in the initial product information prediction model, obtains the prediction result of the product information to be compared, determines the current descent gradient of the model parameters in the initial product information prediction model according to the preset loss function and the prediction result of the product information to be compared, updates the model parameters according to the current descent gradient, and obtains the product information prediction model. The whole process can effectively utilize the historical category variables in the historical product information data of the SKU to be predicted, obtains the category feature vector used to represent the historical category variables by processing the historical category variables, realizes the processing of historical product information data of many types of SKU to be predicted, constructs a product information prediction model that can improve the accuracy of information prediction, and realizes accurate information prediction.
[0097] In one embodiment, converting the historical category variables into category feature vectors through the Embedding network includes:
[0098] The historical categorical variables are converted into integer labels through the Embedding network, and the integer labels are encoded and converted to obtain the categorical variable encoding vector corresponding to the historical categorical variables. The categorical variable encoding vector is subjected to matrix operation according to the preset weight vector to obtain the categorical feature vector used to represent the historical categorical variables.
[0099] Among them, the integer label refers to the integer used to represent the historical category variable. For example, the integer label can be 0, 1, 2, 3, etc. Encoding the integer label refers to encoding the integer label and converting the integer label into a category variable encoding vector. Because the integer label corresponds to the historical category variable, the category variable encoding vector obtained by converting the integer label is the category variable encoding vector corresponding to the historical category variable. The preset weight vector refers to the weight matrix pre-set according to the number of integer labels. The dimension of the weight matrix is the number of integer labels*m, where m can be set as needed.
[0100] Specifically, the server will determine the number of integer labels based on the number of historical category variables in the historical product information data, and the number of integer labels is the same as the number of historical category variables. After obtaining the number of integer labels, the server will determine the maximum value of the integer labels based on the number of integer labels, and then perform integer label conversion on the historical category variables in the historical product information data based on the maximum value of the integer labels, and correspond the historical category variables to the integer labels one by one to obtain the integer labels corresponding to each historical category variable. For example, the maximum value of the integer label can be the number of integer labels minus 1, and the minimum value of the integer label is 0. The server can correspond the historical category variables to the integer labels one by one according to the minimum value of the integer label and the maximum value of the integer label. Taking the historical category variable as SKU code as an example, assuming that the number of SKUs to be predicted is 4, the number of corresponding SKU codes is also 4, so the number of integer labels can be determined to be 4. Assuming that the SKU codes in the product information data are as follows: 2.608.644.307, 2.608.833.496, 0.601.93A.385, 0.601.3A2.080, after converting the SKU codes to integer labels, the integer labels corresponding to the SKU codes can be obtained: SKU code = [0, 1, 2, 3] T .
[0101] Specifically, the server determines the dimension of the categorical variable encoding vector based on the integer label corresponding to the historical categorical variable and the number of integer labels, and then performs encoding transformation on the integer label according to the dimension of the categorical variable encoding vector to obtain the categorical variable encoding vector corresponding to the historical categorical variable. The encoding transformation of the integer label can be performed by one-hot encoding the integer label. For example, the historical categorical variable is SKU encoding, assuming that the integer label corresponding to the SKU encoding is [0,1,2,3,0] T (The SKU code of the first SKU to be predicted is the same as that of the fifth SKU to be predicted, and the number of integer labels is 4). After the integer labels are one-hot encoded, the SKU encoding vector corresponding to the SKU code can be obtained as follows:
[0102] Specifically, the server will perform matrix multiplication on the category variable encoding vector according to the preset weight vector to obtain a dense vector used to represent the historical category variable, and use the dense vector used to represent the historical category variable as the category feature vector representing the historical category variable. Take the historical category variable as SKU encoding as an example, assuming that the preset weight vector is By performing matrix multiplication on the SKU encoding vector according to the preset weight vector, we can get: That is, the category feature vectors used to represent the SKU code are: 2.608.644.307->[0.82,1.00,0.00], 2.608.833.496->[0.98,0.20,0.00], 0.601.93A.385->[0.02,1.00,0.96], 0.601.3A2.080->[0.03,0.25,1.00]. Furthermore, the server will also update the preset weight vector through the back propagation algorithm.
[0103] In one embodiment, according to a preset loss function and the prediction result of the product information to be compared, determining the current descending gradient of the model parameters in the initial product information prediction model includes:
[0104] Calculate the current gradient of the model parameters in the initial product information prediction model according to the preset loss function and the prediction result of the product information to be compared;
[0105] The historical gradient of the model parameters in the initial product information prediction model is obtained, and the current descent gradient of the model parameters in the initial product information prediction model is calculated based on the historical gradient and the current gradient.
[0106] For example, assuming that the preset loss function is MSE and the model parameters are W and b, then Here, predict refers to the prediction result of the product information to be compared. By taking the partial derivative of the loss function with respect to the model parameters, the current gradient of the model parameters can be obtained as: According to the historical gradient, the first-order momentum can be calculated as: Calculate the second-order momentum as: Thus, the current descent gradient is calculated based on the current gradient, first-order momentum, second-order momentum and preset gradient coefficient. for:
[0107] Finally, the model parameters are updated according to the current descent gradient:
[0108] In one embodiment, Figure 4 As shown, a product information prediction method is provided, which is applied to Figure 1 The server in the example is used to illustrate the following steps:
[0109] Step 402, obtaining product information data of the SKU to be predicted.
[0110] The SKU to be predicted refers to the inventory type to be predicted. The inventory type is represented by the SKU. The SKUs of different inventory types are different. Different inventory types can be distinguished by the SKU codes in the product information data. Different inventory types correspond to SKU codes one by one. Specifically, the server obtains the product information data of the SKU to be predicted from the preset inventory database, and stores the product information data of the SKU to be predicted in the preset inventory database.
[0111] Specifically, the server obtains the product information data of the SKU to be predicted from the preset inventory database, and stores the product information data of the SKU to be predicted in the preset inventory database.
[0112] Step 404, input the product category variables and product continuous variables in the product information data into the trained product information prediction model to obtain the product information prediction result of the SKU to be predicted. The trained product information prediction model is constructed according to the above-mentioned product information prediction model construction method.
[0113] Specifically, the server will input the product category variables and product continuous variables in the product information data into the trained product information prediction model, convert the product category variables into product category feature vectors through the Embedding network in the trained product information prediction model, concatenate the product category feature vectors and the product continuous variables to obtain the feature vector to be predicted, and input the feature vector to be predicted into the DNN network in the trained product information prediction model to obtain the product information prediction result of the SKU to be predicted.
[0114] The above-mentioned product information prediction method converts historical category variables into category feature vectors through the Embedding network in the initial product information prediction model, concatenates the category feature vectors and the historical continuous variables to obtain the feature vectors to be trained, inputs the feature vectors to be trained into the DNN network in the initial product information prediction model, obtains the prediction results of the product information to be compared, determines the current descent gradient of the model parameters in the initial product information prediction model according to the preset loss function and the prediction results of the product information to be compared, updates the model parameters according to the current descent gradient, and obtains the product information prediction model. The whole process can effectively utilize the historical category variables in the historical product information data of the SKU to be predicted, obtains the category feature vectors used to represent the historical category variables by processing the historical category variables, realizes the processing of historical product information data of many types of SKU to be predicted, constructs a product information prediction model that can improve the accuracy of information prediction, and realizes accurate information prediction.
[0115] In one embodiment, the product category variables and product continuous variables in the product information data are input into the trained product information prediction model to obtain the product information prediction result of the SKU to be predicted, including:
[0116] Inputting the product category variables and the product continuous variables in the product information data into at least two trained product information prediction models to obtain product information prediction results corresponding to each product information prediction model;
[0117] Calculate the average of the product information prediction results corresponding to each product information prediction model to obtain an average product information prediction result;
[0118] Obtaining time attribute information and category attribute information corresponding to the average product information prediction result;
[0119] The average product information prediction result is adjusted according to the time attribute information and the category attribute information to obtain the product information prediction result of the SKU to be predicted.
[0120] The time attribute information refers to the time node corresponding to the average product information prediction result, for example, the time attribute information can be a time node such as year-month. The category attribute information refers to the inventory type of the SKU to be predicted corresponding to the average product information prediction result.
[0121] Specifically, in order to enhance the prediction effect of the model, the initialization weight values of the at least two trained product information prediction models are different during training, and the obtained product information prediction models will be different. The server can obtain the product information prediction results corresponding to each product information prediction model by inputting the product category variables and product continuous variables in the product information data into the at least two trained product information prediction models, and then by calculating the average value of the product information prediction results corresponding to each product information prediction model, the average product information prediction result can be obtained. Finally, by obtaining the time attribute information and category attribute information corresponding to the average product information prediction result, the average product information prediction result is adjusted according to the time attribute information and the category attribute information, and the product information prediction result of the SKU to be predicted can be obtained, thereby achieving the acquisition of the product information prediction result.
[0122] In one embodiment, the average product information prediction result is adjusted according to the time attribute information and the category attribute information to obtain the product information prediction result of the SKU to be predicted, including:
[0123] Query preset time adjustment information according to time attribute information, and query preset category adjustment information according to category attribute information;
[0124] When the corresponding target time information is found in the preset time adjustment information, the time adjustment coefficient of the target time information is obtained from the preset time adjustment information, and the average product information prediction result is adjusted according to the time adjustment coefficient to obtain the product information prediction result of the SKU to be predicted;
[0125] When the corresponding target category information is found in the preset category adjustment information, the category adjustment coefficient of the target category information is obtained from the preset category adjustment information, and the average product information prediction result is adjusted according to the category adjustment coefficient to obtain the product information prediction result of the SKU to be predicted.
[0126] The preset time adjustment information is used to represent the information of the time node that needs to be adjusted, for example, the time node that needs to be adjusted may be a holiday such as the Spring Festival. The preset category adjustment information is used to represent the information of the inventory type that needs to be adjusted, for example, the inventory type that needs to be adjusted may be the inventory type obtained through the results of historical backtesting.
[0127] Specifically, the server will query the preset time adjustment information according to the time attribute information. When the corresponding target time information is found in the preset time adjustment information, the time adjustment coefficient of the target time information is obtained from the preset time adjustment information, and the average product information prediction result is adjusted according to the time adjustment coefficient to obtain the product information prediction result of the SKU to be predicted. For example, assuming that the prediction value during the Spring Festival is high, if the server queries the preset time adjustment information according to the time attribute information and finds that the corresponding target time information is the Spring Festival, it will obtain the time adjustment coefficient of the Spring Festival from the preset time adjustment information (because it is assumed here that the prediction value during the Spring Festival is high, so the time adjustment coefficient here is less than 1), and the average product information prediction result is weighted according to the time adjustment coefficient to obtain the product information prediction result of the SKU to be predicted.
[0128] Specifically, while querying the preset time adjustment information according to the time attribute information, the server will query the preset category adjustment information according to the category attribute information. When the corresponding target category information is found in the preset category adjustment information, the category adjustment coefficient of the target category information is obtained from the preset category adjustment information, and the average product information prediction result is adjusted according to the category adjustment coefficient to obtain the product information prediction result of the SKU to be predicted. For example, assuming that the predicted value of the inventory type that needs to be adjusted is low, if the server queries the preset category adjustment information according to the category attribute information and finds that the corresponding target category information is the inventory type that needs to be adjusted, it will obtain the category adjustment coefficient of the target category information from the preset category adjustment information (because it is assumed here that the predicted value of the inventory type that needs to be adjusted is low, so the category adjustment coefficient here is greater than 1), and the average product information prediction result is weighted according to the category adjustment coefficient to obtain the product information prediction result of the SKU to be predicted.
[0129] In this embodiment, the average product information prediction result is adjusted according to the time attribute information and the category attribute information to obtain the product information prediction result of the SKU to be predicted, thereby achieving the acquisition of the product information prediction result.
[0130] In one embodiment, after the product category variables and product continuous variables in the product information data are input into the trained product information prediction model to obtain the product information prediction result of the SKU to be predicted, the method further includes:
[0131] Get the real results of the product information of the SKU to be predicted;
[0132] Compare the actual product information results with the product information prediction results to obtain the evaluation results of the product information prediction model;
[0133] The product information prediction model is adjusted based on the evaluation results.
[0134] The actual result of product information refers to the actual result corresponding to the predicted result of product information. For example, if the predicted result of product information is the sales volume of the SKU to be predicted in the next three months, then the actual result of product information is the actual sales volume of the SKU to be predicted in the three months. The evaluation result of the product information prediction model is the result of measuring the product information prediction model according to the preset indicator value.
[0135] Specifically, the server will obtain the real result of the product information of the SKU to be predicted, calculate the difference between the predicted result of the product information and the real result of the product information, calculate the ratio of the difference to the real result of the product information, and compare the real result of the product information and the predicted result of the product information by comparing the comparison value and the preset index value. For example, when the ratio is less than or equal to the preset index value, the difference between the preset standard value (set to 1 here) and the ratio is calculated. When the difference is greater than 0, the evaluation result of the product information prediction model is obtained as the difference. When the difference is less than 0, the evaluation result of the product information prediction model is 0. When the ratio is greater than the preset index value, the evaluation result of the product information prediction model is 0. After obtaining the evaluation result of the product information prediction model, the server will adjust the product information prediction model according to the evaluation result. Among them, the way to adjust the product information prediction model according to the evaluation result can be: when the evaluation result is 0, it means that the accuracy of the current product information prediction model is low, and the model parameters are further iteratively updated through the optimization method to obtain a new product information prediction model. Among them, the optimization method can be specifically the Adam optimization method.
[0136] In this embodiment, by obtaining the actual product information results of the SKU to be predicted, comparing the actual product information results with the product information prediction results, obtaining the evaluation results of the product information prediction model, and adjusting the product information prediction model according to the evaluation results, timely adjustment of the product information prediction model can be achieved.
[0137] like Figure 5 As shown, the product information prediction method of the present application is described by an embodiment, comprising the following steps:
[0138] Step 502, obtaining historical product information data of the SKU to be predicted;
[0139] Step 504, inputting the historical categorical variables and the historical continuous variables in the historical product information data into the initial product information prediction model, the initial product information prediction model including an Embedding network and a DNN network;
[0140] Step 506, converting the historical categorical variables into integer labels through the Embedding network, performing encoding conversion on the integer labels to obtain categorical variable encoding vectors corresponding to the historical categorical variables, performing matrix operations on the categorical variable encoding vectors according to a preset weight vector, and obtaining categorical feature vectors for representing the historical categorical variables;
[0141] Step 508, concatenating the category feature vector and the historical continuous variable to obtain the feature vector to be trained, inputting the feature vector to be trained into the DNN network to obtain the prediction result of the product information to be compared;
[0142] Step 510, calculating the current gradient of the model parameters in the initial product information prediction model according to the preset loss function and the prediction result of the product information to be compared;
[0143] Step 512, obtaining the historical gradient of the model parameters in the initial product information prediction model, and calculating the current descending gradient of the model parameters in the initial product information prediction model according to the historical gradient and the current gradient;
[0144] Step 514, updating the model parameters according to the current descent gradient to obtain a product information prediction model;
[0145] Step 516, obtaining product information data of the SKU to be predicted;
[0146] Step 518, inputting the product category variables and product continuous variables in the product information data into at least two trained product information prediction models to obtain product information prediction results corresponding to each product information prediction model;
[0147] Step 520, calculating the average of the product information prediction results corresponding to each product information prediction model to obtain an average product information prediction result;
[0148] Step 522, obtaining time attribute information and category attribute information corresponding to the average product information prediction result;
[0149] Step 524, querying preset time adjustment information according to the time attribute information, and querying preset category adjustment information according to the category attribute information;
[0150] Step 526, when the corresponding target time information is found in the preset time adjustment information, the time adjustment coefficient of the target time information is obtained from the preset time adjustment information, and the average product information prediction result is adjusted according to the time adjustment coefficient to obtain the product information prediction result of the SKU to be predicted;
[0151] Step 528, when the corresponding target category information is found in the preset category adjustment information, the category adjustment coefficient of the target category information is obtained from the preset category adjustment information, and the average product information prediction result is adjusted according to the category adjustment coefficient to obtain the product information prediction result of the SKU to be predicted;
[0152] Step 530, obtaining the actual product information of the SKU to be predicted;
[0153] Step 532, comparing the actual product information result and the product information prediction result to obtain the evaluation result of the product information prediction model;
[0154] Step 534, adjusting the product information prediction model according to the evaluation results.
[0155] It should be understood that although Figure 2 , Figure 4 and Figure 5 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 2 , Figure 4 and Figure 5 At least part of the steps may include multiple steps or multiple stages. These steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed in turn or alternately with other steps or at least part of the steps or stages in other steps.
[0156] In one embodiment, Figure 6 As shown, a product information prediction model construction device is provided, including: an acquisition module 602, an input module 604, a variable conversion module 606, a training module 608, a processing module 610 and an update module 612, wherein:
[0157] An acquisition module 602 is used to acquire historical product information data of the SKU to be predicted;
[0158] An input module 604 is used to input historical categorical variables and historical continuous variables in the historical product information data into an initial product information prediction model, where the initial product information prediction model includes an Embedding network and a DNN network;
[0159] A variable conversion module 606 is used to convert historical categorical variables into categorical feature vectors through an Embedding network;
[0160] The training module 608 is used to concatenate the category feature vector and the historical continuous variable to obtain the feature vector to be trained, and input the feature vector to be trained into the DNN network to obtain the prediction result of the product information to be compared;
[0161] The processing module 610 is used to determine the current descending gradient of the model parameters in the initial product information prediction model according to the preset loss function and the prediction result of the product information to be compared;
[0162] The updating module 612 is used to update the model parameters according to the current descent gradient to obtain the product information prediction model.
[0163] In one embodiment, the variable conversion module is also used to convert historical categorical variables into integer labels through an Embedding network, perform encoding conversion on the integer labels to obtain categorical variable encoding vectors corresponding to the historical categorical variables, perform matrix operations on the categorical variable encoding vectors according to preset weight vectors, and obtain categorical feature vectors used to represent the historical categorical variables.
[0164] In one embodiment, the processing module is also used to calculate the current gradient of the model parameters in the initial product information prediction model based on a preset loss function and the prediction results of the product information to be compared, obtain the historical gradient of the model parameters in the initial product information prediction model, and calculate the current descent gradient of the model parameters in the initial product information prediction model based on the historical gradient and the current gradient.
[0165] In one embodiment, Figure 7 As shown, a product information prediction device is provided, including: a data acquisition module 702 and a prediction module 704, wherein:
[0166] The data acquisition module 702 is used to acquire product information data of the SKU to be predicted;
[0167] The prediction module 704 is used to input the product category variables and product continuous variables in the product information data into the trained product information prediction model to obtain the product information prediction result of the SKU to be predicted. The trained product information prediction model is constructed according to the above-mentioned product information prediction model construction method.
[0168] In one embodiment, the prediction module is also used to input the product category variables and product continuous variables in the product information data into at least two trained product information prediction models to obtain product information prediction results corresponding to each product information prediction model, calculate the average of the product information prediction results corresponding to each product information prediction model to obtain the average product information prediction result, obtain the time attribute information and category attribute information corresponding to the average product information prediction result, adjust the average product information prediction result according to the time attribute information and the category attribute information, and obtain the product information prediction result of the SKU to be predicted.
[0169] In one embodiment, the prediction module is also used to query preset time adjustment information based on time attribute information, and to query preset category adjustment information based on category attribute information. When the corresponding target time information is found in the preset time adjustment information, the time adjustment coefficient of the target time information is obtained from the preset time adjustment information, and the average product information prediction result is adjusted according to the time adjustment coefficient to obtain the product information prediction result of the SKU to be predicted. When the corresponding target category information is found in the preset category adjustment information, the category adjustment coefficient of the target category information is obtained from the preset category adjustment information, and the average product information prediction result is adjusted according to the category adjustment coefficient to obtain the product information prediction result of the SKU to be predicted.
[0170] In one embodiment, the product information prediction device also includes an adjustment module, which is used to obtain the actual product information results of the SKU to be predicted, compare the actual product information results with the product information prediction results, obtain the evaluation results of the product information prediction model, and adjust the product information prediction model according to the evaluation results.
[0171] The above-mentioned product information prediction model construction device and product information prediction device convert historical category variables into category feature vectors through the Embedding network in the initial product information prediction model, concatenate the category feature vectors and the historical continuous variables to obtain the feature vectors to be trained, input the feature vectors to be trained into the DNN network in the initial product information prediction model, obtain the prediction results of the product information to be compared, determine the current descent gradient of the model parameters in the initial product information prediction model according to the preset loss function and the prediction results of the product information to be compared, update the model parameters according to the current descent gradient, and obtain the product information prediction model. The whole process can effectively utilize the historical category variables in the historical product information data of the SKU to be predicted, obtain the category feature vectors used to represent the historical category variables by processing the historical category variables, realize the processing of historical product information data of many types of SKU to be predicted, construct a product information prediction model that can improve the accuracy of information prediction, and realize accurate information prediction.
[0172] For the specific limitations of the product information prediction model building device and the product information prediction device, please refer to the limitations of the product information prediction model building method and the product information prediction method in the above text, which will not be repeated here. The various modules in the above-mentioned product information prediction model building device and the product information prediction device can be implemented in whole or in part through software, hardware and their combination. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0173] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 8 As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store product information data. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a product information prediction model construction method and a product information prediction method are implemented.
[0174] Those skilled in the art will understand that Figure 8 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0175] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0176] Obtain historical product information data of the SKU to be predicted;
[0177] Inputting historical categorical variables and historical continuous variables in the historical product information data into an initial product information prediction model, the initial product information prediction model includes an Embedding network and a DNN network;
[0178] Convert historical categorical variables into categorical feature vectors through the Embedding network;
[0179] Concatenate the category feature vector and the historical continuous variable to obtain the feature vector to be trained, input the feature vector to be trained into the DNN network, and obtain the prediction result of the product information to be compared;
[0180] Determine the current descending gradient of the model parameters in the initial product information prediction model according to the preset loss function and the prediction result of the product information to be compared;
[0181] The model parameters are updated according to the current descent gradient to obtain the product information prediction model.
[0182] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0183] The historical categorical variables are converted into integer labels through the Embedding network, and the integer labels are encoded and converted to obtain the categorical variable encoding vector corresponding to the historical categorical variables. The categorical variable encoding vector is subjected to matrix operation according to the preset weight vector to obtain the categorical feature vector used to represent the historical categorical variables.
[0184] In one embodiment, when the processor executes the computer program, the following steps are also implemented:
[0185] Calculate the current gradient of the model parameters in the initial product information prediction model according to the preset loss function and the prediction result of the product information to be compared;
[0186] The historical gradient of the model parameters in the initial product information prediction model is obtained, and the current descent gradient of the model parameters in the initial product information prediction model is calculated based on the historical gradient and the current gradient.
[0187] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0188] Obtain product information data of the SKU to be predicted;
[0189] The product category variables and product continuous variables in the product information data are input into the trained product information prediction model to obtain the product information prediction result of the SKU to be predicted. The trained product information prediction model is constructed according to the above-mentioned product information prediction model construction method.
[0190] In one embodiment, when the processor executes the computer program, the following steps are also implemented:
[0191] Inputting the product category variables and the product continuous variables in the product information data into at least two trained product information prediction models to obtain product information prediction results corresponding to each product information prediction model;
[0192] Calculate the average of the product information prediction results corresponding to each product information prediction model to obtain an average product information prediction result;
[0193] Obtaining time attribute information and category attribute information corresponding to the average product information prediction result;
[0194] The average product information prediction result is adjusted according to the time attribute information and the category attribute information to obtain the product information prediction result of the SKU to be predicted.
[0195] In one embodiment, when the processor executes the computer program, the following steps are also implemented:
[0196] Query preset time adjustment information according to time attribute information, and query preset category adjustment information according to category attribute information;
[0197] When the corresponding target time information is found in the preset time adjustment information, the time adjustment coefficient of the target time information is obtained from the preset time adjustment information, and the average product information prediction result is adjusted according to the time adjustment coefficient to obtain the product information prediction result of the SKU to be predicted;
[0198] When the corresponding target category information is found in the preset category adjustment information, the category adjustment coefficient of the target category information is obtained from the preset category adjustment information, and the average product information prediction result is adjusted according to the category adjustment coefficient to obtain the product information prediction result of the SKU to be predicted.
[0199] In one embodiment, when the processor executes the computer program, the following steps are also implemented:
[0200] Get the real results of the product information of the SKU to be predicted;
[0201] Compare the actual product information results with the product information prediction results to obtain the evaluation results of the product information prediction model;
[0202] The product information prediction model is adjusted based on the evaluation results.
[0203] The above-mentioned product information prediction model construction computer equipment and product information prediction computer equipment convert historical category variables into category feature vectors through the Embedding network in the initial product information prediction model, concatenate the category feature vectors and the historical continuous variables to obtain the feature vectors to be trained, input the feature vectors to be trained into the DNN network in the initial product information prediction model, obtain the prediction results of the product information to be compared, determine the current descent gradient of the model parameters in the initial product information prediction model according to the preset loss function and the prediction results of the product information to be compared, update the model parameters according to the current descent gradient, and obtain the product information prediction model. The whole process can effectively utilize the historical category variables in the historical product information data of the SKU to be predicted, obtain the category feature vectors used to represent the historical category variables by processing the historical category variables, realize the processing of historical product information data of many types of SKU to be predicted, construct a product information prediction model that can improve the accuracy of information prediction, and realize accurate information prediction.
[0204] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0205] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0206] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0207] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A method for constructing a product information prediction model, characterized in that: The method comprises: Obtain historical product information data of the SKU to be predicted; Inputting historical categorical variables and historical continuous variables in the historical product information data into an initial product information prediction model, wherein the initial product information prediction model includes an Embedding network and a DNN network, wherein the historical categorical variables are used to represent the category of the SKU to be predicted, and the historical continuous variables include at least one of a sliding window feature and a holiday feature; Converting the historical category variables into category feature vectors through the Embedding network; splicing the category feature vector and the historical continuous variable to obtain a feature vector to be trained, inputting the feature vector to be trained into the DNN network to obtain a prediction result of the product information to be compared, wherein the prediction result of the product information to be compared includes a sales volume prediction result to be compared; Determine the current descending gradient of the model parameters in the initial product information prediction model according to the preset loss function and the prediction result of the product information to be compared; The model parameters are updated according to the current descent gradient to obtain a product information prediction model.
2. The method according to claim 1, characterized in that: The converting the historical category variables into category feature vectors through the Embedding network includes: The historical category variables are converted into integer labels through the Embedding network, and the integer labels are encoded and converted to obtain category variable encoding vectors corresponding to the historical category variables. Matrix operations are performed on the category variable encoding vectors according to a preset weight vector to obtain category feature vectors used to represent the historical category variables.
3. The method according to claim 1, characterized in that Determining the current descending gradient of the model parameters in the initial product information prediction model according to the preset loss function and the prediction result of the product information to be compared includes: Calculating the current gradient of the model parameters in the initial product information prediction model according to the preset loss function and the prediction result of the product information to be compared; The historical gradient of the model parameters in the initial product information prediction model is obtained, and the current descent gradient of the model parameters in the initial product information prediction model is calculated based on the historical gradient and the current gradient.
4. A product information prediction method, characterized in that: The method comprises: Obtain product information data of the SKU to be predicted; The product category variables and product continuous variables in the product information data are input into a trained product information prediction model to obtain a product information prediction result for the SKU to be predicted, wherein the product information prediction result includes a sales prediction result, and the trained product information prediction model is constructed according to the method described in any one of claims 1-3.
5. The method according to claim 4, characterized in that The step of inputting the product category variable and the product continuous variable in the product information data into the trained product information prediction model to obtain the product information prediction result of the SKU to be predicted includes: Inputting the product category variables and the product continuous variables in the product information data into at least two trained product information prediction models to obtain product information prediction results corresponding to each product information prediction model; Calculating the average of the product information prediction results corresponding to each product information prediction model to obtain an average product information prediction result; Acquire time attribute information and category attribute information corresponding to the average product information prediction result; The average product information prediction result is adjusted according to the time attribute information and the category attribute information to obtain a product information prediction result of the SKU to be predicted.
6. The method according to claim 5, characterized in that The adjusting the average product information prediction result according to the time attribute information and the category attribute information to obtain the product information prediction result of the SKU to be predicted includes: querying preset time adjustment information according to the time attribute information, and querying preset category adjustment information according to the category attribute information; When the corresponding target time information is found in the preset time adjustment information, the time adjustment coefficient of the target time information is obtained from the preset time adjustment information, and the average product information prediction result is adjusted according to the time adjustment coefficient to obtain the product information prediction result of the SKU to be predicted; When the corresponding target category information is found in the preset category adjustment information, the category adjustment coefficient of the target category information is obtained from the preset category adjustment information, and the average product information prediction result is adjusted according to the category adjustment coefficient to obtain the product information prediction result of the SKU to be predicted.
7. The method according to claim 4, characterized in that After inputting the product category variables and the product continuous variables in the product information data into the trained product information prediction model to obtain the product information prediction result of the SKU to be predicted, the method further includes: Get the real results of the product information of the SKU to be predicted; Comparing the actual result of the product information with the predicted result of the product information to obtain an evaluation result of the product information prediction model; The product information prediction model is adjusted according to the evaluation result.
8. A product information prediction model construction device, characterized in that: The device comprises: The acquisition module is used to obtain the historical product information data of the SKU to be predicted; An input module, used to input historical categorical variables and historical continuous variables in the historical product information data into an initial product information prediction model, wherein the initial product information prediction model includes an Embedding network and a DNN network, wherein the historical categorical variables are used to represent the category of the SKU to be predicted, and the historical continuous variables include at least one of a sliding window feature and a holiday feature; A variable conversion module, used for converting the historical category variables into category feature vectors through the Embedding network; A training module, used for concatenating the category feature vector and the historical continuous variable to obtain a feature vector to be trained, inputting the feature vector to be trained into the DNN network, and obtaining a prediction result of the product information to be compared, wherein the prediction result of the product information to be compared includes a sales volume prediction result to be compared; A processing module, used to determine the current descending gradient of the model parameters in the initial product information prediction model according to a preset loss function and the prediction result of the product information to be compared; An updating module is used to update the model parameters according to the current descent gradient to obtain a product information prediction model.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Electric vehicle endurance mileage prediction method and device based on deep learning and medium
CN110091751A