CN-122022250-A - Material demand prediction method and device and electronic equipment
Abstract
The application discloses a material demand prediction method and device and electronic equipment. The method comprises the steps of collecting business data, wherein the business data at least comprises material basic information, purchasing data, warehousing data, ticket collecting data, production data, order data and provider data, conducting feature extraction according to collection sources of the business data to generate a plurality of features to be fused, conducting feature fusion on the features to be fused to construct feature vectors, inputting the feature vectors into a long-short-term memory time sequence model to obtain first material demand prediction containing material demand historical fluctuation features, training the long-short-term memory time sequence model in advance based on historical business data and a historical material demand plan, correcting the first material demand prediction by means of a random forest model to obtain second material demand prediction at least comprising one or more of material demand quantity, material demand time and confidence, obtaining a safe stock threshold and/or production capacity according to the business data, processing the second material demand prediction, and generating a material demand initial plan. The application realizes the feature fusion and the combined model prediction of the multi-source business data, improves the precision and the stability of the material demand prediction, ensures that the generated material demand plan accords with the constraint of stock and productivity, and has better executable and application values.
Inventors
- SONG LILI
Assignees
- 北京众谊越泰科技有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20251223
Claims (10)
- 1. A method for predicting material demand, the method comprising: Collecting service data, wherein the service data at least comprises material basic information, purchasing data, warehousing data, ticket collecting data, production data, order data and provider data; According to the acquisition source of the service data, extracting the characteristics of the service data to generate a plurality of characteristics to be fused; Performing feature fusion on the plurality of features to be fused to construct a feature vector, wherein the feature vector at least comprises one or more of historical demand data, time features and external features; inputting the feature vector into a long-short-term memory time sequence model to obtain a first material demand prediction comprising material demand history fluctuation features, wherein the long-short-term memory time sequence model is pre-trained by using historical business data and a historical material demand plan; Correcting the first material demand prediction by using a random forest model to obtain a second material demand prediction, wherein the second material demand prediction at least comprises one or more of material demand quantity, material demand time and confidence, and the random forest model is trained to correct a prediction interval of the material demand; and acquiring a safety stock threshold and/or production capacity constraint according to the service data, and executing processing on the second material demand forecast to generate a material demand initial plan.
- 2. The material demand prediction method according to claim 1, characterized in that the method further comprises: collecting real-time service data in the execution process of the initial plan according to the material demand; generating constraint data according to the collected real-time business data, wherein the constraint data at least comprises one or more of equipment capacity change data, supplier exchange period change data, order change data and inventory fluctuation data; performing optimization on the material demand initial plan by using a material demand prediction optimization model according to the constraint data to generate a first material demand update plan, wherein the first material demand update plan at least comprises one or more of material purchase quantity adjustment information, material purchase time information and production scheduling priority; and generating an updated material demand plan according to the material demand initial plan and the first material demand update plan, and executing the updated material demand plan.
- 3. The method of claim 1, wherein the obtaining business data further comprises: And carrying out anomaly detection on the business data by using an isolated forest anomaly detection model so as to identify missing value, repeated value and/or numerical anomaly data, and cleaning the business data according to the detected anomaly.
- 4. The method for predicting material demand according to claim 2, wherein the acquiring service data further comprises: extracting error characteristics based on the service data, wherein the error characteristics at least comprise one or more of calculation sequence characteristics, floating point operation deviation characteristics, field precision setting characteristics and tax rate conversion coefficient characteristics; and inputting the error characteristic into a random forest model to obtain the probability and/or the numerical range of the data precision deviation, and correcting the business data based on the numerical deviation in the purchasing link, the warehousing link and/or the ticket collecting link by a tail difference balance algorithm.
- 5. The material demand prediction method according to claim 1, wherein the material demand prediction optimization model is configured to take "lowest material shortage rate, lowest stock cost, highest order on-time delivery rate" as an objective function.
- 6. The method for predicting material demand according to claim 1, wherein, The temporal features include seasonal features and/or holiday features; The external characteristics include air temperature characteristics, promotional activity characteristics, and/or bid price characteristics.
- 7. The method for predicting material demand according to claim 1, wherein, The training process of the long-term and short-term memory time sequence mixed model comprises the following steps: adopting historical business data and a historical material demand plan of the last three years as sample data; dividing the sample data into a training set and a verification set according to the proportion of 7:3; Performing iterative training on the long-short-term memory time sequence mixed model by taking root mean square error as a loss function; and when the fluctuation value of the root mean square error on the verification set in five continuous iterations is smaller than or equal to a preset threshold value, controlling to stop training, wherein the preset threshold value is 0.05.
- 8. The method for predicting material demand according to claim 1, wherein, The material demand predictive optimization model is configured with a state space, an action space and a reward function, The state space includes one or more of current inventory level, equipment capacity, supplier lead time, and order requirements; The action space comprises one or more of adjusting material purchase quantity, changing suppliers and adjusting priority of production schedule; and the bonus function R is R = -0.5 x stock cost-1.0 x loss of missing material + 0.8 x on-time delivery rate.
- 9. A material demand prediction apparatus, comprising: the collecting module is used for collecting service data, wherein the service data at least comprises material basic information, purchasing data, warehousing data, ticket collecting data, production data, order data and supplier data; A feature extraction module for extracting features of the service data according to the acquisition source of the service data to generate a plurality of features to be fused, The feature fusion module is used for executing feature fusion on the plurality of features to be fused and constructing feature vectors, wherein the feature vectors at least comprise one or more of historical demand data, time features and external features; The prediction module is used for inputting the feature vector into a long-short-period memory time sequence model to obtain a first material demand prediction comprising material demand history fluctuation characteristics, wherein the long-short-period memory time sequence model is trained in advance by using historical service data and a historical material demand plan; The correction module is used for correcting the first material demand prediction by using a random forest model to obtain a second material demand prediction, wherein the second material demand prediction at least comprises one or more of material demand quantity, material demand time and confidence, and the random forest model is trained to correct a prediction interval of the material demand; And the generation module is used for acquiring a safety stock threshold and/or production capacity constraint according to the service data, and executing processing on the second material demand forecast so as to generate a material demand initial plan.
- 10. An electronic device, comprising: A memory for storing a program; A processor for executing the program stored in the memory to perform the material demand prediction method according to any one of claims 1 to 8.
Description
Material demand prediction method and device and electronic equipment Technical Field The present application relates to the field of intelligent manufacturing technologies, and in particular, to a method and an apparatus for predicting material demand, and an electronic device. Background The material requirement planning (Material Requirements Planning, abbreviated as MRP) is an important link in production management of manufacturing enterprises, and is generally used for calculating the quantity of material requirements and the required time in a future period according to the product structure, the production plan and the inventory condition, so as to support the establishment of a purchasing plan and a production schedule. In the prior art, an MRP system generally operates by means of an Enterprise Resource Planning (ERP) system or a supply chain management system, and generates a material demand plan by processing business data such as material basic information, purchase data, warehouse-in data, production data, order data, inventory data and the like. In the traditional MRP operation, one common method is to predict the demand based on historical demand data and manual experience, and then calculate the demand quantity and demand time of each level of materials in batches according to preset calculation rules by combining the BOM structure of the product and the in-process/inventory data. The method is generally characterized in that firstly, a demand prediction part adopts a simple time sequence model or a moving average, experience coefficients and other modes, comprehensive consideration of seasonal factors, holidays, sales promotion activities, external environment changes and other factors is lacked, nonlinear fluctuation characteristics of material demands are difficult to effectively describe, secondly, MRP operation is mostly based on relatively static input data, and dynamic constraint factors such as equipment capacity changes, supplier exchange period fluctuation, customer order changes, inventory real-time fluctuation and the like are difficult to respond in time in the production execution process, so that material demand plans are updated and lagged. In the aspect of demand prediction, the prior art starts to try to introduce a certain statistical learning or machine learning method to model and predict the material demand. For example, there are schemes that use a traditional time series model to fit historical demand data, or that introduce some external variables through a simple regression model to make demand predictions. However, the method has limited capability of describing long-time span, nonlinearity and multi-factor coupling characteristics and has insufficient adaptability to the change of the requirements in complex service scenes. Disclosure of Invention The embodiment of the application provides a material demand prediction method and device and electronic equipment, which overcome the defect that in the prior art, the material demand prediction accuracy is low and the method and device cannot be dynamically adapted to business scenes. In a first aspect, a method for predicting material demand is provided, including: Collecting service data, wherein the service data at least comprises material basic information, purchasing data, warehousing data, ticket collecting data, production data, order data and provider data; extracting features of the service data according to the acquisition sources of the service data to generate a plurality of features to be fused, Performing feature fusion on the plurality of features to be fused to construct a feature vector, wherein the feature vector at least comprises one or more of historical demand data, time features and external features; inputting the feature vector into a long-short-term memory time sequence model to obtain a first material demand prediction comprising material demand history fluctuation features, wherein the long-short-term memory time sequence model is pre-trained by using historical business data and a historical material demand plan; Correcting the first material demand prediction by using a random forest model to obtain a second material demand prediction, wherein the second material demand prediction at least comprises one or more of material demand quantity, material demand time and confidence, and the random forest model is trained to correct a prediction interval of the material demand; and acquiring a safety stock threshold and/or production capacity constraint according to the service data, and executing processing on the second material demand forecast to generate a material demand initial plan. According to an embodiment of the present application, the method further comprises: collecting real-time service data in the execution process of the initial plan according to the material demand; generating constraint data according to the collected real-time business data, wherein the constraint data at leas