A small sample quality prediction method based on meta-learning

By training and optimizing the XGBoost regression model under the meta-learning framework, the difficulty in quality prediction caused by small sample data is solved, accurate quality prediction and intelligent adjustment of process parameters of small sample products are achieved, and production efficiency and quality control are improved .

CN118468040BActive Publication Date: 2024-12-03NANJING UNIV OF AERONAUTICS & ASTRONAUTICS

Patent Information

Application Number
CN202410724493.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-05
Publication Date
2024-12-03
Estimated Expiration
2044-06-05

AI Technical Summary

Technical Problem

The prior art cannot effectively predict the processing quality of the small sample data volume, resulting in poor performance in the face of new data or new tasks and lack of adaptability.

Method used

Using a small sample quality prediction method based on meta-learning, by obtaining the data sets in the processing process of CNC machine tools, dividing the training sets and test sets, using XGBoost regression algorithm to build a quality prediction model, and training and fine-tuning are performed under the meta-learning framework to optimize Model parameters to achieve quality prediction of small sample data.

Benefits of technology

Accurate prediction of the quality of small sample products is achieved, possible problems that may arise during the processing process are discovered in advance, intelligent adjustment of process parameters is supported, and overall efficiency and quality assurance of the production process are enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118468040B_ABST
    Figure CN118468040B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of product quality prediction, and solves the technical problem that the prior art cannot correctly predict the processing quality of a small number of samples, and in particular relates to a small sample quality prediction method based on meta-learning, the method comprising the following steps: obtaining a data set containing processing parameter values ​​of a CNC machine tool during the processing process, and dividing the data set into a training set and a test set in proportion; according to the number of tasks n of the CNC machine tool during the processing process, the processing parameter values ​​corresponding to each task in the training set are divided into a support set and a query set to form a training data set. The present invention can not only effectively predict product quality, but also discover problems that may occur in the processing process in advance, realize quality control, and avoid the production of defective products. In addition, this method also supports the intelligent adjustment of process parameters, and enhances the overall efficiency and quality assurance of the production process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of product quality prediction, and in particular to a small sample quality prediction method based on meta-learning. Background Art

[0002] The selection of processing parameters is an important part of CNC processing. Machine learning has excellent learning and reasoning capabilities in certain data sets or scenarios, especially the learning and summarization capabilities of empirical data sets far exceeding the human brain. In the field of mechanical processing, researchers use artificial intelligence technology to analyze and study CNC processing quality, which can detect possible problems in processing in advance, control quality, avoid defective products, and provide support for the intelligentization of process parameters.

[0003] Because the sample data of some products is small and cannot meet the data requirements of the machine learning model, the model's adaptability cannot be achieved. This may cause the model to perform poorly when faced with new data or new tasks because it lacks sufficient information to make accurate predictions or decisions. Summary of the invention

[0004] In view of the shortcomings of the prior art, the present invention provides a small sample quality prediction method based on meta-learning, which solves the technical problem that the prior art cannot correctly predict the processing quality of a small number of samples.

[0005] To solve the above technical problems, the present invention provides the following technical solution: a small sample quality prediction method based on meta-learning, the method comprising the following steps:

[0006] S1, obtaining a data set containing processing parameter values ​​of a CNC machine tool during a processing process, and dividing the data set into a training set and a test set in proportion;

[0007] S2. According to the number of tasks n of the CNC machine tool in the processing process, the processing parameter values ​​corresponding to each task in the training set are divided into a support set and a query set to form a training data set;

[0008] S3, using the training data set to perform meta-training on the quality prediction model to obtain the optimized optimal parameters;

[0009] S4, using the test set for meta-testing to fine-tune the quality prediction model;

[0010] S5. Input the data to be measured into the fine-tuned quality prediction model to output the quality prediction result, that is, the roughness value of the workpiece.

[0011] Furthermore, in step S1 , the machining process parameter values ​​include cutting width k, cutting depth h, spindle speed g, feed speed v, machining mode m and ambient temperature w.

[0012] Furthermore, in step S1, the data set is divided into a training set and a test set in a ratio of 80% training and 20% testing.

[0013] Furthermore, in step S2, the support set is used for training and parameter adjustment of the quality prediction model, and the query set is used to evaluate the generalization ability of the quality prediction model.

[0014] Furthermore, in step S3, an XGBoost regression algorithm is used as a quality prediction model. The quality prediction model uses process parameters as independent variables and quality targets as dependent variables, and uses the XGBoost regression algorithm to construct a prediction function for the quality target.

[0015] Furthermore, in step S3, the specific process includes the following steps:

[0016] S31. Randomly select s tasks from a total of n tasks to process the first meta-batch and initialize the initial parameters of meta-learning

[0017] S32. For any selected task t, the initial parameters of meta-learning are Assign the quality prediction model to task t to obtain the initial model parameters θ t ,at this time

[0018] S33. Based on the input and label of the query set, iteratively train the quality prediction model and update the model parameters θ of task t t ,This process is repeated to optimize the model performance for each task;

[0019] S34. For the support set of task t, the trained model parameters θ t Take as input the predicted value of the part indicator;

[0020] S35. Calculate the loss l of task m based on the predicted value and the true label in the support set m ;

[0021] S36, according to the loss l m Calculate the total loss L for the first meta-batch of tasks Ti ,Right now:

[0022] l Ti =l1+…+l k +…+l m +…+l s

[0023] In the formula, l1, l k , l s They are the losses of task 1, task k, and task s respectively;

[0024] S37, according to the total loss L Ti Update the initial parameters of meta-learning Get updated parameters Right now:

[0025]

[0026] Where α is the learning rate, which can be fixed as a hyperparameter or meta-learned; is the initial parameter The gradient of

[0027] S38, train the next task in the same way until all meta-batch tasks are trained and the trained meta-learning parameters are obtained

[0028] Further, in step S35, the loss l m is the mean square error R mse ,Right now:

[0029]

[0030] In the formula, r i is the true value of the part index; is the predicted value of the part index, and T is the number of selected tasks.

[0031] By means of the above technical solution, the present invention provides a small sample quality prediction method based on meta-learning, which has at least the following beneficial effects:

[0032] 1. The present invention can not only effectively predict product quality, but also discover problems that may occur during the processing in advance, achieve quality control, and avoid the production of defective products. In addition, this method also supports the intelligent adjustment of process parameters, enhancing the overall efficiency and quality assurance of the production process.

[0033] 2. The present invention can be directly applied to the product processing quality prediction process of a small number of samples, solving the problem of small amount of sample data and difficulty in quality prediction, realizing adaptive adjustment of model parameters, and realizing quality prediction of small sample data. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0035] Figure 1 It is a flow chart of the small sample quality prediction method of the present invention;

[0036] Figure 2 This is a flow chart of meta-learning in an embodiment of the present invention;

[0037] Figure 3 This is a meta-test flow chart of an embodiment of the present invention;

[0038] Figure 4 is a flow chart of a quality prediction model according to an embodiment of the present invention;

[0039] Figure 5 Schematic diagram of quality prediction results according to an embodiment of the present invention. DETAILED DESCRIPTION

[0040] In order to make the above-mentioned purposes, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific implementation methods, so that the implementation process of how the present application uses technical means to solve technical problems and achieve technical effects can be fully understood and implemented accordingly.

[0041] As an important piece of equipment, CNC machine tools urgently need to be supported by industrial big data technology with machine learning as the core to improve the stability and quality of their machining process. The selection of machining process parameters is an important part of CNC machining. Machine learning has excellent learning and reasoning capabilities in certain data sets or scenarios, especially the learning and summarizing capabilities of empirical data sets far exceeding the human brain. In the field of mechanical machining, researchers use artificial intelligence technology to analyze and study CNC machining quality, which can detect possible problems in machining in advance, control quality, avoid defective products, and provide support for the intelligentization of process parameters.

[0042] Since the sample data of some products is small and cannot meet the data requirements of the machine learning model, the adaptability of the model cannot be achieved. This may cause the model to perform poorly when faced with new data or new tasks because it lacks sufficient information to make accurate predictions or decisions. Meta-learning can effectively deal with the problem of small sample learning. By training the model under the meta-learning framework, the model can learn the commonalities and regularities between tasks from a small number of samples, so that it can make accurate predictions or decisions when faced with new tasks. Therefore, a small sample quality prediction method based on meta-learning is urgently needed.

[0043] Based on the technical problem that the existing technology cannot correctly predict the processing quality of a small number of samples, please refer to Figure 1-Figure 5 This embodiment proposes a small sample quality prediction method based on meta-learning. This method can be directly applied to the product processing quality prediction process of a small number of samples. It can not only effectively predict product quality, but also discover problems that may occur in the processing process in advance, achieve quality control, and avoid the production of defective products. In addition, this method also supports the intelligent adjustment of process parameters to enhance the overall efficiency and quality assurance of the production process. The method includes the following steps:

[0044] S1. Obtain a data set containing processing parameter values ​​of a CNC machine tool during the processing, and divide the data set into a training set and a test set in proportion; the processing parameter values ​​include cutting width k, cutting depth h, spindle speed g, feed speed v, processing mode m and ambient temperature w; specifically, during the CNC processing of each workpiece, a signal acquisition device is used to collect the processing parameter values ​​on the CNC machine tool. After data acquisition, the acquired data set is first divided into a training set and a test set in a ratio of 80% training and 20% testing.

[0045] S2. According to the number of tasks n in the machining process of the CNC machine tool, the machining process parameter values ​​corresponding to each task in the training set are divided into a support set and a query set to form a training data set. The support set is used for training and parameter adjustment of the quality prediction model, and the query set is used to evaluate the generalization ability of the quality prediction model. In this step, in view of the small number of samples to be tested, in order to enhance the robustness of the quality prediction model, samples of other categories are also included in the training set. Next, according to the number of tasks n, the training data set is further subdivided, and each task is divided into two parts: a support set and a query set. The support set is used for training and parameter adjustment of the quality prediction model, while the query set is used to evaluate the generalization ability of the quality prediction model.

[0046] S3, using the training data set to meta-train the quality prediction model to obtain the optimized optimal parameters; in step S3, the XGBoost regression algorithm is used as the quality prediction model. The quality prediction model uses process parameters as independent variables and quality targets as dependent variables, and uses the XGBoost regression algorithm to construct a prediction function for the quality target. XGBoost is a boosting tree model that integrates multiple tree models to form a powerful classifier. Its optimization objective function is defined as follows:

[0047]

[0048] Where: O(t) obj represents the loss value after the t1th iteration, t1 is the number of iterations; T represents the number of leaves; G j is the cumulative sum of the first-order derivatives of the samples contained in leaf node j; w j is the weight value of the jth leaf node; H j is the cumulative sum of the second-order derivatives of the samples contained in leaf node j; γ is a regularization term used to avoid overfitting; τ is a penalty parameter for the number of leaves, which is used to control the complexity of the quality prediction model.

[0049] like Figure 4As shown, the training data set is first used to train the quality prediction model. The trained quality prediction model is input into the weak learner to calculate the residual, and the weight of the quality prediction model is adjusted according to the residual to finally form the learner.

[0050] By setting the optimal parameters of the quality prediction model, putting the processing sample training set data into the quality prediction model for fitting, and verifying the generalization ability on the processing sample test set, it is determined whether the prediction ability of the quality prediction model can meet the accuracy requirements. If it cannot meet the requirements, a better optimal parameter value is found through the grid search method, and retraining is carried out until the accuracy requirements are met. Finally, the optimal parameters are output, and the prediction data in the actual project is put into the quality prediction model for prediction, so that a more ideal prediction value can be obtained. Figure 2 and Figure 3 As shown, the specific process includes the following steps:

[0051] S31. Randomly select s tasks from a total of n tasks to process the first meta-batch and initialize the initial parameters of meta-learning Perform iterative training for iterative training.

[0052] S32. For any selected task t, the initial parameters of meta-learning are Assign the quality prediction model to task t to obtain the initial model parameters θ t ,at this time

[0053] S33. Based on the input and label of the query set, iteratively train the quality prediction model and update the model parameters θ of task t t ,This process is repeated to optimize the model performance for each task.

[0054] S34. For the support set of task t, the trained model parameters θ t Take as input the predicted value of the part indicator.

[0055] S35. Calculate the loss l of task m based on the predicted value and the true label in the support set m , where the loss l m is the mean square error R mse ,Right now:

[0056]

[0057] In the formula, r i is the true value of the part index; is the predicted value of the part index, and T is the number of selected tasks.

[0058] S36, according to the loss l m Calculate the total loss L for the first meta-batch of tasksTi , for a meta-batch task, the total loss L Ti is the sum of the losses for each task, that is:

[0059] L Ti =l1+…+l k +…+l m +…+l s

[0060] In the formula, l1, l k , l s They are the losses of task 1, task k, and task s respectively.

[0061] S37, according to the total loss L Ti Update the initial parameters of meta-learning Get updated parameters Right now:

[0062]

[0063] Where α is the learning rate, which can be fixed as a hyperparameter or meta-learned; is the initial parameter gradient.

[0064] S38, train the next task in the same way until all meta-batch tasks are trained and the trained meta-learning parameters are obtained

[0065] S4. Use the test set to perform meta-testing to achieve fine-tuning of the quality prediction model. In the test set, this embodiment uses the trained meta-learning optimal parameters to apply to the training set, and then obtains the quality prediction parameters for the specific task. This process can be called model fine-tuning.

[0066] S5, input the data to be tested into the fine-tuned quality prediction model to output the quality prediction result, that is, the roughness value of the workpiece; after fine-tuning the optimal parameters of the quality prediction model, the data to be tested is input into the fine-tuned quality prediction model and its output is obtained, which is the roughness value used to represent the quality target of the workpiece, such as Figure 5 shown.

[0067] In the above embodiment, an accurate calculation and analysis method is provided to solve the problem that the prior art cannot accurately predict the product processing quality. The processing quality of small sample products can be simply and effectively predicted, which can more effectively improve the prediction efficiency, improve quality control, and avoid the production of defective products.

[0068] Those skilled in the art can understand that all or part of the steps in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a program, so the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0069] Each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the above embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0070] The above implementation methods have been described in detail. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A small sample quality prediction method based on meta-learning, It is characterized in that The method comprises the following steps: S1, obtaining a data set containing processing parameter values ​​of a CNC machine tool during a processing process, and dividing the data set into a training set and a test set in proportion; S2. According to the number of tasks n of the CNC machine tool in the processing process, the processing parameter values ​​corresponding to each task in the training set are divided into a support set and a query set to form a training data set; S3. Meta-training the quality prediction model using the training data set to obtain the optimized optimal parameters. The specific process includes the following steps: S31. Randomly select s tasks from a total of n tasks to process the first meta-batch and initialize the initial parameters of meta-learning S32. For any selected task t, the initial parameters of meta-learning are Assign the quality prediction model to task t to obtain the initial model parameters θ t ,at this time S33. Based on the input and label of the query set, iteratively train the quality prediction model and update the model parameters θ of task t t ,This process is repeated to optimize the model performance for each task; S34. For the support set of task t, the trained model parameters θ t Take as input the predicted value of the part indicator; S35. Calculate the loss l of task m based on the predicted value and the true label in the support set m ; S36, according to the loss l m Calculate the total loss L for the first meta-batch of tasks Ti ,Right now: L Ti =l 1 +…+l k +…+l m +…+l s In the formula, l 1 , l k , l s They are the losses of task 1, task k, and task s respectively; S37, according to the total loss L Ti Update the initial parameters of meta-learning Get updated parameters Right now: Where α is the learning rate, which can be fixed as a hyperparameter or meta-learned; is the initial parameter The gradient of S38, train the next task in the same way until all meta-batch tasks are trained and the trained meta-learning parameters are obtained S4, using the test set for meta-testing to fine-tune the quality prediction model; S5. Input the data to be measured into the fine-tuned quality prediction model to output the quality prediction result, that is, the roughness value of the workpiece.

2. The small sample quality prediction method according to claim 1, It is characterized in that In step S1 , the machining process parameter values ​​include cutting width k, cutting depth h, spindle speed g, feed speed v, machining mode m and ambient temperature w.

3. The small sample quality prediction method according to claim 1, It is characterized in that In step S1, the data set is divided into a training set and a test set in a ratio of 80% training and 20% testing.

4. The small sample quality prediction method according to claim 1, It is characterized in that In step S2, the support set is used for training and parameter adjustment of the quality prediction model, and the query set is used to evaluate the generalization ability of the quality prediction model.

5. The small sample quality prediction method according to claim 1, It is characterized in that In step S3, an XGBoost regression algorithm is used as a quality prediction model. The quality prediction model uses process parameters as independent variables and quality targets as dependent variables, and uses the XGBoost regression algorithm to construct a prediction function for the quality target.

6. The small sample quality prediction method according to claim 1, It is characterized in that In step S35, the loss l m is the mean square error R mse ,Right now: In the formula, r i is the true value of the part index; is the predicted value of the part index, and T is the number of selected tasks.

Citation Information

Patent Citations

  • Small sample text classification method based on regularization meta-learning

    CN114491028A

  • Small sample target detection method based on meta-learning method

    CN116597244A

  • Small sample fault diagnosis method, system and device based on model independent element learning and medium

    CN117150359A

  • Small sample time sequence prediction method based on meta-learning framework

    CN117272040A

  • Method and system for predicting residual service life of machine based on meta-learning

    CN117610411A

Cited By

  • Prediction method and system for starting transient temperature field of photo-thermal steam turbine rotor

    CN119514370A