CN114663154A - Model training method, information output method, device, equipment and storage medium - Google Patents

Model training method, information output method, device, equipment and storage medium Download PDF

Info

Publication number
CN114663154A
CN114663154A CN202210347090.6A CN202210347090A CN114663154A CN 114663154 A CN114663154 A CN 114663154A CN 202210347090 A CN202210347090 A CN 202210347090A CN 114663154 A CN114663154 A CN 114663154A
Authority
CN
China
Prior art keywords
sales
model
prediction
sales data
prediction model
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210347090.6A
Other languages
Chinese (zh)
Inventor
张立平
何昱
曹俊豪
王希予
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jingdong Technology Information Technology Co Ltd
Original Assignee
Jingdong Technology Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Jingdong Technology Information Technology Co Ltd filed Critical Jingdong Technology Information Technology Co Ltd
Priority to CN202210347090.6A priority Critical patent/CN114663154A/en
Publication of CN114663154A publication Critical patent/CN114663154A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0201Market modelling; Market analysis; Collecting market data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0201Market modelling; Market analysis; Collecting market data
    • G06Q30/0202Market predictions or forecasting for commercial activities

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Strategic Management (AREA)
  • Finance (AREA)
  • Development Economics (AREA)
  • Accounting & Taxation (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Entrepreneurship & Innovation (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Game Theory and Decision Science (AREA)
  • Economics (AREA)
  • Marketing (AREA)
  • General Business, Economics & Management (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Artificial Intelligence (AREA)
  • General Engineering & Computer Science (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Evolutionary Computation (AREA)
  • Evolutionary Biology (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The disclosure provides a model training method, a model training device, an information output method, an information output device, equipment and a storage medium, and relates to the technical field of big data and deep learning. The specific implementation scheme is as follows: acquiring first item sales data generated in a first historical time period; training an initial sales prediction model by using the first article sales data to obtain a trained target sales prediction model; acquiring first incremental item sales data generated in a second historical time period after the first historical time period; and updating the target sales forecasting model by using the first incremental goods sales data. The realization mode can improve the accuracy of goods sales prediction and reduce the calculation burden of model updating.

Description

Model training method, information output method, device, equipment and storage medium
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to the field of big data and deep learning technologies, and in particular, to a method, an apparatus, a device, and a storage medium for model training and information output.
Background
In both the traditional retail industry and the rapidly-developed internet e-commerce industry, the commodity operators hope to carry out prospective estimation on the sales volume of the sold commodities, so that the links of production, distribution, supply and the like of the commodities can be better guided. Therefore, sales forecasting is an important link in the whole operation system of an enterprise. The sales forecast is a method that systematically surveys and studies many factors affecting the market supply and demand changes, and on the basis of the systematic surveys and studies, analyzes, forecasts, estimates and judges the supply and demand development trend of future market products and the changes of various related factors by applying a scientific method. The traditional sales prediction method is usually based on manual work, the established model is relatively simple, the data mining technology is a scientific and effective data processing mode, and a scientific and effective means is provided for dealing with information explosion and processing of massive information. However, the data mining model is required to be continuously updated iteratively to meet the requirements of the enterprise. In order to optimize the commodity sales decision scheme of an enterprise and improve the accuracy of commodity sales prediction, the data mining method is applied to analyze the sales database, and the improvement of the accuracy of the sales prediction has a profound significance.
Disclosure of Invention
The present disclosure provides a model training and information output method, apparatus, device and storage medium.
According to a first aspect, there is provided a model training method comprising: acquiring first item sales data generated in a first historical time period; training an initial sales prediction model by using the first article sales data to obtain a trained target sales prediction model; acquiring first incremental item sales data generated in a second historical time period after the first historical time period; and updating the target sales forecasting model by using the first incremental goods sales data.
In some embodiments, the target sales prediction model includes a plurality of prediction trees; and updating the target sales prediction model using the first incremental item sales data, comprising: and updating at least one prediction tree in the target sales forecasting model by using the first incremental goods sales data.
In some embodiments, the updating the target sales prediction model using the first incremental item sales data includes: and not updating at least one prediction tree in the target sales prediction model.
In some embodiments, the target sales prediction model includes a plurality of prediction trees; and updating the target sales prediction model using the first incremental item sales data, comprising:
fixing the structures and parameters of the prediction trees and adding new prediction trees; and training a new prediction tree by using the first incremental commodity sales data so as to update the target sales prediction model.
In some embodiments, the first history period and the second history period are consecutive.
In some embodiments, the above method further comprises: acquiring second incremental item sales data generated in a third historical time period after the second historical time period; testing the updated target sales forecasting model by using the second incremental goods sales data; and determining whether to train the updated target sales prediction model again or not according to the test result.
In some embodiments, the determining whether to train the updated target sales volume prediction model again according to the test result includes: determining an error of the updated target sales prediction model according to a prediction result of the updated target sales prediction model on the second incremental goods sales data and an actual result in the second incremental goods sales data; and in response to the fact that the error is smaller than the preset threshold value, retraining the updated target sales forecasting model by using third incremental goods sales data generated in a third historical time period after the second historical time period.
In some embodiments, the determining whether to train the updated target sales prediction model again according to the test result includes: and in response to the fact that the error is larger than or equal to the preset threshold value, retraining the updated target sales prediction model by using the total historical item sales data between the current time.
In some embodiments, the initial sales prediction model comprises at least two initial prediction trees, and the first item sales data comprises a plurality of training samples; and the training of the initial sales prediction model by using the first article sales data to obtain a trained target sales prediction model comprises the following steps: for each initial prediction tree, determining a residual error of the initial prediction tree for each training sample; fitting the residual errors to obtain a regression tree; and updating parameters of each initial prediction tree according to the regression tree to obtain a trained target sales prediction model.
According to a second aspect, there is provided an information output method comprising: acquiring related information of a target commodity; predicting sales data of the target commodity according to the relevant information and a pre-trained target sales prediction model, wherein the target sales prediction model is obtained by training through the method described in the first aspect; and outputting the sales data.
According to a third aspect, there is provided a model training apparatus comprising: a first acquisition unit configured to acquire first item sales data generated within a first historical period of time; the model training unit is configured to train the initial sales prediction model by using the first article sales data to obtain a trained target sales prediction model; a second acquisition unit configured to acquire first incremental item sales data generated in a second historical time period after the first historical time period; a model updating unit configured to update the target sales prediction model with the first incremental item sales data.
In some embodiments, the target sales prediction model includes a plurality of prediction trees; and the model update unit is further configured to: and updating at least one prediction tree in the target sales forecasting model by using the first incremental goods sales data.
In some embodiments, the model update unit is further configured to: and not updating at least one prediction tree in the target sales prediction model.
In some embodiments, the target sales prediction model includes a plurality of prediction trees; and the model update unit is further configured to: and training a new prediction tree by using the first incremental commodity sales data so as to update the target sales prediction model.
In some embodiments, the first history period and the second history period are consecutive.
In some embodiments, the above apparatus further comprises: a third acquisition unit configured to acquire second incremental item sales data generated in a third history time period after the second history time period; a model testing unit configured to test the updated target sales forecasting model by using the second incremental goods sales data; and the model retraining unit is configured to determine whether to retrain the updated target sales prediction model according to the test result.
In some embodiments, the model retraining unit is further configured to: determining an error of the updated target sales prediction model according to a prediction result of the updated target sales prediction model on the second incremental goods sales data and an actual result in the second incremental goods sales data; and in response to the fact that the error is smaller than the preset threshold value, retraining the updated target sales forecasting model by using third incremental goods sales data generated in a third historical time period after the second historical time period.
In some embodiments, the model retraining unit is further configured to: and in response to the fact that the error is larger than or equal to the preset threshold value, retraining the updated target sales prediction model by using the total historical item sales data between the current time.
In some embodiments, the initial sales prediction model comprises at least two initial prediction trees, and the first item sales data comprises a plurality of training samples; and the model training unit is further configured to: for each initial prediction tree, determining a residual error of the initial prediction tree for each training sample; fitting the residual errors to obtain a regression tree; and updating parameters of each initial prediction tree according to the regression tree to obtain a trained target sales prediction model.
According to a fourth aspect, there is provided an information output apparatus comprising: an information acquisition unit configured to acquire related information of a target commodity; a sales predicting unit configured to predict sales data of the target commodity based on the relevant information and a pre-trained target sales predicting model obtained by the apparatus described in the third aspect; an information output unit configured to output the sales amount data.
According to a fifth aspect, there is provided an electronic device comprising: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method as described in the first aspect or to perform the method as described in the second aspect.
According to a sixth aspect, there is provided a non-transitory computer readable storage medium storing computer instructions for causing a computer to perform the method as described in the first aspect or to perform the method as described in the second aspect.
According to a seventh aspect, a computer program product comprising a computer program which, when executed by a processor, implements the method as described in the first aspect or the method as described in the second aspect.
The technique according to the present disclosure improves the accuracy of item sales predictions.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present disclosure, nor do they limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description.
Drawings
The drawings are included to provide a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
FIG. 1 is an exemplary system architecture diagram in which one embodiment of the present disclosure may be applied;
FIG. 2 is a flow diagram of one embodiment of a model training method according to the present disclosure;
FIG. 3 is a flow diagram of another embodiment of a model training method according to the present disclosure;
FIG. 4 is a flow diagram for one embodiment of an information output method according to the present disclosure;
FIG. 5 is a schematic diagram of an application scenario of a model training, information output method according to the present disclosure;
FIG. 6 is a flow diagram of one embodiment of a model training apparatus according to the present disclosure;
FIG. 7 is a schematic block diagram of one embodiment of an information output device according to the present disclosure;
fig. 8 is a block diagram of an electronic device for implementing a model training method and an information output method according to an embodiment of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below with reference to the accompanying drawings, in which various details of the embodiments of the disclosure are included to assist understanding, and which are to be considered as merely exemplary. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
It should be noted that, in the present disclosure, the embodiments and features of the embodiments may be combined with each other without conflict. The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
Fig. 1 illustrates an exemplary system architecture 100 to which embodiments of the model training method, information output method, or model training apparatus, information output apparatus of the present disclosure may be applied.
As shown in fig. 1, the system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like. The terminal devices 101, 102, 103 may have installed thereon various communication client applications, such as e-commerce type applications.
The terminal apparatuses 101, 102, and 103 may be hardware or software. When the terminal devices 101, 102, 103 are hardware, they may be various electronic devices including, but not limited to, smart phones, tablet computers, e-book readers, car computers, laptop portable computers, desktop computers, and the like. When the terminal apparatuses 101, 102, 103 are software, they can be installed in the electronic apparatuses listed above. It may be implemented as multiple pieces of software or software modules (e.g., to provide distributed services) or as a single piece of software or software module. And is not particularly limited herein.
The server 105 may be a server providing various services, such as a background server providing sales volume prediction services on the terminal devices 101, 102, 103. The background server can use the trained sales prediction model to perform sales prediction, and feed back predicted data to the terminal devices 101, 102, and 103.
The server 105 may be hardware or software. When the server 105 is hardware, it may be implemented as a distributed server cluster composed of a plurality of servers, or may be implemented as a single server. When the server 105 is software, it may be implemented as multiple pieces of software or software modules (e.g., to provide distributed services), or as a single piece of software or software module. And is not particularly limited herein.
It should be noted that the model training method and the information output method provided by the embodiments of the present disclosure are generally executed by the server 105. Accordingly, the model training device and the information output device are generally provided in the server 105.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
With continued reference to FIG. 2, a flow 200 of one embodiment of a model training method according to the present disclosure is shown. The model training method of the embodiment comprises the following steps:
step 201, first item sales data generated in a first historical time period is acquired.
In this embodiment, an executive body of the model training method may obtain first item sales data generated in a first historical time period. Here, the first historical period of time may be any period of time in the past, such as a month, a year, and so forth in the past. The first item sales data may be full item sales data generated for an item on a particular e-commerce website. The first item sales data may include the sales time and the total sales volume of each item, and may further include attribute information (e.g., volume, category to which the item belongs, corresponding keyword, attribute of purchasing group, etc.) of the item.
Step 202, training the initial sales prediction model by using the first article sales data to obtain a trained target sales prediction model.
After the execution subject obtains the first item sales data, the execution subject may train the initial sales prediction model by using the first item sales data. Specifically, in the training process, the executive body may use attribute information or sales time of the first item sales data item as input, use the corresponding sales as expected output, and continuously iteratively adjust parameters of the initial sales prediction model to obtain the trained target sales prediction model. Here, the initial sales prediction model may be an initialized sales prediction model. The sales prediction model may be a convolutional neural network or various regression algorithms, clustering algorithms, etc.
Step 203, acquiring first incremental item sales data generated in a second historical time period after the first historical time period.
After the execution subject trains and obtains the target sales prediction model, the execution subject may continue to obtain first incremental item sales data generated in a second historical time period after the first historical time period. Here, the second history period may be the same as or different from the first history period in time. In some specific applications, the second historical period of time may be 7 days. The first incremental item sales data can be item sales data originating from the same website as the first item sales data, which can be incremental data of the first item sales data. The content included in the first incremental item sales data can be the same as the content of the first item sales data.
And step 204, updating the target sales forecasting model by utilizing the first incremental goods sales data.
The executive agent may also update the target sales prediction model with the first incremental item sales data. In particular, the executive agent may use the first incremental item sales data to update some or all of the parameters in the target sales prediction model. For example, if the target sales prediction model includes multiple modules, upon a partial update, the executive agent may update the partial modules in the target sales prediction model with the first incremental item sales data. Therefore, the target sales prediction model can be updated in real time, and the timeliness of the target sales prediction model is kept.
According to the model training method provided by the embodiment of the disclosure, after model training is completed, the trained model can be further trained by continuously adopting incremental data, so that the model can be updated in time, and the timeliness of the model is maintained.
With continued reference to FIG. 3, a flow 300 of another embodiment of a model training method according to the present disclosure is shown. As shown in fig. 3, the model training method of the present embodiment may include the following steps:
step 301, obtaining first item sales data generated in a first historical time period.
Step 302, for each initial prediction tree, determining a residual error of the initial prediction tree for each training sample; fitting the residual error to obtain a regression tree; and according to the regression tree, updating parameters of each initial prediction tree to obtain a trained target sales prediction model.
In this embodiment, the initial sales prediction model includes at least two initial prediction trees, and the first item sales data includes a plurality of training samples. In some specific applications, the sales prediction model may be an XGBoost (expandable Gradient Boosting, a tool of a massively parallel Boosting tree) model. In training the XGBoost, for each initial prediction tree in the XGBoost, a residual of the initial prediction tree for each training sample may be determined. Then, by doing your sum on the residuals, a regression tree can be learned. And finally, updating parameters of each initial prediction tree by using the regression tree to obtain a trained target sales prediction model.
Specifically, let the training set T { (x)1,y1),(x2,y2),…,(xn,yn) And f, finally obtaining a target sales prediction modelM(x) In that respect First, initializing to obtain f0(x) 0. Then, for M equal to 1,2, …, M, the residual r is calculated respectivelymi=yi-f(m-1)(xi) I is 1,2, …, n. Then, the residual r is fittedmiLearning to obtain a regression tree, which is marked as T (x: theta)m). Updating by means of regression trees, i.e. fm(x)=fm-1(x)+T(x:θm). Finally, obtain
Figure BDA0003576959660000081
Step 303, obtaining first incremental item sales data generated in a second historical time period after the first historical time period.
In some optional implementations of the present embodiment, the first historical period of time and the second historical period of time are consecutive. In this way, the first incremental item sales data generated by the second historical time period contains partial features in the first item sales data, so that the target sales prediction model updated by the first incremental item sales data better conforms to the change rule of the item sales, and the prediction accuracy is improved. And meanwhile, the model has better timeliness.
Step 304, updating at least one prediction tree in the target sales prediction model using the first incremental item sales data and not updating at least one prediction tree in the target sales prediction model.
In this embodiment, when the executive agent updates the target sales prediction model with the first incremental item sales data, the executive agent may update at least one prediction tree in the target sales prediction model. However, in order to maintain the features in the full-volume item sales data, not all of the prediction trees are updated. Thus, at the time of updating, at least one prediction tree in the target sales prediction model is not updated. Specifically, when the executive agent performs updating by using the first incremental item sales data, at least one of the predictive trees may be randomly selected from the predictive trees to perform parameter updating.
Step 304', fixing the structures and parameters of a plurality of prediction trees, and adding new prediction trees; the new prediction tree is trained using the first incremental item sales data to update the target sales prediction model.
In this embodiment, the execution subject may further fix the structure and parameters of each prediction tree in the target sales prediction model, and add at least one new prediction tree to the target sales prediction model. And then training the added new prediction tree by using the first incremental article sales data to update the target sales prediction model.
Step 305, second incremental item sales data generated during a third historical time period after the second historical time period is obtained.
In this embodiment, the executive agent may further continue to acquire second incremental item sales data generated within a third historical time period after the second historical time period. Here, the duration of the third history period may be the same as the duration of the second history period. The second incremental item sales data may be the same as the first incremental item sales data.
And step 306, testing the updated target sales forecasting model by using the second incremental goods sales data.
After the execution main body obtains the second incremental goods sales data, the execution main body can be used for testing the updated target sales prediction model. During testing, the attribute information, the sales time and other information of the article in the second incremental article sales data can be used as the input of the updated target sales prediction model, and the output of the updated target sales prediction model is compared with the sales in the second incremental article sales data to obtain the test result.
And 307, determining whether to train the updated target sales prediction model again according to the test result.
And the execution main body can judge whether the performance of the updated target sales prediction model meets the requirements or not according to the test result. And further determining whether to retrain the updated target sales prediction model. Specifically, if the test result shows that the updated target sales prediction model has poor performance, the updated target sales prediction model may be retrained again. If the test result shows that the updated target sales prediction model has better performance, the training is not needed.
In some optional implementations of this embodiment, the executing agent may implement step 307 by: determining the error of the updated target sales forecasting model according to the forecasting result of the updated target sales forecasting model on the second incremental goods sales data and the actual result in the second incremental goods sales data; in response to the fact that the determined error is smaller than the preset threshold value, retraining the updated target sales prediction model by using third incremental goods sales data generated in a third historical time period after the second historical time period; and in response to the fact that the determined error is larger than or equal to the preset threshold value, retraining the updated target sales prediction model by using the total historical article sales data between the current moments.
In this implementation manner, the executive agent may compare the prediction result of the updated target sales prediction model on the second incremental item sales data with the actual result in the second incremental item sales data, and calculate an error between the prediction result and the actual result. If the error is smaller than the preset threshold value, the updated target sales prediction model is better in performance, and the updated target sales prediction model can be retrained again by using third incremental item sales data generated in a third history time period after the second history time period. It is to be understood that retraining herein refers to training the model with incremental data to improve the timeliness of the model. If the error is larger than or equal to the preset threshold value, the performance of the model is poor, the updated target sales prediction model can be retrained again by using the total historical item sales data between the current moments, and the continuous iterative optimization of the model is realized. Therefore, the performance of the model can be improved on the whole, and the accuracy of the sales data prediction is improved. Meanwhile, incremental data are adopted for updating the model, and the incremental data comprise partial characteristics of sales data used for training the initial model, so that the calculation cost of the updating iteration of the model is reduced. In addition, in the embodiment, the newly generated incremental data is always used when the model is updated, so that the timeliness of the model is ensured, and the incremental data is fully utilized.
The model training method provided by the embodiment of the disclosure can perform incremental training on the model and then perform testing, and continuously maintain the incremental training when the model performance is determined to be better, and re-train when the model performance is determined to be worse.
Referring to fig. 4, a flow 400 of one embodiment of an information output method according to the present disclosure is shown. As shown in fig. 4, the method of the present embodiment may include the following steps:
step 401, obtaining relevant information of a target commodity.
In this embodiment, the executing entity may first obtain the relevant information of the target product. Here, the related information may include an identification of the target product, attribute information, a transaction time, and the like.
And step 402, predicting sales data of the target commodity according to the relevant information and a pre-trained target sales prediction model.
The execution subject may input the related information into a pre-trained target sales prediction model, and predict sales data of the target product. The target sales prediction model can be obtained by training through the model training method described in fig. 2 or fig. 3.
In step 403, the sales data is output.
The executing agent may output the predicted sales data so that the user may view the sales data for stocking or scheduling production.
With continued reference to fig. 5, a schematic diagram of an application scenario of the model training method and the information output method according to the present disclosure is shown. In the application scenario of fig. 5, the server 501 trains a target sales prediction model using the full-volume commodity sales data in the first historical time period. The target sales prediction model is then updated with incremental data generated over a second historical time period. The updated target sales prediction model is then tested using the incremental data over the third historical time period. If the test result shows that the updated target sales prediction model has better performance, the updated target sales prediction model is brought online for the user 502 to use. And meanwhile, the generated incremental data is periodically used for carrying out incremental training on the target sales prediction model.
With further reference to fig. 6, as an implementation of the methods shown in the above-mentioned figures, the present disclosure provides an embodiment of a model training apparatus, which corresponds to the embodiment of the method shown in fig. 2, and which can be applied in various electronic devices.
As shown in fig. 6, the model training apparatus 600 of the present embodiment includes: a first acquisition unit 601, a model training unit 602, a second acquisition unit 603, and a model updating unit 604.
A first obtaining unit 601 configured to obtain first item sales data generated in a first historical time period.
And the model training unit 602 is configured to train the initial sales prediction model by using the first article sales data to obtain a trained target sales prediction model.
A second obtaining unit 603 configured to obtain first incremental item sales data generated within a second historical time period after the first historical time period.
A model update unit 604 configured to update the target sales prediction model with the first incremental item sales data.
In some alternative implementations of the present embodiment, the target sales prediction model includes a plurality of prediction trees. The model updating unit 604 may be further configured to: updating at least one prediction tree in the target sales forecasting model with the first incremental item sales data.
In some optional implementations of this embodiment, the model updating unit 604 may be further configured to: at least one prediction tree in the target sales prediction model is not updated.
In some alternative implementations of the present embodiment, the target sales prediction model includes a plurality of prediction trees. The model updating unit 604 may be further configured to: the new prediction tree is trained using the first incremental item sales data to update the target sales prediction model.
In some optional implementations of this embodiment, the first history period and the second history period are consecutive.
In some optional implementations of this embodiment, the apparatus 600 may further include: the device comprises a third acquisition unit, a model test unit and a model retraining unit.
A third acquisition unit configured to acquire second incremental item sales data generated within a third history time period after the second history time period.
A model testing unit configured to test the updated target sales forecasting model using the second incremental item sales data.
And the model retraining unit is configured to determine whether to retrain the updated target sales prediction model according to the test result.
In some optional implementations of this embodiment, the model retraining unit is further configured to: determining the error of the updated target sales forecasting model according to the forecasting result of the updated target sales forecasting model on the second incremental goods sales data and the actual result in the second incremental goods sales data; and in response to determining that the error is smaller than the preset threshold value, retraining the updated target sales prediction model by using third incremental item sales data generated in a third historical time period after the second historical time period.
In some optional implementations of this embodiment, the model retraining unit is further configured to: and in response to the fact that the determined error is larger than or equal to the preset threshold value, retraining the updated target sales prediction model by using the total historical article sales data between the current moments.
In some optional implementations of this embodiment, the initial sales prediction model includes at least two initial prediction trees, and the first item sales data includes a plurality of training samples. The model training unit 602 may be further configured to: for each initial prediction tree, determining a residual error of the initial prediction tree for each training sample; fitting the residual error to obtain a regression tree; and according to the regression tree, updating parameters of each initial prediction tree to obtain a trained target sales prediction model.
It should be understood that units 601 to 604 recited in the model training apparatus 600 correspond to respective steps in the method described with reference to fig. 2. Thus, the operations and features described above with respect to the model training method are equally applicable to the apparatus 600 and the units included therein, and are not described in detail here.
With further reference to fig. 7, as an implementation of the methods shown in the above figures, the present disclosure provides an embodiment of an information output apparatus, which corresponds to the method embodiment shown in fig. 2, and which is particularly applicable to various electronic devices.
As shown in fig. 7, the information output apparatus 700 of the present embodiment includes: an information acquisition unit 701, a sales prediction unit 702, and an information output unit 703.
An information acquisition unit 701 configured to acquire related information of a target commodity.
And a sales predicting unit 702 configured to predict sales data of the target commodity according to the relevant information and a pre-trained target sales predicting model obtained by the apparatus described in fig. 6.
An information output unit 703 configured to output the sales amount data.
It should be understood that the units 701 to 703 recited in the information output apparatus 700 correspond to respective steps in the method described with reference to fig. 4, respectively. Thus, the operations and features described above for the information output method are also applicable to the apparatus 700 and the units included therein, and are not described herein again.
In the technical scheme of the disclosure, the collection, storage, use, processing, transmission, provision, disclosure and other processing of the personal information of the related user are all in accordance with the regulations of related laws and regulations and do not violate the good customs of the public order.
The present disclosure also provides an electronic device, a readable storage medium, and a computer program product according to an embodiment of the present disclosure.
Fig. 8 illustrates a block diagram of an electronic device 800 that performs a model training method, an information output method, according to an embodiment of the disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 8, the electronic device 800 includes a processor 801 that may perform various suitable actions and processes in accordance with a computer program stored in a Read Only Memory (ROM)802 or a computer program loaded from a memory 808 into a Random Access Memory (RAM) 803. In the RAM803, various programs and data required for the operation of the electronic apparatus 800 can also be stored. The processor 801, the ROM 802, and the RAM803 are connected to each other by a bus 804. An I/O interface (input/output interface) 805 is also connected to the bus 804.
A number of components in the electronic device 800 are connected to the I/O interface 805, including: an input unit 806, such as a keyboard, a mouse, or the like; an output unit 807 such as various types of displays, speakers, and the like; a memory 808, such as a magnetic disk, optical disk, or the like; and a communication unit 809 such as a network card, modem, wireless communication transceiver, etc. The communication unit 809 allows the electronic device 800 to exchange information/data with other devices through a computer network such as the internet and/or various telecommunication networks.
The processor 801 may be various general purpose and/or special purpose processing components having processing and computing capabilities. Some examples of processor 801 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, or the like. The processor 801 performs various methods and processes described above, such as a model training method, an information output method. For example, in some embodiments, the model training method, the information output method, may be implemented as a computer software program tangibly embodied in a machine-readable storage medium, such as the memory 808. In some embodiments, part or all of the computer program can be loaded and/or installed onto the electronic device 800 via the ROM 802 and/or the communication unit 809. When loaded into RAM803 and executed by processor 801, a computer program may perform one or more of the steps of the model training method, the information output method described above. Alternatively, in other embodiments, the processor 801 may be configured to perform the model training method, the information output method, by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuitry, Field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), system on a chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present disclosure may be written in any combination of one or more programming languages. The program code described above may be packaged as a computer program product. These program code or computer program products may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the program code, when executed by the processor 801, causes the functions/acts specified in the flowchart and/or block diagram block or blocks to be performed. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable storage medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable storage medium may be a machine-readable signal storage medium or a machine-readable storage medium. A machine-readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), Wide Area Networks (WANs), and the Internet.
The computer system may include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The Server can be a cloud Server, also called a cloud computing Server or a cloud host, and is a host product in a cloud computing service system, so as to solve the defects of high management difficulty and weak service expansibility in the traditional physical host and VPS service ("Virtual Private Server", or simply "VPS"). The server may also be a server of a distributed system, or a server incorporating a blockchain.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present disclosure may be executed in parallel or sequentially or in different orders, and are not limited herein as long as the desired results of the technical solutions of the present disclosure can be achieved.
The above detailed description should not be construed as limiting the scope of the disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present disclosure should be included in the protection scope of the present disclosure.

Claims (23)

1. A model training method, comprising:
acquiring first item sales data generated in a first historical time period;
training an initial sales prediction model by using the first article sales data to obtain a trained target sales prediction model;
obtaining first incremental item sales data generated in a second historical time period after the first historical time period;
updating the target sales prediction model using the first incremental item sales data.
2. The method of claim 1, wherein the target sales prediction model comprises a plurality of prediction trees; and
the updating the target sales prediction model with the first incremental item sales data comprises:
updating at least one prediction tree in the target sales forecasting model with the first incremental item sales data.
3. The method of claim 2, wherein said updating said target sales prediction model with said first incremental item sales data comprises:
and not updating at least one prediction tree in the target sales prediction model.
4. The method of claim 1, wherein the target sales prediction model comprises a plurality of prediction trees; and
the updating the target sales prediction model with the first incremental item sales data comprises:
fixing the structures and parameters of the prediction trees, and adding new prediction trees;
training a new prediction tree using the first incremental item sales data to update the target sales prediction model.
5. The method of claim 1, wherein the first history period and the second history period are consecutive.
6. The method of claim 1, wherein the method further comprises:
acquiring second incremental item sales data generated in a third historical time period after the second historical time period;
testing the updated target sales forecasting model by utilizing the second incremental goods sales data;
and determining whether to train the updated target sales forecasting model again or not according to the test result.
7. The method of claim 1, wherein the determining whether to retrain the updated target sales prediction model based on the test results comprises:
determining the error of the updated target sales forecasting model according to the forecasting result of the updated target sales forecasting model on the second incremental goods sales data and the actual result in the second incremental goods sales data;
and in response to determining that the error is smaller than the preset threshold value, retraining the updated target sales prediction model by using third incremental item sales data generated in a third historical time period after the second historical time period.
8. The method of claim 7, wherein the determining whether to retrain the updated target sales prediction model based on the test results comprises:
and in response to determining that the error is greater than or equal to the preset threshold, retraining the updated target sales prediction model by using the total historical item sales data between the current moments.
9. The method of any of claims 1-8, wherein the initial sales prediction model comprises at least two initial prediction trees, the first item sales data comprising a plurality of training samples; and
the training of the initial sales prediction model by using the first article sales data to obtain a trained target sales prediction model comprises the following steps:
for each initial prediction tree, determining a residual error of the initial prediction tree for each training sample;
fitting the residual errors to obtain a regression tree;
and updating parameters of each initial prediction tree according to the regression tree to obtain a trained target sales prediction model.
10. An information output method comprising:
acquiring related information of a target commodity;
predicting sales data of the target commodity according to the relevant information and a pre-trained target sales prediction model, wherein the target sales prediction model is obtained by training according to the method of any one of claims 1 to 7;
and outputting the sales data.
11. A model training apparatus comprising:
a first acquisition unit configured to acquire first item sales data generated within a first historical period of time;
the model training unit is configured to train an initial sales prediction model by using the first article sales data to obtain a trained target sales prediction model;
a second acquisition unit configured to acquire first incremental item sales data generated within a second historical period of time after the first historical period of time;
a model update unit configured to update the target sales prediction model with the first incremental item sales data.
12. The apparatus of claim 11, wherein the target sales prediction model comprises a plurality of prediction trees; and
the model update unit is further configured to:
updating at least one prediction tree in the target sales forecasting model using the first incremental item sales data.
13. The apparatus of claim 12, wherein the model update unit is further configured to:
and not updating at least one prediction tree in the target sales prediction model.
14. The apparatus of claim 11, wherein the target sales prediction model comprises a plurality of prediction trees; and
the model update unit is further configured to:
training a new prediction tree using the first incremental item sales data to update the target sales prediction model.
15. The apparatus of claim 11, wherein the first history period and the second history period are consecutive.
16. The apparatus of claim 11, wherein the apparatus further comprises:
a third acquisition unit configured to acquire second incremental item sales data generated within a third history time period after the second history time period;
a model testing unit configured to test the updated target sales forecasting model using the second incremental item sales data;
and the model retraining unit is configured to determine whether to retrain the updated target sales prediction model according to the test result.
17. The apparatus of claim 11, wherein the model retraining unit is further configured to:
determining the error of the updated target sales forecasting model according to the forecasting result of the updated target sales forecasting model on the second incremental goods sales data and the actual result in the second incremental goods sales data;
in response to determining that the error is less than a preset threshold, retraining the updated target sales prediction model using third incremental item sales data generated within a third historical time period after the second historical time period.
18. The apparatus of claim 17, wherein the model retraining unit is further configured to:
and in response to determining that the error is greater than or equal to the preset threshold, retraining the updated target sales prediction model by using the total historical item sales data between the current moments.
19. The apparatus of any of claims 11-18, wherein the initial sales prediction model comprises at least two initial prediction trees, the first item sales data comprising a plurality of training samples; and
the model training unit is further configured to:
for each initial prediction tree, determining a residual error of the initial prediction tree for each training sample;
fitting the residual errors to obtain a regression tree;
and updating parameters of each initial prediction tree according to the regression tree to obtain a trained target sales prediction model.
20. An information output apparatus comprising:
an information acquisition unit configured to acquire related information of a target commodity;
a sales predicting unit configured to predict sales data of the target commodity according to the related information and a pre-trained target sales predicting model obtained by the apparatus according to any one of claims 11 to 19;
an information output unit configured to output the sales data.
21. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-9 or to perform the method of claim 8.
22. A non-transitory computer readable storage medium having stored thereon computer instructions for causing the computer to perform the method of any one of claims 1-9 or to perform the method of claim 10.
23. A computer program product comprising a computer program which, when executed by a processor, implements the method of any one of claims 1-9 or the method of claim 10.
CN202210347090.6A 2022-04-01 2022-04-01 Model training method, information output method, device, equipment and storage medium Pending CN114663154A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210347090.6A CN114663154A (en) 2022-04-01 2022-04-01 Model training method, information output method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210347090.6A CN114663154A (en) 2022-04-01 2022-04-01 Model training method, information output method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114663154A true CN114663154A (en) 2022-06-24

Family

ID=82033408

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210347090.6A Pending CN114663154A (en) 2022-04-01 2022-04-01 Model training method, information output method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114663154A (en)

Similar Documents

Publication Publication Date Title
US20230351323A1 (en) Systems and methods for inventory management and optimization
US11861464B2 (en) Graph data structure for using inter-feature dependencies in machine-learning
CN110111139B (en) Behavior prediction model generation method and device, electronic equipment and readable medium
US20210103858A1 (en) Method and system for model auto-selection using an ensemble of machine learning models
AU2020203862B2 (en) Artificial intelligence (ai) based predictions and recommendations for equipment
EP4242955A1 (en) User profile-based object recommendation method and device
CN110390408A (en) Trading object prediction technique and device
CN112016796B (en) Comprehensive risk score request processing method and device and electronic equipment
CN107517251B (en) Information pushing method and device
US20210224351A1 (en) Method and system for optimizing an objective having discrete constraints
CN110866625A (en) Promotion index information generation method and device
JP2021192308A (en) Method and device for determining recommendation model and determining item price, electronic apparatus, storage medium, and computer program
CN116091110A (en) Resource demand prediction model training method, prediction method and device
CN110827069A (en) Data processing method, device, medium, and electronic apparatus
CN114663015A (en) Replenishment method and device
CN115601071A (en) Marketing strategy optimization method, device, equipment and medium for product
CN115202847A (en) Task scheduling method and device
CN114663154A (en) Model training method, information output method, device, equipment and storage medium
CN115689143A (en) Work order assignment method, work order assignment device, electronic device and medium
CN114328123A (en) Abnormality determination method, training method, device, electronic device, and storage medium
CN114266239A (en) Data set generation method and device
CN113159877A (en) Data processing method, device, system and computer readable storage medium
CN112906723A (en) Feature selection method and device
EP4198831A1 (en) Automated feature engineering for predictive modeling using deep reinforcement learning
US20220164744A1 (en) Demand forecasting of service requests volume

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination