A tin paste printing quality prediction system and method based on an XGBoost-LSTM hybrid model

By using the XGBoost-LSTM hybrid model, combined with data preprocessing and grey relational theory, a solder paste printing quality prediction model is constructed, which solves the problem of low efficiency in traditional methods and achieves efficient and accurate quality prediction and production optimization.

CN118247262BActive Publication Date: 2026-07-21TIANJIN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
TIANJIN UNIV
Filing Date
2024-04-25
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

Traditional solder paste printing quality control methods rely on manual experience, which is inefficient and makes it difficult to accurately predict quality problems in complex production processes. Existing technologies are also unable to effectively capture the long-term dependencies and uncontrollable factors in time-series data.

Method used

A quality prediction model that can dynamically adapt to changes in production is constructed by adopting an XGBoost-LSTM hybrid model, which combines data preprocessing, time series analysis and grey relational theory. LSTM captures time series dependencies, XGBoost improves the model’s prediction performance, identifies key influencing factors and constructs an efficient and accurate prediction model.

Benefits of technology

It improves the accuracy and generalization ability of solder paste printing quality prediction, monitors printing quality in real time, optimizes the production process, reduces rework and scrap rates, and improves production efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118247262B_ABST
    Figure CN118247262B_ABST
Patent Text Reader

Abstract

The application discloses a tin paste printing quality prediction system and method based on an XGBoost-LSTM hybrid model, which comprises the following steps: S1, tin paste printing original data sets are preliminarily processed to obtain printing quality data packets and tin paste printing data packets; S2, an LSTM model is used to analyze time sequence data of the printing quality data packets to construct a time sequence prediction model, the time sequence prediction model combines printing quality parameters at historical moments to output time sequence prediction values of quality data; S3, a grey correlation method is used to analyze key features of the tin paste printing data packets to obtain key values of tin paste printing; S4, according to the time sequence prediction values of the quality data and the key values of the tin paste printing, feature sets of tin paste printing quality are screened and constructed; S5, printing quality feature parameters in the feature sets are selected as inputs based on an XGBoost algorithm to construct a printing quality prediction model, and the printing quality prediction model outputs tin paste printing quality parameter prediction values; S6, the printing quality prediction model is evaluated by using independent test data sets to verify the effectiveness of the printing quality prediction model; the application improves printing quality prediction precision, provides a scientific basis for printing process optimization, and has important industrial application value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical fields:

[0001] This invention relates to the technical fields of machine learning algorithms for industrial quality management, data mining, and surface mount technology, and in particular to a solder paste printing quality prediction system and method based on an XGBoost-LSTM hybrid model. Background technology:

[0002] In modern industrial production, quality control is a key factor in ensuring product reliability and corporate competitiveness. Especially in the field of surface mount technology (SMT), solder paste printing, as a fundamental process, directly impacts the assembly accuracy of electronic components and the performance of the final product. Statistics show that as many as 60%-70% of SMT quality problems originate from solder paste printing defects, highlighting the importance of accurate quality prediction in the solder paste printing process.

[0003] Traditional quality control methods rely on human experience and sampling inspection, which are inefficient when dealing with large-scale production data and struggle to accurately predict quality problems in complex production processes. With the development of artificial intelligence and data science, machine learning algorithms and data mining techniques offer new solutions for industrial quality management. Long Short-Term Memory (LSTM) networks and XGBoost algorithms, as advanced machine learning tools, have proven to have significant advantages in processing time-series data and improving prediction accuracy.

[0004] The LSTM algorithm can capture long-term dependencies in time-series data, while the XGBoost algorithm effectively improves the model's predictive performance through ensemble learning. Combining these two algorithms for solder paste printing quality prediction not only improves prediction accuracy but also mitigates the impact of uncontrollable factors in the production process to some extent, thereby enabling dynamic monitoring and real-time optimization of printing quality.

[0005] This invention aims to provide a method for predicting solder paste printing quality by integrating LSTM and XGBoost algorithms. Through in-depth analysis of factors affecting printing quality, it mines patterns in time-series data and identifies key influencing parameters to construct an efficient and accurate prediction model. This method is expected to significantly improve the quality management level of SMT production processes, reduce rework and scrap rates, and enhance production efficiency and economic benefits. Summary of the Invention:

[0006] This invention proposes a solder paste printing quality prediction system and method based on an XGBoost-LSTM hybrid model. This invention integrates deep learning and ensemble learning techniques to improve the accuracy of quality control in the solder paste printing process. The invention not only deeply analyzes the inherent characteristics of solder paste printing data but also systematically mines all factors that may affect printing quality, paying particular attention to variables that are difficult to control in actual printing processes. By deploying a Long Short-Term Memory (LSTM) network algorithm to capture long-term dependencies in time-series data, combined with the efficient ensemble learning capability of the XGBoost algorithm, this invention constructs a model that can dynamically adapt to production changes and provide real-time quality predictions. This invention is applicable to the field of industrial quality management, especially the printing process in SMT technology. This method deeply analyzes the factors affecting printing quality, mines time-series data patterns, and identifies key parameters to construct an efficient and accurate prediction model. Data preprocessing in this invention includes missing value handling, outlier correction, and normalization to ensure the accuracy of the dataset. The LSTM module captures time-series dependencies, while the XGBoost algorithm improves the model's predictive performance. The algorithm framework of this invention integrates data preprocessing, time-series analysis, and machine learning techniques to adapt to changes in the production environment. The grey relational analysis theory of this invention is used to identify key parameters from multi-dimensional data. The XGBoost algorithm of this invention constructs a model that learns data patterns, improving prediction accuracy and generalization ability. The model is validated through independent test datasets, monitors printing quality in real time, and optimizes the production process. This invention improves the accuracy of printing quality prediction, provides a scientific basis for printing process optimization, and has significant industrial application value. It is expected to significantly improve SMT quality management, reduce rework and scrap rates, and increase production efficiency.

[0007] To solve the technical problems, the present invention adopts the following technical solution:

[0008] A solder paste printing quality prediction system based on an XGBoost-LSTM hybrid model includes:

[0009] The data preprocessing module performs preliminary processing on the raw dataset of solder paste printing to obtain print quality data packages and solder paste printing data packages;

[0010] The time-series information mining module uses the LSTM algorithm to analyze the time-series data of the print quality data packet, and combines it with the print quality parameters of historical moments to obtain the time-series prediction value of the quality data.

[0011] The key factor identification module uses the grey relational analysis method to analyze the key features of solder paste printing data packets to obtain key values ​​for solder paste printing.

[0012] The feature selection module filters and constructs a feature set for solder paste printing quality based on the time-series predicted values ​​of quality data and key numerical values ​​of solder paste printing.

[0013] The printing quality prediction model is based on the XGBoost algorithm, which takes the selected feature parameters in the feature set as input and the solder paste printing quality parameters as output.

[0014] Print quality prediction model validation: The model is evaluated using an independent test dataset, various evaluation indicators are calculated, and the model is compared with existing models to verify the effectiveness of the prediction model.

[0015] Furthermore, the time-series prediction model includes a first LSTM layer, a second LSTM layer, a first Dropout layer, a second Dropout layer, and a fully connected layer; the first LSTM layer and the second LSTM layer are connected through the first Dropout layer; the second LSTM layer and the fully connected layer are connected through the second Dropout layer; both the first LSTM layer and the second LSTM layer include an input gate, a forget gate, and an output gate; wherein:

[0016] The input gate is used to selectively accept information from the current moment, and the valid information is summarized into the cell state. The calculation formula is as follows:

[0017] i t =σ(W i *h t-1 +U i *X t +b i )

[0018] a t =tanh(W a *h t-1 +U a *X t +b a )

[0019] Among them: W i W a U i U a Represents the weight parameter, b i b a It is the bias value;

[0020] C t =C t-1 *f t +i t *a t

[0021] The forget gate is used to forget the information of the hidden layer from the previous time step and update the data state information C. t The calculation formula is as follows:

[0022] f t =σ(wf *h t-1 +U f *X t +b f )

[0023] In the formula: W f and U f These are the model's weight coefficients, b f It is the bias, f t The activation value of the forget gate is the proportion of the hidden state information from the previous moment that is preserved in the calculation at the current moment.

[0024] After passing through the forget gate and the input gate, the information in the new data state consists of the partially remembered data from the previous time step and the partially useful information filtered through the input gate at the current time step. The update formula is:

[0025] C t =C t-1 *f t +i t *a t

[0026] The output gate is used to calculate the output value of the current layer at the current moment. The calculation formula is as follows:

[0027] O t =σ(W o *h t-1 +U o *X t +b o )

[0028] h t =O t *tanh(C t )

[0029] Among them: W o U o b is the weighting coefficient. o This is the bias value.

[0030] Furthermore, the time-series information mining module uses the LSTM algorithm to analyze the time-series data of the print quality data packet, and combines it with the print quality parameters at historical moments to obtain the time-series predicted value of the quality data; including:

[0031] The time sequence of quality parameter changes is constructed by arranging the solder paste printing data packages of each PCB board in chronological order of printing time.

[0032] The following formula is used to map all feature data of the time series of quality parameter change trends to the [0-1] interval to construct solder paste printing quality time series data:

[0033]

[0034] Where: x is the actual value of the feature parameter, max(x) and min(x) are the maximum and minimum values ​​of the feature column, and x′ is the normalized feature value;

[0035] Based on the time series data of solder paste printing quality, the first LSTM layer and the second LSTM layer are trained using the following loss function:

[0036]

[0037] Where: n represents the number of samples in each training batch, y t This indicates the print quality parameters predicted for the next moment. This represents the actual value of the corresponding quality parameter.

[0038] Furthermore, the key factor identification module uses the grey relational analysis method to analyze the key features of the solder paste printing data package to obtain the key numerical process of solder paste printing; including:

[0039] The feature selection module filters and constructs a feature set for solder paste printing quality based on the time-series predicted values ​​of quality data and key numerical values ​​of solder paste printing.

[0040] The grey relational analysis method is used to analyze the key features of solder paste printing data packets to obtain key numerical processes for solder paste printing. This process involves: dividing the solder paste printing data packets into sequences to construct a reference sequence of solder paste printing quality evaluation indicators and a feature sequence of various process parameters affecting printing quality; wherein the solder paste printing quality evaluation indicator sequence includes: mean solder paste volume, standard deviation of solder paste volume, and the percentage of well-printed pads.

[0041] The following formula is used to perform dimensionless processing on the reference sequence of solder paste printing quality evaluation indicators and the characteristic sequence of various process parameters affecting printing quality;

[0042]

[0043] Transform the data to eliminate the effects of different units and orders of magnitude, while retaining information about the degree of difference between variables;

[0044] Where: x i The original data after the solder paste printing data packet sequence is divided. x′ is the average value of the sequence data after the solder paste printing data packet sequence is divided. i This is the processed data after the solder paste printing data packet sequence is divided; i is the sequence number.

[0045] The correlation between the reference sequence of solder paste printing quality evaluation indicators and the characteristic sequence of various process parameters affecting printing quality is calculated using the following formula:

[0046]

[0047] Where: ζ i (k) is the grey relational coefficient, ρ is the discrimination coefficient, which is generally taken as 0.5; x0 is the parent sequence; {x1,x2,x3…,x m} represents the subsequence; the parent sequence is determined by the three quality parameters mentioned above: mean solder paste volume, standard deviation of solder paste volume, and percentage of well-printed pads; the subsequence is determined by the parameters affecting solder paste printing quality; k is the data sequence number in the sequence;

[0048] The grey relational degree of printing quality is obtained by calculating the characteristic sequence of each process parameter affecting printing quality using the following formula:

[0049]

[0050] Where: r 0i The degree of correlation is given by n, where n is the total number of data points in the sequence.

[0051] Based on the grey relational analysis of printing quality, the characteristic sequences of each influencing factor are sorted to obtain the key values ​​affecting solder paste printing quality.

[0052] Furthermore, the printing quality prediction model, based on the XGBoost algorithm, takes selected feature parameters from the feature set as input and solder paste printing quality parameters as output; including:

[0053] A dataset for training a printing quality prediction model is constructed based on printing quality feature parameters and actual printing quality data. This includes dimensionless processing of the dataset and mapping all feature values ​​to the [0,1] interval using the min-max method. Then, the dataset is randomly divided into a training set and a validation set in an 8:2 ratio.

[0054] Set the key parameters of the XGBoost algorithm;

[0055] Base learner initialization: Start the model training process, first train the first base learner, and calculate the residual between the predicted value and the true value;

[0056] Iteratively construct the decision tree: Using the residual as the objective, train subsequent base learners one by one; for the construction of the t-th decision tree, perform the following operations:

[0057] (a) For each sample i, calculate the loss function L based on f in the current round. t-1 (x i First derivative g ti Second derivative h ti Calculate the first derivative of all samples and Second derivative and

[0058] (b) Generate a tree of depth 0;

[0059] (c) For each node, attempt to split it. Arrange the samples according to the feature size for different features, and split the node sequentially according to the size of different feature values. The sums of the first and second derivatives of the left and right subtrees after splitting are as follows:

[0060] G L =G L +g ti G R =GG L

[0061] H L =H L +h ti H R =HH L

[0062] Calculate the gain:

[0063]

[0064] It is the value of the left subtree node. It is the value of the right subtree node. The value before the node splits, γ is the added complexity due to having an additional leaf node;

[0065] The maximum gain is obtained using the following formula:

[0066]

[0067] (d) If the maximum gain is 0 or a preset value, or the tree depth reaches the maximum limit, then the current decision tree is completed and a weak learner h is obtained. t (x);

[0068] The newly trained base learners are integrated into the print quality prediction model to update the prediction values ​​and evaluate whether the iteration termination condition is met. If not, the iteration process continues. If it is met, all weak learners are merged to form the final solder paste print quality prediction model.

[0069] This invention can also be implemented using the following technical solutions:

[0070] A method for predicting solder paste printing quality based on an XGBoost-LSTM hybrid model includes the following steps:

[0071] S1. Preliminary processing of the raw dataset of solder paste printing yields a print quality data package and a solder paste printing data package;

[0072] S2. An LSTM model is used to analyze the time series data of the print quality data package to construct a time series prediction model. The time series prediction model combines the print quality parameters of historical moments to output the time series prediction value of the quality data.

[0073] S3. Use the grey relational analysis method to analyze the key features in the solder paste printing data package to obtain the key values ​​of solder paste printing;

[0074] S4. Based on the time-series predicted values ​​of quality data and key values ​​of solder paste printing, construct a feature set for solder paste printing quality.

[0075] S5. Based on the XGBoost algorithm, select the printing quality feature parameters in the feature set as input to construct a printing quality prediction model. At the same time, the printing quality prediction model outputs the predicted values ​​of solder paste printing quality parameters.

[0076] S6. Evaluate the model using an independent test dataset, calculate various evaluation metrics, and compare it with existing models to verify the effectiveness of the prediction model.

[0077] Furthermore, the process of obtaining quality data by combining the time-series prediction model with the printing quality parameters at historical moments in step S2 includes:

[0078] The time sequence of quality parameter changes is constructed by arranging the solder paste printing data packages of each PCB board in chronological order of printing time.

[0079] The following formula is used to map all feature data of the time series of quality parameter change trends to the [0-1] interval to construct solder paste printing quality time series data:

[0080]

[0081] Where: x is the actual value of the feature parameter, max(x) and min(x) are the maximum and minimum values ​​of the feature column, and x′ is the normalized feature value;

[0082] Based on the time series data of solder paste printing quality, the first LSTM layer and the second LSTM layer are trained using the following loss function:

[0083]

[0084] Where: n represents the number of samples in each training batch, y t This indicates the print quality parameters predicted for the next moment. This represents the actual value of the corresponding quality parameter.

[0085] Furthermore, in step S3, the grey relational analysis method is used to analyze the key features of the solder paste printing data package to obtain the key numerical values ​​of solder paste printing, wherein:

[0086] Based on the solder paste printing data package, a reference sequence of solder paste printing quality evaluation indicators and a characteristic sequence of various process parameters affecting printing quality are constructed by sequence division; the solder paste printing quality evaluation indicator sequence includes: mean solder paste volume, standard deviation of solder paste volume, and percentage of good printed pads;

[0087] The following formula is used to perform dimensionless processing on the reference sequence of solder paste printing quality evaluation indicators and the characteristic sequence of various process parameters affecting printing quality;

[0088]

[0089] Where: x i The original data after the solder paste printing data packet sequence is divided. x′ is the average value of the sequence data after the solder paste printing data packet sequence is divided. i This is the processed data after the solder paste printing data packet sequence is divided; i is the sequence number.

[0090] The correlation between the reference sequence of solder paste printing quality evaluation indicators and the characteristic sequence of various process parameters affecting printing quality is calculated using the following formula:

[0091]

[0092] Where: ζ i (k) is the grey relational coefficient, ρ is the discrimination coefficient, which is generally taken as 0.5; x0 is the parent sequence, {x1,x2,x3…,x m} represents the subsequence; the parent sequence is determined by the three quality parameters mentioned above: mean solder paste volume, standard deviation of solder paste volume, and percentage of well-printed pads; the subsequence is determined by the parameters affecting solder paste printing quality; k is the data sequence number in the sequence;

[0093] The grey relational degree of printing quality is obtained by calculating the characteristic sequence of each process parameter affecting printing quality using the following formula:

[0094]

[0095] Where: r 0i The degree of correlation is given by n, where n is the total number of data points in the sequence.

[0096] Based on the grey relational analysis of printing quality, the characteristic sequences of each influencing factor are sorted to obtain the key values ​​affecting solder paste printing quality.

[0097] Further, step S4, which involves selecting printing quality feature parameters from the feature set based on the XGBoost algorithm as input to construct a printing quality prediction model, and simultaneously outputting predicted values ​​of solder paste printing quality parameters from the printing quality prediction model, includes:

[0098] A dataset for training a printing quality prediction model is constructed based on printing quality feature parameters and actual printing quality data; this includes dimensionless processing of the dataset, mapping all feature values ​​to the [0,1] interval using the min-max method; and the dataset is randomly divided into a training set and a validation set in an 8:2 ratio.

[0099] Set the key parameters of the XGBoost algorithm;

[0100] Base learner initialization: Start the model training process, first train the first base learner, and calculate the residual between the predicted value and the true value;

[0101] Iteratively construct the decision tree: Using the residual as the objective, train subsequent base learners one by one; for the construction of the t-th decision tree, perform the following operations:

[0102] (a) For each sample i, calculate the loss function L based on f in the current round. t-1 (x i First derivative g ti Second derivative h ti Calculate the first derivative of all samples and Second derivative and

[0103] (b) Generate a tree of depth 0;

[0104] (c) For each node, attempt to split it. Arrange the samples according to the feature size for different features, and split the node sequentially according to the size of different feature values. The sums of the first and second derivatives of the left and right subtrees after splitting are as follows:

[0105] G L =G L +g ti G R =GG L

[0106] H L =H L +h ti H R =HH L

[0107] Calculate the gain:

[0108]

[0109] It is the value of the left subtree node. It is the value of the right subtree node. The value before the node splits, γ is the added complexity due to having an additional leaf node;

[0110] The maximum gain is obtained using the following formula:

[0111]

[0112] (d) If the maximum gain is 0 or a preset value, or the tree depth reaches the maximum limit, then the current decision tree is completed and a weak learner h is obtained. t (x);

[0113] The newly trained base learners are integrated into the print quality prediction model to update the prediction values ​​and evaluate whether the iteration termination condition is met. If not, the iteration process continues. If it is met, all weak learners are merged to form the final solder paste print quality prediction model.

[0114] Beneficial effects:

[0115] 1. The algorithm framework of this invention comprehensively applies data preprocessing, time-series data analysis, and machine learning techniques to construct a quality prediction model that can adapt to changes in the dynamic production environment. In the data preprocessing stage, this invention meticulously processes the original solder paste printing dataset, including imputing missing values, identifying and correcting outliers, and normalizing the data, ensuring the quality and consistency of the dataset. Subsequently, the LSTM algorithm is used to mine the time-series information of printing quality parameters, predicting future quality parameters by analyzing historical data, effectively capturing the time-series dependencies in the printing process.

[0116] 2. This invention employs grey relational analysis to mine key influencing factors in the printing process, identifying parameters that significantly impact printing quality from multi-dimensional data. Based on these analytical results, this invention selects input features crucial for quality prediction and constructs a quality prediction model based on the XGBoost algorithm. This model learns complex patterns and long-term dependencies in the data through training, improving the accuracy and generalization ability of predictions.

[0117] 3. The data preprocessing steps of this invention include merging PCB-level data and recalculating the mean, standard deviation, and percentage of good printed pads of solder paste volume.

[0118] 4. This invention establishes a time-series prediction model for quality data to reveal and reflect the influence of uncontrollable factors on printing quality parameters over time.

[0119] 5. Feature selection involves in-depth analysis of the feature columns of solder paste printing-related data, performing feature fusion and dimensionality reduction operations to screen out features highly correlated with printing quality, and optimizing the computational efficiency and prediction accuracy of the model.

[0120] 6. The model building steps based on the XGBoost algorithm further include determining the input and output features of the model, leveraging the efficiency, scalability, and flexibility of the XGBoost algorithm, as well as its advantages in parallel computing and optimization techniques, to improve the speed of model training and prediction, and ensure that the model can accurately predict the quality parameters in the solder paste printing process.

[0121] Meanwhile, during the model validation phase, this invention uses an independent test dataset to evaluate the model. By calculating various evaluation indicators and comparing them with existing models, the effectiveness of the designed predictive model is verified. The model of this invention can monitor printing quality in real time and provide immediate feedback to the production process, thereby optimizing quality control.

[0122] In summary, the technical solution of this invention fully considers the uncontrollable factors in the printing process. By mining time-series data and key influencing factors, it establishes an accurate quality prediction model that can describe the solder paste printing process. This model not only improves the accuracy of printing quality prediction but also provides a scientific basis for optimizing the printing process, thus possessing significant industrial application value. Attached Figure Description

[0123] Figure 1 This is an overall architecture diagram of the present invention;

[0124] Figure 2 This is a schematic diagram of a two-layer LSTM model structure;

[0125] Figure 3 This is a schematic diagram of the XGBoost tree splitting process. Detailed implementation method:

[0126] The following is in conjunction with the appendix Figure 1-3 The present invention will be described in detail below:

[0127] The specific embodiments of this invention involve a multi-stage algorithm for quality prediction during solder paste printing, aiming to integrate controllable and uncontrollable factors to achieve accurate prediction of printing quality. Controllable factors, such as squeegee pressure, ambient temperature, and production materials, as well as uncontrollable factors, such as printer performance, wear level, and slight variations in solder paste viscosity, are all considered in this invention. This invention particularly focuses on how to incorporate those uncontrollable factors that are difficult to quantify into the prediction model to improve the accuracy of prediction.

[0128] In the implementation process, the original dataset for solder paste printing is first preprocessed, including imputation of missing values, identification and correction of outliers, and data normalization to ensure the accuracy and consistency of the dataset. Next, the printing quality parameters are treated as time-series data, and the Long Short-Term Memory (LSTM) algorithm is used to mine the time-series information of these parameters. By analyzing historical data, the quality parameters for future moments are predicted, effectively capturing the temporal dependencies in the printing process to compensate for the impact of uncontrollable factors on printing quality.

[0129] The data preprocessing module performs preliminary processing on the raw dataset of solder paste printing to obtain print quality data packages and solder paste printing data packages;

[0130] The time-series information mining module uses the LSTM algorithm to analyze the time-series data of the print quality data package and combines it with the print quality parameters at historical moments to obtain the time-series predicted values ​​of the quality data; where:

[0131] The time-series prediction model includes a first LSTM layer, a second LSTM layer, a first Dropout layer, a second Dropout layer, and a fully connected layer; the first LSTM layer and the second LSTM layer are connected through the first Dropout layer; the second LSTM layer and the fully connected layer are connected through the second Dropout layer; both the first LSTM layer and the second LSTM layer include an input gate, a forget gate, and an output gate; wherein:

[0132] The input gate is used to selectively accept information from the current moment, and the valid information is summarized into the cell state. The calculation formula is as follows:

[0133] i t =σ(W i *h t-1 +U i *X t +b i )

[0134] a t =tanh(W a *h t-1 +U a *X t +b a )

[0135] Among them: W i W a U i U a Represents the weight parameter, b i b a It is the bias value;

[0136] C t =C t-1 *ft +i t *a t

[0137] The forget gate is used to forget the information of the hidden layer from the previous time step and update the data state information C. t The calculation formula is as follows:

[0138] f t =σ(W f *h t-1 +U f *X t +b f )

[0139] In the formula: W f and U f These are the model's weight coefficients, b f It is the bias, f t The activation value of the forget gate is the proportion of the hidden state information from the previous moment that is preserved in the calculation at the current moment.

[0140] After passing through the forget gate and the input gate, the information in the new data state consists of the partially remembered data from the previous time step and the partially useful information filtered through the input gate at the current time step. The update formula is:

[0141] C t =C t-1 *f t +i t *a t

[0142] The output gate is used to calculate the output value of the current layer at the current moment. The calculation formula is as follows:

[0143] O t =σ(W o *h t-1 +U o *X t +b o )

[0144] h t =O t *tanh(C t )

[0145] Among them: W o U o b is the weighting coefficient. o This is the bias value.

[0146] The time sequence of quality parameter changes is constructed by arranging the solder paste printing data packages of each PCB board in chronological order of printing time.

[0147] The following formula is used to map all feature data of the time series of quality parameter change trends to the [0-1] interval to construct solder paste printing quality time series data:

[0148]

[0149] Where: x is the actual value of the feature parameter, max(x) and min(x) are the maximum and minimum values ​​of the feature column, and x′ is the normalized feature value;

[0150] Based on the time series data of solder paste printing quality, the first LSTM layer and the second LSTM layer are trained using the following loss function:

[0151]

[0152] Where: n represents the number of samples in each training batch, y t This indicates the print quality parameters predicted for the next moment. This represents the actual value of the corresponding quality parameter.

[0153] The key factor identification module uses the grey relational analysis method to analyze the key features of solder paste printing data packets to obtain key values ​​for solder paste printing.

[0154] The feature selection module filters and constructs a feature set for solder paste printing quality based on the time-series predicted values ​​of quality data and key values ​​of solder paste printing; it also constructs a reference sequence of solder paste printing quality evaluation indicators and a feature sequence of various process parameters affecting printing quality by dividing the solder paste printing data package into sequences; wherein: the solder paste printing quality evaluation indicator sequence includes: mean solder paste volume, standard deviation of solder paste volume, and percentage of good printed pads;

[0155] The following formula is used to perform dimensionless processing on the reference sequence of solder paste printing quality evaluation indicators and the characteristic sequence of various process parameters affecting printing quality;

[0156]

[0157] Where: x i The original data after the solder paste printing data packet sequence is divided. x′ is the average value of the sequence data after the solder paste printing data packet sequence is divided. i This is the processed data after the solder paste printing data packet sequence is divided; i is the sequence number.

[0158] The correlation between the reference sequence of solder paste printing quality evaluation indicators and the characteristic sequence of various process parameters affecting printing quality is calculated using the following formula:

[0159]

[0160] Where: ζ i (k) is the grey relational coefficient, ρ is the discrimination coefficient, which is generally taken as 0.5; x0 is the parent sequence (also known as the reference sequence), {x1,x2,x3…,x m} represents the subsequence (also known as the comparison sequence). The parent sequence is determined by the three quality parameters mentioned above: mean solder paste volume, standard deviation of solder paste volume, and percentage of well-printed pads. The subsequence is determined by the parameters affecting solder paste printing quality; k is the data sequence number in the sequence.

[0161] The grey relational degree of printing quality is obtained by calculating the characteristic sequence of each process parameter affecting printing quality using the following formula:

[0162]

[0163] Where: r 0i The degree of correlation is given by n, where n is the total number of data points in the sequence.

[0164] Based on the grey relational analysis of printing quality, the characteristic sequences of each influencing factor are sorted to obtain the key values ​​affecting solder paste printing quality.

[0165] The printing quality prediction model is based on the XGBoost algorithm, which takes the selected feature parameters in the feature set as input and the solder paste printing quality parameters as output.

[0166] Print quality prediction model validation: The model is evaluated using an independent test dataset, various evaluation indicators are calculated, and the model is compared with existing models to verify the effectiveness of the prediction model.

[0167] In actual production, this invention considers the printing parameters corresponding to all solder joints on the PCB board, using solder paste volume as pad-level data and printing parameters as board-level data. By calculating the mean and standard deviation of solder paste volume for all solder joints on the PCB board, as well as the proportion of well-printed pads, this invention can comprehensively describe the solder paste printing quality in multiple dimensions.

[0168] This invention employs a two-layer LSTM network structure to better capture complex patterns and long-term dependencies in print quality parameters, while avoiding overly complex models. By introducing Dropout layers between LSTM layers and between LSTM and fully connected layers, the model randomly discards the outputs of some neurons during training, thereby reducing the risk of overfitting and improving the model's generalization ability and robustness.

[0169] In summary, the embodiments of the present invention provide a new quality prediction tool for the solder paste printing industry. This tool can not only improve the prediction accuracy of printing quality, but also provide a scientific basis for optimizing the printing process, and has significant industrial application value.

[0170] In the implementation of this invention, grey relational analysis is used to identify and select key influencing factors on solder paste printing quality. The detailed steps of this method are as follows:

[0171] 1. Sequence Definition: First, define the parent sequence (reference sequence), which consists of three key quality evaluation indicators for solder paste printing: mean solder paste volume, standard deviation of solder paste volume, and percentage of well-printed pads. The sub-sequences (feature sequences) are composed of various process parameters that affect printing quality.

[0172] 2. Dimensionless Data Transformation: The data of the parent and child sequences are dimensionless using the mean method, calculated using the formula...

[0173]

[0174] 3. Transform the data to eliminate the effects of different units and orders of magnitude, while retaining information about the degree of difference between variables.

[0175] 4. Setting the resolution coefficient: The resolution coefficient ρ is set to 0.5, which is used to calculate the correlation coefficient between the subsequence and the parent sequence, thereby evaluating the correlation between each factor and printing quality.

[0176] 5. Grey Relational Degree Calculation: Calculate the grey relational degree of each subsequence. This measure reflects the degree of similarity between each factor and print quality.

[0177] 6. Ranking of Key Factors: Based on the calculated grey relational degrees, the feature sequences of each influencing factor are ranked. Factors with high correlation degrees are considered key factors affecting solder paste printing quality and are given priority in model construction.

[0178] Through the steps described above, this invention accurately identifies the factors that have the most significant impact on solder paste printing quality, laying a solid data foundation for building an accurate quality prediction model. The application of this method not only improves the model's prediction accuracy but also provides crucial data support for the continuous optimization of the printing process.

[0179] In actual production practice, process parameters are usually set manually, and the correlation between these parameters is low. Considering the need for dynamic optimization of these parameters during production, this invention incorporates each process parameter as an independent feature column into the model construction without additional processing, in order to maintain the flexibility and adaptability of the model.

[0180] Regarding material parameters, given their stability during the production cycle and the high correlation between parameters, this invention adopts a feature dimension optimization strategy to simplify model complexity and improve model performance. For example, the correspondence between the PCB board size and the stencil matching degree is effectively eliminated through feature selection and dimensionality reduction, thereby reducing the computational burden of model training, lowering the risk of overfitting, and enhancing the model's application effect in actual production.

[0181] In a specific embodiment of the present invention, the process of constructing a solder paste printing quality prediction model using the XGBoost algorithm follows the detailed steps below:

[0182] 1. Data Preparation: Based on the previously determined feature selection results and actual print quality data, a dataset for model training was constructed. The dataset was dimensionless, and the min-max method was used to map all feature values ​​to the [0,1] interval. Then, the dataset was randomly divided into training and validation sets in an 8:2 ratio.

[0183] 2. Algorithm Parameter Initialization: Set the key parameters of the XGBoost algorithm, including but not limited to:

[0184] learning_rate: Adjusts the impact of weak learners on the final performance of the model. A lower learning rate helps the model learn robustly, but may require more iterations.

[0185] n_estimators (number of base learners): controls the number of iterations during the model improvement process. Increasing this number appropriately can improve model performance, but the computational cost will also increase.

[0186] max_depth (maximum depth of the tree): limits the complexity of the decision tree and prevents overfitting.

[0187] min_child_weight (minimum sum of child node sample weights): controls the number of branches in the tree, affecting model complexity.

[0188] colsample_bytree (feature subsampling rate per tree): Reduces reliance on a single feature and increases model diversity.

[0189] Subsample (sample sampling rate): Reduces the risk of overfitting, but may cause underfitting.

[0190] gamma (minimum loss reduction for node splits): Increasing this value makes the model more conservative.

[0191] reg_alpha (L1 regularization weights): Promotes sparse weights in the model, enhancing the regularization effect.

[0192] reg_lambda (L2 regularization weights): Controls model complexity and reduces dependence on specific features.

[0193] By using cross-validation and grid search techniques, the optimal combination of the above parameters is determined to optimize model performance.

[0194] 3. Base learner initialization: Start the model training process, first train the first base learner, and calculate the residual between the predicted value and the true value.

[0195] 4. Iteratively construct the decision tree: Using the residual as the objective, train subsequent base learners one by one. For the construction of the t-th decision tree, perform the following operations:

[0196] (a) For each sample i, calculate the loss function L based on f in the current round. t-1 (x i First derivative g ti Second derivative h ti Calculate the first derivative of all samples and Second derivative and

[0197] (b) First, generate a tree with a depth of 0.

[0198] (c) For each node, attempt to split it. Arrange the samples according to the feature size for different features, and split the node sequentially according to the size of different feature values. The sums of the first and second derivatives of the left and right subtrees after splitting are as follows:

[0199] G L =G L +g ti G R =GG L

[0200] H L =H L +h ti H R =HH L

[0201] Calculate the gain:

[0202]

[0203] It is the value of the left subtree node. It is the value of the right subtree node. The value before the node splits, γ is the added complexity due to having an additional leaf node.

[0204] Find the maximum gain by trying different splitting schemes:

[0205]

[0206] Split nodes based on the scheme that maximizes gain.

[0207] (d) If the maximum gain is 0 or a preset value, or if the tree depth reaches the maximum limit, then the current decision tree is complete, and a new weak learner h is obtained. t (x).

[0208] 5. Model Update: Integrate the newly trained base learners into the model, update the predicted values, and evaluate whether the iteration termination condition is met. If not, continue the iteration process; if met, merge all weak learners to form the final solder paste printing quality prediction model.

[0209] Through the above steps, this invention constructs an efficient solder paste printing quality prediction model that can accurately reflect quality changes during the printing process and provide data support for production optimization.

[0210] Although the present invention has been described above, the present invention is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many modifications under the guidance of the present invention without departing from the spirit of the present invention, and these modifications are all within the protection scope of the present invention.

Claims

1. A solder paste printing quality prediction system based on an XGBoost-LSTM hybrid model, characterized in that, include: The data preprocessing module performs preliminary processing on the raw dataset of solder paste printing to obtain print quality data packages and solder paste printing data packages; The time-series information mining module uses the LSTM algorithm to analyze the time-series data of the print quality data packet, and combines it with the print quality parameters of historical moments to obtain the time-series prediction value of the quality data. The key factor identification module uses the grey relational analysis method to analyze the key features of solder paste printing data packets to obtain key values ​​for solder paste printing; based on the solder paste printing data packets, the module performs sequence division to construct a reference sequence of solder paste printing quality evaluation indicators and a feature sequence of various process parameters that affect printing quality; The reference sequence of solder paste printing quality evaluation indicators includes: mean solder paste volume, standard deviation of solder paste volume, and proportion of good printed pads. The correlation between the reference sequence of solder paste printing quality evaluation indicators and the characteristic sequence of each process parameter affecting printing quality is calculated by the grey relational method, thereby screening out the key values ​​of solder paste printing. The feature selection module filters and constructs a feature set for solder paste printing quality based on the time-series predicted values ​​of the quality data and key values ​​of solder paste printing. The printing quality prediction model uses the selected feature parameters from the feature set as input and the solder paste printing quality parameters as output, based on the XGBoost algorithm. Validation of the print quality prediction model: The model is evaluated using an independent test dataset, various evaluation indicators are calculated, and the model is compared with existing models to verify its effectiveness.

2. The solder paste printing quality prediction system based on the XGBoost-LSTM hybrid model according to claim 1, characterized in that, The time-series information mining module includes a first LSTM layer, a second LSTM layer, a first Dropout layer, a second Dropout layer, and a fully connected layer; the first LSTM layer and the second LSTM layer are connected through the first Dropout layer; the second LSTM layer and the fully connected layer are connected through the second Dropout layer; both the first LSTM layer and the second LSTM layer include an input gate, a forget gate, and an output gate; wherein: The input gate is used to selectively accept information from the current moment, and the valid information is summarized into the cell state. The calculation formula is as follows: in: , , , Represents the weight parameter. , It is the bias value; The forget gate is used to forget the information of the hidden layer from the previous time step and update the data state information. The calculation formula is as follows: In the formula: and These are the model's weight coefficients. It is the bias value. The activation value of the forget gate is the proportion of the hidden state information from the previous moment that is preserved in the calculation at the current moment. After passing through the forget gate and the input gate, the information in the new data state consists of the partially remembered data from the previous time step and the partially useful information filtered through the input gate at the current time step. The update formula is: The output gate is used to calculate the output value of the current layer at the current moment. The calculation formula is as follows: in: , These are the weighting coefficients. This is the bias value.

3. The solder paste printing quality prediction system based on the XGBoost-LSTM hybrid model according to claim 1, characterized in that, The time-series information mining module uses the LSTM algorithm to analyze the time-series data of the printing quality data packets and combines it with the printing quality parameters at historical moments to obtain the time-series predicted values ​​of the quality data; including: arranging the printing data packets of each PCB board according to the printing time sequence to construct the time-series trend of quality parameter changes; The following formula is used to map all feature data of the time series of quality parameter change trends to the [0-1] interval to construct solder paste printing quality time series data: Where: x is the actual value of the feature parameter. and These are the maximum and minimum values ​​of this feature column. These are the normalized eigenvalues; Based on the time series data of solder paste printing quality, the first LSTM layer and the second LSTM layer are trained using the following loss function: Where: n represents the number of samples in each training batch. This indicates the print quality parameters predicted for the next moment. This represents the actual value of the corresponding quality parameter.

4. The solder paste printing quality prediction system based on the XGBoost-LSTM hybrid model according to claim 1, characterized in that, The key factor identification module uses the grey relational analysis method to analyze the key features of solder paste printing data packets to obtain key numerical processes for solder paste printing; including: The following formula is used to perform dimensionless processing on the reference sequence of solder paste printing quality evaluation indicators and the characteristic sequence of various process parameters affecting printing quality; Transform the data to eliminate the effects of different units and orders of magnitude, while retaining information about the degree of difference between variables; in: The original data after the solder paste printing data packet sequence is divided. The average value of the sequence data after dividing the solder paste printing data packet sequence. The processed data after the solder paste printing data packet sequence is divided; For sequence number; The correlation between the reference sequence of solder paste printing quality evaluation indicators and the characteristic sequence of various process parameters affecting printing quality is calculated using the following formula: in: The grey relational coefficient is... The resolution coefficient is typically set to 0.

5. The parent sequence; The parent sequence defines three quality parameters: mean solder paste volume, standard deviation of solder paste volume, and percentage of well-printed pads. The subsequence is defined as the parameters affecting solder paste printing quality. The sequence number is the index of the data in the sequence. The grey relational degree of printing quality is obtained by calculating the characteristic sequence of each process parameter affecting printing quality using the following formula: in: For relevance, This represents the total number of data items in the sequence. Based on the grey relational analysis of printing quality, the characteristic sequences of each influencing factor are sorted to obtain the key values ​​affecting solder paste printing quality.

5. The solder paste printing quality prediction system based on the XGBoost-LSTM hybrid model according to claim 1, characterized in that, The printing quality prediction model is based on the XGBoost algorithm; the printing quality prediction model takes the selected feature parameters in the feature set as input and the solder paste printing quality parameters as output. include: A dataset for training a printing quality prediction model is constructed based on printing quality feature parameters and actual printing quality data. This includes dimensionless processing of the dataset, mapping all feature values ​​to the interval [0, 1] using the min-max method, and then randomly dividing the dataset into a training set and a validation set in an 8:2 ratio. Set the key parameters of the XGBoost algorithm; Base learner initialization: Start the model training process, first train the first base learner, and calculate the residual between the predicted value and the true value; Iteratively construct the decision tree: Using the residual as the objective, train subsequent base learners one by one; for the construction of the t-th decision tree, perform the following operations: (a) For each sample i, calculate the loss function L in the current round based on First derivative Second derivative Calculate the first derivative of all samples and Second derivative and (b) Generate a tree of depth 0; (c) For each node, attempt to split it. Arrange the samples according to the feature size for different features, and split the node sequentially according to the size of different feature values. The sums of the first and second derivatives of the left and right subtrees after splitting are as follows: Calculate the gain: It is the value of the left subtree node. It is the value of the right subtree node. The value of the node before it splits. The added complexity comes from having an extra leaf node. The maximum gain is obtained using the following formula: (d) If the maximum gain is 0 or a preset value, or the tree depth reaches the maximum limit, then the current decision tree is completed and a weak learner is obtained. The newly trained base learners are integrated into the print quality prediction model to update the prediction values ​​and evaluate whether the iteration termination condition is met. If not, the iteration process continues. If it is met, all weak learners are merged to form the final solder paste print quality prediction model.

6. A method for predicting solder paste printing quality based on an XGBoost-LSTM hybrid model, characterized in that, Includes the following steps: S1. Preliminary processing of the raw dataset of solder paste printing yields a print quality data package and a solder paste printing data package; S2. An LSTM model is used to analyze the time series data of the print quality data package to construct a time series information mining module. The time series information mining module combines the print quality parameters of historical moments to output the time series prediction value of the quality data. S3. Use the grey relational analysis method to analyze the key features in the solder paste printing data package to obtain the key values ​​of solder paste printing; construct the reference sequence of solder paste printing quality evaluation index and the feature sequence of each process parameter affecting printing quality by dividing the sequence of the solder paste printing data package. The reference sequence of solder paste printing quality evaluation indicators includes: mean solder paste volume, standard deviation of solder paste volume, and proportion of good printed pads. The correlation between the reference sequence of solder paste printing quality evaluation indicators and the characteristic sequence of each process parameter affecting printing quality is calculated by the grey relational method, thereby screening out the key values ​​of solder paste printing. S4. Based on the time-series predicted values ​​of quality data and key values ​​of solder paste printing, construct a feature set for solder paste printing quality. S5. Construct a printing quality prediction model based on the XGBoost algorithm. The printing quality prediction model outputs the predicted values ​​of solder paste printing quality parameters. S6. Evaluate the model using an independent test dataset, calculate various evaluation metrics, and compare it with existing models to verify the effectiveness of the prediction model.

7. The solder paste printing quality prediction method based on the XGBoost-LSTM hybrid model according to claim 6, characterized in that, The time-series information mining module in S2 combines historical printing quality parameters to obtain the time-series information mining process of quality data, including: The time sequence of quality parameter changes is constructed by arranging the solder paste printing data packages of each PCB board in chronological order of printing time. The following formula is used to map all feature data of the time series of quality parameter change trends to the [0-1] interval to construct solder paste printing quality time series data: in: x These are the actual values ​​of the feature parameters. and These are the maximum and minimum values ​​of this feature column. These are the normalized eigenvalues; The first and second LSTM layers are trained using the following loss function based on the time series data of solder paste printing quality: Where: n represents the number of samples in each training batch. This indicates the print quality parameters predicted for the next moment. This represents the actual value of the corresponding quality parameter.

8. The solder paste printing quality prediction method based on the XGBoost-LSTM hybrid model according to claim 6, characterized in that, In step S3, the grey relational analysis method is used to analyze the key features of the solder paste printing data package to obtain the key numerical values ​​for solder paste printing. Based on the solder paste printing data package, a reference sequence of solder paste printing quality evaluation indicators and a characteristic sequence of various process parameters affecting printing quality are constructed by sequence division; the reference sequence of solder paste printing quality evaluation indicators includes: mean solder paste volume, standard deviation of solder paste volume, and percentage of good printed pads; The following formula is used to perform dimensionless processing on the reference sequence of solder paste printing quality evaluation indicators and the characteristic sequence of various process parameters affecting printing quality; Transform the data to eliminate the effects of different units and orders of magnitude, while retaining information about the degree of difference between variables; in: The original data after the solder paste printing data packet sequence is divided. The average value of the sequence data after dividing the solder paste printing data packet sequence. The processed data after the solder paste printing data packet sequence is divided; For sequence number; The correlation between the reference sequence of solder paste printing quality evaluation indicators and the characteristic sequence of various process parameters affecting printing quality is calculated using the following formula: in: The grey relational coefficient is... The resolution coefficient is typically set to 0.

5. For the parent sequence, The parent sequence consists of three quality parameters: mean solder paste volume, standard deviation of solder paste volume, and percentage of well-printed pads. The subsequence consists of parameters affecting solder paste printing quality. The sequence number is the index of the data in the sequence. The grey relational degree of printing quality is obtained by calculating the characteristic sequence of each process parameter affecting printing quality using the following formula: in: For relevance, This represents the total number of data items in the sequence. Based on the grey relational analysis of printing quality, the characteristic sequences of each influencing factor are sorted to obtain the key values ​​affecting solder paste printing quality.

9. The solder paste printing quality prediction method based on the XGBoost-LSTM hybrid model according to claim 6, characterized in that, The process described in S5 involves constructing a printing quality prediction model based on the XGBoost algorithm. This model takes printing quality feature parameters from a selected feature set as input and outputs predicted values ​​for solder paste printing quality parameters. This includes: A dataset for training a printing quality prediction model is constructed based on printing quality feature parameters and actual printing quality data; this includes dimensionless processing of the dataset, mapping all feature values ​​to the interval [0, 1] using the min-max method; and the dataset is randomly divided into a training set and a validation set in an 8:2 ratio. Set the key parameters of the XGBoost algorithm; Base learner initialization: Start the model training process, first train the first base learner, and calculate the residual between the predicted value and the true value; Iteratively construct the decision tree: Using the residual as the objective, train subsequent base learners one by one; for the construction of the t-th decision tree, perform the following operations: (a) For each sample i, calculate the loss function L in the current round based on First derivative Second derivative Calculate the first derivative of all samples and Second derivative and (b) Generate a tree of depth 0; (c) For each node, attempt to split it. Arrange the samples according to the feature size for different features, and split the node sequentially according to the size of different feature values. The sums of the first and second derivatives of the left and right subtrees after splitting are as follows: Calculate the gain: It is the value of the left subtree node. It is the value of the right subtree node. The value of the node before it splits. The added complexity comes from having an extra leaf node. The maximum gain is obtained using the following formula: (d) If the maximum gain is 0 or a preset value, or the tree depth reaches the maximum limit, then the current decision tree is completed and a weak learner is obtained. The newly trained base learners are integrated into the print quality prediction model to update the prediction values ​​and evaluate whether the iteration termination condition is met. If not, the iteration process continues. If it is met, all weak learners are merged to form the final solder paste print quality prediction model.