A component demand prediction method and device, computer equipment and storage medium
By classifying components according to their lifecycle and order volume, constructing a tagging system and preprocessing data, and using machine learning models to predict component demand, the problem of low practicality in existing component demand prediction technologies has been solved, achieving accurate demand prediction and resource optimization.
Patent Information
- Application Number
- CN202411709214.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2025-12-30
- Estimated Expiration
- 2044-11-27
AI Technical Summary
Existing technologies for component demand forecasting mainly focus on single attributes, which has low practicality, makes it difficult to achieve accurate demand forecasting, and affects inventory control and cost-effectiveness.
By classifying components according to their lifecycle and order volume, a component tagging system is constructed. The tag data is preprocessed to construct component demand prediction features, and machine learning models are used for prediction.
It enables accurate forecasting of component demand, improves the timeliness and accuracy of forecasts, helps companies optimize resource allocation, reduce inventory costs, and enhance market competitiveness.
Smart Images

Figure CN119623995B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of artificial intelligence, and in particular to a parts demand prediction method and device, computer equipment and a storage medium. BACKGROUND
[0002] With the intensification of competition in the automotive industry and rapid technological progress, how to enhance the competitiveness of the market, meet customer delivery, and reasonably control inventory, increase cash flow, and achieve a balance between demand and inventory, has become a challenge for every automotive parts department. Among them, accurately predicting the demand for parts is the basis for production planning and inventory management, and is crucial to the operation of the entire supply chain. Accurate demand forecasting can help enterprises avoid the risk of excess or shortage of parts inventory, thereby optimizing resource allocation, reducing costs, and enhancing the market competitiveness and response speed of enterprises.
[0003] As a key link in enterprise supply chain management, the accuracy of parts demand prediction directly affects inventory control, production planning, and cost efficiency. For example, demand prediction for automotive parts plays an extremely important role in supply chain management, which directly affects the operational efficiency, cost control, and customer satisfaction of enterprises. Demand prediction for parts is mainly based on the combination of historical demand for parts to make demand judgment models for the future. In the process of ordering parts, there are certain differences in demand corresponding to different life cycles and different order quantities. Therefore, parts prediction must be analyzed under multiple conditions to be more reliable. The existing technology is generally focused on demand prediction for a single attribute, which has low practicality. SUMMARY
[0004] To solve the above technical problems, the present application provides a parts demand prediction method, which adopts the following technical solution, comprising:
[0005] According to the life cycle and order quantity of the parts, the parts are classified to obtain the category of the parts;
[0006] According to the category of the parts, a parts label system is constructed;
[0007] According to the parts label system, the parts label data is preprocessed;
[0008] According to the preprocessed parts label data, parts demand prediction features are constructed;
[0009] According to the parts demand prediction features, a prediction model is constructed;
[0010] According to the prediction model, the demand for the parts is predicted.
[0011] Preferably, the step of classifying the spare parts according to the life cycle and order quantity of the spare parts comprises the following steps:
[0012] Collecting historical spare part demand data of the spare parts;
[0013] Formulating classification criteria for stable spare parts and unstable spare parts according to the historical spare part demand data;
[0014] Dividing the spare parts into stable spare parts and unstable spare parts according to the classification criteria.
[0015] Preferably, the step of constructing a spare part label system according to the classification of the spare parts comprises the following steps:
[0016] Setting label classification criteria;
[0017] According to the label classification criteria, setting the corresponding relationship between the label categories and the label attributes to construct the spare part label system.
[0018] Preferably, the step of preprocessing the spare part label data according to the spare part label system comprises the following steps:
[0019] According to the spare part label system, the spare part label data is cleaned;
[0020] The cleaned spare part label data from multiple data sources is merged and integrated to ensure the consistency and continuity of the data;
[0021] The merged and integrated spare part label data is reduced.
[0022] Preferably, the step of constructing a spare part demand prediction feature according to the preprocessed spare part label data comprises the following steps:
[0023] Establishing an initial feature set and screening features;
[0024] Encoding the classification features to convert the classification features into numerical features;
[0025] Scaling the numerical features to make different features comparable in value;
[0026] According to the business requirements, multiple features are combined to form new features.
[0027] Preferably, the step of constructing a prediction model according to the spare part demand prediction feature comprises the following steps:
[0028] According to the characteristics of the spare part demand data and the business requirements, a machine learning model is selected;
[0029] Training the machine learning model;
[0030] The machine learning model is verified.
[0031] Preferably, the step of predicting the spare part demand according to the prediction model specifically comprises:
[0032] According to the prediction model, internal and external factors affecting the spare part demand are identified;
[0033] The influence degree of internal and external factors on the spare part demand is evaluated;
[0034] The spare part demand is predicted in combination with the influence degree.
[0035] To solve the above technical problems, the application further provides a spare part demand prediction device, which adopts the technical scheme as follows, comprising:
[0036] The classification module is used for classifying the spare parts according to the life cycle and order volume of the spare parts to obtain the categories of the spare parts.
[0037] The first construction module is used for constructing a spare part label system according to the categories of the spare parts.
[0038] The preprocessing module is used for preprocessing the spare part label data according to the spare part label system.
[0039] The second construction module is used for constructing a spare part demand prediction feature according to the preprocessed spare part label data.
[0040] The third construction module is used for constructing a prediction model according to the spare part demand prediction feature.
[0041] The prediction module is used for predicting the spare part demand according to the prediction model.
[0042] To solve the above technical problems, the application further provides a computer device, which adopts the technical scheme as follows, comprising a memory and a processor, the memory stores computer readable instructions, and the processor executes the computer readable instructions to realize the steps of the above-mentioned spare part demand prediction method.
[0043] To solve the above technical problems, the application further provides a computer readable storage medium, which adopts the technical scheme as follows, the computer readable storage medium stores computer readable instructions, and the computer readable instructions are executed by the processor to realize the steps of the above-mentioned spare part demand prediction method.
[0044] Compared with the prior art, the present application has the following beneficial effects: firstly, by classifying according to the life cycle and order quantity of the parts, the enterprise can clearly distinguish different categories of parts such as high demand, medium demand and low demand, which helps the enterprise to identify key parts and prioritize resource allocation; secondly, the construction of the part label system can systematically organize part information, including model, purpose, supplier, etc., providing a basis for subsequent data processing, which helps to realize the standardization and unified management of part information; then, the pre-processing of part label data such as deduplication, cleaning and formatting can ensure data quality and reduce prediction bias caused by data errors; again, based on the pre-processed data, part demand prediction features such as historical demand, seasonal fluctuations and market trends are constructed, which can more comprehensively reflect the internal law of part demand; again, using these features to build prediction models such as time series analysis and machine learning algorithms can achieve accurate prediction of part demand, these models can capture demand changes and improve the timeliness and accuracy of prediction; finally, according to the prediction model, the enterprise can adjust production plans and optimize inventory levels in advance to respond to changes in market demand; which helps to reduce inventory costs, improve production efficiency and enhance the market competitiveness of the enterprise; it has strong reliability, integrates multiple models, takes advantages of each other and increases the reliability of the prediction results; the attributes of the parts are classified and different prediction methods are proposed, which effectively solves the influence of abnormal orders on model prediction and improves the overall prediction effect; considering the actual application scenario, the framework of some prediction models supports the identification and explanation of trends, seasonality and other factors, and for machine learning models, model explanation algorithms and tools can be used to identify feature importance and important influencing factors of prediction. BRIEF DESCRIPTION OF DRAWINGS
[0045] In order to more clearly illustrate the schemes in the present application, the drawings needed in the description of the embodiments of the present application will be briefly introduced as follows. Obviously, the drawings in the following description are some embodiments of the present application, and those skilled in the art can also obtain other drawings according to these drawings without creating any creative labor.
[0046] Figure 1 is a flowchart of an embodiment of the part demand prediction method of the present application;
[0047] Figure 2 is an architecture diagram of an embodiment of the part demand prediction method of the present application;
[0048] Figure 3 is a structural schematic diagram of an embodiment of the part demand prediction device of the present application;
[0049] Figure 4is a structural schematic diagram of one embodiment of the computer device of the present application. DETAILED DESCRIPTION
[0050] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs; the terminology used in the description herein is for describing particular embodiments only and is not intended to be limiting of the application; the description herein and the claims of the application and the above description of the drawings herein, the terms "comprising", "comprises" and "including" are to be construed as not limited; the description herein and the claims of the application and the above description of the drawings herein, the terms "first", "second" and the like are used to distinguish different objects, not to describe a particular sequential order.
[0051] Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase "in an embodiment" in various places in the specification are not necessarily all referring to the same embodiment, nor are they necessarily mutually exclusive of one another.
[0052] In order to better understand the technical scheme of the present application, the technical scheme in the embodiments of the present application will be clearly and completely described below with reference to the drawings.
[0053] It should be noted that the part demand prediction method provided by the embodiments of the present application is generally executed by a server / terminal device, and accordingly, the part demand prediction device is generally arranged in the server / terminal device.
[0054] It should be understood that the number of terminal devices, networks and servers is only illustrative. Any number of terminal devices, networks and servers can be provided according to the implementation needs.
[0055] Example One
[0056] Please refer to Figure 1 and Figure 2 , which show a flow chart of one embodiment of the part demand prediction method of the present application and an architecture diagram of implementing one embodiment of the part demand prediction method of the present application. The part demand prediction method comprises the following steps:
[0057] In step S1, the parts are classified according to the life cycle and order quantity of the parts, to obtain the categories of the parts.
[0058] In the embodiment, the electronic device (e.g., server / terminal device) on which the component demand prediction method runs can receive the component demand prediction request through wired connection or wireless connection. It should be noted that the wireless connection can include, but is not limited to, 3G / 4G / 5G connection, WiFi connection, Bluetooth connection, WiMAXX connection, Zigbee connection, UWB (ultra wideband) connection, and other now known or future developed wireless connection methods.
[0059] In the embodiment, step S1 classifies the components according to the life cycle of the components and the order quantity, and the classification of the components can further include the following steps:
[0060] S11, collect historical spare part demand quantity data of the components.
[0061] The enterprise resource planning (ERP) system contains information such as procurement, inventory, use, and scrap of the components. Through the ERP system, the purchase records of the spare parts in the past period of time can be queried to obtain the historical spare part demand quantity data.
[0062] S12, develop classification standards for stable spare parts and unstable spare parts according to the historical spare part demand quantity data.
[0063] The stable spare parts refer to spare parts with relatively stable demand quantity and small fluctuations, while the unstable spare parts refer to spare parts with large fluctuations in demand quantity and difficult to predict.
[0064] According to the historical spare part demand quantity data, a basic classification method standard can be developed to classify the components.
[0065] The basic classification method standard refers to classifying the components by using the specified order monthly sales median as the division index.
[0066] S13, divide the components into two categories of stable spare parts and unstable spare parts according to the classification standard.
[0067] According to the basic classification method standard, the historical demand quantity of each spare part is used as the division index, for example, the order monthly sales median in the past 36 months is used as the division index, to divide the components into five categories of A, B, C, D, and E.
[0068] Unstable spare parts (E class): considering the life cycle of spare parts changes with the status of the whole vehicle after being put on the market, it is divided into three stages: new parts stage, in-production and discontinued stage, the sales of new parts and discontinued stage have instability, such components usually show that the number of months with sales of 0 within 36 months is too much, the sales change trend is not enough to predict future sales by the job title model, and the time series method is generally used for prediction. Here, the rule is taken as an example with 36 months of data, if the number of months with sales data of 0 is greater than or equal to 24, that is, the number of months with sales in the training data does not meet 12 months of spare parts is unstable.
[0069] Stable spare parts (A, B, C and D class): stable parts show that the number of non-zero sales data is greater than 12 months, and stable parts are divided into 90%, 5%, 3% and 2% of historical order demand ratio.
[0070] It should be noted that in addition to using the basic classification method standard, a clustering classification method can also be used to divide the spare parts by the coefficient of variation (CV) and the average demand interval (ADI).
[0071] The clustering classification method uses the K-shape algorithm to calculate the similarity between different sequences. It uses a new distance definition, so that K-Shape can do both sub-sequence clustering (extract sub-sequences by sliding window, that is, cluster the fragments in a single long time series, which can effectively find frequent patterns and abnormal fragments in long time series) and full sequence clustering.
[0072] The coefficient of variation (CV) and the average demand interval (ADI) are used to divide the spare parts into four categories, for example, according to the percentile:
[0073] Greater than CV 75th percentile Less than or equal to CV 75th percentile Greater than ADI 75th percentile A C Less than or equal to ADI 75th percentile B D
[0074] Here, the coefficient of variation (CV) is used to measure the change in demand over time. The larger the CV value represents the more intense the demand fluctuation, CV = demand standard deviation / demand mean; the average demand interval (ADI) is used to measure the average level of the interval between the relative demand non-zero time window. ADI = total period / demand total period.
[0075] Step S2, according to the category of spare parts, a spare parts label system is constructed.
[0076] In this embodiment, step S2, according to the category of spare parts, a spare parts label system is constructed, which can further include the following steps:
[0077] S21, setting label classification standard.
[0078] Set the label classification criteria, including basic information, policy impulse, replacement parts, exclusive store order, BOM, spare parts sales, holidays, vehicle sales, vehicle maintenance, etc.
[0079] S22, according to the label classification criteria, set the corresponding relationship between the label category and the label attribute, and construct the part label system.
[0080] Under different label categories, the label attributes corresponding to these label categories need to be set, and the part label system is composed of label categories and their label attributes. For example, the part label system constructed can be as shown in the following table:
[0081]
[0082]
[0083] Step S3, according to the part label system, pre-process the part label data.
[0084] In part demand forecasting, part label data is an important source of information. Part label data includes part code, name, specification, supplier information, production date, etc. In order to ensure the accuracy of the forecast, these label data need to be pre-processed.
[0085] In this embodiment, step S3, according to the part label system, pre-processing the part label data can further include the following steps:
[0086] S31, according to the part label system, data cleaning is performed on the part label data.
[0087] For part label data, the factors of outliers may be affected by policy, environment, etc. They do not have meaningful information and will affect the learning of the model and the prediction of future trends.
[0088] Abnormal data can be divided into: missing data, inf or none value; invalid data, affected by policy or environment, the value is suddenly increased or decreased compared with historical performance. Invalid values are screened by combining isolated forests. For missing data and invalid values, the average value of adjacent month sales is used.
[0089] Use functions or algorithms to identify missing values in the data. For example, in R language, you can use the `is.na` function to identify missing values. According to the specific situation, missing values can be handled by deleting, replacing or imputing.
[0090] When the missing values have little effect on the research target, the observation samples or variables containing missing values can be directly deleted. In R language, you can use the `na.omit` function to delete rows containing missing values.
[0091] For numerical variables, the missing values can be replaced by the mean of other numbers under the variable; for non-numerical variables, the median or mode can be used to replace.
[0092] Impute missing values by regression model or multiple imputation algorithm. Regression imputation treats the imputed variable as the dependent variable and other variables as independent variables, and uses regression model for fitting. Multiple imputation generates a complete set of data from a data set containing missing values, and imputes multiple times to produce a random sample of missing values.
[0093] Identify outliers through univariate scatter plot or box plot. In R language, you can use the `dotchart` function to draw a univariate scatter plot and the `boxplot` function to draw a box plot.
[0094] For identified outliers, you need to analyze the possible reasons for the outliers first, and then determine whether to discard or replace them. If the outliers are caused by data entry errors or measurement errors, you can delete or replace them with normal values; if the outliers reflect the real business situation, they should be retained.
[0095] S32, merge and integrate the cleaned part label data from multiple data sources to ensure data consistency and coherence.
[0096] Merge data from different data sources according to the key. For example, in R language, you can use the `merge` function to merge two data frames based on the key.
[0097] Handle homonymy and synonymy problems: In the process of data integration, there may be homonymy and synonymy problems. Homonymy refers to the same attribute name in different data sources but represents different entities, which cannot be used as a key; synonymy refers to different attribute names in different data sources but represent the same entity, which can be used as a key.
[0098] Data integration often causes data redundancy, which may be the same attribute appearing multiple times or repeated due to inconsistent attribute names. For repeated attributes, delete them if they exist.
[0099] S32, reduce the part label data after merging and integrating.
[0100] Data reduction is to reduce the amount of data as much as possible while maintaining the original data, to reduce the impact of invalid and erroneous data on modeling, and to reduce time and storage space.
[0101] Attribute reduction, finding the smallest subset of attributes and determining the probability distribution of the subset close to the probability distribution of the original data. Attribute reduction methods include step-by-step selection (starting from an empty attribute set, selecting a current worst attribute from the original attribute set each time and removing it until the worst attribute cannot be selected or a constraint value is met), decision tree induction (removing attributes that do not appear in the decision tree from the initial set to obtain a better attribute subset), and principal component analysis (using fewer variables to explain most variables in the original data, and transforming variables with high correlation into independent or unrelated variables).
[0102] Numerical reduction, reducing storage and computing costs by reducing data volume. Numerical reduction methods include parametric methods (such as linear regression and multiple regression) and non-parametric methods (such as histograms and sampling).
[0103] Step S4, constructing spare part demand prediction features according to the preprocessed spare part label data.
[0104] In this embodiment, step S4, constructing spare part demand prediction features according to the preprocessed spare part label data can further include the steps of:
[0105] S41, establishing an initial feature set and screening features.
[0106] The potential factors affecting the demand of spare parts are data cleaned and preprocessed to form an initial feature set. These potential factors include the historical sales volume, type (new, seasonal, promotional, regular), region, order quantity, etc. of spare parts.
[0107] Recursive feature elimination, cross-validation, principal component analysis, random forest and other methods are used to screen the initial feature set, and features that have a significant impact on the prediction results are retained.
[0108] The initial feature set includes spare part basic features, sales features, holiday features, repair order data features, new and old part replacement features, and policy data, etc.
[0109] In specific implementation, 5676 individual spare parts of high, medium and low frequency, five flow rates and eight categories are analyzed.
[0110] The spare part basic features can be processed as follows:
[0111] Category features are processed using One-Hot encoding, including flow rate, category, supplier, etc. For example, flow rate data is represented by high, medium and low. After One-Hot encoding, 100 represents high, 010 represents medium and 001 represents low.
[0112] Numeric variables are used directly, such as order quantity, order frequency, delivery frequency, etc.
[0113] For the sales features, the following processing can be done:
[0114] For the aggregated sales, the sales are aggregated by spare part number and month.
[0115] For the sales growth rate, the sales growth rate is calculated for 24 months by part number and month.
[0116] For the periodic sales, the average, median, maximum, and minimum of the window sales are calculated with rolling steps of 3, 6, 9, 12, 15, and 18.
[0117] The relative features include constructing the same period features and historical relative features.
[0118] The fluctuation features include 1, 2, 3, 6, 12, and 24 lagging sales, and the growth rate is calculated.
[0119] The seasonal features include the end-of-quarter surge, end-of-quarter sales trend, and quarterly sales average.
[0120] For the holiday features, the following processing can be done:
[0121] For statutory holidays, One-Hot encoding is used, and for weekdays and rest days, data statistics are used as features.
[0122] The maintenance order data is more advanced or lagging than the sales data, and the overall cycle trend is similar to the sales data, so the feature construction includes: a, periodic features: the average, median, maximum, and minimum of the window sales are calculated with rolling steps of 3, 6, 9, 12, 15, and 18; b, seasonal features, including the end-of-quarter surge, end-of-quarter sales trend, and quarterly sales average; c, relative features, including constructing the same period features and historical relative features.
[0123] The replacement of new and old parts shows that the demand for old parts decreases and the demand for replacement parts increases. Here, the intersection of new and old part sales (new part demand >= old part demand) is added to the historical demand of the new part.
[0124] Policy data generally includes recalls or promotions, etc. According to the given activity start time and end time, the spare part activity feature within the activity period is set to 1, otherwise 0.
[0125] S42, encode the classification features to convert the classification features into numerical features.
[0126] Encode the classification features, such as using One-Hot Encoding or Label Encoding, to convert the classification features into numerical features.
[0127] S43, scaling the numerical features to make different features comparable in numerical value.
[0128] Scaling the numerical features, such as using standardization or normalization methods, to make different features comparable in numerical value.
[0129] S44, combining multiple features to form new features according to business needs.
[0130] Step S44 can capture more complex patterns.
[0131] Step S5, predict features according to the demand of parts, and construct a prediction model.
[0132] The prediction model can be a statistical model, a machine learning model, a deep learning model, etc. When selecting the model, the characteristics of the parts demand data, the accuracy of the prediction, the complexity of the model, etc. need to be considered.
[0133] In this embodiment, step S5, according to the demand of parts, the prediction model can also include the following steps:
[0134] S51, according to the characteristics of the parts demand data and business needs, select a machine learning model.
[0135] For high and medium parts, a high and medium parts prediction model can be selected. The high and medium flow prediction model can include a time series model, a machine learning model and a deep learning model.
[0136] The time series model mainly includes three parts, growth, seasonality and holiday effect:
[0137] y(t)=g(t)+s(t)+h(t)+e(t).
[0138] Where g(t) represents the trend item, which represents the change trend of the time series on the non-periodic, s(t) represents the periodic item, or called seasonal item, generally in weeks or years, h(t) represents the holiday item, which represents the influence of potential non-fixed period holidays in the time series on the predicted value, e(t) is the error term or called the residual term, which represents the fluctuations that the model has not predicted, and obeys the Gaussian distribution.
[0139] The latest versions of machine learning models, including XGBoost, LightGBM, and CatBoost, are suitable for different scenarios. Due to their excellent code structure and API design, they can be easily integrated into applications for consistent and efficient model training and testing. In addition, for specific spare parts, Random Forest and its derivative algorithm, Extreme RF, can be selected to reduce the impact of bias and overfitting.
[0140] Deep learning algorithms, combined with the automotive spare parts scenario, can use time series prediction deep learning algorithms such as LSTM and deep learning algorithms based on Transformer and other frameworks. Here, the Informer and TFT (Temporal Fusion Transformer) models based on the Transformer framework are used. In addition to good prediction accuracy, they can also provide some degree of explanation and probability estimation based on the Attention mechanism.
[0141] For low-flow components, a low-flow prediction model can be selected. The sales trend of low-flow components is intermittent, and here the Croston method is used to separate the actual intervals of demand quantity as 0 and non-0, and exponential smoothing is used for prediction.
[0142] Z(t) = a * X(t) + (1 - a) * Z(t - 1);
[0143] P(t) = β * Q + (1 - β) * P(t - 1);
[0144] M(t) = Z(t) / P(t);
[0145] Where X(t) represents the actual demand in period t, Z(t) is the predicted value of demand in period t, P(t) is the estimated interval in period t, a and β are the corresponding smoothing indices, and Q represents the number of periods since the last actual non-zero demand.
[0146] Recursive prediction and direct prediction models can also be selected based on the characteristics of spare parts demand data and business requirements.
[0147] The advantage of recursive prediction is that it can incorporate the trend item of the time series into the input process to continuously correct the algorithm, but this form consumes a lot of resources.
[0148] Direct prediction is a one-time prediction of multiple periods, ignoring the trend item. For prediction periods of three months or less, recursive prediction is used, and for periods longer than three months, direct prediction is used.
[0149] According to the characteristics of the parts demand data and business needs, an integrated learning prediction model can be selected.
[0150] Integrated learning uses the stacking method, which refers to training a model to combine other individual models. Through stacking, the different characteristics and advantages of the base models can be fully utilized to improve the performance of the overall model.
[0151] S52, train the machine learning model.
[0152] The parts demand data set is divided into training set, validation set and test set. The training set is used for the initial training of the machine learning model, the validation set is used to evaluate the training effect and adjust the parameters of the machine learning model, and the test set is used to finally judge the performance of the machine learning model.
[0153] In the model training phase, select the appropriate training method according to the nature of the problem, such as supervised learning, unsupervised learning, semi-supervised learning, reinforcement learning, transfer learning or deep learning, etc.
[0154] S53, verify the machine learning model.
[0155] Cross-validation method can be used to verify the machine learning model. By dividing the data set into multiple subsets, each time using a different subset as the training set and validation set, repeatedly training and evaluating the model. This can ensure that each data point has the opportunity to be used as a validation set, thereby improving the stability and reliability of the model. Among them, K-fold cross-validation is a mainstream method, that is, the data set is divided into K equal parts, each time selecting one part as the validation set and the remaining parts as the training set.
[0156] Leave-one-out method can also be used to verify the machine learning model. Each time only one data point is left as the validation set, and the remaining data points are used as the training set. This method is suitable for small data sets.
[0157] Hold-Out method can also be used to verify the machine learning model. The entire data set is randomly divided into training set and test set, usually 70% to 80% of the data is used for training, and the remaining part is used for testing. This method is simple and fast.
[0158] It should be noted that when verifying the model, appropriate evaluation indicators also need to be selected. For classification problems, evaluation indicators include accuracy, confusion matrix, precision, recall and F1 score, etc. These indicators can help understand the performance of the model in different aspects.
[0159] Step S6, according to the prediction model, predict the parts demand.
[0160] In this embodiment, step S6, predicting the demand for spare parts according to the prediction model can specifically include the following steps:
[0161] S61, identifying internal and external factors affecting the demand for spare parts according to the prediction model.
[0162] In the prediction process, some internal and external factors are unpredictable, such as natural disasters, policy changes, market emergencies, etc. These factors may have a significant impact on the demand for spare parts. Therefore, these unpredictable factors need to be considered in the prediction results, and corresponding countermeasures need to be developed.
[0163] S62, evaluate the impact of internal and external factors on the demand for spare parts.
[0164] Risk assessment of internal and external factors affecting the demand for spare parts.
[0165] S63, predict the demand for spare parts in combination with the impact.
[0166] In combination with the potential internal and external factors affecting the demand for spare parts and the risk assessment results, develop countermeasures such as increasing inventory, adjusting production plans, etc. to predict the demand for spare parts.
[0167] After considering all predictable and unpredictable factors, the demand for spare parts prediction results needs to be comprehensively judged and the final conclusion is drawn. This step needs to consider the accuracy, reliability, feasibility and other factors of the prediction results, and provide strong support for the enterprise's decision-making.
[0168] The application of the demand prediction results for spare parts is the ultimate goal of the demand prediction work for spare parts. The demand prediction results for spare parts can be applied to production planning, inventory management, supply chain optimization, etc. At the same time, the demand prediction results for spare parts need to be continuously monitored to discover and adjust prediction errors in a timely manner.
[0169] The embodiment is implemented, and the beneficial effects are: first, by classifying according to the life cycle and order quantity of the parts, the enterprise can clearly distinguish different categories of parts such as high demand, medium demand and low demand, and this classification helps the enterprise to identify key parts and thus prioritize resource allocation; second, the part label system is built, which can systematically organize part information, including model, purpose, supplier, etc., providing a basis for subsequent data processing, and helping to realize the standardization and unified management of part information; then, the part label data is preprocessed, such as deduplication, cleaning and formatting, which can ensure data quality and reduce prediction bias caused by data errors; then, based on the preprocessed data, part demand prediction features are constructed, such as historical demand, seasonal fluctuations, market trends, etc., which can more comprehensively reflect the internal law of part demand; then, these features are used to build prediction models, such as time series analysis, machine learning algorithms, etc., which can achieve accurate prediction of part demand, and these models can capture demand changes, improve the timeliness and accuracy of prediction; finally, according to the prediction model, the part demand is predicted, and the enterprise can adjust the production plan in advance and optimize the inventory level to respond to changes in market demand. This helps to reduce inventory costs, improve production efficiency, and enhance the market competitiveness of the enterprise; it is reliable, integrates multiple models, takes the advantages of each model, and increases the reliability of the prediction results; the attributes of the parts are classified, different prediction methods are proposed, and the influence of abnormal orders on model prediction is effectively solved, improving the overall prediction effect; considering the actual application scenario, the framework of some prediction models supports the identification and explanation of trends, seasonality and other factors, and for machine learning models, model explanation algorithms and tools can be used to identify feature importance and important influencing factors of prediction.
[0170] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in a distributed computing environment, in which tasks are performed by remote processing devices connected by a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media, including storage devices.
[0171] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing relevant hardware through computer readable instructions, and the computer readable instructions can be stored in a computer readable storage medium. When the program is executed, it can include the processes of the above-mentioned embodiment methods. Among them, the storage medium can be a non-volatile storage medium such as a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0172] It should be understood that although each step in the flowchart of the accompanying drawings is shown in sequence according to the direction of the arrow, these steps are not necessarily executed in sequence according to the direction of the arrow. Unless otherwise specified herein, the execution of these steps is not strictly limited in sequence, and they can be executed in other orders. Moreover, at least part of the steps in the flowchart of the accompanying drawings can include multiple sub-steps or multiple stages, which are not necessarily executed at the same time, but can be executed at different times, and the execution sequence is not necessarily sequential, but can be alternately executed with at least part of other steps or sub-steps or stages of other steps.
[0173] Example Two
[0174] Further reference Figure 3 , as an implementation of the method shown in the above Figure 1 , the present application provides an embodiment of a component demand prediction device, which corresponds to the method embodiment shown in Figure 1 , and the device can be applied to various electronic devices.
[0175] As shown in Figure 3 , the component demand prediction device 70 of the embodiment includes a classification module 71, a first construction module 72, a preprocessing module 73, a second construction module 74, a third construction module 75, and a prediction module 76. Among them:
[0176] The classification module 71 is configured to classify the components according to the life cycle and order quantity of the components, and obtain the categories of the components;
[0177] The first construction module 72 is configured to construct a component label system according to the categories of the components;
[0178] The preprocessing module 73 is configured to preprocess the component label data according to the component label system;
[0179] The second construction module 74 is configured to construct component demand prediction features according to the preprocessed component label data;
[0180] The third construction module 75 is used to build a prediction model based on the prediction characteristics of component demand;
[0181] The prediction module 76 is used to predict the demand for parts based on the prediction model.
[0182] The beneficial effects of implementing this embodiment are: high reliability, integration of multiple models, leveraging strengths and compensating for weaknesses, increasing the reliability of prediction results; attribute classification for parts, proposing different prediction methods, effectively solving the impact of abnormal orders on model prediction, and improving the overall prediction effect; considering practical application scenarios, the framework of some prediction models supports the identification and interpretation of trends, seasonality and other factors, and for machine learning models, the importance of features and important influencing factors of prediction can be identified through model interpretation algorithms and tools.
[0183] Example Three
[0184] To address the aforementioned technical problems, embodiments of the present invention also provide a computer device. Please refer to [link / reference needed]. Figure 4 , Figure 4 This is a basic structural block diagram of the computer device in this embodiment.
[0185] The aforementioned computer device 8 includes a memory 81, a processor 82, and a network interface 83 that are interconnected via a system bus. It should be noted that only the computer device 8 with components 81, 82, and 83 is shown in the figure; however, it should be understood that it is not required to implement all the shown components, and more or fewer components can be implemented alternatively. Those skilled in the art will understand that the computer device described herein is a device capable of automatically performing numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes, but is not limited to, microprocessors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.
[0186] The aforementioned computer devices can be desktop computers, laptops, handheld computers, and cloud servers, among other computing devices. These devices can facilitate human-computer interaction with users through keyboards, mice, remote controls, touchpads, or voice-activated devices.
[0187] The memory 81 includes at least one type of readable storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., an SD or DX memory, etc.), a random access memory (RAM), a static random access memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the memory 81 can be an internal storage unit of the computer device 8, such as a hard disk or a memory of the computer device 8. In other embodiments, the memory 81 can also be an external storage device of the computer device 8, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the computer device 8. Of course, the memory 81 can also include both the internal storage unit and the external storage device of the computer device 8. In this embodiment, the memory 81 is generally used to store an operating system and various application software installed on the computer device 8, such as computer readable instructions of the part demand prediction method, etc. In addition, the memory 81 can also be used to temporarily store various data that have been output or will be output.
[0188] The processor 82 can be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chip in some embodiments. The processor 82 is generally used to control the overall operation of the computer device 8. In this embodiment, the processor 82 is used to run computer readable instructions or process data stored in the memory 81, such as computer readable instructions of the part demand prediction method.
[0189] The network interface 83 can include a wireless network interface or a wired network interface, and is generally used to establish a communication connection between the computer device 8 and other electronic devices.
[0190] The implementation of this embodiment has the beneficial effects of strong reliability, fusion of multiple models, taking advantages of each other, and increasing the reliability of the prediction results. The attributes of the parts are classified, different prediction methods are proposed, the influence of abnormal orders on model prediction is effectively solved, and the overall prediction effect is improved. Considering the actual application scenario, the framework of some prediction models supports the identification and explanation of trends, seasonality and other factors. For machine learning models, feature importance and important influencing factors of prediction can be identified through model explanation algorithms and tools.
[0191] Example Four
[0192] The application also provides another embodiment, that is, providing a computer readable storage medium, the computer readable storage medium stores computer readable instructions, the computer readable instructions can be executed by at least one processor to make the at least one processor execute the steps of the part requirement prediction method as described above.
[0193] The embodiment has the beneficial effects of strong reliability, fusion of multiple models, taking advantages and making up for shortcomings, and increasing the reliability of the prediction result. The attributes of the parts are classified, different prediction methods are proposed, the influence of abnormal orders on model prediction is effectively solved, and the overall prediction effect is improved. Considering the actual application scenario, the framework of part of the prediction model supports the identification and explanation of trends, seasonality and other factors. For machine learning models, the feature importance and important influencing factors of prediction can be identified through model explanation algorithms and tools.
[0194] Through the above description of the embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment method can be realized by means of software and the necessary general hardware platform, of course, it can also be realized by hardware, but in many cases the former is a better embodiment. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes a plurality of instructions for making a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) execute the various embodiment methods of the present application.
[0195] Obviously, the above-described embodiments are only some of the embodiments of the present application, not all the embodiments, and the preferred embodiments of the present application are given in the drawings, but do not limit the patent scope of the present application. The present application can be realized in many different forms, and conversely, the purpose of providing these embodiments is to make the disclosure of the present application more thorough and comprehensive. Although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art can modify the technical solutions recorded in the foregoing specific embodiments, or make equivalent substitutions for some technical features. Any equivalent structure made by using the contents of the present application specification and drawings, directly or indirectly applied to other related technical fields, is also within the patent protection scope of the present application.
Claims
1. A method of predicting demand for parts, characterized by, The method comprises the following steps: According to the life cycle and order quantity of the spare parts, the spare parts are classified to obtain the categories of the spare parts; According to the categories of the spare parts, a spare part label system is constructed; According to the spare part label system, the spare part label data is preprocessed; According to the preprocessed spare part label data, spare part demand prediction features are constructed; According to the spare part demand prediction features, a prediction model is constructed; for high and medium spare parts, the prediction model comprises a time series model, a machine learning model and a deep learning model; for low flow spare parts, the actual interval of sales demand quantity of 0 and non-0 is separated by using the Croston method, and the prediction is performed in an exponential smoothing manner; or a recursive prediction, a direct prediction model or an integrated learning prediction model is selected as the prediction model; According to the prediction model, the spare part demand is predicted; The step of classifying the spare parts according to the life cycle and order quantity of the spare parts to obtain the categories of the spare parts specifically comprises: Collecting historical spare part demand quantity data of the spare parts; According to the historical spare part demand quantity data, classification standards of stable spare parts and unstable spare parts are formulated; According to the classification standards, the spare parts are divided into two categories of stable spare parts and unstable spare parts; the classification method comprises at least one of the following: (1) Basic classification method: the spare parts are classified by using a specified order month sales median as a division index; (2) Clustering classification method: the similarity between different sequences is calculated by using a K-shape algorithm; (3) Variation coefficient and average demand interval percentile classification method; The step of constructing the spare part label system according to the categories of the spare parts specifically comprises: Setting label classification standards; the label classification standards comprise basic information, policy impulse, replacement part, exclusive store order, BOM, spare part sales, holiday, vehicle sales and vehicle maintenance; According to the label classification standards, a corresponding relationship between label categories and label attributes is set to construct the spare part label system.
2. The method of predicting demand for parts according to claim 1, wherein, The step of preprocessing the spare part label data according to the spare part label system specifically comprises: According to the spare part label system, the spare part label data is cleaned; The cleaned spare part label data from multiple data sources is merged and integrated to ensure the consistency and continuity of the data; The merged and integrated spare part label data is reduced.
3. The method of predicting demand for parts according to claim 1, wherein, The step of constructing the spare part demand prediction features according to the preprocessed spare part label data specifically comprises: An initial feature set is established, and features are screened; The classification features are encoded to convert the classification features into numerical features; The numerical features are scaled to make different features comparable in value; According to business requirements, multiple features are combined to form new features.
4. The method of predicting demand for parts according to claim 1, wherein, The step of constructing the prediction model according to the spare part demand prediction features specifically comprises: According to the characteristics of the spare part demand data and business requirements, a machine learning model is selected; The machine learning model is trained; The machine learning model is verified.
5. The method according to any one of claims 1 to 4, characterized in that, The step of predicting the spare part demand according to the prediction model specifically comprises: According to the prediction model, internal and external factors affecting the demand for spare parts are identified; The influence degree of internal and external factors on the demand for spare parts is evaluated; The demand for spare parts is predicted in combination with the influence degree.
6. A parts demand forecasting device characterized by comprising: It comprises: The classification module is used to classify the spare parts according to the life cycle and order quantity of the spare parts, and obtain the category of the spare parts; the classification module collects historical spare parts demand data, and formulates classification standards for stable spare parts and unstable spare parts according to the historical spare parts demand data, According to the classification standards, the spare parts are divided into two categories: stable spare parts and unstable spare parts; the classification method comprises at least one of the following: (1) Basic classification method: using the specified order monthly sales median as the division index to classify the spare parts; (2) Clustering classification method: using K-shape algorithm to calculate the similarity between different sequences; (3) Variance coefficient and average demand interval percentile classification method; The first construction module is used to construct a spare parts label system according to the category of the spare parts; the first construction module sets label classification standards, sets the corresponding relationship between label categories and label attributes according to the label classification standards, and constructs a spare parts label system; the label classification standards include basic information, policy impulse, replacement parts, exclusive store order, BOM, spare parts sales, holidays, vehicle sales, and vehicle maintenance; The preprocessing module is used to preprocess the spare parts label data according to the spare parts label system; The second construction module is used to construct a spare parts demand prediction feature according to the preprocessed spare parts label data; The third construction module is used to construct a prediction model according to the spare parts demand prediction feature; for high and medium spare parts, the prediction model comprises a time series model, a machine learning model and a deep learning model; for low flow spare parts, the actual interval of sales demand quantity of 0 and non-0 is separated by using the Croston method, and the prediction is performed by using the exponential smoothing method; or a recursive prediction model, a direct prediction model or an integrated learning prediction model is selected as the prediction model; The prediction module is used to predict the demand for spare parts according to the prediction model.
7. A computer device comprising a memory and a processor, wherein the memory stores computer readable instructions, and the processor executes the computer readable instructions to realize the steps of the spare parts demand prediction method according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer readable instructions, and the computer readable instructions are executed by the processor to realize the steps of the spare parts demand prediction method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Demand model construction and demand prediction method of online retailer in big data environment
CN114529318A
Product demand prediction method and device, computer equipment and storage medium
CN115345640A