Defective product number prediction method and electronic equipment

The automatic machine learning system is used to predict the number of defective products, and the order and historical data are used to build a prediction model, which solves the problem of relying on manual experience for defective product prediction in the existing technology, and improves the accuracy of prediction and the intelligence of the process.

CN118628015APending Publication Date: 2024-09-10GUANGZHOU SHIYUAN ELECTRONICS CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310214680.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-07
Publication Date
2024-09-10

AI Technical Summary

Technical Problem

In the existing technology, the prediction of the quantity of defective products relies on the business experience of purchasing personnel, which is less accurate and difficult, leading to performance rate problems and the risk of material sluggishness or default.

Method used

An automatic machine learning system is used to predict the number of defective products based on order data and historical data. Through data processing, feature mining and model optimization, a prediction model is built to reduce the difficulty of prediction and improve accuracy.

Benefits of technology

It improves the accuracy of forecasting the number of defective products, reduces the difficulty of forecasting, reduces the risk of material sluggishness and default, and improves the intelligence and automation of procurement plans.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118628015A
    Figure CN118628015A
Patent Text Reader

Abstract

The embodiment of the invention provides a method for predicting the number of defective products and electronic equipment. The method comprises the steps of obtaining order data of to-be-predicted defective products; and based on the order data, a prediction model in an automatic machine learning system is utilized to obtain the predicted number of defective products. According to the method, after order data of a customer is obtained, the number of defective products is predicted based on product dimensions by utilizing automatic machine learning, the number is used as a preparation loss number of the order data, a purchasing plan can be customized subsequently according to the number of the defective products, and a subsequent factory produces corresponding products based on purchased materials. According to the method, an automatic machine learning scheme is adopted to predict the number of the defective products based on the product dimension, the prediction difficulty of the number of the defective products can be reduced, and the prediction accuracy of the number of the defective products is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of computer application technology, and in particular to a method and electronic device for predicting the number of defective products. Background Art

[0002] For the prediction of the number of defective products, the traditional solution is to split the bill of materials after receiving the customer's order data, obtain the production task list, that is, obtain the minimum unit-level material of the service, and the purchasing staff will purchase materials based on the production task list and send it to the factory for production. Then, the factory uses the materials to produce products. However, due to problems such as process and material quality, defective products may be produced, which cannot meet the delivery requirements of customers and there is a problem of fulfillment rate. For example, a customer places an order for 1,000 TV boards, and finally arranges the factory to complete the production and must deliver 1,000 TV boards to the customer. However, due to problems such as process and material quality, the factory may produce defective boards with missing functions or rough appearance during the production process, that is, losses will occur during the factory production process. For example, if only 1,000 TV boards are produced, 1,000 TV boards cannot be delivered to customers due to losses during the factory production process. Although the cost of defective products produced by the factory is borne by the factory, it cannot deliver enough boards to customers on time, resulting in breach of contract. At this time, additional orders can only be placed to meet customer needs, which has a certain time lag problem.

[0003] To solve the problem of fulfillment rate, currently, procurement personnel will predict the number of defective products based on the production task list and business experience, and purchase materials based on the predicted number of defective products to reserve for the loss of defective products produced during the production process. However, such a process plan is extremely dependent on the business experience of procurement personnel. Different procurement personnel have different procurement styles. For conservative procurement personnel, in order to meet the fulfillment rate requirements, the number of defective products is predicted to be large, and more materials may be purchased, causing material stagnation problems; for aggressive procurement personnel, in order to reduce material stagnation, the number of defective products is predicted to be small, and as little material as possible will be purchased during procurement, resulting in a low fulfillment rate. It can be seen that the manual method of predicting defective products is difficult and has low accuracy. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide a method and electronic device for predicting the number of defective products, which predicts the number of defective products based on an automatic machine learning system, thereby reducing the difficulty of prediction and improving accuracy.

[0005] In order to solve the above technical problems, a technical solution adopted in the implementation mode of the present application is: to provide a method for predicting the number of defective products, the method comprising: obtaining order data of defective products to be predicted; based on the order data, using the prediction model in the automatic machine learning system to obtain the predicted number of defective products.

[0006] In some embodiments, the method further includes: obtaining the actual required quantity of parts corresponding to the order data based on the predicted quantity.

[0007] In some embodiments, the method further includes: obtaining historical order data; and using the historical order data to train the automatic machine learning system to obtain the prediction model.

[0008] In some embodiments, the use of the historical order data to train the automatic machine learning system to obtain the prediction model includes: the automatic machine learning system obtains the historical order data, and processes the historical order data to obtain processed historical order data; the automatic machine learning system performs data feature mining on the processed historical order data to obtain feature data; the automatic machine learning system obtains basic modules and builds at least one model based on the basic modules; the automatic machine learning system uses the feature data to optimize and evaluate each of the models to obtain the prediction model.

[0009] In some embodiments, the processing of the historical order data to obtain the processed historical order data includes: the automatic machine learning system performing data cleaning, data integration and data splitting on the historical order data to obtain the processed historical order data.

[0010] In some embodiments, the automatic machine learning system performs data feature mining on the processed historical order data to obtain feature data, including: the automatic machine learning system performs feature construction and feature selection on the processed historical order data to obtain the feature data.

[0011] In some embodiments, the base module includes a traditional machine learning module and / or a deep learning module.

[0012] In some embodiments, the automatic machine learning system uses the feature data to optimize and evaluate each of the models to obtain the prediction model, including: the automatic machine learning system uses the feature data to optimize the parameters of each of the models, and evaluates each of the models based on the regression evaluation index to obtain the prediction model.

[0013] In a second aspect, an embodiment of the present application provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute a method as described in any one of the methods of the first aspect.

[0014] In a third aspect, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the method described in the first aspect above.

[0015] In a fourth aspect, an embodiment of the present application further provides a computer program product, wherein the computer program product comprises a computer program stored on a computer-readable storage medium, wherein the computer program comprises program instructions, and when the program instructions are executed by a computer, the computer executes the method described in the first aspect above.

[0016] Compared with the prior art, the beneficial effect of the present application is as follows: Different from the prior art, the embodiment of the present application provides a method and electronic device for predicting the number of defective products, the method comprising: obtaining order data of defective products to be predicted; based on the order data, using the prediction model in the automatic machine learning system to obtain the predicted number of defective products. In this method, after obtaining the customer's order data, automatic machine learning is used to predict the number of defective products based on the product dimension, which is used as the preliminary loss quantity of the order data. The subsequent purchase plan can be customized according to the number of defective products, and the subsequent factory produces the corresponding products based on the purchased materials. The method adopts an automatic machine learning solution to realize the prediction of the number of defective products based on the product dimension, which can reduce the difficulty of predicting the number of defective products and improve the accuracy of predicting the number of defective products. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements / modules and steps with the same reference numerals in the drawings are represented as similar elements / modules and steps. Unless otherwise specified, the figures in the drawings do not constitute proportional limitations.

[0018] Figure 1 It is a flowchart of a method for predicting the number of defective products provided in an embodiment of the present application;

[0019] Figure 2 This is a partial flow chart of a method for predicting the number of defective products provided in an embodiment of the present application;

[0020] Figure 3 It is a partial flow chart of another method for predicting the number of defective products provided in an embodiment of the present application;

[0021] Figure 4 This is a method provided by the embodiment of the present application. Figure 3 Schematic diagram of the method flow of step S20;

[0022] Figure 5It is a schematic diagram of a calculation structure of a long short-term memory network provided in an embodiment of the present application;

[0023] Figure 6 It is a schematic diagram of a calculation structure of a gated recurrent unit provided in an embodiment of the present application;

[0024] Figure 7 This is a method provided by the embodiment of the present application. Figure 4 Schematic diagram of the method flow of step S21;

[0025] Figure 8 This is a method provided by the embodiment of the present application. Figure 4 Schematic diagram of the method flow of step S22;

[0026] Fig. 9 This is a method provided by the embodiment of the present application. Figure 4 Schematic diagram of the method flow of step S24;

[0027] Fig.10 It is a structural block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0028] The present application is described in detail below in conjunction with specific embodiments. The following embodiments will help those skilled in the art to further understand the present application, but do not limit the present application in any form. It should be noted that, for those of ordinary skill in the art, several variations and improvements can also be made without departing from the concept of the present application. These all belong to the protection scope of the present application.

[0029] For ease of understanding of the present application, the present application is described in more detail below in conjunction with the accompanying drawings and specific embodiments. Unless otherwise defined, all technical and scientific terms used in this specification have the same meaning as those generally understood by those skilled in the art of the present application. The terms used in the specification of the present application are only for the purpose of describing specific embodiments and are not used to limit the present application. The term "and / or" used in this specification includes any and all combinations of one or more related listed items.

[0030] It should be noted that, if there is no conflict, the various features in the embodiments of the present application can be combined with each other, all within the scope of protection of the present application. In addition, although the functional module division is performed in the device schematic, in some cases, the module division can be different from that in the device. In addition, the words "first", "second", etc. used herein do not limit the data and execution order, but only distinguish the same items or similar items with basically the same functions and effects.

[0031] As mentioned above, in the prior art, manual methods are often used to predict the number of defective products. In this method, it relies on the experience of purchasing personnel, has poor accuracy, and is difficult to predict.

[0032] Based on this, the present application proposes a method and electronic device for predicting the number of defective products. In this method, after obtaining the customer's order data, automatic machine learning is used to predict the number of defective products based on the product dimension, and this is used as the preliminary loss quantity of the order data. Subsequently, the procurement plan can be customized based on the number of defective products, and the subsequent factory produces corresponding products based on the purchased materials. This method uses an automatic machine learning solution to realize the prediction of the number of defective products based on the product dimension. It has a large granularity, can reduce the difficulty of predicting the number of defective products, and improve the prediction accuracy of the number of defective products. In addition, this method is highly portable and can be easily applied to the prediction of defective products in other scenarios, thereby improving the application scenarios.

[0033] In the first aspect, the present application embodiment provides a method for predicting the number of defective products. Figure 1 , the prediction method of the number of defective products includes:

[0034] Step S100: Obtaining order data of defective products to be predicted;

[0035] Step S200: Based on the order data, the prediction model in the automatic machine learning system is used to obtain the predicted number of defective products.

[0036] Order data includes information such as product name, quantity of required products, order time, delivery time, etc. Automatic machine learning system can automate the process of applying machine learning to real-world problems. It can automatically complete data collection, data preprocessing, feature engineering, model generation, model evaluation and optimization. After training, it can obtain a prediction model.

[0037] After obtaining the customer's order data, the order data can be input into the automatic machine learning system. After obtaining the order data, the automatic machine learning system will use the prediction model to make predictions and finally output the predicted number of defective products corresponding to the order data.

[0038] In this method, after obtaining the customer's order data, automatic machine learning is used to predict the number of defective products based on the product dimension, which is used as the preliminary loss quantity of the order data. The purchase plan can be customized according to the number of defective products, and the factory produces the corresponding products based on the purchased materials. This method uses an automatic machine learning solution to predict the number of defective products based on the product dimension. It has a large granularity, can reduce the difficulty of predicting the number of defective products, and improve the accuracy of predicting the number of defective products. In addition, this method is highly portable and can be easily applied to the prediction of defective products in other scenarios, improving the application scenarios.

[0039] In some of these examples, see Figure 2 , the method further comprises:

[0040] Step S300: According to the predicted quantity, the actual required quantity of parts corresponding to the order data is obtained.

[0041] After obtaining the predicted number of defective products corresponding to the order data, the predicted number is added to the order data to obtain the actual work order required; then, the products in the work order are split through the Bill of Material (BOM) system in the Enterprise Resource Planning (ERP). The BOM system can obtain the specific physical materials according to the pre-set allocation rules, that is, the required quantity of the minimum unit-level material, as shown in Table 1 below.

[0042] Table 1 Partial BOM list of a TV board

[0043]

[0044] Next, select the specific material code according to the BOM list to form a production task list, select the supplier name that can provide the corresponding material, and evaluate the cost and delivery time. Some materials are replaceable, such as the switch diode material in Table 1. The three are replaceable, so just choose one. Then, send the production task list to the factory for production, and the factory will produce the corresponding products based on the purchased materials.

[0045] In the traditional process, the products in the customer's order data are directly split into BOMs to obtain specific materials. Then, the purchasing staff makes a loss reserve based on the material dimension and purchases from the supplier. Such a process is extremely dependent on the business experience of the purchasing staff. In the embodiment of the present application, a loss reserve is made directly based on the dimension of the order product. After the predicted number of defective products is added to the order, the ERP BOM is split to obtain the material. There is no need to make a loss reserve for the material dimension. The purchasing staff directly purchases the materials based on the BOM split. There is no need for the purchasing staff to make a loss reserve based on business experience, thereby improving the accuracy of the prediction.

[0046] In some of these examples, see Figure 3 , the method further comprises:

[0047] Step S10: Obtain historical order data.

[0048] Historical order data refers to historical order data in the product dimension, which mainly includes product attribute information and product material information, brief information about the factory used to produce the product, historical order information of the product, etc. The historical order information includes product name, quantity of the product required, order time, delivery time and other information.

[0049] Step S20: Use historical order data to train the automatic machine learning system to obtain a prediction model.

[0050] The automatic machine learning system includes a data preparation module, a feature engineering module, a model generation module, and a model evaluation and optimization module. Then, the automatic machine learning system is trained using the historical order data to obtain a prediction model.

[0051] In conventional machine learning algorithms, data scientists or professional modelers are required to manually perform feature engineering, feature screening and model selection based on modeling experience and understanding of business scenarios, and then determine the features and models in the scenario. Due to the reliance on the modeling experience of data scientists and modelers, their understanding of specific businesses, and a large number of manual experiments, the workload is large, and it is difficult to ensure the output of a reliable and stable model. In the embodiment of the present application, the automatic machine learning system integrates the various steps of the modeling process, and is an automated process. Compared with conventional machine learning algorithms, it can be easily migrated to other defective product prediction scenarios, such as PCB incoming materials, whole machine materials, etc., and can be applied to scenarios with more complex businesses and more messy data, and the obtained prediction model has higher reliability and stability.

[0052] In addition, compared with the traditional technology of determining the predicted number of defective products based on logical rules, this application adopts an automatic machine learning system that includes multiple modules such as data preparation, feature engineering, model generation, and model evaluation and optimization. Each model actively interacts with each other and can learn the optimal model structure and parameters by itself, improving the prediction effect and generalization ability. It also breaks through the limitations and constraints of logical rules and integrates various modules into one system, allowing business personnel who do not have professional knowledge of data science to easily complete the construction of the model and output the results, thereby reducing labor costs, shortening iteration speed, and being able to solve business problems faster, alleviating the sluggish costs caused by multiple reserves or the risk of default caused by insufficient reserves, and improving the intelligence and automation of the process.

[0053] In some of these examples, see Figure 4 , step S20 comprises:

[0054] Step S21: The automatic machine learning system obtains historical order data, and processes the historical order data to obtain processed historical order data.

[0055] Specifically, after obtaining the historical order data, the data preparation module in the automatic machine learning system will process the data and configure the data collection tasks, including the collected order data, collection events, collection cycles, etc.

[0056] Step S22: The automatic machine learning system performs data feature mining on the processed historical order data to obtain feature data.

[0057] Specifically, when the feature engineering module in the automatic machine learning system performs data feature mining, it determines the various features that affect the number of defective products, analyzes the degree of influence of each feature on the number of defective products, and sorts each feature according to the degree of influence in order to determine the features to be included in the model training. Feature data includes features and work orders under each feature, the number of defective products corresponding to each work order, etc.

[0058] Step S23: The automatic machine learning system obtains the basic modules and builds at least one model based on the basic modules.

[0059] Specifically, the model generation module will automatically learn the network structure of the model. The network structure is the combination of basic modules. Through the free combination of basic modules and multiple iterative learning of data, a complex model with better results can be output eventually.

[0060] In some of the embodiments, the basic module includes a traditional machine learning module and / or a deep learning module. Among them, the traditional machine learning model module includes a support vector machine, a decision tree, a gradient boosting tree model, etc., and the deep model module includes a one-dimensional convolutional neural network and a recurrent neural network, etc. The recurrent neural network can be a long short-term memory network (LongShort Term Memory, LSTM), a gated recurrent unit (Gated Recurrent Unit, GRU), etc. For example, the network structure of the constructed model can be a network structure composed of a temporal convolutional neural network, a LSTM, and a multi-layer perceptron (Multi-Layer Perceptron, MLP) in sequence.

[0061] Among them, for the gradient boosting tree model, its input is:

[0062] T={(x 1 ,y 1 ),(x 2 ,y 2 ),...,(x N ,y N )};

[0063] Among them, x 1 ,...,x N is the work order in the feature data, y 1 ,...,y N is the number of defective products corresponding to each work order. The output of the model is the boosting tree f M (x).

[0064] The training process is as follows: Let f 0(x) = 0;

[0065] Next, for m=1, 2, ..., M, the residual is calculated according to the following formula:

[0066] r mi =y i -f m-1 (x i ),i=1,2,...,N,

[0067] M is the number of trees or the number of trainings, which can be set according to actual needs. Then, a regression tree is obtained by learning the fitting residuals:

[0068]

[0069] Next, update the boosted tree to:

[0070]

[0071] Finally, we get the gradient boosting tree for the regression problem:

[0072]

[0073] LSTM is a typical time series model that is widely used in industry. Figure 5 , LSTM takes the input X of the current time step t The hidden state H of the previous time step t-1 As data is input into the long short-term memory network gate, it will pass through three fully connected layers with sigmoid activation function. The sigmoid function is:

[0074]

[0075] Among them, the input gate I t 、Forget Gate F t and output gate O t The values ​​are:

[0076] I t =σ(X t W xi +H t-1 W hi +b i );

[0077] F t =σ(X t W xf +H t-1 W hf +b f );

[0078] Ot =σ(X t W xo +H t-1 W ho +b o );

[0079] The sigmoid function controls the values ​​of the above three gates between (0, 1), where the weight parameter W xi , W xf , W xo ∈R d×h , weight parameter W hi , W hf , W ho ∈R h×h , deviation parameter b i , b f , b o ∈R 1×h , h is the number of hidden units, and d is the number of inputs. In addition, the calculation of the candidate memory gate is similar to the calculation of the above three gates, except that the tanh function is used as the activation function. The tanh function is:

[0080]

[0081] The value range of the tanh function is (-1, 1), and the formula of the candidate memory gate is as follows:

[0082]

[0083] The weight parameter W in the above expression xc ∈R d×h , weight parameter W hc ∈R h×h , deviation parameter b c ∈R 1×h .

[0084] The mechanism of the memory unit is to control input and forget (or skip), where the input gate I t Control how much of the New data, forget gate F t Control how many old memory cells The calculation formula of the memory unit is as follows:

[0085]

[0086] Among them, ⊙ represents the element-wise product operation between two vectors.

[0087] In LSTM, the hidden state H t is a gated version of the tanh of the memory unit, ensuring that H tThe value of is between (-1, 1), the hidden state H t The calculation formula is as follows:

[0088] H t = t ⊙tanh( t );

[0089] If the output gate O t Close to 1, all memory information can be effectively passed to the prediction part, and when the output gate O t When it is close to 0, only all the information in the storage unit is retained, and the next step of calculation is not required. From the above content, we can know that there is a gate mechanism inside LSTM, in which the input gate I t Select which current information to input, forget gate F t Selecting which past information to forget can solve the long-term dependency problem. However, in reality, LSTM captures sequence information step by step, and its performance on long sequence problems will gradually decay as the step length increases, making it difficult to retain all useful information.

[0090] GRU is a typical time series model, which is widely used in industry. Figure 6 The main difference between GRU and ordinary recurrent neural networks is that GRU supports hidden state gating, which means that the model has a special mechanism to determine when to update the hidden state and when to reset the hidden state. The inputs of the reset gate and update gate in GRU are both the input X of the current time step. t and the hidden state H at the previous time step t-1 The outputs of the two gates are given by two fully connected layers containing sigmoid activation functions.

[0091] For time step t, assume the input is a mini-batch X t ∈R n×d , the number of samples is n, the number of features is d, and the hidden state H at the previous time step t-1 t-1 ∈R n×h , the number of hidden units is h, then reset gate R t ∈R n×h and update gate Z t ∈R n×h The calculation formula is as follows:

[0092] R t =σ(X t W xr +H t-1 W hr +b r );

[0093] Z t=σ(X t W xz +H t-1 W hz +b fz );

[0094] Weight parameter W xr ,W xz ∈R d×h , weight parameter W hr ,W hz ∈R h×h , bias parameter b r ,b z ∈R 1×h .

[0095] Next, reset gate R t The conventional hidden state update mechanism is integrated to obtain the candidate hidden state at time step t The weight parameter W xh ∈R d×h , weight parameter W hh ∈R h×h , bias parameter b h ∈R 1×h , the symbol ⊙ is element-wise multiplication, and the tanh activation function keeps the value of the candidate hidden state between (-1, 1). The calculation formula is as follows:

[0096]

[0097] R in the above formula t With H t-1 The element multiplication can reduce the impact of the historical state. When the reset gate R t When the element in the reset gate is close to 0, the candidate hidden state becomes X. t The result of the multilayer perceptron is taken as input, so the pre-existing hidden states are reset to the default values.

[0098] Finally, based on the H t-1 and the new candidate hidden state To determine the new hidden state H t ∈R n×h , update gate Z t Just need to t-1 and Make a convex combination of elements between them, and finally get the update formula of GRU:

[0099]

[0100] When updating gate Z tWhen it is close to 1, the hidden state H t Tend to keep the old state H at time t-1 t-1 , this time from X t The information of is basically filtered, thus effectively skipping the time step t in the dependency chain; when the update gate Z t When it is close to 0, the hidden state H t Tends to be close to the candidate hidden state

[0101] The structural characteristics of GRU help to deal with the gradient vanishing problem in recurrent neural networks, and can better capture the sequence dependency problem with long time step distances. In short, the reset gate helps to capture short-term dependencies in the sequence; the update gate helps to capture long-term dependencies in the sequence.

[0102] The calculation method of each basic module can refer to the existing technology, and there is no need to stick to the limitations in this embodiment.

[0103] Step S24: The automatic machine learning system uses the feature data to optimize and evaluate each model to obtain a prediction model.

[0104] The model evaluation and optimization module in the automatic machine learning system does not exist independently, but interacts and iterates with the model generation module and feature engineering module in the previous part.

[0105] Among them, the model evaluation and optimization module can screen the feature data and select the optimal feature data for training according to the feature importance. It can be understood that the larger the feature importance value of a feature is, the greater the correlation between the feature and the number of defective products is, and the feature should be selected first.

[0106] For example, in the gradient boosting tree model, common efficient implementations include Xgboost, LightGBM, and Catboost. These three implementations all have built-in methods for calculating feature importance, which can be used to screen feature data. At the same time, in-depth mining can also be carried out on some important features.

[0107] Specifically, in the gradient boosting tree model, when screening features, you can first use LightGBM (or Xgboost, Catboost) to train a model Model1 based on the feature data obtained by feature engineering, and get the feature importance of each feature of Model1; then, randomly shuffle the number of defective products, and retrain the model based on the number of defective products after random shuffling, and get the feature importance of Model2 and each feature of Model2; then, combine the feature importance of Model1 and the feature importance of Model2, and calculate the ratio rate = Model2 feature importance / Model1 feature importance. If the ratio rate is too large, it means that the feature is more related to the number of defective products after random shuffling, and has a weaker correlation with the original number of defective products. The feature can be considered as noise and removed. If the ratio rate is too small, it means that the feature is more related to the original number of defective products than the number of defective products after random shuffling, so it is retained.

[0108] Furthermore, the number of defective products, i.e., Label, can be shuffled multiple times, and the average of the feature importance of each model can be taken to calculate the ratio, thereby reducing the impact of random factors. In this embodiment, when the gradient boosting tree model is selected, further feature derivation and feature screening based on feature importance will be performed based on important features, and better features can be selected in the end. In practical applications, other suitable existing technologies can also be used to screen features.

[0109] In addition, when automatic machine learning selects one of the models, the model evaluation and parameter optimization module will iteratively search based on the model parameters and network structure, evaluate and select the optimal model parameters and network structure until all models are tuned, and then evaluate each model to finally obtain the optimal prediction model.

[0110] Compared with the technology using linear model prediction algorithm, in this embodiment, the various modules of the automatic machine learning system are interactively learned to learn the optimal model structure and parameters. The technicians need to analyze the data and mine the potential model of the data, which can improve the efficiency and prediction effect. Compared with the technology of time series decomposition, time series decomposition only uses time as an influencing factor and does not consider the influence of other factors. In this embodiment, feature construction and feature screening can be automated, and more features are constructed, which can improve the robustness and generalization of the model.

[0111] In some of these examples, see Figure 7 , process the historical order data to obtain the processed historical order data, including:

[0112] Step S211: The automatic machine learning system performs data cleaning, data integration and data splitting on the historical order data to obtain processed historical order data.

[0113] Specifically, the data preparation module in the automatic machine learning system will clean the historical order data, such as deleting duplicate data, removing irrelevant or erroneous data, and filtering out noise data.

[0114] Data integration refers to two or more orders that produce the same version but have a small order quantity. To improve factory efficiency, they can be combined into the same work order for production. For example, if there are two orders order_id1 and order_id2, with order quantities of 530 pieces and 470 pieces respectively, the two order data will be combined into one work order mo_id1, and the work order quantity is the sum of the two order quantities.

[0115] Data splitting means that within an order with a large quantity, the order can be split due to different time requirements. For example, the order quantity of order_id3 is 3,000 pieces, but the time requirements are different, 1,200 pieces must be delivered within 1 month, and the other 1,800 pieces must be delivered within 3 months, then the order order_id3 can be split into two work orders mo_id3 and mo_id4, with work order data of 1,200 pieces and 1,800 pieces respectively.

[0116] In this embodiment, by pre-processing the historical order data, the timeliness and integrity of the processed historical order data can be guaranteed, thereby improving the accuracy of subsequent model training.

[0117] In some of these examples, see Figure 8 , step S22 comprises:

[0118] Step S221: The automatic machine learning system performs feature construction and feature selection on the processed historical order data to obtain feature data.

[0119] After obtaining the processed historical order data, the feature engineering module can automatically construct more derived features from the basic data, increase the data and feature expression capabilities, and complete the feature construction. Among them, the dimension of the feature can be the factory, product, time, supplier, statistical value, etc. of the product, and the statistical value can include the sum, average, variance, etc. For example, the feature data can be the total number of defective products produced by Factory A for the TV board in the past one month, the total number of defective products produced by Factory A for the past two months, and the total number of defective products produced by Factory A for the past three months. The specific construction method can refer to the existing technology and is not limited here.

[0120] After completing the feature construction, it is necessary to screen the features and input more important features into the model for training to filter out noise features. Specifically, on the one hand, whether to enter the model training can be determined based on whether the feature diverges. If it does not diverge, it will not enter the model for training. It is understandable that if a feature does not diverge, for example, the variance is close to 0, which means that there is basically no difference in the number of defective products on this feature, then this feature may not participate in subsequent model training. On the other hand, whether to enter the model training can be determined based on the correlation between the feature and the target. If the correlation exceeds a certain threshold, the model can be entered for training. It is understandable that features with high correlation with the target should be given priority for training.

[0121] In the method provided in the embodiment of the present application, the feature engineering module in the automatic machine learning system has built-in feature construction and feature selection methods, which can improve the accuracy of the prediction model obtained by subsequent training.

[0122] In some of these examples, see Fig. 9 , step S24 comprises:

[0123] Step S241: The automatic machine learning system optimizes the parameters of each model using the feature data, and evaluates each model based on the regression evaluation index to obtain a prediction model.

[0124] Specifically, after the model generation module constructs the model, the model evaluation and optimization module optimizes the training parameters in each model one by one to obtain each optimized model. Then, the model evaluation and optimization module evaluates each optimized model according to the regression evaluation index to obtain the prediction model. Specifically, the regression evaluation index includes at least one of the average error index, the mean absolute error index, and the mean absolute percentage error index.

[0125] In the embodiment of the present application, each model in the automatic machine learning system actively interacts with each other and can learn the optimal model structure and parameters by itself, thereby improving the prediction effect and generalization ability.

[0126] In a second aspect, the present application also provides an electronic device, see Fig.10 , which shows that it is possible to execute Figures 1 to 4 , Figures 7 to 9 The hardware structure of the electronic device of the prediction method.

[0127] The electronic device includes: at least one processor 110; and a memory 120 connected to the at least one processor 110 for communication. Fig.10 The memory 120 stores instructions that can be executed by at least one processor 110, and the instructions are executed by at least one processor 110 so that at least one processor 110 can perform the above Figures 1 to 4 , Figures 7 to 9 The processor 110 and the memory 120 may be connected via a bus or other means. Fig.10 The example of connecting through bus is taken in the following.

[0128] The memory 120 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules, such as program instructions / modules corresponding to the method in the embodiment of the present application. The processor 110 executes various functional applications and data processing of the server by running the non-volatile software programs, instructions and modules stored in the memory 120, that is, implements the prediction method in the above method embodiment.

[0129] The memory 120 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and applications required for at least one function; the data storage area may store data created according to the use of the prediction device, etc. In addition, the memory 120 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 120 may optionally include a memory remotely arranged relative to the processor 110, and these remote memories may be connected to the electronic device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0130] One or more modules are stored in the memory 120, and when executed by one or more processors 110, the prediction method in any of the above method embodiments is executed, for example, the prediction method described above is executed. Figures 1 to 4 , Figures 7 to 9 The prediction method steps.

[0131] The above product can execute the prediction method provided in the embodiment of the present application, and has the functional modules and beneficial effects corresponding to the execution method. For technical details not fully described in this embodiment, please refer to the prediction method provided in the embodiment of the present application.

[0132] The present application also provides a non-volatile computer-readable storage medium, which stores computer-executable instructions. The computer-executable instructions are executed by one or more processors, for example, to execute the above-described Figures 1 to 4 , Figures 7 to 9 The prediction method steps.

[0133] The present application also provides a computer program product, including a computer program stored on a non-volatile computer-readable storage medium, wherein the computer program includes program instructions, and when the program instructions are executed by a computer, the computer executes the prediction method in any of the above method embodiments, for example, executing the above described Figures 1 to 4 , Figures 7 to 9 The steps of the prediction method.

[0134] It should be noted that the device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0135] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a general hardware platform, and of course, by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions to use at least one computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiment.

[0136] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Under the concept of the present application, the technical features in the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other changes in different aspects of the present application as described above, which are not provided in detail for the sake of simplicity. Although the present application has been described in detail with reference to the aforementioned embodiments, a person of ordinary skill in the art should understand that the technical solutions described in the aforementioned embodiments can still be modified, or some of the technical features can be replaced by equivalents. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for predicting the number of defective products, characterized in that: include: Obtain order data of defective products to be predicted; Based on the order data, the prediction model in the automatic machine learning system is used to obtain the predicted number of defective products.

2. The method for predicting the number of defective products according to claim 1, characterized in that: The method further comprises: According to the predicted quantity, the actual required quantity of parts corresponding to the order data is obtained.

3. The method for predicting the number of defective products according to claim 1 or 2, characterized in that: The method further comprises: Get historical order data; The automatic machine learning system is trained using the historical order data to obtain the prediction model.

4. The method for predicting the number of defective products according to claim 3, characterized in that: The step of training the automatic machine learning system using the historical order data to obtain the prediction model includes: The automatic machine learning system acquires the historical order data, and processes the historical order data to obtain processed historical order data; The automatic machine learning system performs data feature mining on the processed historical order data to obtain feature data; The automatic machine learning system obtains a basic module and builds at least one model based on the basic module; The automatic machine learning system uses the feature data to optimize and evaluate each of the models to obtain the prediction model.

5. The method for predicting the number of defective products according to claim 4, characterized in that: The processing of the historical order data to obtain the processed historical order data includes: The automatic machine learning system performs data cleaning, data integration and data splitting on the historical order data to obtain the processed historical order data.

6. The method for predicting the number of defective products according to claim 4, characterized in that: The automatic machine learning system performs data feature mining on the processed historical order data to obtain feature data, including: The automatic machine learning system performs feature construction and feature selection on the processed historical order data to obtain the feature data.

7. The method for predicting the number of defective products according to claim 4, characterized in that: The basic module includes a traditional machine learning module and / or a deep learning module.

8. The method for predicting the number of defective products according to claim 4, characterized in that: The automatic machine learning system optimizes and evaluates each of the models using the feature data to obtain the prediction model, including: The automatic machine learning system optimizes the parameters of each model using the feature data, and evaluates each model based on the regression evaluation index to obtain the prediction model.

9. An electronic device, characterized in that: include: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can perform the method according to any one of claims 1 to 8.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the method according to any one of claims 1 to 8.