CN113743985A - Sales prediction method, sales prediction device, storage medium, and electronic apparatus - Google Patents
Sales prediction method, sales prediction device, storage medium, and electronic apparatus Download PDFInfo
- Publication number
- CN113743985A CN113743985A CN202110949686.9A CN202110949686A CN113743985A CN 113743985 A CN113743985 A CN 113743985A CN 202110949686 A CN202110949686 A CN 202110949686A CN 113743985 A CN113743985 A CN 113743985A
- Authority
- CN
- China
- Prior art keywords
- window
- predicted
- day
- commodity
- date
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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/00—Commerce
- G06Q30/02—Marketing; Price estimation or determination; Fundraising
- G06Q30/0201—Market modelling; Market analysis; Collecting market data
- G06Q30/0202—Market predictions or forecasting for commercial activities
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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
- G06Q10/00—Administration; Management
- G06Q10/04—Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION 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/00—Commerce
- G06Q30/02—Marketing; Price estimation or determination; Fundraising
- G06Q30/0201—Market modelling; Market analysis; Collecting market data
Landscapes
- Business, Economics & Management (AREA)
- Engineering & Computer Science (AREA)
- Strategic Management (AREA)
- Development Economics (AREA)
- Finance (AREA)
- Accounting & Taxation (AREA)
- Entrepreneurship & Innovation (AREA)
- Economics (AREA)
- Game Theory and Decision Science (AREA)
- Marketing (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Business, Economics & Management (AREA)
- Human Resources & Organizations (AREA)
- Data Mining & Analysis (AREA)
- Tourism & Hospitality (AREA)
- Quality & Reliability (AREA)
- Operations Research (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The present disclosure relates to a sales prediction method, apparatus, storage medium, and electronic device, including: acquiring a prediction request; if the fact that the commodity to be predicted belongs to the long-tail commodity is determined, obtaining historical daily sales volume of the commodity to be predicted in a first window and historical daily sales volume of the commodity to be predicted in a second window; determining the first proportion as first weights respectively corresponding to the historical daily sales volume corresponding to each day in the second window according to the first proportion of the historical daily sales volume corresponding to each day in the second window in the historical daily sales volume corresponding to each day in the first window; and determining the predicted sales volume of the commodity to be predicted in the prediction date according to the historical daily sales volume corresponding to each day in the second window and the first weight. Therefore, the corresponding weight of the local data can be dynamically adjusted according to the historical data, the local principle of prediction is considered, and meanwhile, the global information and the prior knowledge of the historical sequence are integrated, so that the prediction is more robust, and the prediction performance of the long-tail commodity with weak regularity is improved.
Description
Technical Field
The present disclosure relates to the field of time series prediction technologies, and in particular, to a sales prediction method, an apparatus, a storage medium, and an electronic device.
Background
Time series prediction is an important area of machine learning to predict future sequences from historically occurring sequences or features. When the method is applied to prediction of future sales of commodities, methods generally adopted in the prior art include a regression model, a time sequence prediction algorithm, a statistical method and the like, and a good prediction effect is obtained by constructing and mining prediction regularity in a sequence. However, a large number of long-tailed commodity parts (accounting for about 70%) exist in sales volume prediction, and the data of the parts are weak in regularity and predictability, so that the prediction performance of the existing method is poor.
Disclosure of Invention
An object of the present disclosure is to provide a sales predicting method, apparatus, storage medium, and electronic device to partially solve the above-mentioned problems in the related art
In order to achieve the above object, the present disclosure provides a sales predicting method, the method including:
acquiring a prediction request, wherein the prediction request comprises attribute information of a commodity to be predicted;
if the fact that the commodity to be predicted belongs to the long-tail commodity is determined, acquiring historical daily sales volume of the commodity to be predicted in a first window and historical daily sales volume of the commodity to be predicted in a second window, wherein the number of days corresponding to the first window is larger than the number of days corresponding to the second window, and the starting day in the second window is closer to the predicted date than the starting day in the first window;
determining the first proportion as first weights respectively corresponding to the historical daily sales in the second window according to the first proportion of the historical daily sales in the second window respectively corresponding to the historical daily sales in the first window;
and determining the predicted sales volume of the commodity to be predicted in the prediction date according to the historical daily sales volume corresponding to each day in the second window and the first weight.
Optionally, the method further comprises:
judging whether the predicted date is a weekday or a weekend;
when the predicted date is judged to be the working day, the first window is a first preset number of days which is closest to the predicted date and is the working day, the second window is a second preset number of days which is closest to the predicted date and is the working day, and the first preset number of days is larger than the second preset number of days;
the determining the predicted sales amount of the to-be-predicted commodity in the prediction date according to the historical daily sales amount corresponding to each day in the second window and the first weight comprises:
and taking the weighted sum of the historical daily sales amount corresponding to each day in the second window and the first weight as the predicted sales amount of the to-be-predicted commodity in the prediction date.
Optionally, in a case where the predicted date is determined to be the weekend, the first window is a first preset number of days closest to the predicted date, and the second window is a second preset number of days closest to the predicted date.
Optionally, in a case where it is determined that the predicted date is the weekend, the method further includes:
acquiring historical daily sales volume of the commodity to be predicted in a third window and historical daily sales volume of the commodity to be predicted in a fourth window, wherein the number of days corresponding to the third window is larger than the number of days corresponding to the fourth window, a starting day in the fourth window is closer to the predicted date than a starting day in the third window, the starting day in the fourth window and the starting day in the second window are not the same day, and the starting day in the third window and the starting day in the first window are not the same day;
determining a second proportion of the historical daily sales volume corresponding to each day in the fourth window to a second weight corresponding to the historical daily sales volume corresponding to each day in the fourth window;
and determining the predicted sales amount of the commodity to be predicted in the prediction date according to the historical daily sales amount and the first weight corresponding to each day in the second window and the historical daily sales amount and the second weight corresponding to each day in the fourth window.
Optionally, the third window is a first preset number of days on a weekend closest to the predicted date, and the fourth window is a second preset number of days on a weekend closest to the predicted date.
Optionally, the determining the predicted sales amount of the to-be-predicted commodity in the prediction date according to the historical daily sales amount and the first weight corresponding to each day in the second window, and the historical daily sales amount and the second weight corresponding to each day in the fourth window comprises:
taking the weighted sum of the historical daily sales amount corresponding to each day in the second window and the first weight as a first predicted sales amount, and taking the weighted sum of the historical daily sales amount corresponding to each day in the fourth window and the second weight as a second predicted sales amount;
acquiring a third weight corresponding to the first predicted sales and a fourth weight corresponding to the second predicted sales, wherein the sum of the third weight and the fourth weight is 1;
and calculating the weighted sum of the first predicted sales amount and the second predicted sales amount according to the third weight and the fourth weight to serve as the predicted sales amount of the commodity to be predicted in the prediction date.
Optionally, the third weight is greater than the fourth weight.
The present disclosure also provides a sales prediction apparatus, the apparatus comprising:
the system comprises a first acquisition module, a second acquisition module and a prediction module, wherein the first acquisition module is used for acquiring a prediction request which comprises attribute information of a commodity to be predicted;
the second obtaining module is used for obtaining the historical daily sales volume of the commodity to be predicted in a first window and the historical daily sales volume of the commodity to be predicted in a second window if the commodity to be predicted belongs to the long-tail commodity, wherein the number of days corresponding to the first window is larger than the number of days corresponding to the second window, and the starting day in the second window is closer to the predicted date than the starting day in the first window;
the first processing module is used for determining a first proportion of the historical daily sales amount corresponding to each day in the second window to a first weight corresponding to the historical daily sales amount corresponding to each day in the second window according to the first proportion of the historical daily sales amount corresponding to each day in the first window;
and the second processing module is used for determining the predicted sales volume of the commodity to be predicted in the prediction date according to the historical daily sales volume corresponding to each day in the second window and the first weight.
The present disclosure also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the method described above.
The present disclosure also provides an electronic device, comprising:
a memory having a computer program stored thereon;
a processor for executing the computer program in the memory to implement the steps of the method described above.
Through the technical scheme, when the sales volume is predicted according to the historical data in a weighted mode, the weight corresponding to the local data can be dynamically adjusted according to the historical data, namely the weight corresponding to the historical data of the second window is determined in real time according to the proportion of the historical data of the second window in the historical data of the first window. Therefore, the local principle of prediction is considered, the global information and the prior knowledge of the historical sequence are simultaneously integrated, the abnormal value can be effectively inhibited, the prediction is more robust, and the prediction performance of the long-tail commodity is improved.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows.
Drawings
The accompanying drawings, which are included to provide a further understanding of the disclosure and are incorporated in and constitute a part of this specification, illustrate embodiments of the disclosure and together with the description serve to explain the disclosure without limiting the disclosure. In the drawings:
FIG. 1 is a flow chart illustrating a method of sales forecasting according to an exemplary embodiment of the present disclosure.
Fig. 2 is a flow chart illustrating a method of sales forecasting according to yet another exemplary embodiment of the present disclosure.
Fig. 3 is a flow chart illustrating a method of sales forecasting according to yet another exemplary embodiment of the present disclosure.
Fig. 4 is a flow chart illustrating a method of sales forecasting according to yet another exemplary embodiment of the present disclosure.
Fig. 5 is a block diagram illustrating a configuration of a sales predicting apparatus according to an exemplary embodiment of the present disclosure.
Fig. 6 is a block diagram illustrating a configuration of a sales predicting apparatus according to still another exemplary embodiment of the present disclosure.
Fig. 7 is a block diagram illustrating a configuration of a sales predicting apparatus according to still another exemplary embodiment of the present disclosure.
FIG. 8 is a block diagram illustrating an electronic device in accordance with an example embodiment.
FIG. 9 is a block diagram illustrating an electronic device in accordance with an example embodiment.
Detailed Description
The following detailed description of specific embodiments of the present disclosure is provided in connection with the accompanying drawings. It should be understood that the detailed description and specific examples, while indicating the present disclosure, are given by way of illustration and explanation only, not limitation.
FIG. 1 is a flow chart illustrating a method of sales forecasting according to an exemplary embodiment of the present disclosure. As shown in fig. 1, the method includes steps 101 to 104.
In step 101, a prediction request is obtained, wherein the prediction request comprises attribute information of a commodity to be predicted. The attribute information may be, for example, ID information of the product or ID information of a merchant to which the product belongs, and is used to characterize the identity of the product to be predicted.
In step 102, if it is determined that the commodity to be predicted belongs to a long-tail commodity, acquiring historical daily sales volume of the commodity to be predicted in a first window and historical daily sales volume of the commodity to be predicted in a second window, wherein the number of days corresponding to the first window is greater than the number of days corresponding to the second window, and a start day in the second window is closer to a prediction date than the start day in the first window.
The method for judging whether the commodity to be predicted belongs to the long-tail commodity can be that according to the attribute information of the commodity to be predicted, searching is carried out in a preset long-tail commodity set, and if the attribute information of the commodity to be predicted does not exist in the long-tail commodity set, the commodity to be predicted is judged to be a non-long-tail commodity. The method for determining the long-tailed commodity set is not limited in the present disclosure.
The first window may be, for example, a historical date one month from the predicted date and the second window may be a historical date one week from the predicted date. Alternatively, the first window may also be, for example, a historical date between one month and one week from the predicted date, the second window may also be, for example, a historical date between two weeks and three days from the predicted date, and so forth.
In the case that the first window is larger than the second window, and the starting date of the second window is closer to the forecast date than the starting date of the first window, the historical dates included in the first window are farther from the forecast date and more than the historical dates included in the second window, so that the historical sales data corresponding to the historical dates in the first window are more global and regular than the historical sales data corresponding to the historical dates in the second window, and the historical sales data corresponding to the historical dates in the second window are closer to the forecast date and are more local in forecast.
The historical daily sales data is also the daily sales corresponding to each date in the historical dates included in the first window and the second window.
In step 103, according to a first ratio of the historical daily sales corresponding to each day in the second window to the historical daily sales corresponding to each day in the first window, the first ratio is determined as a first weight corresponding to each historical daily sales corresponding to each day in the second window.
For example, if the first window is a history date one month away from the predicted date and the second window is a history date one week away from the predicted date, the history sales data corresponding to the history date in the first window and the history sales data corresponding to the history date in the second window may be as shown in table 1 and table 2, respectively.
TABLE 1
TABLE 2
Day 1 | 0 | Day 4 | 3 | Day 7 | 36 |
Day 2 | 1 | Day 5 | 3 | ||
Day 3 | 5 | Day 6 | 23 |
The historical daily sales corresponding to the historical dates in the second window are respectively 0,1,5,3,3,23 and 36, wherein in the historical daily sales corresponding to the historical dates in the first window, the daily sales 0 appears 5 times, so that the historical daily sales of 0 accounts for the first proportion of the historical daily sales corresponding to each day in the first windowBy analogy, the first proportions of the historical daily sales volume corresponding to each day in the second window in the historical daily sales volume corresponding to each day in the first window are respectively:that is, the historical daily sales in the second window are weighted to
Wherein, in the historical daily sales corresponding to each day in the second window, when any historical daily sales is not outdated in the historical daily sales corresponding to each day in the first window, the corresponding first ratio may also be 0.
In step 104, the predicted sales amount of the to-be-predicted commodity in the prediction date is determined according to the historical daily sales amount corresponding to each day in the second window and the first weight.
And under the condition that the historical daily sales volume corresponding to each day in the second window is determined and the weights corresponding to the historical daily sales volume in the second window are determined, the predicted sales volume of the to-be-predicted commodity in the prediction date can be directly calculated. The specific calculation is not limiting in this disclosure.
Through the technical scheme, when the sales volume is predicted according to the historical data in a weighted mode, the weight corresponding to the local data can be dynamically adjusted according to the historical data, namely the weight corresponding to the historical data of the second window is determined in real time according to the proportion of the historical data of the second window in the historical data of the first window. Therefore, the local principle of prediction is considered, the global information and the prior knowledge of the historical sequence are simultaneously integrated, the abnormal value can be effectively inhibited, the prediction is more robust, and the prediction performance of the long-tail commodity is improved.
Fig. 2 is a flow chart illustrating a method of sales forecasting according to yet another exemplary embodiment of the present disclosure. As shown in fig. 2, the method further includes steps 201 to 203.
In step 201, it is determined whether the commodity to be predicted belongs to a long-tailed commodity, if so, the process goes to step 202, and if not, the process goes to step 101 to continue to judge the commodity to be predicted. Or, under the condition that the commodity to be predicted does not belong to the long tail commodity, the sales amount of the commodity to be predicted can be predicted by a preset prediction method corresponding to the non-long tail commodity.
In step 202, the forecast date is determined to be a weekday or a weekend.
In step 203, if it is determined that the predicted date is the working day, the first window is a first preset number of days closest to the predicted date and the working day, and the second window is a second preset number of days closest to the predicted date and the working day, wherein the first preset number of days is greater than the second preset number of days.
Weekdays are also five days on monday through friday, and weekends are two days on saturday and sunday.
When the predicted date falls on a weekday, such as monday, and the first predicted day is 30 days and the second predetermined day is 7 days, the first window may be 30 days of the weekday in 6 weeks before the predicted date, the second window may be 5 days of the weekday in one week before the predicted date, and 7 days of the thursday and 2 days of the friday in the next week before the predicted date.
In step 204, that is, in the case that the forecast date is the working day, the weighted sum of the historical daily sales volume corresponding to each day in the second window and the first weight is used as the forecast sales volume of the to-be-forecasted product in the forecast date.
In the example shown in fig. 1, the predicted sales amount of the product to be predicted in the prediction date may be calculated according to the calculation method shown in step 202 as follows:
through the technical scheme, under the condition that the prediction date is the working day, the sales volume in the prediction date can be predicted only according to the historical daily sales volume of the working day with the same data in the historical data, so that the sales law reflected by the historical daily sales volume is more consistent with the sales law of the working day, and the prediction structure can be more accurate.
Fig. 3 is a flow chart illustrating a method of sales forecasting according to yet another exemplary embodiment of the present disclosure. As shown in fig. 3, the method further includes steps 301 to 304.
In step 301, when it is determined that the predicted date is the weekend, the first window is a first preset number of days closest to the predicted date, and the second window is a second preset number of days closest to the predicted date.
That is, when the predicted date is a weekend, the sales of the predicted date will not be predicted directly from the historical daily sales belonging to the weekend in the historical data, but will be predicted from the historical daily sales in the first preset number of days closest to the predicted date and the second preset number of days closest to the predicted date.
In step 302, historical daily sales of the product to be predicted in a third window and historical daily sales of the product to be predicted in a fourth window are obtained, the number of days corresponding to the third window is greater than the number of days corresponding to the fourth window, a start day in the fourth window is closer to the predicted date than the start day in the third window, the start day in the fourth window and the start day in the second window are not the same day, and the start day in the third window and the start day in the first window are not the same day.
In step 303, according to a second proportion of the historical daily sales amount corresponding to each day in the fourth window to the historical daily sales amount corresponding to each day in the third window, determining the second proportion as a second weight corresponding to the historical daily sales amount corresponding to each day in the fourth window.
In step 304, the predicted sales amount of the product to be predicted in the prediction date is determined according to the historical daily sales amount and the first weight corresponding to each day in the second window, and the historical daily sales amount and the second weight corresponding to each day in the fourth window.
Since the start day in the fourth window is not the same day as the start day in the second window, and the start day in the third window is not the same day as the start day in the first window, it can be considered that the history dates included in the third window and the fourth window are not completely coincident with the history dates included in the first window and the second window. Through the arrangement of the third window and the fourth window, more historical data before the forecast date can be subjected to the extraction of the sales rule of the commodity to be forecasted, so that the sales volume of the commodity to be forecasted is forecasted according to more historical daily sales volumes of the commodity to be forecasted, and the forecasting robustness is guaranteed.
In a possible embodiment, the third window is the first preset number of days on a weekend closest to the predicted date and the fourth window is the second preset number of days on a weekend closest to the predicted date.
That is, when the historical daily sales volume before the predicted date is obtained through a plurality of sets of window pairs, the historical daily sales volume obtained in different sets of windows may also be the historical daily sales volume in different types of historical dates. For example, the predicted date is a weekend, the first window is a first preset number of days closest to the predicted date, the second window is a second preset number of days closest to the predicted date, the third window is a first preset number of days closest to the predicted date and on the weekend, and the fourth window is a second preset number of days closest to the predicted date and on the weekend. On the premise of avoiding the problem of weak regularity caused by sparse distribution of weekend dates, the method can be used for independently acquiring the sales rules in the weekend dates so as to comprehensively predict and more accurately predict the sales in the weekend dates.
Fig. 4 is a flow chart illustrating a method of sales forecasting according to yet another exemplary embodiment of the present disclosure. As shown in fig. 4, the method further includes steps 401 to 403.
In step 401, the weighted sum of the historical daily sales amount corresponding to each day in the second window and the first weight is used as a first predicted sales amount, and the weighted sum of the historical daily sales amount corresponding to each day in the fourth window and the second weight is used as a second predicted sales amount.
In step 402, a third weight corresponding to the first predicted sales amount and a fourth weight corresponding to the second predicted sales amount are obtained, and the sum of the third weight and the fourth weight is 1.
In step 403, a weighted sum of the first predicted sales amount and the second predicted sales amount is calculated according to the third weight and the fourth weight as the predicted sales amount of the to-be-predicted commodity in the prediction date.
The first predicted sales amount and the second predicted sales amount are sales amounts of the predicted date predicted from the historical daily sales amount corresponding to the historical date acquired through different window groups, respectively, and a third weight and a fourth weight of the first predicted sales amount and the second predicted sales amount in the final predicted sales amount can be determined according to the historical dates included in the different window groups. The third weight and the fourth weight may be preset according to settings of the first window, the second window, and the third window and the fourth window.
In a possible implementation, the third weight is greater than the fourth weight. Preferably, the third weight may be 0.9, and the fourth weight may be 0.1. The third weight is set to be larger than the fourth weight, namely the sales volume of the forecast date belonging to the weekend is forecasted more through the historical daily sales volume of the weekend and the weekday, so that the problem that the historical daily sales volume of the weekend is poor in rule and inaccurate in forecast due to sparse weekend distribution is further solved.
Fig. 5 is a block diagram illustrating a configuration of a sales predicting apparatus according to an exemplary embodiment of the present disclosure. As shown in fig. 5, the apparatus includes: a first obtaining module 10, configured to obtain a prediction request, where the prediction request includes attribute information of a commodity to be predicted; a second obtaining module 20, configured to, if it is determined that the to-be-predicted commodity belongs to a long-tailed commodity, obtain historical daily sales volume of the to-be-predicted commodity in a first window and historical daily sales volume of the to-be-predicted commodity in a second window, where a number of days corresponding to the first window is greater than a number of days corresponding to the second window, and a start day in the second window is closer to a predicted date than a start day in the first window; the first processing module 30 is configured to determine, according to a first ratio of the historical daily sales amount corresponding to each day in the second window to the historical daily sales amount corresponding to each day in the first window, the first ratio as a first weight corresponding to each historical daily sales amount corresponding to each day in the second window; and the second processing module 40 is configured to determine the predicted sales amount of the to-be-predicted commodity in the prediction date according to the historical daily sales amount corresponding to each day in the second window and the first weight.
Through the technical scheme, when the sales volume is predicted according to the historical data in a weighted mode, the weight corresponding to the local data can be dynamically adjusted according to the historical data, namely the weight corresponding to the historical data of the second window is determined in real time according to the proportion of the historical data of the second window in the historical data of the first window. Therefore, the local principle of prediction is considered, the global information and the prior knowledge of the historical sequence are simultaneously integrated, the abnormal value can be effectively inhibited, the prediction is more robust, and the prediction performance of the long-tail commodity is improved.
Fig. 6 is a block diagram illustrating a configuration of a sales predicting apparatus according to still another exemplary embodiment of the present disclosure. As shown in fig. 6, the apparatus further includes: the judging module 50 is used for judging that the predicted date is a weekday or a weekend; when the predicted date is judged to be the working day, the first window is a first preset number of days which is closest to the predicted date and is the working day, the second window is a second preset number of days which is closest to the predicted date and is the working day, and the first preset number of days is larger than the second preset number of days; the second processing module 40 is further configured to: and taking the weighted sum of the historical daily sales amount corresponding to each day in the second window and the first weight as the predicted sales amount of the to-be-predicted commodity in the prediction date.
In one possible embodiment, in a case where it is determined that the predicted date is the weekend, the first window is a first preset number of days closest to the predicted date, and the second window is a second preset number of days closest to the predicted date.
Fig. 7 is a block diagram illustrating a configuration of a sales predicting apparatus according to still another exemplary embodiment of the present disclosure. As shown in fig. 7, in a case where it is determined that the predicted date is the weekend, the apparatus further includes: a third obtaining module 60, configured to obtain historical daily sales volume of the product to be predicted in a third window and historical daily sales volume of the product to be predicted in a fourth window, where a number of days corresponding to the third window is greater than a number of days corresponding to the fourth window, a start day in the fourth window is closer to the predicted date than a start day in the third window, the start day in the fourth window and the start day in the second window are not the same day, and the start day in the third window and the start day in the first window are not the same day; a third processing module 70, configured to determine, according to a second proportion of the historical daily sales amount corresponding to each day in the fourth window to the historical daily sales amount corresponding to each day in the third window, the second proportion as a second weight corresponding to the historical daily sales amount corresponding to each day in the fourth window; and a fourth processing module 80, configured to determine the predicted sales amount of the to-be-predicted commodity in the prediction date according to the historical daily sales amount and the first weight corresponding to each day in the second window, and the historical daily sales amount and the second weight corresponding to each day in the fourth window.
In a possible embodiment, the third window is the first preset number of days on a weekend closest to the predicted date and the fourth window is the second preset number of days on a weekend closest to the predicted date.
In a possible implementation, the fourth processing module 80 is further configured to: taking the weighted sum of the historical daily sales amount corresponding to each day in the second window and the first weight as a first predicted sales amount, and taking the weighted sum of the historical daily sales amount corresponding to each day in the fourth window and the second weight as a second predicted sales amount; acquiring a third weight corresponding to the first predicted sales and a fourth weight corresponding to the second predicted sales, wherein the sum of the third weight and the fourth weight is 1; and calculating the weighted sum of the first predicted sales amount and the second predicted sales amount according to the third weight and the fourth weight to serve as the predicted sales amount of the commodity to be predicted in the prediction date.
In a possible implementation, the third weight is greater than the fourth weight.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Fig. 8 is a block diagram illustrating an electronic device 800 in accordance with an example embodiment. As shown in fig. 8, the electronic device 800 may include: a processor 801, a memory 802. The electronic device 800 may also include one or more of a multimedia component 803, an input/output (I/O) interface 804, and a communications component 805.
The processor 801 is configured to control the overall operation of the electronic device 800, so as to complete all or part of the steps of the sales prediction method. The memory 802 is used to store various types of data to support operation at the electronic device 800, such as instructions for any application or method operating on the electronic device 800 and application-related data, such as contact data, transmitted and received messages, pictures, audio, video, and so forth. The Memory 802 may be implemented by any type of volatile or non-volatile Memory device or combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read-Only Memory (EPROM), Programmable Read-Only Memory (PROM), Read-Only Memory (ROM), magnetic Memory, flash Memory, magnetic disk or optical disk. The multimedia components 803 may include screen and audio components. Wherein the screen may be, for example, a touch screen and the audio component is used for outputting and/or inputting audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signal may further be stored in the memory 802 or transmitted through the communication component 805. The audio assembly also includes at least one speaker for outputting audio signals. The I/O interface 804 provides an interface between the processor 801 and other interface modules, such as a keyboard, mouse, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 805 is used for wired or wireless communication between the electronic device 800 and other devices. Wireless Communication, such as Wi-Fi, bluetooth, Near Field Communication (NFC), 2G, 3G, 4G, NB-IOT, eMTC, or other 5G, etc., or a combination of one or more of them, which is not limited herein. The corresponding communication component 805 may therefore include: Wi-Fi module, Bluetooth module, NFC module, etc.
In an exemplary embodiment, the electronic Device 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components for performing the above-described sales prediction method.
In another exemplary embodiment, a computer readable storage medium comprising program instructions which, when executed by a processor, implement the steps of the sales prediction method described above is also provided. For example, the computer readable storage medium may be the memory 802 described above including program instructions executable by the processor 801 of the electronic device 800 to perform the sales prediction method described above.
Fig. 9 is a block diagram illustrating an electronic device 900 in accordance with an example embodiment. For example, the electronic device 900 may be provided as a server. Referring to fig. 9, the electronic device 900 includes a processor 922, which may be one or more in number, and a memory 932 for storing computer programs executable by the processor 922. The computer programs stored in memory 932 may include one or more modules that each correspond to a set of instructions. Further, the processor 922 may be configured to execute the computer program to perform the sales prediction method described above.
Additionally, the electronic device 900 may also include a power component 926 and a communication component 950, the power component 926 may be configured to perform power management of the electronic device 900, and the communication component 950 may be configured to enable communication, e.g., wired or wireless communication, of the electronic device 900. The electronic device 900 may also include input/output (I/O) interfaces 958. The electronic device 900 may operate based on an operating system stored in the memory 932, such as Windows ServerTM,Mac OS XTM,UnixTM,LinuxTMAnd so on.
In another exemplary embodiment, a computer readable storage medium comprising program instructions which, when executed by a processor, implement the steps of the sales prediction method described above is also provided. For example, the non-transitory computer readable storage medium may be the memory 932 described above including program instructions executable by the processor 922 of the electronic device 900 to perform the sales prediction method described above.
In another exemplary embodiment, a computer program product is also provided, which comprises a computer program executable by a programmable apparatus, the computer program having code portions for performing the above-mentioned sales prediction method when executed by the programmable apparatus.
The preferred embodiments of the present disclosure are described in detail with reference to the accompanying drawings, however, the present disclosure is not limited to the specific details of the above embodiments, and various simple modifications may be made to the technical solution of the present disclosure within the technical idea of the present disclosure, and these simple modifications all belong to the protection scope of the present disclosure.
It should be noted that the various features described in the above embodiments may be combined in any suitable manner without departing from the scope of the invention. In order to avoid unnecessary repetition, various possible combinations will not be separately described in this disclosure.
In addition, any combination of various embodiments of the present disclosure may be made, and the same should be considered as the disclosure of the present disclosure, as long as it does not depart from the spirit of the present disclosure.
Claims (10)
1. A sales prediction method, comprising:
acquiring a prediction request, wherein the prediction request comprises attribute information of a commodity to be predicted;
if the fact that the commodity to be predicted belongs to the long-tail commodity is determined, acquiring historical daily sales volume of the commodity to be predicted in a first window and historical daily sales volume of the commodity to be predicted in a second window, wherein the number of days corresponding to the first window is larger than the number of days corresponding to the second window, and the starting day in the second window is closer to the predicted date than the starting day in the first window;
determining the first proportion as first weights respectively corresponding to the historical daily sales in the second window according to the first proportion of the historical daily sales in the second window respectively corresponding to the historical daily sales in the first window;
and determining the predicted sales volume of the commodity to be predicted in the prediction date according to the historical daily sales volume corresponding to each day in the second window and the first weight.
2. The method of claim 1, further comprising:
judging whether the predicted date is a weekday or a weekend;
when the predicted date is judged to be the working day, the first window is a first preset number of days which is closest to the predicted date and is the working day, the second window is a second preset number of days which is closest to the predicted date and is the working day, and the first preset number of days is larger than the second preset number of days;
the determining the predicted sales amount of the to-be-predicted commodity in the prediction date according to the historical daily sales amount corresponding to each day in the second window and the first weight comprises:
and taking the weighted sum of the historical daily sales amount corresponding to each day in the second window and the first weight as the predicted sales amount of the to-be-predicted commodity in the prediction date.
3. The method of claim 2,
and when the predicted date is judged to be the weekend, the first window is a first preset number of days closest to the predicted date, and the second window is a second preset number of days closest to the predicted date.
4. The method of claim 3, wherein in the event that the predicted date is determined to be the weekend, the method further comprises:
acquiring historical daily sales volume of the commodity to be predicted in a third window and historical daily sales volume of the commodity to be predicted in a fourth window, wherein the number of days corresponding to the third window is larger than the number of days corresponding to the fourth window, a starting day in the fourth window is closer to the predicted date than a starting day in the third window, the starting day in the fourth window and the starting day in the second window are not the same day, and the starting day in the third window and the starting day in the first window are not the same day;
determining a second proportion of the historical daily sales volume corresponding to each day in the fourth window to a second weight corresponding to the historical daily sales volume corresponding to each day in the fourth window;
the determining the predicted sales amount of the to-be-predicted commodity in the prediction date according to the historical daily sales amount corresponding to each day in the second window and the first weight comprises:
and determining the predicted sales amount of the commodity to be predicted in the prediction date according to the historical daily sales amount and the first weight corresponding to each day in the second window and the historical daily sales amount and the second weight corresponding to each day in the fourth window.
5. The method of claim 4, wherein the third window is a first predetermined number of days on a weekend closest to the predicted date and the fourth window is a second predetermined number of days on a weekend closest to the predicted date.
6. The method of claim 5, wherein the determining the predicted sales amount of the product to be predicted in the prediction date according to the historical daily sales amount and the first weight corresponding to each day in the second window and the historical daily sales amount and the second weight corresponding to each day in the fourth window comprises:
taking the weighted sum of the historical daily sales amount corresponding to each day in the second window and the first weight as a first predicted sales amount, and taking the weighted sum of the historical daily sales amount corresponding to each day in the fourth window and the second weight as a second predicted sales amount;
acquiring a third weight corresponding to the first predicted sales and a fourth weight corresponding to the second predicted sales, wherein the sum of the third weight and the fourth weight is 1;
and calculating the weighted sum of the first predicted sales amount and the second predicted sales amount according to the third weight and the fourth weight to serve as the predicted sales amount of the commodity to be predicted in the prediction date.
7. The method of claim 6, wherein the third weight is greater than the fourth weight.
8. A sales prediction apparatus, comprising:
the system comprises a first acquisition module, a second acquisition module and a prediction module, wherein the first acquisition module is used for acquiring a prediction request which comprises attribute information of a commodity to be predicted;
the second obtaining module is used for obtaining the historical daily sales volume of the commodity to be predicted in a first window and the historical daily sales volume of the commodity to be predicted in a second window if the commodity to be predicted belongs to the long-tail commodity, wherein the number of days corresponding to the first window is larger than the number of days corresponding to the second window, and the starting day in the second window is closer to the predicted date than the starting day in the first window;
the first processing module is used for determining a first proportion of the historical daily sales amount corresponding to each day in the second window to a first weight corresponding to the historical daily sales amount corresponding to each day in the second window according to the first proportion of the historical daily sales amount corresponding to each day in the first window;
and the second processing module is used for determining the predicted sales volume of the commodity to be predicted in the prediction date according to the historical daily sales volume corresponding to each day in the second window and the first weight.
9. A non-transitory computer readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.
10. An electronic device, comprising:
a memory having a computer program stored thereon;
a processor for executing the computer program in the memory to carry out the steps of the method of any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110949686.9A CN113743985A (en) | 2021-08-18 | 2021-08-18 | Sales prediction method, sales prediction device, storage medium, and electronic apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110949686.9A CN113743985A (en) | 2021-08-18 | 2021-08-18 | Sales prediction method, sales prediction device, storage medium, and electronic apparatus |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113743985A true CN113743985A (en) | 2021-12-03 |
Family
ID=78731626
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110949686.9A Pending CN113743985A (en) | 2021-08-18 | 2021-08-18 | Sales prediction method, sales prediction device, storage medium, and electronic apparatus |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113743985A (en) |
-
2021
- 2021-08-18 CN CN202110949686.9A patent/CN113743985A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108090567B (en) | Fault diagnosis method and device for power communication system | |
EP3825861A2 (en) | Method and apparatus of user clustering, computer device | |
US11061994B2 (en) | Abnormal data detection | |
US11593817B2 (en) | Demand prediction method, demand prediction apparatus, and non-transitory computer-readable recording medium | |
CN111339436B (en) | Data identification method, device, equipment and readable storage medium | |
CN109992473B (en) | Application system monitoring method, device, equipment and storage medium | |
CN113011856B (en) | Online residence method and device for energy enterprise, electronic equipment and medium | |
CN111311014B (en) | Service data processing method, device, computer equipment and storage medium | |
CN113051183A (en) | Test data recommendation method and system, electronic device and storage medium | |
CN113849531A (en) | Query method and device | |
CN113159934A (en) | Method and system for predicting passenger flow of network, electronic equipment and storage medium | |
CN111835536B (en) | Flow prediction method and device | |
CN116756522B (en) | Probability forecasting method and device, storage medium and electronic equipment | |
AU2021290402A1 (en) | Method for identifying a device using attributes and location signatures from the device | |
CN113743985A (en) | Sales prediction method, sales prediction device, storage medium, and electronic apparatus | |
CN108961071B (en) | Method for automatically predicting combined service income and terminal equipment | |
CN108632054B (en) | Information transmission quantity prediction method and device | |
CN108874879A (en) | Feature Selection method, apparatus, computer equipment and storage medium | |
CN115408297A (en) | Test method, device, equipment and medium | |
CN113093702B (en) | Fault data prediction method and device, electronic equipment and storage medium | |
CN114925275A (en) | Product recommendation method and device, computer equipment and storage medium | |
CN113362097B (en) | User determination method and device | |
CN114509791A (en) | Satellite positioning error analysis method and device capable of reducing storage | |
CN110874612A (en) | Time interval prediction method and device, computer equipment and storage medium | |
CN112199371B (en) | Data migration method, device, computer equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication |