CN116051159A - Prediction method, prediction device and storage medium for accessory demand - Google Patents

Prediction method, prediction device and storage medium for accessory demand Download PDF

Info

Publication number
CN116051159A
CN116051159A CN202211598441.7A CN202211598441A CN116051159A CN 116051159 A CN116051159 A CN 116051159A CN 202211598441 A CN202211598441 A CN 202211598441A CN 116051159 A CN116051159 A CN 116051159A
Authority
CN
China
Prior art keywords
demand
sequence
interval
value
historical
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
CN202211598441.7A
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.)
Zoomlion Heavy Industry Science and Technology Co Ltd
Zhongke Yungu Technology Co Ltd
Original Assignee
Zoomlion Heavy Industry Science and Technology Co Ltd
Zhongke Yungu 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 Zoomlion Heavy Industry Science and Technology Co Ltd, Zhongke Yungu Technology Co Ltd filed Critical Zoomlion Heavy Industry Science and Technology Co Ltd
Priority to CN202211598441.7A priority Critical patent/CN116051159A/en
Publication of CN116051159A publication Critical patent/CN116051159A/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
    • 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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/30Computing systems specially adapted for manufacturing

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • Accounting & Taxation (AREA)
  • Development Economics (AREA)
  • Finance (AREA)
  • Strategic Management (AREA)
  • Data Mining & Analysis (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Entrepreneurship & Innovation (AREA)
  • Mathematical Analysis (AREA)
  • Economics (AREA)
  • General Business, Economics & Management (AREA)
  • Game Theory and Decision Science (AREA)
  • Marketing (AREA)
  • Mathematical Physics (AREA)
  • Pure & Applied Mathematics (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Optimization (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Evolutionary Biology (AREA)
  • Operations Research (AREA)
  • Probability & Statistics with Applications (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Algebra (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application discloses a prediction method, a prediction device and a storage medium for accessory demands. The prediction method comprises the following steps: acquiring a historical intermittent demand sequence of the accessory; extracting a historical effective demand sequence and a historical demand interval sequence from the historical intermittent demand sequence; predicting the historical effective demand sequence to obtain a next effective demand predicted value; predicting the historical demand interval sequence to obtain a next interval predicted value; and determining the demand predicted value of the accessory in the next period according to the next effective demand predicted value and the next interval predicted value. The method and the device have the advantages that the demand prediction of the intermittent fitting is simpler on the premise that the accuracy is guaranteed, so that the prediction efficiency of the demand of the intermittent fitting is improved.

Description

Prediction method, prediction device and storage medium for accessory demand
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method and apparatus for predicting accessory requirements, and a storage medium.
Background
The engineering machinery has complex structure and various machines of related accessories, and only one type of building hoisting machinery covers up to tens of thousands of types of accessories such as bearings, pedals, various brackets, structural members and the like. The market demands for various accessories are also greatly different due to different types of accessories. If the enterprise purchases excessively, warehouse backlog can be caused, so that not only is funds wasted, but also the site is occupied, and the replenishment of other accessories is affected; if the purchasing is insufficient, the order loss is caused, and meanwhile, the reputation of an enterprise is influenced, so that the demand condition of market accessories is necessary to be predicted in advance, and the purchasing of the accessories is guided. In the prior art, general methods for predicting the demand of accessories are as follows: 1) Direct prediction of artificial experience; 2) Converting into a general time series prediction problem, and predicting by using a moving average, an exponential smoothing, a supervised learning model and the like. The manual experience prediction relies on subjective feeling of people, accuracy is low, the types of accessories are huge, and the manual experience prediction is not practical. Because the fittings are various, the market demands are different, if the unified model is used for training and prediction, an invalid model is most likely to be obtained finally, and the prediction accuracy is low.
Disclosure of Invention
An objective of the embodiments of the present application is to provide a method, a device and a storage medium for predicting a demand for an accessory, which are used for solving the problem in the prior art that the accuracy of predicting the demand for the accessory is low.
To achieve the above object, a first aspect of the present application provides a prediction method for accessory demand, the prediction method including:
acquiring a historical intermittent demand sequence of the accessory;
extracting a historical effective demand sequence and a historical demand interval sequence from the historical intermittent demand sequence;
predicting the historical effective demand sequence to obtain a next effective demand predicted value;
predicting the historical demand interval sequence to obtain a next interval predicted value;
and determining the demand predicted value of the accessory in the next period according to the next effective demand predicted value and the next interval predicted value.
In the embodiment of the present application, extracting the historical effective demand sequence and the historical demand interval sequence from the historical intermittent demand sequence includes:
removing zero values in the historical intermittent demand sequence to obtain a historical effective demand sequence;
a historical demand interval sequence is determined from the intervals of each value in the valid demand sequence at the historical intermittent demand sequence.
In the embodiment of the present application, predicting the historical effective demand sequence to obtain the next effective demand predicted value includes:
amplifying the historical effective demand sequence by using a Lagrange interpolation method to obtain an amplified effective demand sequence;
determining a target prediction model according to the length of the augmented effective demand sequence;
and predicting the augmented effective demand sequence through a target prediction model to obtain a next effective demand predicted value.
In an embodiment of the present application, the step of augmenting the historical effective demand sequence by the lagrangian interpolation method to obtain the augmented effective demand sequence includes:
taking the history period as an abscissa and the demand quantity as an ordinate, and establishing a coordinate system of a history intermittent demand sequence;
acquiring an actual observation point of a historical intermittent demand sequence, wherein the ordinate of the actual observation point is not zero;
fitting the actual observation points to obtain a polynomial fitting function;
determining a numerical value corresponding to a polynomial fitting function of a period with zero ordinate in the history intermittent demand sequence;
and filling the historical intermittent demand sequence according to the numerical value to obtain an amplified effective demand sequence.
In an embodiment of the present application, determining the target prediction model according to the length of the augmented effective demand sequence includes:
Judging whether the length of the extended effective demand sequence is larger than a preset length;
under the condition that the length of the augmented effective demand sequence is larger than a preset length, determining an ARIMA model as a target prediction model;
and under the condition that the length of the augmented effective demand sequence is smaller than the preset length, determining the Holt model as a target prediction model.
In an embodiment of the present application, predicting the historical demand interval sequence to obtain the next interval prediction value includes:
acquiring the number of last zero demands of a history intermittent demand sequence;
determining the transition probability of the last interval value of the historical intermittent demand sequence;
determining an initial interval predicted value according to the transition probability of the end interval value;
determining a difference value of the initial interval predicted value minus the end zero demand quantity;
in the case that the difference is less than or equal to 1, determining the next interval prediction value as 1;
in the case where the difference is greater than 1, the difference is determined as the next interval prediction value.
In an embodiment of the present application, determining the transition probability of the last interval value of the historical intermittent demand sequence includes:
judging whether the last interval value of the historical demand interval sequence appears for the first time;
determining a transition combination of the end interval value in the history demand interval sequence under the condition that the end interval value is not the first occurrence;
Determining the number of times each transfer combination occurs;
determining the probability of each transition combination according to the occurrence times of each transition combination;
wherein the sum of probabilities of all transition combinations is 1.
In an embodiment of the present application, determining the transition probability of the last interval value of the historical intermittent demand sequence further includes:
resampling the historical demand interval sequence under the condition that the last interval value appears for the first time to obtain a resampled demand interval sequence;
and determining the transition probability of the end interval value according to the resampling requirement interval sequence.
In this embodiment of the present application, resampling the historical demand interval sequence to obtain the resampled demand interval sequence when the last interval value is the first occurrence includes:
repeatedly taking and putting back the interval values in the historical demand interval sequence under the condition that the last interval value appears for the first time, and recording resampling interval values taken each time;
and under the condition that the fetching and putting back operation reaches the preset times, combining the resampling interval values to obtain a resampling requirement interval sequence.
In an embodiment of the present application, determining the transition probability of the end interval value from the resampling demand interval sequence includes:
Determining a transfer combination of the last interval value in the resampling demand interval sequence;
determining the number of times each transfer combination occurs;
determining the probability of each transition combination according to the occurrence times of each transition combination;
wherein the sum of probabilities of all transition combinations is 1.
In an embodiment of the present application, determining the initial interval prediction value according to the transition probability of the end interval value includes:
acquiring all transition combinations of the end interval value and the occurrence probability of each transition combination;
dividing intervals of each transfer combination according to the occurrence probability of each transfer combination to obtain a plurality of intervals;
acquiring a generated random number;
determining an initial interval predicted value according to a target interval in which the random number falls;
wherein the transition combination comprises an end interval value and a transition value.
In the embodiment of the present application, determining the initial interval prediction value according to the interval in which the random number falls includes:
acquiring a target interval in which the random number falls;
determining a target transfer combination corresponding to the target interval;
the transition value of the target transition combination is determined as the initial interval prediction value.
In an embodiment of the present application, the prediction method further includes:
acquiring the number of last zero demands of a history intermittent demand sequence;
And adding 1 to the number of the last zero demands to obtain the reverse order position value of the historical effective demand sequence.
In an embodiment of the present application, determining the demand forecast value for the accessory in the next cycle based on the next effective demand forecast value and the next interval forecast value includes:
judging whether the next interval predicted value is smaller than or equal to the inverted sequence position value;
determining a next effective demand predictor as a demand predictor for a next cycle if the next interval predictor is less than or equal to the inverted position value;
in the case where the next interval predicted value is greater than the reverse order position value, the demand predicted value of the next cycle is determined to be zero.
In an embodiment of the present application, the prediction method further includes:
acquiring a historical continuity demand sequence of the accessory;
according to the historical continuous demand sequence, determining a first demand prediction interval of the next period through a random forest regression model;
determining a second demand prediction interval of the next period through a logistic regression multi-classification model according to the historical continuity demand sequence;
and carrying out weighted fusion on the first demand prediction interval and the second demand prediction interval to obtain a target demand prediction interval of the next period.
In this embodiment of the present application, the random forest regression model includes a preset number of random forest regression sub-models, and determining, according to the historical continuity demand sequence, the first demand prediction interval of the next cycle through the random forest regression model includes:
Extracting an input sequence of a historical continuity demand sequence;
extracting a characteristic value of an input sequence;
inputting the characteristic values of the input sequences into a random forest regression submodel with a preset number to obtain a demand predicted value with the preset number;
sequencing the preset number of demand predicted values according to the sequence from large to small to obtain a demand predicted value sequence;
and respectively determining the demand predicted values corresponding to the first preset position and the second preset position in the demand predicted value sequence as the maximum value and the minimum value of the first demand predicted interval.
In this embodiment of the present application, determining, according to the historical continuity demand sequence, the first demand prediction interval of the next cycle through the random forest regression model further includes:
extracting a sample sequence of a historical continuity demand sequence;
extracting the characteristic value and the corresponding label of the sample sequence;
training a random forest regression model according to the characteristic values and the labels of the sample sequences.
In an embodiment of the present application, determining, according to the historical continuity demand sequence, the second demand prediction interval of the next cycle through the logistic regression multiple classification model includes:
dividing the historical continuity demand sequence into a plurality of intervals, and coding each interval to obtain a plurality of coding values;
Converting the historical continuous demand sequence into a historical continuous demand coding sequence;
extracting an input code value sequence of a historical continuity requirement code sequence;
inputting the input code value sequence into a logistic regression multi-classification model to obtain a predictive code value;
and determining the section corresponding to the predictive coding value as a second demand prediction section.
In an embodiment of the present application, determining, according to the historical continuity demand sequence, the second demand prediction interval of the next cycle through the logistic regression multiple classification model further includes:
extracting a sample input code value sequence of a historical continuity demand code sequence and a corresponding sample prediction code value;
and training a logistic regression multi-classification model according to the sample input code value sequence and the sample prediction code value.
In an embodiment of the present application, dividing the historical continuity requirement sequence into a plurality of intervals includes:
determining the maximum value and the minimum value of the historical continuity demand sequence and the number of preset intervals;
the maximum value and the minimum value of the historical continuity demand sequence are subjected to difference to obtain the total interval length;
dividing the total interval length according to the number of preset intervals to obtain a plurality of intervals.
In this embodiment of the present application, weighting and fusing the first demand prediction interval and the second demand prediction interval to obtain the target demand prediction interval of the next cycle includes:
Determining a first maximum value and a first minimum value of a first demand prediction interval and a second maximum value and a second minimum value of a second demand prediction interval;
acquiring a first weight of a first demand prediction interval and a second weight of a second demand prediction interval;
determining a target maximum value of the target demand prediction interval according to the first weight, the second weight, the first maximum value and the second maximum value;
determining a target minimum value of the target demand prediction interval according to the first weight, the second weight, the first minimum value and the second minimum value;
and determining a target demand prediction interval according to the target maximum value and the target minimum value.
A second aspect of the present application provides a predictive device for accessory demand, comprising:
a memory configured to store instructions; and
a processor configured to call instructions from the memory and when executing the instructions, to implement the above-described predictive method for accessory requirements.
A third aspect of the present application provides a machine-readable storage medium having stored thereon instructions for causing a machine to perform the above-described predictive method for accessory demand.
Through the technical scheme, the historical effective demand sequence and the historical demand interval sequence are extracted from the historical intermittent demand sequence; predicting the historical effective demand sequence to obtain a next effective demand predicted value, and predicting the historical demand interval sequence to obtain a next interval predicted value; and finally, determining the predicted demand value of the accessory in the next period according to the predicted effective demand value and the predicted interval value. Compared with the traditional mode of predicting the demand of the accessory, which needs to build a complex model, the method has the advantages that the predicting mode is simpler on the premise of ensuring the precision of the demand prediction of the intermittent accessory, so that the predicting efficiency of the demand of the intermittent accessory is improved.
Additional features and advantages of embodiments of the present application will be set forth in the detailed description that follows.
Drawings
The accompanying drawings are included to provide a further understanding of embodiments of the present application and are incorporated in and constitute a part of this specification, illustrate embodiments of the present application and together with the description serve to explain, without limitation, the embodiments of the present application. In the drawings:
FIG. 1 schematically illustrates a flow chart of a method for predicting accessory demand according to an embodiment of the present application;
FIG. 2 schematically illustrates a flow chart of a method for predicting accessory demand according to another embodiment of the present application;
FIG. 3 schematically illustrates a flow chart of a method for predicting accessory demand in accordance with a specific embodiment of the present application;
fig. 4 schematically shows a block diagram of a prediction apparatus for fitting demand according to an embodiment of the present application.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it should be understood that the specific implementations described herein are only for illustrating and explaining the embodiments of the present application, and are not intended to limit the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present application based on the embodiments herein.
It should be noted that, in the embodiment of the present application, directional indications (such as up, down, left, right, front, and rear … …) are referred to, and the directional indications are merely used to explain the relative positional relationship, movement conditions, and the like between the components in a specific posture (as shown in the drawings), and if the specific posture is changed, the directional indications are correspondingly changed.
In addition, if there is a description of "first", "second", etc. in the embodiments of the present application, the description of "first", "second", etc. is for descriptive purposes only and is not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In addition, the technical solutions of the embodiments may be combined with each other, but it is necessary to base that the technical solutions can be realized by those skilled in the art, and when the technical solutions are contradictory or cannot be realized, the combination of the technical solutions should be regarded as not exist and not within the protection scope of the present application.
Fig. 1 schematically shows a flow chart of a method for predicting accessory demand according to an embodiment of the present application. As shown in fig. 1, in an embodiment of the present application, a prediction method for accessory demand is provided, and the prediction method may include the following steps.
Step 101, acquiring a historical intermittent demand sequence of the accessory.
In this embodiment of the present application, the historical intermittent demand sequence refers to an intermittent demand sequence within a preset period. For example, the intermittent demand sequence of 12 months may be taken with one month as a period, or the intermittent demand sequence of 24 months may be taken. Intermittent demand refers to discontinuous demand, for example, if there are more parts of a certain type that need to be maintained for a certain period of time, there is a demand for parts of that type, and if there is no failure for another certain period of time, there is no need to maintain parts of that type, and the demand for parts of that type is zero. In one example, the fittings may be divided into intermittent demand fittings and continuous demand fittings by comparing the average demand interval over the inspection period to a preset interval value. The average demand interval can be obtained by counting the historical demand sequence, and the preset interval value can be set according to the demand of the user. For example, the preset interval value is set to 1.3, and the processor may determine that the average demand interval is greater than 1.3 in the historical demand sequence as the intermittent demand sequence, and determine that the average demand interval is less than or equal to 1.3 as the continuous demand sequence.
Step 102, extracting a historical effective demand sequence and a historical demand interval sequence from the historical intermittent demand sequence.
In this embodiment, the historical demand interval sequence is a demand interval sequence within a preset period. The historical effective demand sequence is a non-zero demand sequence, and is the sequence which is left after zero values in the historical intermittent demand sequence are removed. The historical interval sequence is the interval value between non-zero values. The embodiment of the application can extract two subsequences from the history intermittent demand sequence by referring to the design thought of Croston, namely a history effective demand sequence and a history demand interval sequence. Firstly, zero values in the history intermittent demand sequence are removed, a history effective demand sequence can be obtained, and then a history demand interval sequence is determined according to interval intervals of each value in the effective demand sequence in the history intermittent demand sequence. For example, a fitting 14 months history intermittent demand sequence is [4,0,5,0,9,5,0,1,3,0,0,12,0,0], then its history effective demand sequence is [4,5,9,5,1,3,12], and its history demand interval sequence is [2,2,1,2,1,3]. Different algorithms can be designed for prediction according to the characteristics of the two sequences. And the number of zero demands at the tail of the history intermittent demand sequence can be recorded.
Step 103, predicting the historical effective demand sequence to obtain the next effective demand predicted value.
In the embodiment of the present application, the historical effective demand sequence, i.e. the non-zero demand sequence, is a sequence that is left after zero values in the historical intermittent demand sequence are removed. The processor may remove zero values from the historical intermittent demand sequence and may obtain a historical effective demand sequence. And predicting the next effective demand predicted value based on the effective demand sequence. The next valid demand forecast value refers to a demand forecast value corresponding to a period in which the next demand is not zero. The next interval predictor and the next effective demand predictor are predicted to determine the demand predictor for the next cycle.
Step 104, predicting the historical demand interval sequence to obtain the next interval predicted value.
In this embodiment of the present application, the historical intermittent demand sequence refers to an intermittent demand sequence within a preset period. Demand intervals tend to be concentrated on a few values and are also reflected in demand intervals when there is some seasonal variation in demand. Therefore, there will be some correlation between adjacent interval values. The embodiment of the application expresses the association relation of the adjacent interval values by adopting a mode of determining the interval value transition probability. In the embodiment of the present application, transition probabilities of the end interval values, that is, all transition combinations of the end interval values and the probability of occurrence of each transition combination. However, the last interval value of the historical demand interval sequence may be the first occurrence, and the transition probability cannot be directly calculated. Thus, the processor needs to first determine if the last interval value is the first occurrence. In case the end interval value does not occur for the first time, the end interval value can be predicted directly from the previous transition probabilities. Under the condition that the end interval value appears for the first time, resampling the end interval value to obtain a required interval sequence, and determining the transition probability of the end interval value. Thus, the problem that the traditional time sequence model predicts poorly on a short sequence is solved. Further, the processor may also obtain an end zero demand number of the historical intermittent demand sequence. Since there may be a period of zero at the end of the historical intermittent demand sequence, the extracted historical demand interval sequence does not take into account the number of zero demands at the end. Therefore, the processor may determine the initial interval prediction value according to the transition probability of the end interval value, and then determine the next interval prediction value according to the difference between the initial interval prediction value and the end zero demand number.
Step 105, determining the predicted demand value of the accessory in the next period according to the predicted effective demand value and the predicted interval value.
In the embodiment of the application, the processor predicts the demand of the next period based on the historical intermittent demand sequence in the preset period before the current time. In this embodiment of the present application, the next valid demand predicted value is a demand predicted value corresponding to a period in which the next demand is not zero, and the next interval predicted value is an interval value between the period in which the next demand is not zero and the current time. That is, the next interval prediction value is not necessarily 1, that is, the next cycle accessory is not necessarily in need. Therefore, it is necessary to determine whether the demand predicted value of the next cycle is the next effective demand predicted value or 0 according to the next interval predicted value. Therefore, if the next interval predicted value is 1, the demand predicted value of the next period is the next effective demand predicted value; if the next interval prediction value is not 1, the demand prediction value representing the next period is 0.
The present embodiments determine a demand forecast value for the accessory for a next cycle based on the next effective demand value and the next interval forecast value. Compared with the traditional mode of predicting the demand of the accessory, which needs to build a complex model, the method has the advantages that the predicting mode is simpler on the premise of ensuring the precision of the demand prediction of the intermittent accessory, so that the predicting efficiency of the demand of the intermittent accessory is improved.
In this embodiment, step 102, extracting the historical effective demand sequence and the historical demand interval sequence from the historical intermittent demand sequence may include:
removing zero values in the historical intermittent demand sequence to obtain a historical effective demand sequence;
a historical demand interval sequence is determined from the intervals of each value in the valid demand sequence at the historical intermittent demand sequence.
Specifically, the historical demand interval sequence is a demand interval sequence within a preset period. The historical effective demand sequence is a non-zero demand sequence, and is the sequence which is left after zero values in the historical intermittent demand sequence are removed. The historical interval sequence is the interval value between non-zero values. The embodiment of the application can extract two subsequences from the history intermittent demand sequence by referring to the design thought of Croston, namely a history effective demand sequence and a history demand interval sequence. Firstly, zero values in the history intermittent demand sequence are removed, a history effective demand sequence can be obtained, and then a history demand interval sequence is determined according to interval intervals of each value in the effective demand sequence in the history intermittent demand sequence. For example, a fitting 14 months history intermittent demand sequence is [4,0,5,0,9,5,0,1,3,0,0,12,0,0], then its history effective demand sequence is [4,5,9,5,1,3,12], and its history demand interval sequence is [2,2,1,2,1,3]. Different algorithms can be designed for prediction according to the characteristics of the two sequences. And the number of zero demands at the tail of the history intermittent demand sequence can be recorded.
In this embodiment, step 103, predicting the historical effective demand sequence to obtain the next effective demand predicted value may include:
amplifying the historical effective demand sequence by using a Lagrange interpolation method to obtain an amplified effective demand sequence;
determining a target prediction model according to the length of the augmented effective demand sequence;
and predicting the augmented effective demand sequence through a target prediction model to obtain a next effective demand predicted value.
Specifically, the residual value of the historical effective demand sequence obtained after the historical intermittent demand sequence is zeroed is less, so that the traditional time sequence analysis model has poor prediction effect when the observation point of the time sequence is too small. Therefore, in order to ensure efficient training of the model, data augmentation processing is required on the data prior to prediction. The embodiment of the application adopts Lagrange interpolation method to complete the data augmentation. The Lagrange interpolation method is a polynomial interpolation, a polynomial fitting function is obtained by fitting actual observation points, and then a value operation is carried out on the fitting function formula, so that the purpose of data expansion is achieved. Specifically, the processor may set the historical period of the historical intermittent demand sequence as the abscissa and the demand as the ordinate, set up a coordinate system of the historical intermittent demand sequence, fit the actual observation points, and implement the numerical filling of the zero demand period through interpolation.
After the historical effective demand sequence is amplified by the Lagrange interpolation method, a corresponding target prediction model can be determined according to the amplified effective demand sequence so as to obtain the next effective demand prediction value. The target prediction model refers to a prediction model corresponding to the length of the extended effective demand sequence. Based on sequences of different lengths, the applicable prediction models are different, so that the prediction accuracy can be more accurate.
In an embodiment of the present application, the step of augmenting the historical effective demand sequence by the lagrangian interpolation method to obtain the augmented effective demand sequence may include:
taking the history period as an abscissa and the demand quantity as an ordinate, and establishing a coordinate system of a history intermittent demand sequence;
acquiring an actual observation point of a historical intermittent demand sequence, wherein the ordinate of the actual observation point is not zero;
fitting the actual observation points to obtain a polynomial fitting function;
determining a numerical value corresponding to a polynomial fitting function of a period with zero ordinate in the history intermittent demand sequence;
and filling the historical intermittent demand sequence according to the numerical value to obtain an amplified effective demand sequence.
Specifically, the lagrangian interpolation method is a polynomial interpolation method, a polynomial fitting function is obtained by fitting actual observation points, and then a value operation is performed on the fitting function formula, so that the purpose of data expansion is achieved. In the embodiment of the application, the processor may set a history period of the history intermittent demand sequence as an abscissa and a demand amount as an ordinate, set up a coordinate system of the history intermittent demand sequence, then fit the actual observation points, and finally implement numerical filling of the zero demand period through interpolation. For example, assuming a predetermined period of 1 to 12 months, the historical intermittent demand sequence is [4,0,5,0,9,5,0,1,3,0,0,12], wherein the actual observation points are [ (1, 4), (3, 5), (5, 9), (6, 5), (8, 1), (9, 3), (12, 12) ], a polynomial fitting function can be obtained by fitting the 8 actual observation points. Further, the months of zero demand of 2, 4, 7, 10 and 11 months are found out the corresponding ordinate values on the polynomial fitting function, and the corresponding values are used as interpolation of the months of zero demand, so that an amplified effective demand sequence with demand values of 1 to 12 months is obtained. It should be noted that, since only the intermediate data can be subjected to differential filling, the sequence length after interpolation of different sequences is completely dependent on the position where the first and last demands occur within the preset period: l=j-i+1, i is the first demand corresponding position, j is the last demand corresponding position.
In an embodiment of the present application, determining the target prediction model according to the length of the augmented effective demand sequence may include:
judging whether the length of the extended effective demand sequence is larger than a preset length;
under the condition that the length of the augmented effective demand sequence is larger than a preset length, determining an ARIMA model as a target prediction model;
and under the condition that the length of the augmented effective demand sequence is smaller than the preset length, determining the Holt model as a target prediction model.
Specifically, the processor may determine a corresponding target prediction model according to the amplified effective demand sequence to obtain the next effective demand prediction value. The target prediction model refers to a prediction model corresponding to the length of the extended effective demand sequence. Based on sequences of different lengths, the applicable prediction models are different, so that the prediction accuracy can be more accurate. The processor may set a preset length in advance, i.e. distinguish the length of the target prediction model. For example, the preset length may be set to 20. And determining the ARIMA model as a target prediction model under the condition that the length of the augmented effective demand sequence is larger than the preset length, and determining the Holt model as the target prediction model under the condition that the length of the augmented effective demand sequence is smaller than the preset length. The ARIMA model is an autoregressive integral moving average model (Autoregressive Integrated Moving Average Model), which is a model established by regressing a dependent variable only on the hysteresis value of the dependent variable and the current value and the hysteresis value of a random error term in the process of converting a non-stationary time sequence into a stationary time sequence. The basic idea of ARIMA is to treat the data sequence formed by the predicted object over time as a random sequence, which is approximately described by a certain mathematical model. Once identified, this model can predict future values from past and present values of the time series. The model can be selected for longer augmented effective demand sequences, and the ARIMA model can be selected as the target prediction model under the condition that the length of the augmented effective demand sequence is greater than the preset length. The Holt model is an exponential smoothing model, is simple, reliable and easy to operate, and is particularly suitable for data which continuously changes with time. The exponential smoothing model assigns exponentially decreasing weights to past observations, the closer the resulting observations are, the greater the weights. The Holt model may be applied to sequences of shorter length. Therefore, in the case where the length of the augmented effective demand sequence is smaller than the preset length, the Holt model may be determined as the target prediction model. According to the method and the device for predicting the target, the corresponding target prediction model is selected based on the length of the augmented effective demand sequence, so that the accuracy of the effective demand predicted value is higher.
In this embodiment, step 104, predicting the historical demand interval sequence to obtain the next interval predicted value may include:
acquiring the number of last zero demands of a history intermittent demand sequence;
determining the transition probability of the last interval value of the historical demand interval sequence;
determining an initial interval predicted value according to the transition probability of the end interval value;
determining a difference value of the initial interval predicted value minus the end zero demand quantity;
in the case that the difference is less than or equal to 1, determining the next interval prediction value as 1;
in the case where the difference is greater than 1, the difference is determined as the next interval prediction value.
Specifically, the interval prediction value is obtained based on a historical demand interval sequence, and in the case that there is a zero demand at the end of the historical intermittent demand sequence, the actual value of the next interval prediction value also needs to consider the number of zero demands at the end of the historical intermittent demand sequence, that is, the number of periods when the demand is zero. Therefore, the embodiment of the present application also needs to acquire the last zero demand number of the history intermittent demand sequence.
In the embodiments of the present application, the demand interval is often concentrated on a few values, and when there is a certain seasonal change in demand, it is also reflected on the demand interval. Therefore, there will be some correlation between adjacent interval values. The embodiment of the application expresses the association relation of the adjacent interval values by adopting a mode of determining the interval value transition probability. In the embodiment of the present application, transition probabilities of the end interval values, that is, all transition combinations of the end interval values and the probability of occurrence of each transition combination. All transition combinations where an end interval value may exist can be derived from the transition probabilities of the end interval value in order to predict the next interval value. However, the last interval value of the historical demand interval sequence may be the first occurrence, and the transition probability cannot be directly calculated. Thus, the processor needs to first determine if the last interval value is the first occurrence. In case the end interval value does not occur for the first time, the end interval value can be predicted directly from the previous transition probabilities. In the case where the last interval value is the first occurrence, there is no transition to any interval value. To solve this problem, it is necessary to enlarge the data size, and therefore, it is necessary to resample the historical demand interval sequence to obtain the resampled demand interval sequence. The resampling is to obtain a resampling interval value each time by replacing the repeated taking operation from the historical interval demand sequence, and under the condition that the preset times are reached, all the resampling interval values can be combined to obtain the resampling demand interval sequence.
In the embodiment of the present application, the initial interval value is an interval predicted value that is preliminarily determined according to the transition probability of the last interval value, that is, an interval predicted value that does not consider the last zero demand number of the historical intermittent demand sequence. In one example, transition probabilities for the end interval values, i.e., all transition combinations of end interval values and the probability of each transition combination occurring, may be obtained first. Wherein the transition combination comprises an end interval value and a transition value. And dividing the intervals of each transition combination according to the occurrence probability of each transition combination so as to obtain a plurality of intervals. Still taking the spacer sequence [2,1,2,1,2,1,2,2,1,1,1,3,2,1,2,1,1] as an example, the transfer set includes 1.fwdarw.1, 1.fwdarw.2 and 1.fwdarw.3, with transfer values of 1,2 and 3, respectively. Transfer combination 1- > 1 allocation interval (0,0.375), transfer combination 1- > 2 allocation interval (0.375,0.875), and transfer combination 1- > 3 allocation interval (0.875,1). Then, the processor acquires the generated random number, and then determines an initial interval predicted value according to a target interval in which the random number falls. The random number is a random number between (0, 1), and it is assumed that 0.833 is generated, which is between intervals (0.375,0.875), the corresponding transition value is 2, that is, the predicted initial interval predicted value is 2.
In the present embodiment, there may be periods of zero value due to the end of the historical intermittent demand sequence, but the extracted historical demand interval sequence does not take into account the number of end zero demands. Therefore, the actual value of the next interval forecast also needs to take into account the number of zero demands at the end of the sequence of historical intermittent demands, i.e. the number of periods when the demand is zero. After the processor determines the initial interval predicted value, the initial interval predicted value and the end zero demand number need to be subtracted to obtain a difference value between the initial interval predicted value and the end zero demand number. In the case where the difference is less than or equal to 1, it is indicated that the next interval prediction value is 1. For example, the historical intermittent demand sequence is 1 month to 12 months in the year, the last month with demand in the historical intermittent demand sequence is 10 months, and then the number of zero demands at the end of the historical intermittent demand sequence is 2. If the first interval prediction value is 1, the difference is-1, and at this time, the next interval prediction value is determined to be 1, that is, 1 month in the next year. However, if the interval prediction value obtained initially is 5, the difference is 3, and then 3 can be determined as the next interval prediction value, that is, 3 months of the next year. In this way, it is possible to predict the interval prediction value more accurately.
According to the method and the device, the next interval predicted value of the demand interval sequence of the accessory is predicted based on the transition probability and the tail zero demand quantity of the intermittent demand sequence, the adjacent demand interval relation is characterized, the front-back influence relation of the demand is reflected, the demand interval sequence is predicted based on the adjacent demand interval relation, the interval predicted value can be predicted more simply and accurately, and accordingly the predicting efficiency of the intermittent demand sequence of the accessory is improved.
In an embodiment of the present application, determining the transition probability of the last interval value of the historical demand interval sequence may include:
judging whether the last interval value of the historical demand interval sequence appears for the first time;
determining a transition combination of the end interval value in the history demand interval sequence under the condition that the end interval value is not the first occurrence;
determining the number of times each transfer combination occurs;
determining the probability of each transition combination according to the occurrence times of each transition combination;
wherein the sum of probabilities of all transition combinations is 1.
In particular, in case the end interval value does not occur for the first time, the end interval value can be predicted directly from the previous transition probabilities. The processor first determines a transition combination of the end interval value in the historical demand interval sequence, the transition combination being a combination of the end interval value to the transition value. And determining the probability of each transition combination, namely the transition probability of the end interval value, according to the occurrence times of each transition combination. Wherein the sum of probabilities of all transition combinations is 1. For example, in interval sequence [2,1,2,1,2,1,2,2,1,1,1,3,2,1,2,1,1], the last interval value is 1 and does not occur for the first time. The transition probability of 1 can thus be determined directly. Interval 1 has transitions to 1,2 and 3, with the number of transitions being 3, 4 and 1, respectively. The transition combinations present for the end interval value 1 are 1→1,1→2 and 1→3. Wherein, the transition probability of 1→1 is 3/(3+4+1) = 0.375,1 →2 is 3/(3+4+1) =0.5, and the transition probability of 1→3 is 1/(3+4+1) =0.125.
In an embodiment of the present application, determining the transition probability of the last interval value of the historical demand interval sequence may further include:
resampling the historical demand interval sequence under the condition that the last interval value appears for the first time to obtain a resampled demand interval sequence;
and determining the transition probability of the end interval value according to the resampling requirement interval sequence.
In the embodiment of the application, since the original historical demand interval sequence is directly used to calculate the transition probability, the last interval value may be the first occurrence, so that there is no transition relation to any interval value. For example, assume that the last bit interval value in the history interval requirement sequence changed from [2,1,2,1,2,1,2,2,1,1,1,3,2,1,2,1,1] to [2,1,2,1,2,1,2,2,1,1,1,3,2,1,2,1,4] is 4, which is the first occurrence, and the transition probability thereof is not calculated. To solve this problem, it is necessary to enlarge the data size, and therefore, it is necessary to resample the historical demand interval sequence to obtain the resampled demand interval sequence. The resampling is to obtain a resampling interval value each time by replacing the repeated taking operation from the historical interval demand sequence, and under the condition that the preset times are reached, all the resampling interval values can be combined to obtain the resampling demand interval sequence.
In the embodiment of the present application, after the processor acquires the resampling requirement interval sequence, the transition relation exists in the last interval value, so that the transition probability of the last interval value can be determined according to the resampling interval sequence. Thus, the problem of poor prediction of the traditional timing model on short sequences is solved by resampling.
In the embodiment of the present application, resampling the historical demand interval sequence to obtain the resampled demand interval sequence may include:
repeatedly taking and putting back the interval values in the historical demand interval sequence under the condition that the last interval value appears for the first time, and recording resampling interval values taken each time;
and under the condition that the fetching and putting back operation reaches the preset times, combining the resampling interval values to obtain a resampling requirement interval sequence.
Specifically, in the case that the last interval value is the first occurrence, the processor may repeat the operations of taking and replacing the interval value in the historical demand interval sequence, obtain one resampling interval value each time, and may combine all resampling interval values when the number of times reaches the preset number. For example, the processor resamples 100 times from [2,1,2,1,2,1,2,2,1,1,1,3,2,1,2,1,4] to obtain a sampling result, i.e., a resampling demand interval sequence of [1,3,1,1,1,4,1,2,1,1,1,2,1,1,1,1,2,1,1,1,3,1,1,1,2,2,2,1,1,2,2,1,4,1,1,2,2,2,1,2,1,1,2,1,1,3,4,1,2,1,3,2,1,1,4,1,2,4,2,4,2,3,3,1,2,1,1,2,1,2,2,4,2,4,1,2,3,1,1,1,3,1,4,2,2,2,1,2,1,2,2,1,1,1,3,1,2,3,4,2].
In an embodiment of the present application, determining the transition probability of the end interval value according to the resampling requirement interval sequence may include:
determining a transfer combination of the last interval value in the resampling demand interval sequence;
determining the number of times each transfer combination occurs;
determining the probability of each transition combination according to the occurrence times of each transition combination;
wherein the sum of probabilities of all transition combinations is 1.
In particular, the processor may determine the probability of each transition combination occurring, i.e. the transition probability of the end interval value, based on the transition combinations of the end interval value in the resampling interval requirement sequence, respectively, according to the number of times each transition combination occurs. Still taking [2,1,2,1,2,1,2,2,1,1,1,3,2,1,2,1,4] as an example, assuming a resampling requirement interval sequence of [1,3,1,1,1,4,1,2,1,1,1,2,1,1,1,1,2,1,1,1,3,1,1,1,2,2,2,1,1,2,2,1,4,1,1,2,2,2,1,2,1,1,2,1,1,3,4,1,2,1,3,2,1,1,4,1,2,4,2,4,2,3,3,1,2,1,1,2,1,2,2,4,2,4,1,2,3,1,1,1,3,1,4,2,2,2,1,2,1,2,2,1,1,1,3,1,2,3,4,2], the transition combinations of the end interval value 4 include 4→1 and 4→2, corresponding to 5 times and 4 times, respectively. The transition probability of transition combination 4→1 is 5/(5+4) =0.56, and the probability of transition combination 4→2 is 4/(5+4) =0.44.
According to the embodiment of the application, the transition probability of the last interval value of the first initial selection is determined according to the resampling interval sequence, and the problem that the traditional time sequence model is poor in prediction on a short sequence is solved.
In an embodiment of the present application, determining the initial interval prediction value according to the transition probability of the end interval value includes:
acquiring all transition combinations of the end interval value and the occurrence probability of each transition combination;
dividing intervals of each transfer combination according to the occurrence probability of each transfer combination to obtain a plurality of intervals;
acquiring a generated random number;
determining an initial interval predicted value according to a target interval in which the random number falls;
wherein the transition combination comprises an end interval value and a transition value.
In particular, the processor may first obtain transition probabilities of the end interval values, i.e. all transition combinations of the end interval values and the probability of each transition combination occurring. Wherein the transition combination comprises an end interval value and a transition value. And dividing the intervals of each transition combination according to the occurrence probability of each transition combination so as to obtain a plurality of intervals. Still taking the spacer sequence [2,1,2,1,2,1,2,2,1,1,1,3,2,1,2,1,1] as an example, the transfer set includes 1.fwdarw.1, 1.fwdarw.2 and 1.fwdarw.3, with transfer values of 1,2 and 3, respectively. Transfer combination 1- > 1 allocation interval (0,0.375), transfer combination 1- > 2 allocation interval (0.375,0.875), and transfer combination 1- > 3 allocation interval (0.875,1). Then, the processor acquires the generated random number, and then determines an initial interval predicted value according to a target interval in which the random number falls.
In the embodiment of the present application, determining the initial interval prediction value according to the interval in which the random number falls may include:
acquiring a target interval in which the random number falls;
determining a target transfer combination corresponding to the target interval;
the transition value of the target transition combination is determined as the initial interval prediction value.
In the embodiment of the application, the random number is a random number between (0, 1), the target interval is an interval in which the random number falls, and the target transition combination is a transition combination corresponding to the target interval. The processor may determine a target transition combination corresponding to the target interval according to the target interval in which the random number falls, and then determine a transition value of the target transition combination as an initial interval prediction value. Still taking the above transfer allocation interval as an example. Assuming that the generated random number is 0.833, which is between intervals (0.375,0.875), the target interval is (0.375,0.875), and the transition combination corresponding to the target interval is 1→2, that is, the corresponding transition value is 2, that is, the predicted initial interval predicted value is 2. In this way, an initial interval prediction value may be determined.
In an embodiment of the present application, the prediction method may further include:
acquiring the number of last zero demands of a history intermittent demand sequence;
And adding 1 to the number of the last zero demands to obtain the reverse order position value of the historical effective demand sequence.
Specifically, in the embodiment of the present application, the last demand number is the number of periods in which the demand amount after the last demanded period in the history intermittent demand sequence is zero. The reverse order position value is the reverse order position of the period with the last demand in the history intermittent demand sequence, so that the reverse order position value loc can be obtained by adding 1 to the number of the last zero demands.
In an embodiment of the present application, determining the demand forecast value of the accessory in the next period according to the next valid demand forecast value and the next interval forecast value may include:
judging whether the next interval predicted value is smaller than or equal to the inverted sequence position value;
determining a next effective demand predictor as a demand predictor for a next cycle if the next interval predictor is less than or equal to the inverted position value;
in the case where the next interval predicted value is greater than the reverse order position value, the demand predicted value of the next cycle is determined to be zero.
Specifically, the processor predicts the demand for the next cycle based on a sequence of historical intermittent demands within a preset cycle prior to the current time. In this embodiment of the present application, the next valid demand predicted value pn is a demand predicted value corresponding to a period in which the next demand is not zero, and the next interval predicted value pe is an interval value between a period in which the next demand is not zero and the current time. That is, the next interval predicted value pe is not necessarily 1, that is, the next cycle accessory is not necessarily in need. Therefore, it is necessary to determine whether the demand predicted value of the next cycle is the next effective demand predicted value or 0 according to the next interval predicted value.
In the embodiment of the present application, the processor may determine the reverse order position value loc in combination with the initial historical intermittent demand sequence, and then the demand predicted value p of the next period satisfies the following formula:
Figure BDA0003994246830000171
wherein p is the demand predicted value of the next period, pn is the next effective demand predicted value, pe is the next interval predicted value, and loc is the inverted position value.
That is, in the case where the next valid predicted value is less than or equal to the reverse order position value, the demand predicted value of the next cycle is the next valid predicted value. For example, if the inverted position value loc is 3 and the next interval predicted value is 2, the next required period is the next period of the current period, so the next required predicted value is the next effective required predicted value; if the next interval predicted value is 5 and is greater than the inverted position value, the next period of the current period is indicated to have no requirement, and the requirement predicted value of the next period is 0. In this way, the demand forecast value for the accessory in the next cycle is determined based on the next effective demand value and the next interval forecast value. Compared with the traditional mode of predicting the demand of the accessory, which needs to build a complex model, the method has the advantages that the predicting mode is simpler on the premise of ensuring the precision of the demand prediction of the intermittent accessory, so that the predicting efficiency of the demand of the intermittent accessory is improved.
Fig. 2 schematically shows a flow chart of a method for predicting accessory demand according to another embodiment of the present application. As shown in fig. 2, in an embodiment of the present application, the prediction method may further include:
step 201, a historical continuity requirement sequence of the accessory is obtained.
In this embodiment, the historical continuous demand sequence refers to a continuous demand sequence within a preset period. In one example, the fittings may be divided into intermittent demand fittings and continuous demand fittings by comparing the average demand interval over the inspection period to a preset interval value. The average demand interval can be obtained by counting the historical demand sequence, and the preset interval value can be set according to the demand of the user. For example, the preset interval value is set to 1.3, and the processor may determine that the average demand interval is greater than 1.3 in the historical demand sequence as the intermittent demand sequence, and determine that the average demand interval is less than or equal to 1.3 as the continuous demand sequence. The traditional prediction method adopts quantitative prediction time length requirements, and influence factors of the time length requirements are more, if a buyer directly uses a prediction result to purchase, risks exist. The continuous fitting is relatively more abundant than the intermittent fitting because of the large market demand and the higher risk of stock backlog or under-supply. Aiming at the problem, the embodiment of the application adopts a method for predicting the demand interval, so that a buyer can make purchasing decisions by combining the current market situation.
Step 202, determining a first demand prediction interval of a next period through a random forest regression model according to the historical continuity demand sequence.
In the embodiment of the application, a Random Forest (Random Forest) model is a classical Bagging model. The random forest model is randomly sampled in the original data set to form n different sample data sets, then n different decision tree models are built according to the data sets, and finally a final result is determined according to the output results of the decision tree models. Since the starting point of the embodiment of the present application is that one prediction interval is desired, the embodiment of the present application needs to use a plurality of models, each model outputs a predicted value, so as to form a predicted value set, and two quantiles are extracted from the predicted value set as the upper and lower bounds of the prediction interval. In model selection, two points need to be satisfied: 1) The number of the submodels can be set at will; 2) Training between sub-models cannot interfere with each other. The random forest regression model is well suited to the two-point requirements and can therefore be a preferred model.
In the embodiment of the application, the first demand prediction interval is a demand interval of the accessory predicted by a random forest regression model. The processor can set a preset number of random forest regression sub-models and two quantile positions according to actual requirements. For example, 100 random forest regression sub-models may be set, and two quantile positions of 40% and 60% may be set as the maximum value and the minimum value of the first demand prediction interval. In one example, the processor may first extract a feature value of an input sequence of the historical continuity demand sequence, input the feature value of the input sequence into a preset number of random forest regression sub-models to obtain a preset number of demand predicted values, and then sort the preset number of demand predicted values in order from large to small to obtain the demand predicted value sequence. The demand predicted value sequence is a sequence in which the output results of all random forest regression sub-models are arranged from large to small. And finally, respectively determining the demand predicted values corresponding to the first preset position and the second preset position in the demand predicted value sequence as the maximum value and the minimum value of the first demand predicted interval, thereby obtaining the first demand predicted interval.
Step 203, determining a second demand prediction interval of the next period through a logistic regression multi-classification model according to the historical continuity demand sequence.
In the embodiment of the application, a logistic regression (Logistic Regression) multi-classification model is used for performing multi-classification prediction tasks, and the second demand prediction interval is a demand prediction interval determined by the logistic regression multi-classification model. In the embodiment of the application, the processor divides a plurality of intervals according to the historical continuous demand sequence, codes each interval, and simultaneously converts the historical continuous demand sequence into a historical continuous demand coding sequence so as to input the historical continuous demand coding sequence into a logistic regression multi-classification model to obtain a predictive coding value. That is, the input of the logistic regression multiple classification model is a sequence of encoded values and the output is an encoded value. Since each code value corresponds to one section, a corresponding demand prediction section, i.e., a second demand prediction section, can be obtained from the output predictive code value.
And 204, weighting and fusing the first demand prediction interval and the second demand prediction interval to obtain a target demand prediction interval of the next period.
In the embodiment of the application, the processor obtains a first demand prediction interval of a next period through a random forest regression model, and determines a second demand prediction interval of the next period through a logistic regression multi-classification model. And finally, obtaining a target demand prediction interval of the next period based on the first demand prediction interval and the second demand prediction interval, namely a final demand prediction interval. In this embodiment of the present application, the processor may assign weights to the first demand prediction interval and the second demand prediction interval, and perform weighted fusion on the first demand prediction interval and the second demand prediction interval based on the assigned weights, so as to obtain the target demand prediction interval of the next cycle.
According to the embodiment of the application, on one hand, the actual purchasing decision needs and avoidance risks are considered, quantitative prediction is abandoned, and a prediction demand interval is changed; on the other hand, by adopting a mode of combining a random forest regression model and a logistic regression multi-classification model, the risk of overfitting caused by a single method is reduced, and the accuracy of demand prediction of the continuity accessories is improved.
In the embodiment of the present application, the random forest regression model includes a preset number of random forest regression sub-models, and step 202, according to the historical continuity demand sequence, determining, by the random forest regression model, the first demand prediction interval of the next cycle may include:
extracting an input sequence of a historical continuity demand sequence;
extracting a characteristic value of an input sequence;
inputting the characteristic values of the input sequences into a random forest regression submodel with a preset number to obtain a demand predicted value with the preset number;
sequencing the preset number of demand predicted values according to the sequence from large to small to obtain a demand predicted value sequence;
and respectively determining the demand predicted values corresponding to the first preset position and the second preset position in the demand predicted value sequence as the maximum value and the minimum value of the first demand predicted interval.
Specifically, the input sequence is a sequence of demands over a period of time in a historical sequence of demands of continuity. The feature values of the input sequence may include, but are not limited to, statistical features and demand region features, wherein the statistical features may include, but are not limited to, statistical features such as maximum value, minimum value, mean value, median, variance, coefficient of variation and the like, and the demand region features are the demand region features obtained after the demand region is coded. The processor can set a preset number of random forest regression sub-models and two quantile positions according to actual requirements. For example, 100 random forest regression sub-models may be set, and two quantile positions of 40% and 60% may be set as the maximum value and the minimum value of the first demand prediction interval. After extracting the characteristic values of the input sequence, inputting the characteristic values into a preset number of random forest regression submodels to obtain a preset number of demand predicted values, for example, 100 demand predicted values. And then sequencing the 100 demand predicted values from large to small to obtain demand predicted values which are sequentially arranged, and determining a first demand predicted interval according to two quantile positions which are preset, namely a first preset position and a second preset position. For example, the input sequence is [3,2,4,1,4,3], the input sequence is input into 100 random forest regression submodels to obtain 100 values, 40% quantiles and 60% quantiles are taken to obtain [2.32,3.17], and then the first demand prediction interval is [2.32,3.17].
In this embodiment, step 202, determining, according to the historical continuous demand sequence, the first demand prediction interval of the next period through the random forest regression model may further include:
extracting a sample sequence of a historical continuity demand sequence;
extracting the characteristic value and the corresponding label of the sample sequence;
training a random forest regression model according to the characteristic values and the labels of the sample sequences.
Specifically, the processor may also train a random forest regression model. The sample sequences can be used as sequences of samples, and each sample sequence has a corresponding label, namely the required amount of the next month. The processor firstly acquires a sample sequence of the historical continuity demand sequence, extracts a characteristic value and a corresponding label of the sample sequence, and trains a random forest regression model according to the characteristic value and the label of the sample sequence. In one example, setting the inspection window to 36 months, the sliding window to 24 months, and the sliding step to 1, the required sequence of one fitting may obtain 12 training samples, where the training sample size=12×the fitting size. A feature value may be extracted for each sample. The characteristic value is taken as an independent variable, and the corresponding label is taken as the independent variable, namely the demand of the next month. For example, assuming a historical continuity requirement sequence for fitting b of [2,3,3,1,6,3,3,2,4,1,4,3], where the slip length is 6, 6 samples can be generated: [2,3,3,1,6,3], [3,3,1,6,3,3], [3,1,6,3,3,2], [1,6,3,3,2,4], [6,3,3,2,4,1], [3,3,2,4,1,4], corresponding tags are respectively 3,2,4,1,4 and 3, and the input sequence to be predicted is [3,2,4,1,4,3]. Thus, one fitting can produce 6 samples and n fittings can produce a sequence of samples of 6*n to train a random forest regression model.
In this embodiment, step 203, determining, according to the historical continuous demand sequence, the second demand prediction interval of the next cycle through the logistic regression multi-classification model may include:
dividing the historical continuity demand sequence into a plurality of intervals, and coding each interval to obtain a plurality of coding values;
converting the historical continuous demand sequence into a historical continuous demand coding sequence;
extracting an input code value sequence of a historical continuity requirement code sequence;
inputting the input code value sequence into a logistic regression multi-classification model to obtain a predictive code value;
and determining the section corresponding to the predictive coding value as a second demand prediction section.
Specifically, the processor divides a plurality of intervals according to the historical continuous demand sequence, codes each interval, and simultaneously converts the historical continuous demand sequence into a historical continuous demand coding sequence. For example, assuming that the minimum value of the history continuous demand sequence is 10 and the maximum value is 110, 10 intervals [10,20], [20,30], … [100,110] may be divided, each interval defines a digital name as the code value of the interval, and the demand value of each month obtains a code value as the code feature according to the interval in which it is located. And meanwhile, the historical continuous demand sequence is converted into a historical continuous demand coding sequence according to interval division. For example, assuming that the historical continuity requirement sequence of the fitting b is [16,27,8,15,3,11,4,4,1,2,19,13], the maximum value is 27, and the minimum value is 1, each interval length is 26/10=2.6, and the ten intervals are equally divided: [1,3.6], [3.6,5.2], …, [24.4,27]. Thus, the sequence [16,27,8,15,3,11,4,4,1,2,19,13] can be encoded as [6,10,3,6,1,4,2,2,1,1,7,5]. Assuming a sliding length of 6, the input code value sequence is [2,2,1,1,7,5]. The processor inputs the input code value sequence into a logistic regression multi-classification model to obtain a predicted code value, and then finds a corresponding demand prediction interval according to the predicted code value, namely a second demand prediction interval. For example, if the prediction result is 6, the second demand prediction interval corresponding to 6 [14,16.6].
In this embodiment, in step 203, determining, according to the historical continuous demand sequence, the second demand prediction interval of the next period through the logistic regression multi-classification model may further include:
extracting a sample input code value sequence of a historical continuity demand code sequence and a corresponding sample prediction code value;
and training a logistic regression multi-classification model according to the sample input code value sequence and the sample prediction code value.
In particular, the processor may also train a logistic regression multiple classification model. The sample predictive coding value sequence can be used as a sample coding value sequence, and the sample input coding value sequence of each sample has a corresponding sample predictive coding value, namely the coding value of the next month. And training the logistic regression multi-classification model according to the sample input coding sequence and the sample prediction coding value. For example, assuming a sequence of historical continuity requirement codes for fitting b of [6,10,3,6,1,4,2,2,1,1,7,5], where the sliding length is 6, a sequence of 6 sample input code values, [6,10,3,6,1,4], [10,3,6,1,4,2], [3,6,1,4,2,2], [6,1,4,2,2,1], [1,4,2,2,1,1], [4,2,2,1,1,7], corresponding sample predictive code values of 2,1, 7,5, respectively, can be generated. It should be noted that, since the tag is not in the sliding window, it may be out of the demand boundary, so the following settings may be made: if the label value is lower than the minimum required value, the code is 1; if the tag value is higher than the required maximum value, the code is 10.
In an embodiment of the present application, dividing the historical continuity requirement sequence into a plurality of intervals may include:
determining the maximum value and the minimum value of the historical continuity demand sequence and the number of preset intervals;
the maximum value and the minimum value of the historical continuity demand sequence are subjected to difference to obtain the total interval length;
dividing the total interval length according to the number of preset intervals to obtain a plurality of intervals.
Specifically, the preset number of intervals is the number of intervals to be divided, which is set in advance. The processor divides the total interval length according to the number of preset intervals according to the maximum value and the minimum value of the historical continuity requirement sequence, so as to obtain a plurality of intervals, for example, assume that the historical continuity requirement sequence of the accessory b is [16,27,8,15,3,11,4,4,1,2,19,13], and the number of the preset intervals is 10. Maximum value is 27, minimum value is 1, then each interval length is 26/10=2.6, ten intervals are equally divided: [1,3.6], [3.6,5.2], …, [24.4,27].
In this embodiment, step 204, performing weighted fusion on the first demand prediction interval and the second demand prediction interval to obtain the target demand prediction interval of the next cycle may include:
determining a first maximum value and a first minimum value of a first demand prediction interval and a second maximum value and a second minimum value of a second demand prediction interval;
Acquiring a first weight of a first demand prediction interval and a second weight of a second demand prediction interval;
determining a target maximum value of the target demand prediction interval according to the first weight, the second weight, the first maximum value and the second maximum value;
determining a target minimum value of the target demand prediction interval according to the first weight, the second weight, the first minimum value and the second minimum value;
and determining a target demand prediction interval according to the target maximum value and the target minimum value.
Specifically, the first maximum value and the first minimum value are the maximum value and the minimum value of the first demand prediction interval, and the first weight is the weight of the first demand prediction interval; the second maximum value and the second minimum value are the maximum value and the minimum value of the second demand prediction interval, and the second weight is the weight of the second demand prediction interval. The processor may assign weights to the first demand prediction interval and the second demand prediction interval, respectively, and then perform weighted fusion to improve the overall prediction effect. Assuming that the first weight and the second weight are 0.6 and 0.4, respectively, the final target demand prediction interval result (p down ,p up ) The method comprises the following steps:
Figure BDA0003994246830000221
assuming that the first demand prediction interval is [2.32,3.17] and the second demand prediction interval is [13.3,15.9], the weighted target minimum value is 0.6x13.3+0.4x14=13.58, and the target maximum value is 0.6x15.9+0.5x16.6=16.18, so that the target demand prediction interval of the next cycle is [13.58,16.18].
Fig. 3 schematically illustrates a flow chart of a method for predicting accessory demand according to an embodiment of the present application. As shown in fig. 4, in an embodiment of the present application, there is provided a prediction method for demand of accessories, the prediction method including:
step 301, acquiring an accessory demand sequence (i.e. a historical demand sequence);
step 302, obtaining a demand interval of the accessory demand sequence, judging whether the accessory demand is greater than a preset value (taking 1.32 as an example), if yes, entering step 303; otherwise, go to step 304;
step 303, obtaining a demand prediction (i.e. a next effective demand prediction value) according to an effective demand sequence (i.e. a historical effective demand sequence), obtaining an interval prediction (i.e. a next interval prediction value) according to a demand interval sequence (i.e. a historical demand interval sequence), and obtaining a final prediction result (i.e. a demand prediction value of a next period) according to the demand prediction, the interval prediction and the last zero demand number +1 (i.e. a reverse order position value); the method comprises the steps that an effective demand sequence carries out demand prediction by selecting a target prediction model (ARIMA or Holt smoothing model) after data amplification; the demand interval sequence can be used for interval prediction through resampling and state transition probability or directly through the state transition probability;
Step 304, under the condition that the accessory demand sequence is a continuous demand sequence (namely a historical continuous demand sequence), respectively obtaining quantiles through a random forest regression model so as to obtain a first demand prediction interval and obtaining interval categories through a logistic regression classification model so as to obtain a second demand prediction interval; the method for predicting by adopting the random forest regression model comprises the following steps: extracting feature engineering (such as statistical features and the like), and training an RF regression model (namely random forest regression) according to the training data so as to predict prediction data; the method for adopting the logistic regression classification model comprises the following steps: and predicting the logistic regression classification model through the training data, so as to predict the prediction data.
The specific implementation process has been described in the above embodiments, and will not be described in detail here. According to the method and the device, the demand sequence is divided into the intermittent demand sequence and the continuous demand sequence, prediction is carried out according to different modes, the method and the device have strong pertinence, the prediction accuracy of coping with various demand sequences is improved, and the problem that the effect is poor due to the fact that a unified model is used for training is avoided. Secondly, aiming at the intermittent accessory, the problem that the traditional time sequence model predicts poorly on a short sequence is solved through data expansion, including a Lagrange interpolation method aiming at a predicted effective demand sequence and resampling aiming at a predicted demand interval sequence. Furthermore, the adjacent demand interval relation is characterized by designing the demand interval transition probability so as to reflect the front-back influence relation of the demand, and the demand interval sequence is predicted based on the front-back influence relation, so that the method has originality. And finally, aiming at the continuity accessories, considering the actual purchasing decision requirement and avoidance risk, discarding quantitative prediction, and changing the prediction requirement interval. In algorithm design, a mode of combining a random forest result quantile prediction method with a logistic regression multi-classification interval prediction method is adopted, so that the overfitting risk caused by a single method is reduced, and the accuracy is improved.
Fig. 4 schematically shows a block diagram of a prediction apparatus for fitting demand according to an embodiment of the present application. As shown in fig. 4, an embodiment of the present application provides a prediction apparatus for accessory demand, which may include:
a memory 410 configured to store instructions; and
the processor 420 is configured to call instructions from the memory 410 and when executing the instructions, to implement the predictive method for accessory requirements described above.
Embodiments of the present application also provide a machine-readable storage medium having instructions stored thereon for causing a machine to perform the above-described predictive method for accessory demand.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, etc., such as Read Only Memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or apparatus that comprises an element.
The foregoing is merely exemplary of the present application and is not intended to limit the present application. Various modifications and changes may be made to the present application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc. which are within the spirit and principles of the present application are intended to be included within the scope of the claims of the present application.

Claims (23)

1. A method for predicting accessory demand, the method comprising:
acquiring a historical intermittent demand sequence of the accessory;
extracting a historical effective demand sequence and a historical demand interval sequence from the historical intermittent demand sequence;
Predicting the historical effective demand sequence to obtain a next effective demand predicted value;
predicting the historical demand interval sequence to obtain a next interval predicted value;
and determining a demand predicted value of the accessory in the next period according to the next effective demand predicted value and the next interval predicted value.
2. The method of claim 1, wherein the extracting a historical effective demand sequence and a historical demand interval sequence from the historical intermittent demand sequence comprises:
removing zero values in the historical intermittent demand sequence to obtain a historical effective demand sequence;
and determining the historical demand interval sequence according to the interval of each value in the effective demand sequence in the historical intermittent demand sequence.
3. The method of claim 1, wherein predicting the historical effective demand sequence to obtain the next effective demand prediction value comprises:
the historical effective demand sequence is amplified through a Lagrange interpolation method to obtain an amplified effective demand sequence;
determining a target prediction model according to the length of the augmented effective demand sequence;
And predicting the augmented effective demand sequence through the target prediction model to obtain the next effective demand predicted value.
4. A method of predicting as claimed in claim 3, wherein said augmenting the historical effective demand sequence by lagrangian interpolation to obtain an augmented effective demand sequence comprises:
taking the history period as an abscissa and the demand quantity as an ordinate, and establishing a coordinate system of a history intermittent demand sequence;
acquiring an actual observation point of the historical intermittent demand sequence, wherein the ordinate of the actual observation point is not zero;
fitting the actual observation points to obtain a polynomial fitting function;
determining a numerical value corresponding to the polynomial fitting function of a period with zero ordinate in the history intermittent demand sequence;
and filling the historical intermittent demand sequence according to the numerical value to obtain an amplified effective demand sequence.
5. A method of predicting as claimed in claim 3, wherein said determining a target prediction model from the length of the augmented effective demand sequence comprises:
judging whether the length of the augmentation effective demand sequence is larger than a preset length;
Determining an ARIMA model as a target prediction model under the condition that the length of the augmented effective demand sequence is greater than the preset length;
and under the condition that the length of the augmented effective demand sequence is smaller than the preset length, determining the Holt model as a target prediction model.
6. The method of claim 1, wherein predicting the historical demand interval sequence to obtain a next interval prediction value comprises:
acquiring the number of last zero demands of the historical intermittent demand sequence;
determining a transition probability of an end interval value of the historical intermittent demand sequence;
determining an initial interval predicted value according to the transition probability of the end interval value;
determining a difference of the initial interval predicted value minus the end zero demand quantity;
determining the next interval prediction value to be 1 in the case that the difference value is less than or equal to 1;
and in the case that the difference is greater than 1, determining the difference as the next interval prediction value.
7. The method of predicting as recited in claim 6, wherein said determining a transition probability of an end interval value of said sequence of historical discontinuity requirements comprises:
Judging whether the last interval value of the historical demand interval sequence appears for the first time;
determining a transition combination of the end interval value in the historical demand interval sequence if the end interval value is not the first occurrence;
determining the number of times each transfer combination occurs;
determining the probability of each transition combination according to the occurrence times of each transition combination;
wherein the sum of probabilities of all transition combinations is 1.
8. The method of predicting as recited in claim 6, wherein said determining a transition probability of an end interval value of said sequence of historical discontinuity requirements further comprises:
resampling the historical demand interval sequence under the condition that the last interval value appears for the first time to obtain a resampled demand interval sequence;
and determining the transition probability of the tail interval value according to the resampling requirement interval sequence.
9. The method of claim 8, wherein resampling the historical demand interval sequence to obtain the resampled demand interval sequence if the end interval value is the first occurrence comprises:
repeatedly carrying out taking and putting back operation on the interval value in the history demand interval sequence under the condition that the last interval value appears for the first time, and recording resampling interval values taken each time;
And under the condition that the fetching and putting back operation reaches the preset times, merging the resampling interval values to obtain the resampling requirement interval sequence.
10. The method of predicting as recited in claim 8 wherein said determining a transition probability of said end interval value from said sequence of resampling demand intervals comprises:
determining a transition combination of the end interval value in the resampling demand interval sequence;
determining the number of times each transfer combination occurs;
determining the probability of each transition combination according to the occurrence times of each transition combination;
wherein the sum of probabilities of all transition combinations is 1.
11. The prediction method according to claim 6, wherein the determining an initial interval prediction value according to the transition probability of the end interval value comprises:
acquiring all transition combinations of the end interval value and the occurrence probability of each transition combination;
dividing the intervals of each transfer combination according to the occurrence probability of each transfer combination so as to obtain a plurality of intervals;
acquiring a generated random number;
determining the initial interval predicted value according to the target interval in which the random number falls;
Wherein the transition combination comprises an end interval value and a transition value.
12. The prediction method according to claim 11, wherein the determining the initial interval prediction value according to the interval in which the random number falls includes:
acquiring a target interval in which the random number falls;
determining a target transfer combination corresponding to the target interval;
and determining a transfer value of the target transfer combination as the initial interval predicted value.
13. The prediction method according to claim 1, characterized in that the prediction method further comprises:
acquiring the number of last zero demands of the historical intermittent demand sequence;
and adding 1 to the number of the last zero demands to obtain a reverse order position value of the historical effective demand sequence.
14. The method of claim 13, wherein said determining a demand forecast value for the fitting over a next cycle based on the next effective demand forecast value and the next interval forecast value comprises:
judging whether the next interval predicted value is smaller than or equal to the inverted sequence position value;
determining the next valid demand predictor as the demand predictor for the next cycle if the next interval predictor is less than or equal to the inverted position value;
And in the case that the next interval predicted value is greater than the reverse order position value, determining the demand predicted value of the next period as zero.
15. The prediction method according to claim 1, characterized in that the prediction method further comprises:
acquiring a historical continuity demand sequence of the accessory;
determining a first demand prediction interval of the next period through a random forest regression model according to the historical continuity demand sequence;
determining a second demand prediction interval of the next period through a logistic regression multiple classification model according to the historical continuity demand sequence;
and carrying out weighted fusion on the first demand prediction interval and the second demand prediction interval to obtain a target demand prediction interval of the next period.
16. The method of claim 15, wherein the random forest regression model comprises a predetermined number of random forest regression sub-models, and wherein determining the first demand prediction interval for the next cycle from the sequence of historical continuity demands by the random forest regression model comprises:
extracting an input sequence of the historical continuity requirement sequence;
extracting a characteristic value of the input sequence;
inputting the characteristic values of the input sequences into the preset number of random forest regression sub-models to obtain preset number of demand predicted values;
Sequencing the preset number of demand predicted values according to the sequence from large to small to obtain a demand predicted value sequence;
and respectively determining the demand predicted values corresponding to the first preset position and the second preset position in the demand predicted value sequence as the maximum value and the minimum value of the first demand predicted interval.
17. The method of claim 16, wherein determining the first demand prediction interval for the next cycle by a random forest regression model from the historical sequence of continuous demands further comprises:
extracting a sample sequence of the historical continuity requirement sequence;
extracting the characteristic value and the corresponding label of the sample sequence;
and training the random forest regression model according to the characteristic value of the sample sequence and the label.
18. The method of claim 15, wherein determining a second demand prediction interval for a next cycle from the historical sequence of continuous demands by a logistic regression multiple classification model comprises:
dividing the historical continuity demand sequence into a plurality of intervals, and encoding each interval to obtain a plurality of encoding values;
converting the historical continuity requirement sequence into a historical continuity requirement coding sequence;
Extracting an input code value sequence of the historical continuity requirement code sequence;
inputting the input code value sequence into the logistic regression multi-classification model to obtain a predictive code value;
and determining the section corresponding to the predictive coding value as a second demand prediction section.
19. The method of claim 18, wherein determining a second demand prediction interval for a next cycle from the historical sequence of continuous demands by a logistic regression multiple classification model further comprises:
extracting a sample input code value sequence and a corresponding sample prediction code value of the historical continuity requirement code sequence;
training the logistic regression multi-classification model according to the sample input code value sequence and the sample predictive code value.
20. The method of claim 18, wherein the dividing the historical sequence of continuity requirements into a plurality of intervals comprises:
determining the maximum value and the minimum value of the historical continuity demand sequence and the number of preset intervals;
the maximum value and the minimum value of the historical continuity demand sequence are subjected to difference to obtain the total interval length;
dividing the total interval length according to the preset interval number to obtain a plurality of intervals.
21. The prediction method according to claim 15, wherein the weighted fusion of the first demand prediction interval and the second demand prediction interval to obtain a target demand prediction interval of the following period includes:
determining a first maximum value and a first minimum value of the first demand prediction interval and a second maximum value and a second minimum value of the second demand prediction interval;
acquiring a first weight of the first demand prediction interval and a second weight of the second demand prediction interval;
determining a target maximum value of the target demand prediction interval according to the first weight, the second weight, the first maximum value and the second maximum value;
determining a target minimum value of the target demand prediction interval according to the first weight, the second weight, the first minimum value and the second minimum value;
and determining the target demand prediction interval according to the target maximum value and the target minimum value.
22. A predictive device for fitting demand, comprising:
a memory configured to store instructions; and
a processor configured to invoke the instructions from the memory and when executing the instructions is capable of implementing the predictive method for accessory requirements according to any of claims 1 to 21.
23. A machine-readable storage medium having stored thereon instructions for causing a machine to perform the predictive method for accessory demand according to any one of claims 1 to 21.
CN202211598441.7A 2022-12-12 2022-12-12 Prediction method, prediction device and storage medium for accessory demand Pending CN116051159A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211598441.7A CN116051159A (en) 2022-12-12 2022-12-12 Prediction method, prediction device and storage medium for accessory demand

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211598441.7A CN116051159A (en) 2022-12-12 2022-12-12 Prediction method, prediction device and storage medium for accessory demand

Publications (1)

Publication Number Publication Date
CN116051159A true CN116051159A (en) 2023-05-02

Family

ID=86130321

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211598441.7A Pending CN116051159A (en) 2022-12-12 2022-12-12 Prediction method, prediction device and storage medium for accessory demand

Country Status (1)

Country Link
CN (1) CN116051159A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116402321A (en) * 2023-06-08 2023-07-07 北京京东乾石科技有限公司 Method and device for determining demand of article, electronic equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116402321A (en) * 2023-06-08 2023-07-07 北京京东乾石科技有限公司 Method and device for determining demand of article, electronic equipment and storage medium
CN116402321B (en) * 2023-06-08 2023-09-22 北京京东乾石科技有限公司 Method and device for determining demand of article, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN110717535B (en) Automatic modeling method and system based on data analysis processing system
CN111950810B (en) Multi-variable time sequence prediction method and equipment based on self-evolution pre-training
Cao et al. CNN-LSTM coupled model for prediction of waterworks operation data
CN112462261B (en) Motor abnormality detection method and device, electronic equipment and storage medium
CN116051159A (en) Prediction method, prediction device and storage medium for accessory demand
CN116051160A (en) Prediction method, prediction device and storage medium for accessory demand
CN116109339A (en) Prediction method, prediction device and storage medium for accessory demand
CN110163060B (en) Method for determining crowd density in image and electronic equipment
CN115145901A (en) Multi-scale-based time series prediction method and system
CN113239702A (en) Intention recognition method and device and electronic equipment
CN115983497A (en) Time sequence data prediction method and device, computer equipment and storage medium
CN115392548A (en) Travel demand prediction method, device and storage medium for travel site
CN114066510A (en) Method and device for predicting commodity sales, computer equipment and storage medium
CN117235032B (en) Distributed link prediction method and device
CN111327706B (en) Remote meter reading data processing method and device, gas meter system and gas cloud platform
CN116957640A (en) Product sales prediction method and system
CN115358473A (en) Power load prediction method and prediction system based on deep learning
CN110717577A (en) Time series prediction model construction method for noting regional information similarity
CN115809928A (en) Project investment decision-making method and system
CN115481803A (en) Financial time sequence prediction method, device and equipment based on industry crowding degree
CN111598302B (en) AP-TS-SVR model-based thermal power plant short-term industrial heat load prediction method
CN114358422A (en) Research and development progress abnormity prediction method and device, storage medium and electronic equipment
CN113111729A (en) Training method, recognition method, system, device and medium of personnel recognition model
CN113238947A (en) Man-machine collaborative dialog system evaluation method and system
JPH09146915A (en) Chaos time-series short-period predicting 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