Heat setting process parameter recommendation method and device, computer equipment and storage medium
By predicting process parameters using a multi-weighted master model, the problem of reliance on experience in traditional heat setting processes is solved, improving the accuracy of process parameters and production efficiency, reducing scrap rate and costs, and achieving higher production stability and consistency.
Patent Information
- Application Number
- CN202411762339.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-03
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2044-12-03
AI Technical Summary
Traditional heat setting processes rely on experience, resulting in low accuracy and poor adaptability in process design, making it difficult to meet changing customer needs. Furthermore, single-model prediction ignores the weight settings of the base model, affecting prediction accuracy and generalization ability, and increasing scrap rate and production costs.
A multi-weighted master model is used to predict process parameters. The prediction model is formed by training several weighted base models and meta-models. The weights of the base models are adjusted using data quality scores, and the feature data quality scores are added to the loss function to optimize the prediction results.
It improves the accuracy of process parameters and the first-time success rate of production, reduces reliance on manual experience and production costs, and ensures the consistency and stability of product quality.
Smart Images

Figure CN119578250B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of machine learning, and more specifically to a method, apparatus, computer equipment, and storage medium for recommending thermal setting process parameters. Background Technology
[0002] Heat setting is a crucial step in textile dyeing and finishing production. The process involves heating the fabric to a specific size at a high temperature for a certain period, holding it thereafter, and then cooling it at an appropriate rate. The purpose of heat setting is to ensure that the fabric achieves predetermined requirements for smoothness, width, weight, and moisture content during the heating process.
[0003] Currently, the selection and adjustment of heat setting processes mainly rely on long-term experience accumulation, lacking precise process design, resulting in low accuracy and poor adaptability. This approach easily leads to instability in shrinkage rate, weight, and width among products in the same batch, resulting in unsatisfactory setting effects. Due to reliance on experience, high scrap rates and production costs often occur, especially when customer demands or production conditions change, as traditional methods struggle to meet new requirements. Even if process parameters are determined, it is difficult to accurately predict post-setting quality indicators. Product quality is usually judged only through manual sampling inspection, increasing uncertainty. Ultimately, regardless of whether the setting quality is satisfactory, the fabric must undergo the complete heat setting process. This process not only wastes time and resources but also increases labor and material costs. Overall, traditional methods cannot ensure a stable and efficient production process. Furthermore, while current methods employ model-predicted parameters for recommendation, heat-setting process parameters include target output fabric cover, target output basis weight, target output WPI, output CPI, target temperature, target machine speed, target width baseline, target overfeed, first target width deviation, and second target width deviation. When using a single model for stacked prediction, the weighting of base models is often neglected, leading to an overemphasis on the influence of some base models while weakening the role of others. This fails to fully leverage the strengths of each base model, thus affecting the overall model's prediction accuracy and generalization ability.
[0004] Therefore, it is necessary to design a new method to leverage the advantages of multi-model enhancement stacking, reduce reliance on human experience, improve the accuracy of process parameters and the first-pass yield, and reduce product rework and production costs. Summary of the Invention
[0005] The purpose of this invention is to overcome the shortcomings of the prior art and provide a method, apparatus, computer equipment and storage medium for recommending heat setting process parameters.
[0006] To achieve the above objectives, the present invention adopts the following technical solution: a method for recommending heat setting process parameters, including:
[0007] Obtain the production order data to be predicted;
[0008] The production order data to be predicted is preprocessed to obtain the preprocessing result;
[0009] The preprocessing results are input into the prediction model to predict process parameters and obtain prediction results. The prediction model is obtained by training a multi-weight master model formed by stacking several weighted base models and meta-models after preprocessing and labeling the production order data as a sample set. The weight of the base model is determined by the prediction performance of the base model, and the loss function during the training process includes the quality score of each preprocessed and labeled data.
[0010] Output the prediction results.
[0011] The further technical solution is as follows: The prediction model is obtained by training a multi-weighted master model, which is formed by stacking several weighted base models and meta-models, using preprocessed and labeled production order data as a sample set. The weights of the base models are determined by their prediction performance, and the loss function during training incorporates the quality score of each preprocessed and labeled data point, including:
[0012] Acquire production order data, and preprocess and label the production order data to obtain a sample set, wherein the sample set includes feature data and label data;
[0013] Construct a multi-weighted master model;
[0014] Calculate the data quality score of the feature data;
[0015] The feature data is input into each of the base models to predict process parameters, and the mean square error of each base model is calculated based on the prediction results and the corresponding label data.
[0016] The weights of the corresponding base models are calculated based on the mean squared error of each base model.
[0017] The weights of the base model are multiplied by the results predicted by the base model to obtain the weighted prediction result;
[0018] The weighted prediction results are used to extract the corresponding process parameters to form a matrix;
[0019] The final prediction result is determined based on the matrix and the linear regression model.
[0020] The mean error is used as the loss function, and the data quality score of the feature data is added to the loss function;
[0021] The parameters of the meta-model are adjusted by minimizing the loss function, and the training is repeated until the meta-model converges to obtain the prediction model.
[0022] The further technical solution is as follows: the construction of the multi-weight master model includes:
[0023] Several models with satisfactory prediction performance are selected as base models, and a linear regression model is selected as a meta-model. The base models and the meta-model are stacked to form a multi-weighted master model.
[0024] The further technical solution is as follows: the calculation of the data quality score of the feature data includes:
[0025] use Calculate the data quality score of the feature data, where s represents the quantity quality score of each feature data; S2 is the target deviation, representing the degree of deviation between the actual test result and the target value of the parameter, with a value between (0, 1); E M E represents the relative error ratio of the fabric cover. G This is the relative error ratio based on weight. M is the critical value for target deviation when the difference between the actual test result and the target value equals the error value; actual This is the actual value of the fabric cover; M target t is the target value for the fabrication; M G represents the error range of the fabric seal; actual This is the actual weight in grams; G target t is the target weight value. G The error range for weight is defined; the data quality scores of each feature data obtained are combined to form a data quality score set.
[0026] A further technical solution is as follows: the step of calculating the weights of the corresponding base models based on the mean square error of each base model includes:
[0027] use Calculate the weights of the corresponding base model, where W i The weights of the i-th base model; MSE i Let be the mean squared error of the i basic models. m represents the number of base models; n is the amount of training data; h is the number of process parameters; y ij This represents the predicted value of the j-th process parameter in the i-th row of data; s represents the true value of the j-th process parameter in the i-th row of feature data; i Let be the data quality score for the i-th feature data.
[0028] The further technical solution is as follows: determining the final prediction result based on the matrix and the linear regression model includes:
[0029] Determine the coefficient matrix of the linear regression model;
[0030] The coefficient matrix is split by rows and transposed to obtain a new coefficient matrix;
[0031] Perform a dot product operation on the matrix and each of the new coefficient matrices to obtain the predicted value of the process parameters for each feature data;
[0032] The predicted values of all the process parameters are combined to form the final prediction result.
[0033] The further technical solution is as follows: the base model includes the GBR model, the RFR model, and the KNN model.
[0034] The present invention also provides a device for recommending heat setting process parameters, comprising:
[0035] The acquisition unit is used to acquire production order data to be predicted.
[0036] A preprocessing unit is used to preprocess the production order data to be predicted in order to obtain a preprocessing result;
[0037] The prediction unit is used to input the preprocessing results into the prediction model to predict process parameters and obtain prediction results. The prediction model is obtained by training a multi-weight master model formed by stacking several weighted base models and meta-models after preprocessing and labeling the production order data as a sample set. The weight of the base model is determined by the prediction performance of the base model, and the loss function during the training process includes the quality score of each preprocessed and labeled data.
[0038] The output unit is used to output the prediction result.
[0039] The present invention also provides a computer device, the computer device including a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the above-described method.
[0040] The present invention also provides a storage medium storing a computer program that, when executed by a processor, implements the above-described method.
[0041] The beneficial effects of this invention compared to existing technologies are as follows: This invention uses a trained multi-weight master model for automated parameter prediction. Specifically, it acquires production order data to be predicted and preprocesses it to eliminate noise and standardize the data format. The preprocessed data is labeled to construct a standardized sample set, ensuring consistent data quality. The multi-weight master model is trained by stacking multiple base models and meta-models, with the weights of the base models adjusted based on their predictive performance. During training, a loss function with quality scores is used to enhance the impact of high-quality data on the model, thereby improving prediction accuracy. By stacking models and integrating the advantages of each base model, the prediction results of process parameters are further optimized, reducing the bias that a single model might introduce. This multi-model enhancement stacking reduces reliance on human experience, improves the accuracy of process parameters and the first-time success rate of production, and reduces product rework and production costs.
[0042] The present invention will be further described below with reference to the accompanying drawings and specific embodiments. Attached Figure Description
[0043] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0044] Figure 1 This is a schematic diagram illustrating an application scenario of the heat setting process parameter recommendation method provided in this embodiment of the invention.
[0045] Figure 2 A flowchart illustrating the method for recommending heat setting process parameters provided in an embodiment of the present invention;
[0046] Figure 3 A schematic diagram of a sub-process of the method for recommending heat setting process parameters provided in an embodiment of the present invention;
[0047] Figure 4 A schematic diagram of a sub-process of the method for recommending heat setting process parameters provided in an embodiment of the present invention;
[0048] Figure 5 A flowchart illustrating the training process of a multi-weight master model provided in an embodiment of the present invention;
[0049] Figure 6 This is a schematic diagram of the batch basic information and target information input interface provided in an embodiment of the present invention;
[0050] Figure 7 A schematic diagram of the output page provided for an embodiment of the present invention. Figure 1 ;
[0051] Figure 8 A schematic diagram of the output page provided for an embodiment of the present invention. Figure 2 ;
[0052] Figure 9 A schematic block diagram of a device for recommending heat setting process parameters provided in an embodiment of the present invention;
[0053] Figure 10 A schematic block diagram of a computer device provided for an embodiment of the present invention. Detailed Implementation
[0054] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0055] It should be understood that, when used in this specification and the appended claims, the terms "comprising" and "including" indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.
[0056] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.
[0057] It should also be further understood that the term "and / or" as used in this specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0058] Please see Figure 1 and Figure 2 , Figure 1 This is a schematic diagram illustrating an application scenario of the heat setting process parameter recommendation method provided in this embodiment of the invention. Figure 2This is a schematic flowchart illustrating the heat setting process parameter recommendation method provided in this embodiment of the invention. This method is applied in a server. The server interacts with the terminal, and can be a controller for fabric heat setting equipment, etc. It optimizes the selection of process parameters using advanced machine learning techniques to meet specific production goals. This method not only improves production efficiency but also ensures the consistency and stability of product quality. This embodiment applies Stacking algorithm technology to multi-process parameter recommendation in the textile dyeing and finishing industry, improving overall prediction performance by integrating multiple base models. The data quality score is calculated by combining the label error and target deviation from the initial model feedback. The quality of the training data is evaluated by the deviation between the setting test results and the target value, and these quality scores are converted into weights and applied to model training, thereby improving the robustness and accuracy of the model. A base model weight allocation mechanism is introduced into the stacked model, dynamically adjusting the influence weight of each base model based on the loss value feedback of a single base model, thus optimizing the performance of the stacking technology.
[0059] Figure 2 This is a schematic flowchart of the method for recommending heat setting process parameters provided in an embodiment of the present invention. Figure 2 As shown, the method includes the following steps S110 to S140.
[0060] S110, Obtain the production order data to be predicted.
[0061] In this embodiment, the production order data to be predicted includes data from the order generation data management system, specifically including cylinder number, process route, material composition, fabric seal, basis weight, density, temperature, etc., which can be obtained from... Figure 6 The interface shown allows for manual input, device scanning input, or automatic crawling input.
[0062] S120. The production order data to be predicted is preprocessed to obtain the preprocessing result.
[0063] In this embodiment, the preprocessing result refers to the preprocessed production order data. After receiving the production order data, preprocessing is required to improve the accuracy and efficiency of the prediction.
[0064] Specifically, missing data is a common problem in production order data, which may stem from omissions or errors during data collection. Missing data affects the accuracy of model training and subsequent analysis, thus requiring effective handling. In the method of this embodiment, for missing pre-cooking and post-cooking data, the system first attempts to match the missing data with the batch number in the development office's data source. If this still fails to complete the missing data, the incomplete data is deleted. This method helps avoid the adverse effects of missing data on the model, ensuring data integrity and accuracy, thereby improving the reliability of subsequent analysis and model predictions.
[0065] Production order data may contain duplicate records. If these duplicates are not processed, they can bias the analysis results. To eliminate the impact of duplicate data on the model, feature data duplication analysis is employed. Specifically, by comparing the feature data of each production order, when identical data is found, the record with the most recent order time is selected and retained, while other duplicate records are deleted. This step ensures that the model is not affected by duplicate data, thereby improving the accuracy of the analysis and the validity of the data.
[0066] In actual production, due to manual data entry or other operational issues, some outliers may exist in production order data. These outliers can severely interfere with the model's learning and prediction; therefore, outlier detection and processing are necessary. Specifically, the following formula is used to determine outliers; K = {k1,k2,…,k} n}; where n is the amount of training data, and k is the ratio of the target specification to the pre-cooking specification; b i Apply a cover to the i-th data target; g i Let b′ be the target weight of the i-th data point. i For the i-th data, seal it before cooking; g′ i Let be the weight of the i-th data point before cooking.
[0067] This embodiment combines data features with the interquartile range (IQR) method to detect outliers. Specifically, it calculates the 25th percentile (q25) and 75th percentile (q75) of the data, and then uses the IQR (q75 - q25) to determine the upper and lower bounds for outliers. Any data exceeding this range is considered an outlier and is removed. This step ensures that every data point in the dataset is within a reasonable range, preventing outliers from unnecessarily interfering with the model and thus improving the model's accuracy and predictive performance.
[0068] Specifically, the first quantile is also called the 1 / 4 quantile or 25th quantile, and the third quantile is also called the 3 / 4 quantile or 75th quantile. Let q 25The first quantile means that 25% of the data points in the data K are less than q. 25 q 75 The third quantile means that 75% of the data points in this data K are greater than q. 75 Then IQR = q 75 -q 25 ;
[0069] Thus, the upper bound of the threshold (upper) and the lower bound of the threshold (lower) are obtained: lower = q 25 -1.5*IQR; upper = q 75 +1.5*IQR;
[0070] The data K is then filtered using a threshold [lower, upper]. Values outside the range are considered outliers and deleted.
[0071] By processing missing, duplicate, and outlier data, we ensure that the input data is more complete, accurate, and consistent, thus providing a reliable foundation for subsequent analysis and model training. Data processing eliminates noise and bias, ensuring that the model can better identify and learn the true relationships between data, improving the reliability of predictions. By removing incomplete or outlier records, we avoid the negative impact of erroneous data on the analysis results, contributing to more accurate insights into production data.
[0072] These processing steps ensure the quality of the dataset, ultimately optimizing decision support and the ability to predict process parameters during production.
[0073] S130. Input the preprocessing results into the prediction model to predict process parameters and obtain the prediction results.
[0074] In this embodiment, the prediction result refers to the predicted values corresponding to parameters such as required output fabric seal, required output weight, required output WPI, required output CPI, temperature, machine speed, width reference, upper overfeed, first width deviation and second width deviation.
[0075] WPI and CPI represent the loop density index of the fabric, respectively. CPI (Courses Per Inch) refers to the number of loop rows per inch of fabric, which is the transverse density of the fabric. WPI (Wales Per Inch) refers to the number of loop warp rows per inch of fabric, which is the longitudinal density of the fabric.
[0076] The prediction model is obtained by preprocessing and labeling production order data as a sample set, and training a multi-weighted master model formed by stacking several weighted base models and meta-models. The weights of the base models are determined by their prediction performance, and the quality score of each preprocessed and labeled data is added to the loss function during training.
[0077] In one embodiment, please refer to Figure 3 and Figure 5 The aforementioned prediction model is obtained by preprocessing and labeling production order data as a sample set, and training a multi-weighted master model formed by stacking several weighted base models and meta-models. The weights of the base models are determined by their prediction performance, and the loss function during training incorporates the quality score of each preprocessed and labeled data, including steps S131 to S1310.
[0078] S131. Obtain production order data, and preprocess and label the production order data to obtain a sample set, wherein the sample set includes feature data and label data.
[0079] In this embodiment, the characteristic data refers to data such as cylinder number, process route, material composition, fabric seal, basis weight, density, and temperature. The label data refers to the actual values corresponding to parameters such as required fabric seal, required basis weight, required WPI, required CPI, temperature, machine speed, width reference, upper overfeed, first width deviation, and second width deviation.
[0080] The preprocessing in this step is the same as in step S120 above, and will not be repeated here.
[0081] S132. Construct a multi-weighted master model.
[0082] In this embodiment, the multi-weight master model refers to a stacked model that incorporates weights.
[0083] Specifically, several models with satisfactory prediction performance are selected as base models, and a linear regression model is selected as a meta-model. The base models and the meta-model are stacked to form a multi-weighted master model.
[0084] The training process of a multi-weighted master model is essentially stacked ensemble learning, a method that fuses the predictions of multiple base models through a meta-model to improve overall prediction performance, especially when dealing with complex regression problems. The structure of a stacked model typically consists of two main parts: a first layer of base models and a second layer of meta-models. For the selection of base models, the original dataset is first divided into multiple subsets, typically using K-fold cross-validation to effectively reduce the risk of overfitting. Each base model (e.g., KNN, SVR, GBR, RFR, LR, DTR, etc.) is trained on each subset and generates predictions. These base models' predictions are independent and may differ because each base model has different assumptions and preferences when processing the data. Selecting base models with strong predictive power can capture different patterns in the data. Diversity of base models can lead to better ensemble results. For example, models such as KNN, SVR, GBR, RFR, and DTR can be used as base models because they have different advantages under different data characteristics. For the meta-model, the predictions from all the base models in the first layer are combined with the original features to form a new dataset, which serves as the input to the meta-model. The meta-model is usually a relatively simple model (e.g., linear regression (LR)). It is responsible for further fusing and adjusting the outputs of the base models in the first layer to generate the final prediction result. Meta-models are generally chosen for their relatively simple structure and high computational efficiency, such as linear regression (LR). Simple meta-models can effectively avoid overfitting because they do not have many degrees of freedom to overfit the output of the first layer.
[0085] In practical applications, the selection of base models is usually made by evaluating the regression performance of different base models. Common evaluation metrics include the regression coefficient R² and mean squared error (MSE). Based on these evaluation metrics, the performance of each base model is ranked, and the best-performing model is selected as the base model for stacking models.
[0086] For example, the following base models were evaluated:
[0087] KNN (k-Nearest Neighbors Regression); SVR (Support Vector Machine Regression); GBR (Gradient Boosting Regression); RFR (Random Forest Regression); LR (Linear Regression); DTR (Decision Tree Regression);
[0088] By calculating R for each model 2 We calculate the MSE (Mean Sequence Size) and sort them in ascending order. Assume we select the top three performing models: GBR, RFR, and KNN. These models will serve as the base models for the first layer.
[0089] Next, a simple model, such as LR (linear regression), is selected as the meta-model for the second layer. The output of the first-layer base model is then fused with the meta-model to obtain the prediction results of the stacked model.
[0090] Stacked ensemble learning improves overall prediction performance by fusing the predictions of multiple base models into a meta-model. Key steps include:
[0091] In the first layer, select a base model that performs well and can capture different features of the data.
[0092] In the second layer, a simple meta-model (such as linear regression) is used for fusion to avoid overfitting.
[0093] By ranking base models based on evaluation metrics such as MSE and selecting the optimal base model, and then combining it with a simple meta-model, the stability and accuracy of the overall model can be improved. This method can effectively improve the prediction accuracy of regression problems, and is especially suitable for complex practical problems.
[0094] S133. Calculate the data quality score of the feature data.
[0095] In this embodiment, the following is adopted: Calculate the data quality score of the feature data, where s represents the quantity quality score of each feature data; S2 is the target deviation, representing the degree of deviation between the actual test result and the target value of the parameter, with a value between (0, 1); E M E represents the relative error ratio of the fabric cover. G This is the relative error ratio based on weight. M is the critical value for target deviation when the difference between the actual test result and the target value equals the error value; actual This is the actual value of the fabric cover; M target t is the target value for the fabrication; M G represents the error range of the fabric seal; actual This is the actual weight in grams; G target t is the target weight value; G The error range for weight is defined; the data quality scores of each feature data obtained are combined to form a data quality score set. S=[s1,s2,…s n ]; where n is the amount of training data, s n This is the data quality score for the nth data point.
[0096] Step S133 is a quality scoring mechanism based on experimental data, designed to evaluate the deviations between the test results of parameters such as fabric envelope (M) and basis weight (G) during the production process and the target values, thereby assigning a quality score to each data point. This method combines the differences in error range, degree of deviation, and target value, enabling it to provide high-quality data support for the model while preserving data diversity.
[0097] Specifically, the quality score for each data point is calculated by analyzing the test results of two parameters: fabric envelope and basis weight. The key indicator for evaluation is the deviation between the test results and the target value. The evaluation formula considers the following aspects:
[0098] Target deviation (S): This indicator reflects the degree of deviation between the actual test result and the target value, with a score range of (0, 1). The closer the score is to 1, the higher the quality of the data and the closer it is to the target value.
[0099] Error range (E) M and E G The relative error between the actual and target values of fabric envelope and weight is used to calculate the error ratio (E). M and E G If both error ratios are within the allowable range (i.e., E...), M ≤1 and E G If the error ratio is ≤1), then the standard formula is used to calculate the target deviation; if the error ratio exceeds the allowable range (i.e., E... M >1 or E G If the deviation is greater than 1), the target deviation will decrease rapidly.
[0100] A quality score is calculated for each data point based on the error ratio between envelope and weight. The quality score calculation considers whether the test result meets the expected value and how the quality score is rapidly reduced when the error exceeds the acceptable range. For test results exceeding the error range, although the data is not directly deleted, a lower quality score is given to reflect its poorer quality.
[0101] The quality scores of the training data form a dataset that represents the quality of all training data. It can reflect the overall quality level of the data and help to select high-quality sample data for subsequent analysis or model training.
[0102] Even if some data test results exceed the error range, they are not directly deleted, but retained by lowering their quality scores. This helps maintain the diversity of the dataset while ensuring that the quality issues of substandard data are accurately reflected in subsequent analyses. By calculating the target deviation, the difference between the data and the target value can be quantified, and the quality score can be quickly adjusted based on the actual error. This precise evaluation method makes the quality score of each data point more objective and scientific. For test results exceeding the allowable error range, the quality score drops rapidly. This design effectively prevents overall quality assessment bias caused by individual outliers. The closer the test result is to the target value, the higher the quality score, indicating that the data has high reference value for actual production and model training, thus resulting in a higher quality training set and better prediction performance. By utilizing historical production data as the training set, this method can more realistically reflect various possible situations in the production process, enhancing the model's adaptability and generalization ability.
[0103] In summary, this quality scoring mechanism, through refined bias handling, error range control, and dynamic adjustment of quality scores, not only ensures data diversity but also guarantees high-quality data used during model training, thereby improving overall prediction accuracy and optimizing the production process.
[0104] S134. Input the feature data into each of the base models to predict process parameters, and calculate the mean square error of each base model based on the prediction results and the corresponding label data.
[0105] S135. Calculate the weights of the corresponding base models based on the mean square error of each base model.
[0106] In this embodiment, the following is adopted: Calculate the weights of the corresponding base model, where W i The weights of the i-th base model; MSE i Let be the mean squared error of the i basic models. m represents the number of base models; n is the amount of training data; h is the number of process parameters; y ij This represents the predicted value of the j-th process parameter in the i-th row of data; s represents the true value of the j-th process parameter in the i-th row of feature data; i Let be the data quality score for the i-th feature data.
[0107] In traditional stacking methods, the predictions of multiple base models are typically synthesized through simple averaging. However, this embodiment adds a weighting mechanism to the traditional stacking algorithm, namely WeightStacking. Through this method, each base model is assigned different weights based on its predictive performance and reliability, thereby achieving more accurate and stable results.
[0108] Specifically, the performance of each base model is evaluated by calculating its mean squared error (MSE), and this error value is then used to assign weights to the models. A smaller MSE indicates more accurate predictions, and the corresponding weight is larger; conversely, a larger error results in a smaller weight. During the calculation, the weights of all base models are normalized so that their sum equals 1. In this way, Weight Stacking effectively improves the overall accuracy and stability of predictions, assigning higher weights to more reliable base models.
[0109] Weight Stacking introduces a base model weighting mechanism, ensuring that each model's contribution is proportional to its performance. Higher-performing models automatically receive higher weights, thus optimizing the accuracy of the final prediction. Through this weighting mechanism, models with larger errors are assigned lower weights, minimizing their impact on the final prediction and effectively reducing the interference of model errors. By considering the mean squared error (MSE) of each model, Weight Stacking improves the stability of the combined prediction results. In the face of data noise or instability in some base models, other more stable models compensate for the deficiencies with higher weights, preventing fluctuations in the overall prediction results. MSE, as an evaluation criterion, directly reflects the predictive performance of the base models. Using this criterion, Weight Stacking automatically selects high-performing and stable models, enhancing the reliability of the overall model combination. When dealing with complex data structures or multiple process parameters, Weight Stacking effectively assigns appropriate weights to different base models, better adapting to diverse data characteristics and avoiding the risk that a single model might not cover all data patterns. As training data and errors change, Weight Stacking dynamically adjusts the weight allocation of each model, allowing the model combination to continuously optimize and adapt to new data environments. This flexibility enhances the long-term applicability of the algorithm.
[0110] In summary, Weight Stacking, through a weighting mechanism based on model error, not only optimizes prediction accuracy but also improves model stability and reliability. It is an effective improvement over traditional stacking methods, and is particularly suitable for multi-model combinations, demonstrating stronger adaptability on complex datasets.
[0111] S136. Multiply the weights of the base model with the results predicted by the base model to obtain a weighted prediction result.
[0112] In this embodiment, GBR, RFR, and KNN models are used as base models, and LR is used as a meta-model for stacking. In the production order, the feature data fields include target usable fabric seal, target gram weight, denier (D) number, percentage of each component, pre-cooking fabric seal, pre-cooking gram weight, pre-cooking WPI, pre-cooking CPI, post-cooking fabric seal, post-cooking gram weight, post-cooking WPI, and post-cooking CPI. Recommended parameters include required fabric seal, required gram weight, required WPI, required CPI, temperature, machine speed, width reference, and overfeed.
[0113] Assuming the model input data is an n×d matrix, the feature data is represented as X: Where n is the amount of training data, and d is the number of feature fields; x ij Let i = 1, 2, ..., n and j = 1, 2, ..., d represent the j-th feature field of the i-th row of data. Passing X into the base model, the predicted result is Y: Where n is the amount of training data; h is the number of process parameters; y ij ,i=1,2,…,n、j=1,2,…,h, represent the predicted value of the j-th process parameter in the i-th row of data.
[0114] Each base model produces its own prediction results. The prediction results from m base models are then integrated to form Y. ′ : Where m represents the number of base models; Y i y represents the predicted data of the i-th base model; ij Let i = 1, 2, ..., n and j = 1, 2, ..., h represent the j-th predicted value of the i-th row of data in the first base model. j = h + 1, h + 2, ..., h * 2 represent the j-th predicted value of the i-th row of data in the second base model, and so on.
[0115] This allows for the calculation of the weights of each base model. By introducing a weighting mechanism on top of the traditional stacking, different weights can be assigned to each base model, making the adjustment of the model combination more flexible.
[0116] Substituting the weights into the new dataset, the weights of each base model will play a role in the subsequent training and prediction of the meta-model. The data after substituting the weights is as follows: Where m represents the number of base models; W m Y represents the weights of the m-th base model; mThe matrix of process parameters predicted by the m-th base model; h is the number of process parameters; n is the amount of training data; y n(h*m) This is the predicted value of the h-th parameter of the n-th data point under the m-th base model.
[0117] S137. Extract the corresponding process parameters from the weighted prediction results to form a matrix.
[0118] In this embodiment, the process parameters of each base model are extracted according to the process parameters, and the value of YY is obtained as follows: A = [A1, A2, ..., A h ]; Where m represents the number of base models; W m y is the weight of the m-th base model; h is the number of process parameters; n is the amount of training data; n(h*m) This is the predicted value of the h-th parameter of the n-th data point under the m-th base model.
[0119] S138. Determine the final prediction result based on the matrix and the linear regression model.
[0120] In this embodiment, the linear regression model performs estimation analysis through the linear relationship between the independent and dependent variables, and uses coefficients to quantify the strength of the influence of the independent variables on the dependent variable.
[0121] In one embodiment, please refer to Figure 4 The above-mentioned step S138 may include S1381 to S1384.
[0122] S1381. Determine the coefficient matrix of the linear regression model;
[0123] S1382. Perform row-wise partitioning and transpose on the coefficient matrix to obtain a new coefficient matrix;
[0124] S1383. Perform a dot product operation on the matrix and each of the new coefficient matrices to obtain the predicted value of the process parameters for each feature data.
[0125] S1384. Combine all the predicted values of the process parameters to form the final prediction result.
[0126] Specifically, each independent variable corresponds to a coefficient, which is multiplied by the independent variable in the model and then summed. The coefficient matrix of the meta-model corresponding to this invention is P: Where h is the number of process parameters; m represents the number of base models; p hm The coefficients of the h-th process under the m-th basic model.
[0127] Divide P by rows and transpose it to obtain a new coefficient matrix: Where h is the number of process parameters; m represents the number of base models; p hm The coefficients of the h-th process under the m-th basic model.
[0128] Finally, perform matrix multiplication, A h The dimension is (n, m). The dimension is (m,1). After dot product, we get the h-th process parameter of each data point, which has a dimension of (n,1). Combining these parameters forms the final prediction result Z, which has a shape of (n,h). The calculation formula is as follows: z nh =W1y n1 p h1 +W2y n(h*2) p h2 +…+W m y n(h*m) p hm Among them, z ij ,i=1,2,…,n、j=1,2,…,h represent the j-th predicted value of the i-th row of data; m represents the number of base models; h is the number of process parameters; n is the amount of training data; W m y represents the weights of the m-th base model; n(h*m) p is the predicted value of the h-th parameter of the n-th data point under the m-th base model; hm The coefficients of the h-th process under the m-th basic model.
[0129] Compared to traditional stacking that directly combines each base model for prediction, this embodiment introduces a feature weighting mechanism. This mechanism weights the prediction results of different base models, allowing for more flexible adjustment of each model's contribution and thus optimizing the model's prediction performance in specific scenarios. Weight stacking assigns higher weights to better-performing models, more effectively utilizing the strengths of each model and improving the prediction accuracy of the ensemble model. Lower weights are assigned to poorer-performing models, reducing their impact on the final prediction result and mitigating the risk of the ensemble model.
[0130] S139. Use the mean error as the loss function, and add the data quality score of the feature data to the loss function.
[0131] In this embodiment, during model training, the optimization direction of the model is controlled by calculating the loss value. The loss function selected is mean squared error, and the data quality score is applied in the calculation. Where J(θ) is the objective function, which is a function of the meta-model parameter θ; n is the amount of training data; h is the number of process parameters; y ij This represents the predicted value of the j-th process parameter in the i-th row of data; The true value of the j-th process parameter in the i-th row of data; s i Let be the quality score of the i-th sample.
[0132] S1310. By minimizing the loss function, adjust the parameters of the meta-model and repeat the training until the meta-model converges to obtain the prediction model.
[0133] In this embodiment, the loss function is based on the data quality score s. i The degree of influence for each sample is adjusted. Samples with higher quality scores contribute more to the loss function, thus affecting the model's training process.
[0134] During model training, the goal is to minimize the loss function by continuously adjusting the parameters θ of the meta-model to optimize the prediction results. The training process is repeated until the model's loss function converges, ultimately resulting in a multi-weighted main model.
[0135] Introducing a weighted mechanism based on data quality scores allows model training to pay greater attention to the impact of high-quality samples. Samples with high quality scores contribute more to the loss, helping the model learn and fit these important samples more accurately, thereby improving overall prediction accuracy. In practical applications, data quality often varies. Data quality scores allow the model to dynamically adjust its focus on data of different quality levels, reducing interference from low-quality data and enhancing its learning ability on high-quality data. By minimizing the loss function weighted by quality scores, the training process avoids the negative impact of outlier samples or low-quality data on model training. This improves the stability of model training, especially when facing noisy datasets. In traditional training, the loss function simply calculates the difference between the predicted and true values without considering sample quality. However, by introducing quality scores, the loss function can automatically adjust its weights during calculation, allowing the model to focus more accurately on high-quality samples during optimization, thus effectively improving optimization efficiency. Due to the weighted influence of high-quality samples, the model can identify important features more quickly, avoiding interference from noise or low-quality data, thereby accelerating the convergence process. Compared to models without quality score weighting, this weighting mechanism makes training more efficient. By introducing data quality scores, models can better adapt to diverse datasets, avoid overfitting to low-quality data, and thus improve their generalization ability to new data. This approach is particularly advantageous when data quality varies significantly. During model training, the quality scores can be flexibly adjusted based on different data sources or application scenarios. This flexibility allows the model to perform well in different environments, especially when dealing with real-time data, enabling dynamic adjustments to the training strategy.
[0136] By incorporating data quality scores into the loss function and dynamically adjusting the weights during model training, the multi-weight master model optimization method proposed in this invention can effectively improve the accuracy, stability, and efficiency of model training. This method not only reduces the negative impact of low-quality data but also accelerates training convergence and enhances the model's generalization ability, making it particularly suitable for application scenarios with uneven data quality or high noise levels.
[0137] Furthermore, for each final prediction result output by the entire multi-weighted master model, the mean square error corresponding to the label data is calculated, and the mean square error is mapped to obtain the mapping result.
[0138] In this embodiment, a prediction matrix of process parameters is obtained, and the mean square error of each training data point is calculated by comparing the predicted values with the actual values: L = [l1, l2, ..., l i ,…,l n ]; Where L is the set of average errors between the predicted and actual values of the labeled data in the training data; n is the amount of training data; h is the number of process parameters; y ij This is the predicted value of the j-th process parameter for the i-th data point; This represents the true value of the j-th process parameter in the i-th data entry.
[0139] The L is mapped to a range of 1 to 0 using an exponential function. The smaller the mean square error l, i.e. the smaller the deviation, the higher the score, with a maximum of 1. in, Let n be the set of mean squared errors after mapping; n is the amount of training data; l i Let be the average error between the predicted and actual values of the label data for the i-th data point; e is a natural constant.
[0140] The data quality score is adjusted based on the mapping calculation. The parameters of the multi-weighted master model are then adjusted using the adjusted data quality score, and the training is repeated until the multi-weighted master model converges to obtain the prediction model.
[0141] In this embodiment, during the training process of the L-feedback multi-weight master model, different weights are determined based on the influence of target deviation and model feedback error, and a new data quality score is obtained through fusion calculation: S ′ =[s1 ′ ,s2 ′ ,…,s i ′ ,…,s n ′ ]; Among them, S ′ The set of adjusted data quality scores; n is the amount of training data; w1 is the weight of the target deviation; si w1 represents the target deviation of the i-th data point; w2 represents the weight of the model feedback error. Let be the average error between the predicted and actual values of the labeled data after mapping the i-th data.
[0142] After obtaining the new data quality score, the training process needs to be re-executed, namely steps S134 to S1310.
[0143] S140. Output the prediction result.
[0144] In this embodiment, the prediction results include the results of two outputs from the multi-weighted main model, specifically encompassing the predicted values of required output fabric cover, required output basis weight, required output WPI, required output CPI, temperature, machine speed, overfeed, width reference, first width deviation, and second width deviation, which are ultimately presented on a designated interface, such as... Figures 7 to 8 As shown.
[0145] The aforementioned method for recommending heat-setting process parameters uses a trained multi-weight master model for automated parameter prediction. Specifically, it acquires and preprocesses production order data to eliminate noise and standardize the data format. The preprocessed data is labeled to construct a standardized sample set, ensuring consistent data quality. The model is trained using a multi-weight master model, which is composed of multiple base models and meta-models stacked together. The weights of the base models are adjusted based on their predictive performance. During training, a loss function with quality scores is used to enhance the impact of high-quality data on the model, thereby improving prediction accuracy. By stacking models and integrating the advantages of each base model, the prediction results of process parameters are further optimized, reducing the bias that a single model might introduce. This multi-model enhancement stacking approach reduces reliance on human experience, improves the accuracy of process parameters and the first-pass success rate, and reduces product rework and production costs.
[0146] Figure 9 This is a schematic block diagram of a heat setting process parameter recommendation device 300 provided in an embodiment of the present invention. Figure 9 As shown, corresponding to the above-described method for recommending heat-setting process parameters, the present invention also provides a heat-setting process parameter recommendation device 300. This heat-setting process parameter recommendation device 300 includes a unit for executing the above-described method for recommending heat-setting process parameters, and the device can be configured in a server. Specifically, please refer to... Figure 9 The heat setting process parameter recommendation device 300 includes an acquisition unit 301, a pretreatment unit 302, a prediction unit 303, and an output unit 304.
[0147] The acquisition unit 301 is used to acquire production order data to be predicted; the preprocessing unit 302 is used to preprocess the production order data to be predicted to obtain a preprocessing result; the prediction unit 303 is used to input the preprocessing result into the prediction model to predict process parameters to obtain a prediction result; wherein, the prediction model is obtained by training a multi-weighted master model formed by stacking several weighted base models and meta-models using the preprocessed and labeled production order data as a sample set, the weights of the base models are determined by the prediction performance of the base models, and the quality score of each preprocessed and labeled data is added to the loss function during the training process; the output unit 304 is used to output the prediction result.
[0148] In one embodiment, the dyeing and finishing industry process parameter recommendation system further includes a model training unit, which comprises:
[0149] The acquisition subunit is used to acquire production order data and preprocess and tag the production order data to obtain a sample set, wherein the sample set includes feature data and tag data;
[0150] Construct sub-units for building a multi-weighted main model;
[0151] The scoring calculation subunit is used to calculate the data quality score of the feature data; specifically, it employs...
[0152] Calculate the data quality score of the feature data, where s represents the quantity quality score of each feature data; S2 is the target deviation, representing the degree of deviation between the actual test result and the target value of the parameter, with a value between (0, 1); E M E represents the relative error ratio of the fabric cover. G This is the relative error ratio based on weight. M is the critical value for target deviation when the difference between the actual test result and the target value equals the error value; actual This is the actual value of the fabric cover; M target t is the target value for the fabrication; M G represents the error range of the fabric seal; actual This is the actual weight in grams; G target t is the target weight value; G The error range for weight is defined; the data quality scores of each feature data obtained are combined to form a data quality score set.
[0153] The base model prediction subunit is used to input the feature data into each base model to predict process parameters, and to calculate the mean square error of each base model based on the prediction results and the corresponding label data.
[0154] The weight calculation subunit is used to calculate the weights of the corresponding base models based on the mean square error of each base model; specifically, it employs... Calculate the weights of the corresponding base model, where W i The weights of the i-th base model; MSE i Let be the mean squared error of the i basic models. m represents the number of base models; n is the amount of training data; h is the number of process parameters; y ij This represents the predicted value of the j-th process parameter in the i-th row of data; s represents the true value of the j-th process parameter in the i-th row of feature data; i Let be the data quality score for the i-th feature data.
[0155] The multiplication subunit is used to multiply the weights of the base model with the results predicted by the base model to obtain a weighted prediction result;
[0156] Extraction sub-units are used to extract the corresponding process parameters from the weighted prediction results to form a matrix;
[0157] The regression processing subunit is used to determine the final prediction result based on the matrix and the linear regression model.
[0158] A loss function construction sub-unit is used to use the mean error as the loss function, and the data quality score of the feature data is added to the loss function;
[0159] The adjustment sub-unit is used to adjust the parameters of the meta-model by minimizing the loss function, and the training is repeated until the meta-model converges to obtain a multi-weighted main model.
[0160] In one embodiment, the construction sub-unit is used to select several models with predictive performance that meet the requirements as base models, and to select a linear regression model as a meta-model. The base models and the meta-model are stacked to form a multi-weighted master model.
[0161] In one embodiment, the regression processing subunit includes:
[0162] The coefficient matrix determination module is used to determine the coefficient matrix of the linear regression model;
[0163] The matrix processing module is used to perform row-wise partitioning and transpose of the coefficient matrix to obtain a new coefficient matrix;
[0164] The dot product module is used to perform dot product operations on the matrix and each of the new coefficient matrices to obtain the predicted value of the process parameters for each feature data.
[0165] The combination module is used to combine all the predicted values of the process parameters to form the final prediction result.
[0166] It should be noted that those skilled in the art can clearly understand that the specific implementation process of the above-mentioned heat setting process parameter recommendation device 300 and each unit can be referred to the corresponding description in the foregoing method embodiments. For the sake of convenience and brevity, it will not be repeated here.
[0167] The aforementioned heat setting process parameter recommendation device 300 can be implemented as a computer program, which can, for example... Figure 10 It runs on the computer device shown.
[0168] Please see Figure 10 , Figure 10 This is a schematic block diagram of a computer device provided in an embodiment of this application. The computer device 500 can be a server, wherein the server can be a standalone server or a server cluster composed of multiple servers.
[0169] See Figure 10 The computer device 500 includes a processor 502, a memory, and a network interface 505 connected via a system bus 501. The memory may include a non-volatile storage medium 503 and internal memory 504.
[0170] The non-volatile storage medium 503 may store an operating system 5031 and a computer program 5032. The computer program 5032 includes program instructions that, when executed, cause the processor 502 to perform a method for recommending thermal setting process parameters.
[0171] The processor 502 provides computing and control capabilities to support the operation of the entire computer device 500.
[0172] The internal memory 504 provides an environment for the operation of the computer program 5032 in the non-volatile storage medium 503. When the computer program 5032 is executed by the processor 502, the processor 502 can perform a method for recommending thermal setting process parameters.
[0173] This network interface 505 is used for network communication with other devices. Those skilled in the art will understand that... Figure 10 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device 500 to which the present application is applied. The specific computer device 500 may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0174] The processor 502 is used to run a computer program 5032 stored in the memory to perform the following steps:
[0175] Obtain the production order data to be predicted; preprocess the production order data to obtain the preprocessing result; input the preprocessing result into the prediction model to predict process parameters to obtain the prediction result; wherein, the prediction model is obtained by training a multi-weighted master model formed by stacking several weighted base models and meta-models using the preprocessed and labeled production order data as a sample set, the weights of the base models are determined by the prediction performance of the base models, and the quality score of each preprocessed and labeled data is added to the loss function during the training process; output the prediction result.
[0176] In one embodiment, the processor 502 implements the prediction model by using preprocessed and labeled production order data as a sample set to train a multi-weighted master model formed by stacking several weighted base models and meta-models. The weights of the base models are determined by their prediction performance. Furthermore, the loss function during training incorporates the quality score of each preprocessed and labeled data point. Specifically, the processor 502 implements the following steps:
[0177] The process involves: acquiring production order data, preprocessing and labeling the data to obtain a sample set, which includes feature data and label data; constructing a multi-weighted master model; calculating the data quality score of the feature data; inputting the feature data into each base model for process parameter prediction, and calculating the mean squared error of each base model based on the prediction results and the corresponding label data; calculating the weights of each base model based on the mean squared error; multiplying the weights of the base models by the prediction results to obtain a weighted prediction result; extracting the corresponding process parameters from the weighted prediction result to form a matrix; determining the final prediction result based on the matrix and the linear regression model; using the mean error as a loss function, and incorporating the data quality score of the feature data into the loss function; adjusting the parameters of the meta-model by minimizing the loss function, and repeating the training until the meta-model converges to obtain the prediction model.
[0178] In one embodiment, when implementing the step of constructing the multi-weight master model, the processor 502 specifically implements the following steps:
[0179] Several models with satisfactory prediction performance are selected as base models, and a linear regression model is selected as a meta-model. The base models and the meta-model are stacked to form a multi-weighted master model.
[0180] In one embodiment, when implementing the step of calculating the data quality score of the feature data, the processor 502 specifically implements the following steps:
[0181] use Calculate the data quality score of the feature data, where s represents the quantity quality score of each feature data; S2 is the target deviation, representing the degree of deviation between the actual test result and the target value of the parameter, with a value between (0, 1); E M E represents the relative error ratio of the fabric cover. G This is the relative error ratio based on weight. M is the critical value for target deviation when the difference between the actual test result and the target value equals the error value; actual This is the actual value of the fabric cover; M target t is the target value for the fabrication; M G represents the error range of the fabric seal; actual This is the actual weight in grams; G target t is the target weight value; G The error range for weight is defined; the data quality scores of each feature data obtained are combined to form a data quality score set.
[0182] In one embodiment, when implementing the step of calculating the weights of the corresponding base model based on the mean square error of each base model, the processor 502 specifically implements the following steps:
[0183] use Calculate the weights of the corresponding base model, where W i The weights of the i-th base model; MSE i Let be the mean squared error of the i basic models. m represents the number of base models; n is the amount of training data; h is the number of process parameters; y ij This represents the predicted value of the j-th process parameter in the i-th row of data; s represents the true value of the j-th process parameter in the i-th row of feature data; i Let be the data quality score for the i-th feature data.
[0184] In one embodiment, when implementing the step of determining the final prediction result based on the matrix and the linear regression model, the processor 502 specifically implements the following steps:
[0185] Determine the coefficient matrix of the linear regression model; perform row-wise partitioning and transpose on the coefficient matrix to obtain a new coefficient matrix; perform dot product operation on the new coefficient matrix and each of the new coefficient matrices to obtain the predicted process parameter value for each feature data; combine all the predicted process parameter values to form the final prediction result.
[0186] It should be understood that in the embodiments of this application, the processor 502 may be a central processing unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.
[0187] It will be understood by those skilled in the art that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program includes program instructions and can be stored in a storage medium, which is a computer-readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the process steps of the embodiments of the above methods.
[0188] Therefore, the present invention also provides a storage medium. This storage medium can be a computer-readable storage medium. The storage medium stores a computer program, wherein when executed by a processor, the computer program causes the processor to perform the following steps:
[0189] Obtain the production order data to be predicted; preprocess the production order data to obtain the preprocessing result; input the preprocessing result into the prediction model to predict process parameters to obtain the prediction result; wherein, the prediction model is obtained by training a multi-weighted master model formed by stacking several weighted base models and meta-models using the preprocessed and labeled production order data as a sample set, the weights of the base models are determined by the prediction performance of the base models, and the quality score of each preprocessed and labeled data is added to the loss function during the training process; output the prediction result.
[0190] In one embodiment, the processor executes the computer program to implement the prediction model by preprocessing and labeling production order data as a sample set, and training a multi-weighted master model formed by stacking several weighted base models and meta-models. The weights of the base models are determined by their prediction performance. When the loss function during training incorporates the quality score of each preprocessed and labeled data point, the specific steps are as follows:
[0191] Acquire production order data, and preprocess and label the production order data to obtain a sample set, wherein the sample set includes feature data and label data;
[0192] Construct a multi-weighted master model; calculate the data quality score of the feature data; input the feature data into each base model for process parameter prediction, and calculate the mean squared error of each base model based on the prediction results and the corresponding label data; calculate the weights of the corresponding base models based on the mean squared error of each base model; multiply the weights of the base models by the prediction results to obtain a weighted prediction result; extract the corresponding process parameters from the weighted prediction results to form a matrix; determine the final prediction result based on the matrix and the linear regression model; use the mean error as the loss function, and add the data quality score of the feature data to the loss function; adjust the parameters of the meta-model by minimizing the loss function, and repeat training until the meta-model converges to obtain the prediction model.
[0193] In one embodiment, when the processor executes the computer program to implement the step of constructing the multi-weight master model, it specifically implements the following steps:
[0194] Several models with satisfactory prediction performance are selected as base models, and a linear regression model is selected as a meta-model. The base models and the meta-model are stacked to form a multi-weighted master model.
[0195] In one embodiment, when the processor executes the computer program to implement the step of calculating the data quality score of the feature data, it specifically implements the following steps:
[0196] use Calculate the data quality score of the feature data, where s represents the quantity quality score of each feature data; S2 is the target deviation, representing the degree of deviation between the actual test result and the target value of the parameter, with a value between (0, 1); E M E represents the relative error ratio of the fabric cover. G This is the relative error ratio based on weight. M is the critical value for target deviation when the difference between the actual test result and the target value equals the error value; actual This is the actual value of the fabric cover; M target t is the target value for the fabrication; M G represents the error range of the fabric seal; actual This is the actual weight in grams; G target t is the target weight value; G The error range for weight is defined; the data quality scores of each feature data obtained are combined to form a data quality score set.
[0197] In one embodiment, when the processor executes the computer program to implement the step of calculating the weights of the corresponding base model based on the mean square error of each base model, it specifically implements the following steps:
[0198] use Calculate the weights of the corresponding base model, where W i The weights of the i-th base model; MSE i Let be the mean squared error of the i basic models. m represents the number of base models; n is the amount of training data; h is the number of process parameters; y ij This represents the predicted value of the j-th process parameter in the i-th row of data; s represents the true value of the j-th process parameter in the i-th row of feature data; i Let be the data quality score for the i-th feature data.
[0199] In one embodiment, when the processor executes the computer program to implement the step of determining the final prediction result based on the matrix and the linear regression model, it specifically implements the following steps:
[0200] Determine the coefficient matrix of the linear regression model; perform row-wise partitioning and transpose on the coefficient matrix to obtain a new coefficient matrix; perform dot product operation on the new coefficient matrix and each of the new coefficient matrices to obtain the predicted process parameter value for each feature data; combine all the predicted process parameter values to form the final prediction result.
[0201] The storage medium can be any computer-readable storage medium capable of storing program code, such as a USB flash drive, portable hard drive, read-only memory (ROM), magnetic disk, or optical disk.
[0202] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0203] In the several embodiments provided by this invention, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For example, the division of each unit is merely a logical functional division, and there may be other division methods in actual implementation. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed.
[0204] The steps in the method of this invention can be adjusted, merged, or reduced in order according to actual needs. The units in the device of this invention can be merged, divided, or reduced according to actual needs. Furthermore, the functional units in the various embodiments of this invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0205] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, a terminal, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention.
[0206] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A method for recommending heat setting process parameters, characterized in that, include: Obtain the production order data to be predicted; The production order data to be predicted is preprocessed to obtain the preprocessing result; The preprocessing results are input into the prediction model to predict process parameters and obtain prediction results. The prediction model is obtained by training a multi-weight master model formed by stacking several weighted base models and meta-models after preprocessing and labeling the production order data as a sample set. The weight of the base model is determined by the prediction performance of the base model, and the loss function during the training process includes the quality score of each preprocessed and labeled data. Output the prediction result; The prediction model is obtained by training a multi-weighted master model, consisting of several weighted base models and meta-models, using preprocessed and labeled production order data as the sample set. The weights of the base models are determined by their predictive performance, and the loss function during training incorporates the quality score of each preprocessed and labeled data point, including: Acquire production order data, and preprocess and label the production order data to obtain a sample set, wherein the sample set includes feature data and label data; Construct a multi-weighted master model; Calculate the data quality score of the feature data; The feature data is input into each of the base models to predict process parameters, and the mean square error of each base model is calculated based on the prediction results and the corresponding label data. The weights of the corresponding base models are calculated based on the mean squared error of each base model. The weights of the base model are multiplied by the results predicted by the base model to obtain the weighted prediction result; The weighted prediction results are used to extract the corresponding process parameters to form a matrix; The final prediction result is determined based on the matrix and the linear regression model. The mean error is used as the loss function, and the data quality score of the feature data is added to the loss function; The parameters of the meta-model are adjusted by minimizing the loss function, and the training is repeated until the meta-model converges to obtain the prediction model.
2. The method for recommending heat setting process parameters according to claim 1, characterized in that, The construction of the multi-weight master model includes: Several models with satisfactory prediction performance are selected as base models, and a linear regression model is selected as a meta-model. The base models and the meta-model are stacked to form a multi-weighted master model.
3. The method for recommending heat setting process parameters according to claim 1, characterized in that, The calculation of the data quality score for the feature data includes: use Calculate the data quality score of the feature data, where s represents the quantity quality score of each feature data; E M E represents the relative error ratio of the fabric cover. G This is the relative error ratio based on weight. M is the critical value for target deviation when the difference between the actual test result and the target value equals the error value; actual This is the actual value of the fabric cover; M target t is the target value for the fabrication; M G represents the error range of the fabric seal; actual This is the actual weight in grams; G target t is the target weight value. G The error range for weight is defined; the data quality scores of each feature data obtained are combined to form a data quality score set.
4. The method for recommending heat setting process parameters according to claim 1, characterized in that, The step of calculating the weights of the corresponding base models based on the mean square error of each base model includes: use Calculate the weights of the corresponding base model, where W i The weights of the i-th base model; MSE i Let be the mean squared error of the i basic models. m represents the number of base models; n is the amount of training data; h is the number of process parameters; y ij This represents the predicted value of the j-th process parameter in the i-th row of data; This represents the true value of the j-th process parameter in the i-th row of feature data.
5. The method for recommending heat setting process parameters according to claim 1, characterized in that, The step of determining the final prediction result based on the matrix and the linear regression model includes: Determine the coefficient matrix of the linear regression model; The coefficient matrix is split by row and transposed to obtain a new coefficient matrix; Perform a dot product operation between the matrix and each of the new coefficient matrices to obtain the predicted value of the process parameters for each feature data; The predicted values of all the process parameters are combined to form the final prediction result.
6. The method for recommending heat setting process parameters according to claim 2, characterized in that, The base models include the GBR model, the RFR model, and the KNN model.
7. A device for recommending heat setting process parameters, characterized in that, The apparatus uses the method for recommending heat setting process parameters as described in any one of claims 1 to 6, including: The acquisition unit is used to acquire production order data to be predicted. A preprocessing unit is used to preprocess the production order data to be predicted in order to obtain a preprocessing result; The prediction unit is used to input the preprocessing results into the prediction model to predict process parameters and obtain prediction results. The prediction model is obtained by training a multi-weight master model formed by stacking several weighted base models and meta-models after preprocessing and labeling the production order data as a sample set. The weight of the base model is determined by the prediction performance of the base model, and the loss function during the training process includes the quality score of each preprocessed and labeled data. The output unit is used to output the prediction result.
8. A computer device, characterized in that, The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the method as described in any one of claims 1 to 6.
9. A storage medium, characterized in that, The storage medium stores a computer program that, when executed by a processor, implements the method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Printing and dyeing setting machine energy consumption classification prediction method based on gradient promotion decision tree
CN111191712A
Office building rent prediction method and system based on Stacking ensemble learning algorithm
CN117635280A