CN110766425A - Sales prediction method and device - Google Patents

Sales prediction method and device Download PDF

Info

Publication number
CN110766425A
CN110766425A CN201810825637.2A CN201810825637A CN110766425A CN 110766425 A CN110766425 A CN 110766425A CN 201810825637 A CN201810825637 A CN 201810825637A CN 110766425 A CN110766425 A CN 110766425A
Authority
CN
China
Prior art keywords
sales
model
initial
prediction
data
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
CN201810825637.2A
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.)
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke Information Technology Co Ltd
Original Assignee
Beijing Jingdong Century Trading Co Ltd
Beijing Jingdong Shangke 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 Beijing Jingdong Century Trading Co Ltd, Beijing Jingdong Shangke Information Technology Co Ltd filed Critical Beijing Jingdong Century Trading Co Ltd
Priority to CN201810825637.2A priority Critical patent/CN110766425A/en
Publication of CN110766425A publication Critical patent/CN110766425A/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
    • G06Q30/0202Market predictions or forecasting for commercial activities
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/18Complex mathematical operations for evaluating statistical data, e.g. average values, frequency distributions, probability functions, regression analysis

Abstract

The invention discloses a sales prediction method and a sales prediction device, and relates to the technical field of computers. One embodiment of the method comprises: inputting historical sales data into a regression model for training to obtain an initial sales prediction model; inputting historical sales data into an average model for training to obtain an initial sales prediction value; and determining a sales prediction model by utilizing a homotopy algorithm, the sales prediction initial model and the sales prediction initial value so as to predict sales. The method comprises the steps of firstly determining a sales forecasting initial model and a sales forecasting initial value, resolving the sales forecasting model based on a homotopic algorithm and the determined sales forecasting initial model and the sales forecasting initial value, and inputting historical sales data into the sales forecasting model to forecast the sales. The method can reasonably predict the sales volume and is convenient for sellers to make purchasing plans.

Description

Sales prediction method and device
Technical Field
The invention relates to the field of computers, in particular to a sales prediction method and a sales prediction device.
Background
In the field of electronic commerce, it is very common to count and predict sales data of products, and subsequent sellers can purchase products based on the sales prediction results. There are many methods for predicting sales in the prior art, such as a decision tree method, a linear regression method, a weighted average method, and the like. The basic principle of sales prediction is as follows: and after the sales volume is predicted by using models such as a decision tree and a linear regression, adjusting and updating the models according to actual sales volume data.
In the process of implementing the invention, the inventor finds that at least the following problems exist in the prior art:
the above method for predicting the sales volume cannot avoid the defects of the model, for example, the predicted sales volume is far higher than the actual sales volume, the prediction of the sales volume is delayed, and the like, so that the predicted sales volume is inaccurate, and a reasonable basis cannot be provided for a seller to purchase products.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and an apparatus for predicting sales, where the method first determines an initial sales prediction model and an initial sales prediction value, and then solves the initial sales prediction model and the initial sales prediction value based on a homotopy algorithm, and then inputs historical sales data into the sales prediction model to perform sales prediction. The method can reasonably predict the sales volume and is convenient for sellers to make purchasing plans.
To achieve the above object, according to an aspect of an embodiment of the present invention, there is provided a sales prediction method.
The sales forecasting method of the embodiment of the invention comprises the following steps: inputting historical sales data into a regression model for training to obtain an initial sales prediction model; inputting historical sales data into an average model for training to obtain an initial sales prediction value; and determining a sales prediction model by utilizing a homotopy algorithm, the sales prediction initial model and the sales prediction initial value so as to predict sales.
Optionally, the regression model is a multiple linear regression model; the method for inputting historical sales data into a regression model for training to obtain an initial sales prediction model comprises the following steps: determining first training set data from historical sales data; inputting the first training set data into the multiple linear regression model for training so as to fit model parameters of the multiple linear regression model; and taking the multiple linear regression model with the model parameters as a sales forecasting initial model.
Optionally, the average model is a moving weighted average model; inputting historical sales data into an average model for training to obtain an initial sales prediction value, wherein the method comprises the following steps: determining second training set data from the historical sales data; inputting the second training set data into the moving weighted average model for training so as to fit a weight parameter of the moving weighted average model; and calculating a sales value of the forecast date according to the weight parameter, and taking the sales value as an initial sales forecast value.
Optionally, the determining a sales prediction model by using a homotopy algorithm, the sales prediction initial model and the sales prediction initial value includes: constructing a main function which meets the initial prediction model and the initial sales prediction value; discretizing the main function, and introducing an embedded variable, an auxiliary adjusting parameter and an auxiliary control function; constructing a deformation equation according to the discretized main function, the embedded variable, the auxiliary adjusting parameter and the auxiliary control function; and carrying out Taylor expansion and derivation on the deformation equation, then carrying out iterative calculation, and ending the iteration when the error of two adjacent iterations is smaller than a preset threshold value, wherein the corresponding solution is the sales prediction model when the iteration is ended.
To achieve the above object, according to another aspect of the embodiments of the present invention, there is provided a sales predicting apparatus.
The sales prediction apparatus according to an embodiment of the present invention includes: the first training module is used for inputting historical sales data into the regression model for training to obtain an initial sales prediction model; the second training module is used for inputting the historical sales data into the average model for training to obtain an initial sales prediction value; and the sales prediction module is used for determining a sales prediction model by utilizing a homotopy algorithm, the sales prediction initial model and the sales prediction initial value so as to predict sales.
Optionally, the regression model is a multiple linear regression model; the first training module is further configured to: determining first training set data from historical sales data; inputting the first training set data into the multiple linear regression model for training so as to fit model parameters of the multiple linear regression model; and using the multiple linear regression model with the model parameters as a sales forecasting initial model.
Optionally, the average model is a moving weighted average model; the second training module is further configured to: determining second training set data from the historical sales data; inputting the second training set data into the moving weighted average model for training so as to fit a weight parameter of the moving weighted average model; and calculating a sales value of the forecast date according to the weight parameter, and taking the sales value as an initial sales forecast value.
Optionally, the sales prediction module is further configured to: constructing a main function which meets the initial prediction model and the initial sales prediction value; discretizing the main function, and introducing an embedded variable, an auxiliary adjusting parameter and an auxiliary control function; constructing a deformation equation according to the discretized main function, the embedded variable, the auxiliary adjusting parameter and the auxiliary control function; and carrying out Taylor expansion and derivation on the deformation equation, then carrying out iterative calculation, and ending the iteration when the error of two adjacent iterations is smaller than a preset threshold value, wherein the corresponding solution is the sales prediction model when the iteration is ended.
To achieve the above object, according to still another aspect of embodiments of the present invention, there is provided an electronic apparatus.
An electronic device of an embodiment of the present invention includes: one or more processors; a storage device for storing one or more programs that, when executed by the one or more processors, cause the one or more processors to implement a sales prediction method of an embodiment of the present invention.
To achieve the above object, according to still another aspect of embodiments of the present invention, there is provided a computer-readable medium.
A computer-readable medium of an embodiment of the present invention has stored thereon a computer program that, when executed by a processor, implements a sales prediction method of an embodiment of the present invention.
One embodiment of the above invention has the following advantages or benefits: firstly, determining a sales prediction initial model and a sales prediction initial value, resolving the sales prediction model based on a homotopy algorithm and the determined sales prediction initial model and the determined sales prediction initial value, and inputting historical sales data into the sales prediction model to predict the sales; determining a sales volume prediction initial model based on the multiple linear regression model, wherein historical sales data in the same period or season can be reflected, and the obtained sales volume prediction initial model is relatively reasonable; determining a sales forecast initial value based on a moving weighted average model, and reflecting a recent data characteristic value into the model to further obtain an accurate sales forecast initial value; the sales forecasting model is solved based on the homotopy algorithm, the correlation of each item of data is fully considered, and a forecasting result close to the actual sales can be obtained.
Further effects of the above-mentioned non-conventional alternatives will be described below in connection with the embodiments.
Drawings
The drawings are included to provide a better understanding of the invention and are not to be construed as unduly limiting the invention. Wherein:
FIG. 1 is a schematic diagram of the main steps of a sales prediction method according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart of a method for predicting sales in accordance with an embodiment of the present invention;
FIG. 3 is a schematic diagram of the main blocks of a sales prediction apparatus according to an embodiment of the present invention;
FIG. 4 is an exemplary system architecture diagram in which embodiments of the present invention may be employed;
FIG. 5 is a schematic diagram of a computer apparatus suitable for use in an electronic device to implement an embodiment of the invention.
Detailed Description
Exemplary embodiments of the present invention are described below with reference to the accompanying drawings, in which various details of embodiments of the invention 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 invention. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Fig. 1 is a schematic diagram of the main steps of a sales prediction method according to an embodiment of the present invention. As shown in fig. 1, the sales prediction method according to the embodiment of the present invention mainly includes the following steps:
step S101: and inputting the historical sales data into a regression model for training to obtain an initial sales prediction model. The historical sales data comprises sales date data, historical sales volume data, inventory data, sales state data, price data, promotion data and the like; the regression model may be a linear regression model, an autoregressive model, or the like, and in the embodiment, is a multiple linear regression model. The step is to determine first training set data from historical sales data; inputting the first training set data into a regression model for training so as to fit model parameters of the regression model; and finally, taking the regression model with the model parameters as an initial sales prediction model.
Step S102: and inputting the historical sales data into an average model for training to obtain an initial sales prediction value. The average model may be a moving average model, or the like, and in the embodiment, is a moving weighted average model. Determining second training set data from historical sales data; inputting the second training set data into an average model for training so as to fit a weight parameter of the average model; and finally, calculating a sales value of the forecast date according to the weight parameter, and taking the sales value as an initial sales forecast value.
Step S103: and determining a sales prediction model by utilizing a homotopy algorithm, the sales prediction initial model and the sales prediction initial value so as to predict sales. The homotopy algorithm is one of numerical solution methods, is a search algorithm with large-range convergence, and can ensure iterative convergence to obtain a final numerical solution for any initial value. After determining the initial sales prediction model and the initial sales prediction value in steps S101 and S102, a deformation equation may be constructed according to homotopic ideas, taylor expansion and derivation are performed on the deformation equation, then iterative computation is performed, the iteration is terminated until the error of two adjacent iterations is smaller than a preset threshold, and a corresponding solution is the sales prediction model when the iteration is terminated. And then, the historical sales data can be used as the input of a sales prediction model to obtain a sales prediction result.
Fig. 2 is a schematic main flow chart of a sales prediction method according to an embodiment of the present invention. As shown in fig. 2, the sales prediction method according to the embodiment of the present invention mainly includes the following steps:
step S201: historical sales data is obtained, wherein the historical sales data comprises sales date data, historical sales volume data, inventory data, sales status data, price data and promotion data. The sales status data includes upper bin (i.e., normal sales) and lower bin (i.e., non-sales), the price data includes an original price for the item and a bargained price for the item, and the promotion data includes a promotion type and a promotion discount. Table 1 shows the historical sales data for the article a between 1/month 1/2018 and 1/month 10/2018, according to an embodiment.
TABLE 1 historical sales data
Figure BDA0001742420870000061
Step S202: and performing data cleaning on the historical sales data. The step is used for filling missing data in the historical sales data, eliminating data with a historical sales volume of 0 due to stock shortage or bin discharge (for example, the sales volume of the current day is 0 due to the stock shortage of the commodity A in 1 month and 4 days, and the sales volume of the current day is 0 due to the stock shortage of the commodity A in 1 month and 10 days), eliminating abnormal values (for example, the sales volume of the current day of the commodity A in 1 month and 8 days is 236, and is far higher than the sales volumes of other dates) or setting a reasonable sales volume (for example, a sales volume average value or a sales volume median value and the like) by using a box diagram method.
Step S203: and inputting historical sales data into a multiple linear regression model for training to obtain an initial sales prediction model. The concrete realization of this step is: determining first training set data from historical sales data; inputting the first training set data into the multiple linear regression model for training so as to fit model parameters of the multiple linear regression model; and finally, taking the multiple linear regression model with the model parameters as a sales prediction initial model.
The influence of historical sales data, inventory data, sales state data, price data and promotion data on future sales volume is considered, the correlation among the data is reflected by a multiple linear regression model, and the final obtained sales volume prediction initial model is as follows:
F(x1,x2,…,xn,t)=α1x1+…+αnxn1x1x22x1x3+…+εmxnxn+γt
equation 1
In the formula, x1,x2,…,xnFor each item in the historical sales data, t is time α1,α2,…,αn,ε1,ε2,…,εmAnd gamma is a model parameter. In an embodiment, historical sales data, price data, and sales data are initialized as linear functions with respect to time t, and inventory data and sales status data are more artificially affected and therefore initialized as linear functions independent of time t.
Step S204: and inputting the historical sales data into a moving weighted average model for training to obtain an initial sales prediction value. Firstly, determining second training set data from historical sales data; inputting the second training set data into the moving weighted average model for training so as to fit a weight parameter of the moving weighted average model; and finally, calculating a sales value of the forecast date according to the weight parameter, and taking the sales value as an initial sales forecast value.
The moving weighted average model is used in the step, so that the logic of large relevance of recent sales data can be embodied, namely, the more accurate the sales data closer to the date is in predicting the future sales. The moving weighted average model is:
M=f(p1,p2,…,pm)=β1p12p2+…+βmpm
equation 2
In the formula, piFor historical sales data, i is 1,2, …, m, βiIs a weight parameter.
When t is 0, the initial value of the sales prediction obtained by the initial sales prediction model and the initial sales prediction obtained by the moving weighted average model are equal, i.e. the sales prediction model and the moving weighted average model are equal
F(x1,x2,…,xn,0)=M
Equation 3
Step S205: and determining a sales forecasting model by utilizing a homotopy algorithm, the sales forecasting initial model and the sales forecasting initial value. The basic principle of the homotopy algorithm is as follows: given two topological spaces X and Y, consider two sequential functions f (X) and g (X), and f (X) and g (X) are sequential mappings of X → Y. If there is one consecutive mapping H: x [0, 1] → Y is such that for any X ∈ X, there are H (X, 0) ═ f (X), H (X, 1) ═ g (X), then f (X) and g (X) homotopes in the topology space Y, and the function H is called a path connecting f (X) and g (X). The sales prediction model is a nonlinear function of the historical sales data, the inventory data, the sales status data, the price data, and the sales promotion data, and thus can be obtained in the following manner using the homotopic idea.
First, construct a master function, i.e. order
Figure BDA0001742420870000081
Wherein R is a constant and G is a sales prediction model.
L(x1,x2,…,xn,t)=F(x1,x2,…,xn,t)
Equation 5
And F (x)1,x2,…,xnAnd t) satisfies the initial value of the sales prediction.
Equation 4 is then discretized and the embedded variable q, the auxiliary tuning parameter η and the auxiliary control function H (x) are introduced1,x2,…,xn) And satisfies q ∈ [0, 1]],η≠0,H(x1,x2,…,xn) Not equal to 0. In the embodiment, discretization may be performed by using a finite difference method, a finite element method, a boundary element method, or the like.
Then, the following deformation equation is constructed:
(1-q)L(G(x1,x2,…,xn,q)-F(x1,x2,…,xn,t))=
ηqH(x1,x2,…,xn)N(G(x1,x2,…,xn,q))
equation 6
And G (x)1,x2,…,xnAnd q) satisfying the initial sales prediction value.
Equation 6 shows that when q is 0, G (x)1,x2,…,xn,0)=F(x1,x2,…,xnT), when q is 1, N (G (x)1,x2,…,xn1)) ═ 0. The solution G (x) of the deformation equation when the embedding variable q is continuously changed from 0 to 11,x2,…,xnQ) the solution F (x) can be solved from the initial guess1,x2,…,xnT) successive homologies to the final analytical solution.
Then, G (x)1,x2,…,xnAnd q) carrying out Taylor expansion on q, and solving an nth derivative on two sides of the deformation equation to obtain a relation between the nth derivative and the n-1 derivative.
And finally, carrying out iterative computation by using time and/or price data, terminating iteration when the error of two adjacent iterations is smaller than a preset threshold value, and obtaining an approximate analytical solution which is the sales prediction model. The iteration end can obtain:
G(x1,x2,…,xn)=G0(x1,x2,…,xn)+G1(x1,x2,…,xn)+…+Gl(x1,x2,…,xn)+…
equation 7
In the formula, Gi(x1,x2,…,xn) Is the derivative of the order I.
Step S206: and taking the historical sales data as the input of the sales volume prediction model to obtain a sales volume prediction result. The sales forecasting model calculated in the steps S201 to S205 considers various influence factors, and the forecasted sales approaches the actual sales, so that the problem of overhigh sales forecasting in the prior art is solved.
According to the sales prediction method, firstly, the initial sales prediction model and the initial sales prediction value are determined, the initial sales prediction model is solved based on the determined initial sales prediction model and the initial sales prediction value by using the homotopic algorithm, and then the historical sales data is input into the sales prediction model to predict the sales; determining a sales volume prediction initial model based on the multiple linear regression model, wherein historical sales data in the same period or season can be reflected, and the obtained sales volume prediction initial model is relatively reasonable; determining a sales forecast initial value based on a moving weighted average model, and reflecting a recent data characteristic value into the model to further obtain an accurate sales forecast initial value; the sales forecasting model is solved based on the homotopy algorithm, the correlation of each item of data is fully considered, and a forecasting result close to the actual sales can be obtained.
Fig. 3 is a schematic diagram of main blocks of a sales predicting apparatus according to an embodiment of the present invention. As shown in fig. 3, the sales prediction apparatus 300 according to the embodiment of the present invention mainly includes:
the first training module 301 is configured to input historical sales data into a regression model for training, so as to obtain an initial sales prediction model. The historical sales data comprises sales date data, historical sales volume data, inventory data, sales state data, price data, promotion data and the like; the regression model may be a linear regression model, an autoregressive model, or the like, and in the embodiment, is a multiple linear regression model. The module is concretely realized as follows: determining first training set data from historical sales data; inputting the first training set data into a regression model for training so as to fit model parameters of the regression model; and finally, taking the regression model with the model parameters as an initial sales prediction model.
The second training module 302 is configured to input the historical sales data into the weighted average model for training, so as to obtain an initial value of sales prediction. The average model may be a moving average model, or the like, and in the embodiment, is a moving weighted average model. The module is concretely realized as follows: determining second training set data from the historical sales data; inputting the second training set data into an average model for training so as to fit a weight parameter of the average model; and finally, calculating a sales value of the forecast date according to the weight parameter, and taking the sales value as an initial sales forecast value.
And the sales prediction module 303 is configured to determine a sales prediction model by using a homotopy algorithm, the sales prediction initial model, and the sales prediction initial value, so as to perform sales prediction. The homotopy algorithm is one of numerical solution methods, is a search algorithm with large-range convergence, and can ensure iterative convergence to obtain a final numerical solution for any initial value. After the first training module 301 and the second training module 302 determine the initial sales prediction model and the initial sales prediction value, a deformation equation may be constructed according to homotopic ideas, taylor expansion and derivation are performed on the deformation equation, then iterative computation is performed, the iteration is terminated until the error of two adjacent iterations is smaller than a preset threshold value, and a corresponding solution is the sales prediction model when the iteration is terminated. And then, the historical sales data can be used as the input of a sales prediction model to obtain a sales prediction result.
It can be seen from the above description that, firstly, a sales prediction initial model and a sales prediction initial value are determined, and the sales prediction model is solved based on the determined sales prediction initial model and the determined sales prediction initial value and the homotopic algorithm, and then the sales prediction can be performed by inputting historical sales data into the sales prediction model, so that the method can reasonably predict sales and is convenient for sellers to make purchasing plans; determining a sales volume prediction initial model based on the multiple linear regression model, wherein historical sales data in the same period or season can be reflected, and the obtained sales volume prediction initial model is relatively reasonable; determining a sales forecast initial value based on a moving weighted average model, and reflecting a recent data characteristic value into the model to further obtain an accurate sales forecast initial value; the sales forecasting model is solved based on the homotopy algorithm, the correlation of each item of data is fully considered, and a forecasting result close to the actual sales can be obtained.
Fig. 4 illustrates an exemplary system architecture 400 to which the sales prediction method or apparatus of an embodiment of the present invention may be applied.
As shown in fig. 4, the system architecture 400 may include terminal devices 401, 402, 403, a network 404, and a server 405. The network 404 serves as a medium for providing communication links between the terminal devices 401, 402, 403 and the server 405. Network 404 may include various types of connections, such as wire, wireless communication links, or fiber optic cables, to name a few.
A user may use terminal devices 401, 402, 403 to interact with a server 405 over a network 404 to receive or send messages or the like. The terminal devices 401, 402, 403 may have various communication client applications installed thereon, such as shopping applications, web browser applications, search applications, instant messaging tools, mailbox clients, social platform software, and the like.
The terminal devices 401, 402, 403 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like.
The server 405 may be a server that provides various services, such as a background management server that supports historical sales data transmitted by users using the terminal devices 401, 402, and 403. The background management server may perform processing such as training on the received historical sales data input model, and feed back a processing result (e.g., sales prediction result) to the terminal device.
It should be noted that the sales prediction method provided in the embodiment of the present application is generally executed by the server 405, and accordingly, the sales prediction apparatus is generally disposed in the server 405.
It should be understood that the number of terminal devices, networks, and servers in fig. 4 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
The invention also provides an electronic device and a computer readable medium according to the embodiment of the invention.
The electronic device of the present invention includes: one or more processors; a storage device for storing one or more programs that, when executed by the one or more processors, cause the one or more processors to implement a sales prediction method of an embodiment of the present invention.
The computer-readable medium of the present invention has stored thereon a computer program which, when executed by a processor, implements a sales prediction method of an embodiment of the present invention.
Referring now to FIG. 5, shown is a block diagram of a computer system 500 suitable for use in implementing an electronic device of an embodiment of the present invention. The electronic device shown in fig. 5 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present invention.
As shown in fig. 5, the computer system 500 includes a Central Processing Unit (CPU)501 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM)502 or a program loaded from a storage section 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data necessary for the operation of the computer system 500 are also stored. The CPU 501, ROM 502, and RAM 503 are connected to each other via a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
The following components are connected to the I/O interface 505: an input portion 506 including a keyboard, a mouse, and the like; an output portion 507 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker; a storage portion 508 including a hard disk and the like; and a communication section 509 including a network interface card such as a LAN card, a modem, or the like. The communication section 509 performs communication processing via a network such as the internet. The driver 510 is also connected to the I/O interface 505 as necessary. A removable medium 511 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 510 as necessary, so that a computer program read out therefrom is mounted into the storage section 508 as necessary.
In particular, the processes described above with respect to the main step diagrams may be implemented as computer software programs, according to embodiments of the present disclosure. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program containing program code for performing the method illustrated in the main step diagram. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 509, and/or installed from the removable medium 511. The computer program performs the above-described functions defined in the system of the present invention when executed by the Central Processing Unit (CPU) 501.
It should be noted that the computer readable medium shown in the present invention can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having 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. In the present invention, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present invention, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present invention may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: a processor includes a first training module, a second training module, and a sales prediction module. Where the names of these modules do not in some cases constitute a limitation on the modules themselves, for example, the first training module may also be described as a "module that inputs historical sales data into a regression model for training, resulting in an initial model of sales prediction".
As another aspect, the present invention also provides a computer-readable medium that may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise: inputting historical sales data into a regression model for training to obtain an initial sales prediction model; inputting historical sales data into an average model for training to obtain an initial sales prediction value; and determining a sales prediction model by utilizing a homotopy algorithm, the sales prediction initial model and the sales prediction initial value so as to predict sales.
It can be seen from the above description that, firstly, a sales prediction initial model and a sales prediction initial value are determined, and the sales prediction model is solved based on the determined sales prediction initial model and the determined sales prediction initial value and the homotopic algorithm, and then the sales prediction can be performed by inputting historical sales data into the sales prediction model, so that the method can reasonably predict sales and is convenient for sellers to make purchasing plans; determining a sales volume prediction initial model based on the multiple linear regression model, wherein historical sales data in the same period or season can be reflected, and the obtained sales volume prediction initial model is relatively reasonable; determining a sales forecast initial value based on a moving weighted average model, and reflecting a recent data characteristic value into the model to further obtain an accurate sales forecast initial value; the sales forecasting model is solved based on the homotopy algorithm, the correlation of each item of data is fully considered, and a forecasting result close to the actual sales can be obtained.
The product can execute the method provided by the embodiment of the invention, and has corresponding functional modules and beneficial effects of the execution method. For technical details that are not described in detail in this embodiment, reference may be made to the method provided by the embodiment of the present invention.
The above-described embodiments should not be construed as limiting the scope of the invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions can occur, depending on design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A sales prediction method, comprising:
inputting historical sales data into a regression model for training to obtain an initial sales prediction model;
inputting historical sales data into an average model for training to obtain an initial sales prediction value;
and determining a sales prediction model by utilizing a homotopy algorithm, the sales prediction initial model and the sales prediction initial value so as to predict sales.
2. The method of claim 1, wherein the regression model is a multiple linear regression model;
the method for inputting historical sales data into a regression model for training to obtain an initial sales prediction model comprises the following steps:
determining first training set data from historical sales data;
inputting the first training set data into the multiple linear regression model for training so as to fit model parameters of the multiple linear regression model;
and taking the multiple linear regression model with the model parameters as a sales forecasting initial model.
3. The method of claim 1, wherein the average model is a moving weighted average model;
inputting historical sales data into an average model for training to obtain an initial sales prediction value, wherein the method comprises the following steps:
determining second training set data from the historical sales data;
inputting the second training set data into the moving weighted average model for training so as to fit a weight parameter of the moving weighted average model;
and calculating a sales value of the forecast date according to the weight parameter, and taking the sales value as an initial sales forecast value.
4. The method according to any one of claims 1 to 3, wherein determining a pin prediction model using a homotopy algorithm, the initial pin prediction model and the initial pin prediction value comprises:
constructing a main function which meets the initial prediction model and the initial sales prediction value;
discretizing the main function, and introducing an embedded variable, an auxiliary adjusting parameter and an auxiliary control function;
constructing a deformation equation according to the discretized main function, the embedded variable, the auxiliary adjusting parameter and the auxiliary control function;
and carrying out Taylor expansion and derivation on the deformation equation, then carrying out iterative calculation, and ending the iteration when the error of two adjacent iterations is smaller than a preset threshold value, wherein the corresponding solution is the sales prediction model when the iteration is ended.
5. A sales prediction apparatus, comprising:
the first training module is used for inputting historical sales data into the regression model for training to obtain an initial sales prediction model;
the second training module is used for inputting the historical sales data into the average model for training to obtain an initial sales prediction value;
and the sales prediction module is used for determining a sales prediction model by utilizing a homotopy algorithm, the sales prediction initial model and the sales prediction initial value so as to predict sales.
6. The apparatus of claim 5, wherein the regression model is a multiple linear regression model; the first training module is further configured to:
determining first training set data from historical sales data;
inputting the first training set data into the multiple linear regression model for training so as to fit model parameters of the multiple linear regression model; and
and taking the multiple linear regression model with the model parameters as a sales forecasting initial model.
7. The apparatus of claim 5, wherein the average model is a moving weighted average model; the second training module is further configured to:
determining second training set data from the historical sales data;
inputting the second training set data into the moving weighted average model for training so as to fit a weight parameter of the moving weighted average model; and
and calculating a sales value of the forecast date according to the weight parameter, and taking the sales value as an initial sales forecast value.
8. The apparatus of any of claims 5 to 7, wherein the sales prediction module is further configured to:
constructing a main function which meets the initial prediction model and the initial sales prediction value;
discretizing the main function, and introducing an embedded variable, an auxiliary adjusting parameter and an auxiliary control function;
constructing a deformation equation according to the discretized main function, the embedded variable, the auxiliary adjusting parameter and the auxiliary control function; and
and carrying out Taylor expansion and derivation on the deformation equation, then carrying out iterative calculation, and ending the iteration when the error of two adjacent iterations is smaller than a preset threshold value, wherein the corresponding solution is the sales prediction model when the iteration is ended.
9. An electronic device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-4.
10. A computer-readable medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-4.
CN201810825637.2A 2018-07-25 2018-07-25 Sales prediction method and device Pending CN110766425A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810825637.2A CN110766425A (en) 2018-07-25 2018-07-25 Sales prediction method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810825637.2A CN110766425A (en) 2018-07-25 2018-07-25 Sales prediction method and device

Publications (1)

Publication Number Publication Date
CN110766425A true CN110766425A (en) 2020-02-07

Family

ID=69327198

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810825637.2A Pending CN110766425A (en) 2018-07-25 2018-07-25 Sales prediction method and device

Country Status (1)

Country Link
CN (1) CN110766425A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113743969A (en) * 2020-05-29 2021-12-03 北京京东智能城市大数据研究院 Method, device, equipment and storage medium for sales data prediction

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113743969A (en) * 2020-05-29 2021-12-03 北京京东智能城市大数据研究院 Method, device, equipment and storage medium for sales data prediction

Similar Documents

Publication Publication Date Title
CN110751497A (en) Commodity replenishment method and device
CN110880084A (en) Warehouse replenishment method and device
CN109961198B (en) Associated information generation method and device
EP4242955A1 (en) User profile-based object recommendation method and device
US20190197178A1 (en) Container structure
CN110135878B (en) Method and device for determining sales price
KR102379322B1 (en) Method, device and system for providing auction service for building material based on online
CN110866625A (en) Promotion index information generation method and device
CN110309142B (en) Method and device for rule management
US20230186331A1 (en) Generalized demand estimation for automated forecasting systems
CN113743971A (en) Data processing method and device
CN110555713A (en) method and device for determining sales prediction model
CN114663015A (en) Replenishment method and device
CN112418258A (en) Feature discretization method and device
CN109978306B (en) Data processing method and device
CN108985805B (en) Method and device for selectively executing push task
CN109255563B (en) Method and device for determining storage area of article
CN110766425A (en) Sales prediction method and device
CN112950321A (en) Article recommendation method and device
CN112288484A (en) Commodity automatic pricing method and device, electronic equipment and storage medium
CN112102043A (en) Item recommendation page generation method and device, electronic equipment and readable medium
CN111222663B (en) Data processing method and system, computer system and computer readable medium
CN110490682B (en) Method and device for analyzing commodity attributes
CN110826949A (en) Capacity control implementation method and device
CN115544152A (en) Data processing method and device

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