Soldering paste printing process parameter optimization method and system based on machine learning and ant colony optimization
By combining machine learning and ant colony optimization, a method for optimizing solder paste printing process parameters was constructed. This method solves the problems of low efficiency and insufficient accuracy in parameter debugging in traditional methods, and achieves high-precision and high-efficiency optimization of solder paste printing process parameters, thereby improving the printing quality stability of SMT production lines.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-31
- Publication Date
- 2026-03-31
AI Technical Summary
Existing digital technologies lack prediction and optimization loops in solder paste printing process parameter debugging, and it is difficult to achieve high-precision and high-efficiency parameter combination optimization, which cannot meet the needs of high-density and small-size solder paste printing.
A machine learning-based random forest prediction model is used to construct an accurate mapping relationship between process parameters and printing quality. Combined with an ant colony optimization algorithm, the ants search for optimal parameter combinations in the solution space and iteratively update the pheromone concentration to obtain the global optimal solution.
It enables intelligent optimization of solder paste printing process parameters, improves parameter debugging efficiency and accuracy, meets the process requirements of high-density and miniaturized solder paste printing, and enhances the stability of production line printing quality.
Smart Images

Figure CN121765872A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of surface mount technology (SMT) process optimization, specifically involving a method and system for optimizing solder paste printing process parameters based on machine learning and ant colony optimization, which is applicable to high-precision and high-efficiency solder paste printing process parameter debugging scenarios in the field of electronic manufacturing. Background Technology
[0002] Surface mount technology (SMT) is a core process for secondary integration in the electronics manufacturing industry, encompassing key steps such as solder paste printing, component placement, reflow soldering, and cleaning. Solder paste printing, as the first step, directly determines the yield rate of subsequent processes and is the main source of overall SMT defects, accounting for approximately 70% of the total defect rate. With the rapid development of microelectronic products towards high-density integration and miniaturization, low-pitch, small-size solder paste printing faces severe challenges from typical defects such as insufficient solder, excessive solder, misalignment, and solder spikes, placing higher demands on the precise control of process parameters.
[0003] Traditional solder paste printing process parameter tuning relies primarily on manual adjustments based on engineers' practical experience, followed by reverse adjustments to the SPI (Solder Inspector) equipment's detection parameters based on the solder paste printing morphology. In manufacturing scenarios involving multiple product types, small batches, and high reliability, frequent changes in stencils and continuous shifts in solder paste types significantly reduce the efficiency of traditional experience-based tuning methods. This not only prolongs production preparation cycles but also substantially increases production costs. Furthermore, solder paste printing parameters exhibit typical multi-parameter coupling characteristics, making it difficult for manual adjustments to accurately grasp the complex relationships between parameters and hindering the rapid search for the globally optimal parameter combination.
[0004] While existing digital technologies attempt to incorporate machine learning for process optimization, significant shortcomings remain: First, the process parameters collected from SMT production lines have limited feature dimensions and small sample data scale, leading to reduced model generalization ability and applicability. Second, existing research primarily focuses on building predictive models for printing defects, lacking depth in optimizing the combination of solder paste printing process parameters and failing to form a complete prediction-optimization closed loop. Third, there is a lack of effective fusion schemes to integrate high-precision prediction models with efficient global optimization algorithms, making it difficult to achieve intelligent search and precise optimization of process parameters and meet the demands of high-precision and high-efficiency solder paste printing processes.
[0005] Therefore, there is an urgent need for an intelligent optimization method that can quantify the correlation between process parameters and printing quality and efficiently search for the globally optimal parameter combination, in order to solve the inherent defects of traditional methods and adapt to the development needs of modern electronic manufacturing. Summary of the Invention
[0006] The purpose of this invention is to address the lack of prediction and optimization closed loops in existing digital technologies, as well as the problem of effective integration of prediction and optimization algorithms, and to provide a method and system for optimizing solder paste printing process parameters based on machine learning and ant colony optimization.
[0007] To achieve the above objectives, the present invention employs the following technical solution: This invention proposes a method for optimizing solder paste printing process parameters based on machine learning and ant colony optimization, comprising the following steps: Based on the random forest prediction model, the predicted values of solder paste printing quality are obtained. A multi-objective optimization function is constructed based on the predicted values of solder paste printing quality and the corresponding target values. Process candidate parameters are obtained based on the ant candidate solution generation rule, and the process candidate parameters are input into a multi-objective optimization function to obtain the printing quality prediction value. Using the predicted printing quality as heuristic information, the ants are guided to search for high-quality parameter combinations in the solution space. The search direction is determined by calculating the quality prediction score of the candidate combinations. The pheromone concentration is updated during the iteration process to obtain the optimal solution of the process candidate parameters. If the predicted print quality value corresponding to the optimal solution is less than the predicted print quality value corresponding to the global optimal solution, then the optimal solution is updated to the global optimal solution; otherwise, the global optimal solution remains unchanged. The global pheromone concentration is updated for the parameter dimensions corresponding to the global optimal solution. When the number of iterations reaches the preset upper limit, the final global optimal solution, the corresponding objective function value, and the predicted value of the printing quality index are obtained, thereby optimizing the solder paste printing process parameters.
[0008] Preferably, the step of obtaining the predicted solder paste printing quality value based on the random forest prediction model specifically involves: The random forest prediction model includes three independent regression sub-models, which are used to predict the relative area, relative height and relative volume of the print. Specifically, the predicted values for solder paste printing quality include the predicted values for the relative area, relative height, and relative volume of the solder paste printing. Relative area prediction Relative height prediction value Relative volume prediction value , For the random forest model, For relative area, Relative height, This refers to the relative volume.
[0009] Preferably, the step of constructing a multi-objective optimization function based on the predicted solder paste printing quality value and the corresponding target value is as follows:
[0010] in, For a multi-objective optimization function, The relative area value for printing quality targets; The relative height value for the printing quality target; This represents the relative volume value for the printing quality target.
[0011] Preferably, the step of obtaining process candidate parameters based on the ant candidate solution generation rule specifically includes: No. Only ants in the first In the nth iteration, for the th Each process parameter is randomly generated to take values:
[0012] in, For integer random generation function, For uniformly distributed random generation functions, To round to one decimal place; according to the... Obtaining candidate process parameters from process parameters .
[0013] Preferably, the step of inputting candidate process parameters into a multi-objective optimization function to obtain predicted printing quality values specifically involves: Candidate parameters for print quality generated for each ant Substitute into the multi-objective optimization function: .
[0014] Preferably, the step of using the predicted printing quality value as heuristic information to guide the ants to search for high-quality parameter combinations in the solution space, determining the search direction by calculating the quality prediction score of candidate combinations, updating the pheromone concentration during the iteration process, and obtaining the optimal solution for the process candidate parameters is as follows: Each ant corresponds to a set of candidate process parameter combinations, and the search direction is determined by calculating the quality prediction score of the candidate combinations. In the In each iteration, the optimal solution for the candidate process parameters of the current iteration is found. The following conditions must be met:
[0015] in, For the number of ants, For the first Candidate parameters generated by only ants.
[0016] Preferably, updating the global pheromone concentration for the parameter dimension corresponding to the global optimal solution specifically involves: The global pheromone concentration is updated iteratively as follows:
[0017] in, For the first In the nth iteration Pheromon concentration and pheromone increment in each parameter dimension ; As a pheromone volatile factor, Let pheromone update constant be _____. The objective function value is the global optimal solution. For the first In the nth iteration Global pheromone concentration in each parameter dimension.
[0018] This invention proposes a solder paste printing process parameter optimization system based on machine learning and ant colony optimization, comprising: The construction of a multi-objective optimization function is used to obtain the predicted value of solder paste printing quality based on the random forest prediction model, and to construct a multi-objective optimization function based on the predicted value of solder paste printing quality and the target value corresponding to the predicted value. The prediction value acquisition module is used to obtain process candidate parameters based on the ant candidate solution generation rule, input the process candidate parameters into a multi-objective optimization function, and obtain the printing quality prediction value. The optimal solution acquisition module is used to use the printing quality prediction value as heuristic information to guide the ants to search for high-quality parameter combinations in the solution space, determine the search direction by calculating the quality prediction score of the candidate combination, update the pheromone concentration during the iteration process, and obtain the optimal solution of the process candidate parameters. The global optimal solution search module is used to update the optimal solution to the global optimal solution if the predicted print quality value corresponding to the optimal solution is less than the predicted print quality value corresponding to the global optimal solution; otherwise, the global optimal solution remains unchanged. The process parameter optimization module is used to update the global pheromone concentration for the parameter dimension corresponding to the global optimal solution. When the number of iterations reaches a preset upper limit, the final global optimal solution, the corresponding objective function value, and the predicted value of the printing quality index are obtained to achieve the optimization of solder paste printing process parameters.
[0019] A terminal device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement a method for optimizing solder paste printing process parameters based on machine learning and ant colony optimization.
[0020] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of a solder paste printing process parameter optimization method based on machine learning and ant colony optimization.
[0021] Compared with the prior art, the present invention has the following beneficial effects: This invention proposes a method for optimizing solder paste printing process parameters based on machine learning and ant colony optimization. Using a random forest prediction model, it constructs a precise mapping relationship between process parameters and printing quality indicators, obtains predicted solder paste printing quality values, and builds a multi-objective optimization function based on the predicted values and corresponding target values. This establishes a quantitative mapping relationship between process parameters and printing quality, overcoming the limitation of traditional experience-based debugging which cannot quantify parameter correlations. Simultaneously, it generates candidate process parameters based on ant colony optimization rules, substitutes these parameters into the multi-objective optimization function to obtain predicted quality values, and uses this as heuristic information to guide ants to search for optimal parameter combinations in the solution space. The search direction is clarified through the quality prediction score, and the pheromone concentration is iteratively updated to select the optimal solution. This solves the problems of manual debugging in balancing the coupling relationships of multiple parameters and the inability to globally search for optimal parameters. By iteratively comparing and updating the global optimal solution, and strengthening the pheromone update for the parameter dimensions corresponding to the global optimal solution, the parameter search direction is continuously optimized. This achieves a deep integration of the high-precision prediction model of random forest and the global optimization algorithm of ant colony, realizing a closed loop of quality prediction and parameter optimization. It eliminates the dependence on human experience, greatly improves the efficiency and accuracy of parameter debugging, and finally outputs the global optimal process parameters that meet the production requirements. This adapts to the process requirements of high-density and miniaturized solder paste printing and effectively improves the stability of printing quality on the production line. Attached Figure Description
[0022] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0023] Figure 1 This is a flowchart of the solder paste printing process parameter optimization method based on machine learning and ant colony optimization of the present invention.
[0024] Figure 2 This is a detailed flowchart of the solder paste printing process parameter optimization method based on machine learning and ant colony optimization of the present invention.
[0025] Figure 3 Scatter plots and fitted curves are provided for predicting the relative printing area using different models of this invention.
[0026] Figure 4Scatter plots and fitted curves for predicting the relative height of printing using different models of this invention.
[0027] Figure 5 Scatter plots and fitted curves for predicting the relative printing volume using different models of this invention.
[0028] Figure 6 This is a visualization structure of the random forest model for predicting relative printing volume according to the present invention.
[0029] Figure 7 This is a schematic diagram showing the printing quality verification results of the five sets of optimized process parameters of the present invention.
[0030] Figure 8 This is a system diagram of the solder paste printing process parameter optimization based on machine learning and ant colony optimization of the present invention.
[0031] Figure 9 This is a schematic diagram of the structure of an electronic device according to the present invention. Detailed Implementation
[0032] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, 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 embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0033] The present invention will now be described in further detail with reference to the accompanying drawings: Example 1 This invention proposes a solder paste printing process parameter optimization method based on machine learning and ant colony optimization. By constructing a precise mapping model between process parameters and printing quality, and combining it with a swarm intelligence optimization algorithm, it achieves a global optimal search for key process parameters. This solves the problems of traditional solder paste printing processes, such as reliance on experience for parameter tuning, low efficiency, insufficient accuracy, and difficulty in balancing multiple parameter couplings. It improves the printing quality stability and production yield of SMT production lines. Figure 1 The flowchart illustrates the method for optimizing solder paste printing process parameters. The steps of the method for optimizing solder paste printing process parameters are as follows: S1. Based on the random forest prediction model, obtain the predicted value of solder paste printing quality, and construct a multi-objective optimization function according to the predicted value of solder paste printing quality and the target value corresponding to the predicted value. The method for obtaining the predicted solder paste printing quality based on the random forest prediction model is as follows: The random forest prediction model includes three independent regression sub-models, which are used to predict the relative area, relative height and relative volume of the print. Specifically, the predicted values for solder paste printing quality include the predicted values for the relative area, relative height, and relative volume of the solder paste printing. Relative area prediction Relative height prediction value Relative volume prediction value , For the random forest model, For relative area, Relative height, This refers to the relative volume.
[0034] The process involves constructing a multi-objective optimization function based on the predicted solder paste printing quality value and the corresponding target value. Specifically:
[0035] in, For a multi-objective optimization function, The relative area value for printing quality targets; The relative height value for the printing quality target; This represents the relative volume value for the printing quality target.
[0036] S2. Obtain process candidate parameters based on the ant candidate solution generation rule, input the process candidate parameters into the multi-objective optimization function, and obtain the printing quality prediction value; The process candidate parameters are obtained based on the ant candidate solution generation rule as follows: No. Only ants in the first In the nth iteration, for the th Each process parameter is randomly generated to take values:
[0037] in, For integer random generation function, For uniformly distributed random generation functions, To round to one decimal place; according to the... Obtaining candidate process parameters from process parameters .
[0038] The step of inputting candidate process parameters into a multi-objective optimization function to obtain predicted printing quality values specifically involves: Candidate parameters for print quality generated for each ant Substitute into the multi-objective optimization function: .
[0039] S3. Using the predicted printing quality as heuristic information, guide the ants to search for high-quality parameter combinations in the solution space. Determine the search direction by calculating the quality prediction score of the candidate combinations. Update the pheromone concentration during the iteration process to obtain the optimal solution of the process candidate parameters. The process involves using the predicted printing quality as heuristic information to guide the ants in searching for optimal parameter combinations in the solution space. The search direction is determined by calculating the quality prediction scores of candidate combinations. The pheromone concentration is updated during the iteration process to obtain the optimal solution for the process candidate parameters. Specifically: Each ant corresponds to a set of candidate process parameter combinations, and the search direction is determined by calculating the quality prediction score of the candidate combinations. In the In each iteration, the optimal solution for the candidate process parameters of the current iteration is found. The following conditions must be met:
[0040] in, For the number of ants, For the first Candidate parameters generated by only ants.
[0041] S4. If the predicted print quality value corresponding to the optimal solution is less than the predicted print quality value corresponding to the global optimal solution, then update the optimal solution to the global optimal solution; otherwise, the global optimal solution remains unchanged. S5. Update the global pheromone concentration for the parameter dimension corresponding to the global optimal solution. When the number of iterations reaches the preset upper limit, obtain the final global optimal solution, the corresponding objective function value, and the predicted value of the printing quality index to achieve optimization of solder paste printing process parameters.
[0042] The process of updating the global pheromone concentration based on the parameter dimensions corresponding to the global optimal solution is as follows: The global pheromone concentration is updated iteratively as follows:
[0043] in, For the first In the nth iteration Pheromon concentration and pheromone increment in each parameter dimension ; As a pheromone volatile factor, Let pheromone update constant be _____. The objective function value is the global optimal solution. For the first In the nth iteration Global pheromone concentration in each parameter dimension.
[0044] The method is described in detail below: This method achieves intelligent and high-precision optimization of solder paste printing process parameters through a closed-loop process of "data acquisition and preprocessing - machine learning modeling - ant colony algorithm optimization - experimental verification," such as... Figure 2 The specific steps are as follows: Step 1: Solder paste printing data acquisition and preprocessing Collect process parameter data and corresponding printing quality inspection data for solder paste printing in the SMT production line, and construct a standardized experimental dataset: Process parameter data: Four key parameters that significantly affect printing quality were selected as core variables for optimization: squeegee pressure (range 1-10 kg), printing speed (range 10-500 mm / s), screen gap (range 0.1-10 mm), and demolding speed (range 0.1-10 mm / s). Printing quality data: The three key quality indicators of solder paste printing, namely relative area, relative height and relative volume, are collected by 3D SPI equipment. The preset target values are 125% for relative area, 87% for relative height and 115% for relative volume, which serve as the quality evaluation benchmark. Data preprocessing: The raw data is cleaned, and outliers are removed using the 3σ criterion (the final outlier percentage is controlled within 0.5%) to ensure 100% dataset integrity; the cleaned data is standardized to eliminate dimensional differences and to construct an experimental dataset for model training and optimization.
[0045] Step 2: Construction of the mapping model between process parameters and printing quality Based on the experimental dataset, the optimal machine learning model was selected through multi-model comparison, and a precise mapping relationship between process parameters and printing quality was established. Model selection: Nine machine learning models were selected, including Multiple linear regression (MLR), HUBER regression, K-nearest neighbor (KNN), Support vector machine (SVM, including RBF, linear, and poly kernel functions), Decision tree (DT), Random forest (RF), and Multilayer perceptron (MLP), covering both linear and nonlinear modeling scenarios to ensure the comprehensiveness of the modeling methods. Dataset partitioning: The experimental dataset is randomly divided into a training set and a test set in a ratio of 8:2. The training set is used for learning model parameters, and the test set is used for evaluating the model's generalization ability. Model training and tuning: 10-fold cross-validation was used to optimize the parameters of each model. Dedicated models were trained for the three quality indicators of relative printing area, relative height and relative volume to improve the prediction accuracy of the models for different quality indicators. Model evaluation and selection: Mean absolute error (MAE), root mean square error (RMSE), and coefficient of determination (R²) were used. 2 Using this as the core evaluation metric, the optimal mapping model is selected. Experimental verification is as follows: Figure 3 In the figure, (a) to (i) are scatter plots and fitting curves of the predicted relative printing area for different models, and the experimental verification is as follows: Figure 4 In the figure, (a) to (i) are scatter plots and fitted curves of the predicted relative printing height for different models, and the experimental verification is as follows: Figure 5 In the graphs (a) to (i), we see scatter plots and fitted curves of the predicted relative printing volume for different models. The random forest model performs best, with its R² prediction of the relative printing area being the highest. 2 The R-value for relative volume prediction reached 0.798. 2 The value reached 0.862, and there was no overfitting, indicating strong generalization ability. It was determined to be the core mapping model for subsequent optimization.
[0046] Step 3: Construction of a multi-dimensional random forest prediction model Based on the experimental dataset, three independent random forest regression models were constructed to establish precise mapping relationships between process parameters and relative area, relative height, and relative volume, respectively. General expression for the random forest model:
[0047] in, For the first Predicted values of quality indicators ( For relative area, Relative height, (Relative volume) The number of decision trees in the random forest. For the first The output of each decision tree, For process parameter combinations ( =Scraper pressure, =Printing speed, =Screen spacing, =Demolding speed); Multidimensional Model Training: Relative Area Random Forest Prediction Model Relative height random forest prediction model ( ), relative volume random forest prediction model ( ), using 10-fold cross-validation to tune and optimize model parameters, ensuring that the generalization ability of each model meets the requirements of engineering applications. For the random forest model, For relative area, Relative height, For relative volume. The visualization structure of the relative volume predicted by the random forest model is as follows: Figure 6 As shown.
[0048] Step 4: Global optimization of process parameters based on ant colony optimization algorithm Using the quality prediction results of the random forest model as the objective function, and combining it with the ant colony optimization algorithm (ACO), a global optimal search for process parameters is achieved. 4.1 Construction of Multi-Objective Optimization Function Using the sum of squared errors between the predicted and target values of relative area, relative height, and relative volume as the optimization objective function, the multi-objective optimization function expression is as follows:
[0049] in, , is the relative area prediction value. The relative area value for printing quality targets; , is the predicted relative height. The relative height value for the printing quality target; This is a relative volume prediction. This represents the relative volume value for the printing quality target.
[0050] Minimize the optimization objective To achieve optimal synergy among multiple quality indicators.
[0051] 4.2 Definition of core parameters for ant colony algorithm Algorithm parameter initialization: Set the key parameters of the ant colony optimization algorithm, including the number of ants. Pheromones importance factor Heuristic function importance factor pheromone volatile factors pheromone update constant Maximum number of iterations This ensures the search efficiency and convergence of the algorithm; 4.3 Ant Colony Algorithm Execution Flow Solution space construction: Using squeegee pressure, printing speed, screen gap, and demolding speed as optimization variables, a four-dimensional process parameter solution space is constructed based on the parameter value ranges in step 1, clarifying the physical constraint boundaries of each variable; the global pheromone matrix is initialized. Initialization set to .
[0052] Ant candidate solution generation rules: The first Only ants in the first In the nth iteration, for the th Each process parameter is randomly generated according to the following rules:
[0053] in, For integer random generation function, For uniformly distributed random generation functions, Rounding is performed to one decimal place; candidate parameters are obtained after generation. ,in, For the first The scraper pressure parameters obtained from only one ant For the first The printing speed parameters obtained from only ants For the first The mesh spacing parameters obtained from only one ant For the first The demolding speed parameters obtained from only one ant.
[0054] Objective function value calculation: candidate solutions generated for each ant Substitute the values into the three random forest models to calculate the predicted values and solve for the objective function value:
[0055] Heuristic search and pheromone update: The quality prediction value output by the random forest model is used as heuristic information to guide ants to search for high-quality parameter combinations in the solution space; each ant corresponds to a set of candidate process parameter combinations, and the search direction is determined by calculating the quality prediction score of the candidate combinations; during the iteration process, the pheromone concentration is dynamically updated to strengthen the search weight of high-quality solutions, suppress low-quality solutions, and improve search efficiency.
[0056] In the In each iteration, the optimal solution for the current iteration is found. satisfy:
[0057] Global optimal solution: If Then update the global optimal solution. ,otherwise ;in This is the initial random solution. .
[0058] Pheromone update mechanism: The global pheromone concentration is updated iteratively according to the following formula, and pheromones are released only for the parameter dimension corresponding to the global optimal solution:
[0059] in, For the first In the nth iteration Pheromon concentration and pheromone increment in each parameter dimension ; The pheromone evaporation factor is used to ensure the algorithm does not get stuck in local optima. Let be the pheromone update constant.
[0060] Iteration Termination and Result Storage: If the number of iterations reaches... Terminate the current iteration and save the global optimal solution for this round. Objective function value and corresponding quality indicator prediction values Otherwise, return to the above steps and continue iterating.
[0061] Multi-round search and optimal solution selection: To improve the robustness of the solution, the ant colony algorithm described above is repeated. Each run retains the final global optimal solution, resulting in a set of 20 candidate optimal solutions. The candidate solutions are sorted in ascending order of objective function value, and the top 20 groups (after deduplication) are selected as the final candidate optimal parameter combinations.
[0062] Step 5: Verification and Output of Optimal Process Parameters Experiments were conducted to verify the optimal combination of process parameters output by the ant colony optimization algorithm to ensure that it meets the quality requirements of actual production. Multiple candidate parameter generation: Considering the randomness of the ant colony algorithm, 5 batches of optimal process parameter combinations (20 groups in each batch) are generated, and 5 core candidate parameter combinations are obtained through preliminary screening; Table 1. Five optimal combinations of printing process parameters predicted by machine learning.
[0063] Experimental verification: On the SMT production line (using KAG Precision GKG-G5 automatic printing equipment), 5-8 printing experiments were conducted on each of the 5 candidate parameter combinations, collecting a total of 29 sets of printing quality data to verify the stability and reliability of the parameter combinations. Figure 7 As shown, (a) to (d) are schematic diagrams of the printing quality verification results of five sets of optimized process parameters; Final parameter determination: The parameter combination with the smallest deviation between the printing quality index and the target value is selected as the final optimized process parameters. The requirements are: relative area error ≤3%, relative height error ≤1%, and relative volume error ≤2%, to ensure the engineering practicality of the optimization results.
[0064] The preparatory work for implementing the solder paste printing process parameter optimization method based on machine learning and ant colony optimization is as follows: Data acquisition accuracy standards: The accuracy requirements for process parameter data acquisition are: squeegee pressure ±0.1 kg, printing speed ±1 mm / s, screen gap ±0.01 mm, and demolding speed ±0.01 mm; the accuracy requirements for quality data acquisition are: relative area ±3%, relative height ±1%, and relative volume ±2%, to ensure data reliability. Model performance thresholds: The test set performance of the optimal mapping model (random forest) must meet the following requirements: relative area prediction R² ≥ 0.79, relative volume prediction R² ≥ 0.86, MAE ≤ 3.5%, RMSE ≤ 4.0%, to ensure prediction accuracy; Algorithm convergence requirements: The ant colony optimization algorithm must converge to the global optimum within the maximum number of iterations (100 times) to avoid getting trapped in local optima. The deviation of the quality index corresponding to the optimal parameter combination must meet the preset threshold. System compatibility: Supports data interface interface with mainstream SMT solder paste printing equipment (such as KEG Precision GKG-G5) and 3D SPI equipment, and supports importing and exporting multiple data formats such as JSON and Excel; Application scope: Suitable for solder paste printing processes with stencil thickness of 0.08-0.12 mm (default 0.1 mm) and component pad size of 0402 and above. Supports multi-variety, small-batch production scenarios and can adapt to the printing needs of different types of solder paste. Data processing standards: Outlier removal adopts the 3σ criterion (data exceeding the mean ± 3 times the standard deviation is judged as outliers), and the dataset completeness must be ≥99.5% to ensure the quality of modeling data.
[0065] The advantages of the method proposed in this invention are as follows: Precise mapping construction: Through comparative analysis of 9 machine learning models, the random forest model was selected as the optimal mapping model between process parameters and printing quality, realizing high-quality prediction in multi-parameter coupled scenarios and providing precise data support for optimization; Global optimization fusion: The random forest prediction model is organically integrated with the ant colony optimization algorithm. By leveraging the swarm intelligence search advantage of the ant colony algorithm, the global optimal parameter combination search under multi-parameter coupling is achieved, solving the problem that traditional methods have difficulty balancing parameter correlation. Full-process digitalization: Construct a full-process digital closed loop of data acquisition, preprocessing, modeling, optimization, verification, and output to reduce manual intervention and improve the automation level and efficiency of process parameter debugging; Modular design: The system adopts a modular division of labor and collaboration mode. Each module has independent functions and compatible interfaces, supports flexible parameter configuration and function expansion, and adapts to the needs of different production scenarios. Highly practical for engineering applications: The optimization process fully considers actual production constraints (such as equipment parameter range and quality requirements), and the optimal parameters verified by experiments can be directly applied to the production line, reducing the cost of engineering implementation.
[0066] Input raw data
[0067] Example 2 Based on the detailed steps above, a solder paste printing process parameter optimization system based on machine learning and ant colony optimization is proposed. This system is used to implement the above optimization methods and achieves fully automated processing through modular design. It includes a data acquisition and preprocessing module, a machine learning modeling module, an ant colony optimization module, and an optimization result verification and output module. The modules are described in detail below: The data acquisition and preprocessing module includes a data acquisition unit and a data preprocessing unit; Data acquisition unit: Real-time acquisition of process parameter data such as squeegee pressure, printing speed, screen gap, and demolding speed through the equipment data acquisition system of the SMT production line; and acquisition of quality data such as printing relative area, relative height, and relative volume through 3D SPI equipment, supporting real-time data transmission and storage; Data preprocessing unit: Cleans the collected raw data (based on 3D model). The system uses criteria to remove outliers and standardizes data to generate experimental datasets that meet the requirements for model training. These datasets are then stored in the system database to provide high-quality data support for subsequent modeling.
[0068] The machine learning modeling module includes a model training unit, a model evaluation and selection unit, and a model storage unit; Model training unit: Loads the experimental dataset generated by the data preprocessing module, divides the training set and test set according to a preset ratio, supports automated training and 10-fold cross-validation parameter tuning of 9 machine learning models, and builds dedicated prediction models for three quality indicators respectively. Model evaluation and screening unit: Automatically calculates the MAE, RMSE, and R-value of each model on the test set. 2 Metrics, generate model performance comparison reports, filter and output the optimal mapping model (random forest model is recommended by default, and users can manually switch to other models). Model storage unit: Encrypts and stores the best-performing mapped model after training, facilitating quick access during subsequent optimization processes and supporting model version management and updates.
[0069] The ant colony optimization module includes a parameter configuration unit, a solution space construction unit, and an optimal parameter search unit; Parameter configuration unit: Provides a visual configuration interface for key parameters of the ant colony algorithm. Users can adjust parameters such as the number of ants, number of iterations, and pheromone-related factors according to actual production needs. The default is to load the preset optimal parameters. Solution space construction unit: Based on the physical constraint boundary of process parameters, automatically construct a four-dimensional parameter solution space, and support users to adjust the parameter value range according to different component types; Optimal Parameter Search Unit: Calls the optimal mapping model stored in the machine learning modeling module, uses the quality prediction value as the objective function, executes the heuristic search and pheromone update process of the ant colony algorithm, and outputs multiple sets of candidate optimal process parameter combinations.
[0070] The optimized result verification and output module includes an experimental data receiving unit, a result evaluation unit, and a result output unit. Experimental data receiving unit: Receives printing quality data collected in SMT production line verification experiments and compares and analyzes it with the predicted quality data corresponding to the candidate parameter combinations; Results Evaluation Unit: Calculates the deviation of the quality index of each candidate parameter combination from the target value, generates a deviation analysis report, and selects the parameter combination with the smallest deviation. The results output unit outputs the final optimized combination of process parameters (including specific values for squeegee pressure, printing speed, screen gap, and demolding speed) in a structured format (supporting export to Excel and JSON formats), along with the corresponding predicted quality indicators and experimental verification results. It supports direct import into the printing equipment control system.
[0071] Example 3 This invention proposes a solder paste printing process parameter optimization system based on machine learning and ant colony optimization, such as... Figure 8 As shown, it includes: The construction of a multi-objective optimization function is used to obtain the predicted value of solder paste printing quality based on the random forest prediction model, and to construct a multi-objective optimization function based on the predicted value of solder paste printing quality and the target value corresponding to the predicted value. The prediction value acquisition module is used to obtain process candidate parameters based on the ant candidate solution generation rule, input the process candidate parameters into a multi-objective optimization function, and obtain the printing quality prediction value. The optimal solution acquisition module is used to use the printing quality prediction value as heuristic information to guide the ants to search for high-quality parameter combinations in the solution space, determine the search direction by calculating the quality prediction score of the candidate combination, update the pheromone concentration during the iteration process, and obtain the optimal solution of the process candidate parameters. The global optimal solution search module is used to update the optimal solution to the global optimal solution if the predicted print quality value corresponding to the optimal solution is less than the predicted print quality value corresponding to the global optimal solution; otherwise, the global optimal solution remains unchanged. The process parameter optimization module is used to update the global pheromone concentration for the parameter dimension corresponding to the global optimal solution. When the number of iterations reaches a preset upper limit, the final global optimal solution, the corresponding objective function value, and the predicted value of the printing quality index are obtained to achieve the optimization of solder paste printing process parameters.
[0072] Example 4 Please see Figure 9 As shown, the present invention also provides an electronic device 100 for optimizing solder paste printing process parameters based on machine learning and ant colony optimization; the electronic device 100 includes a memory 101, at least one processor 102, a computer program 103 stored in the memory 101 and executable on the at least one processor 102, and at least one communication bus 104.
[0073] The memory 101 can be used to store the computer program 103. The processor 102 implements the steps of the solder paste printing process parameter optimization method based on machine learning and ant colony optimization described in Embodiment 1 by running or executing the computer program stored in the memory 101 and calling the data stored in the memory 101. The memory 101 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device 100 (such as audio data), etc. In addition, the memory 101 may include non-volatile memory, such as hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other non-volatile solid-state storage device.
[0074] The at least one processor 102 may be a Central Processing Unit (CPU), or 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 processor 102 may be a microprocessor or any conventional processor. The processor 102 is the control center of the electronic device 100, connecting various parts of the electronic device 100 via various interfaces and lines.
[0075] The memory 101 in the electronic device 100 stores multiple instructions to implement a solder paste printing process parameter optimization method based on machine learning and ant colony optimization. The processor 102 can execute the multiple instructions to achieve the following: Based on the random forest prediction model, the predicted values of solder paste printing quality are obtained. A multi-objective optimization function is constructed based on the predicted values of solder paste printing quality and the corresponding target values. Process candidate parameters are obtained based on the ant candidate solution generation rule, and the process candidate parameters are input into a multi-objective optimization function to obtain the printing quality prediction value. Using the predicted printing quality as heuristic information, the ants are guided to search for high-quality parameter combinations in the solution space. The search direction is determined by calculating the quality prediction score of the candidate combinations. The pheromone concentration is updated during the iteration process to obtain the optimal solution of the process candidate parameters. If the predicted print quality value corresponding to the optimal solution is less than the predicted print quality value corresponding to the global optimal solution, then the optimal solution is updated to the global optimal solution; otherwise, the global optimal solution remains unchanged. The global pheromone concentration is updated for the parameter dimensions corresponding to the global optimal solution. When the number of iterations reaches the preset upper limit, the final global optimal solution, the corresponding objective function value, and the predicted value of the printing quality index are obtained, thereby optimizing the solder paste printing process parameters.
[0076] Example 5 If the modules / units integrated in the electronic device 100 are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, and a read-only memory (ROM).
[0077] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0078] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0079] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0080] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0081] The beneficial effects of the method proposed in this invention are as follows: 1) Significantly improved optimization accuracy: By using the random forest model to achieve accurate mapping between process parameters and printing quality, and combined with the global search capability of the ant colony algorithm, the deviation between the printing quality index corresponding to the optimized process parameters and the target value is controlled within 3%, effectively reducing the typical defect rate such as insufficient tin and excessive tin, and improving production yield. 2) Significantly improved debugging efficiency: It replaces the traditional manual experience-based debugging method, realizes the automated and intelligent optimization of process parameters, shortens the parameter debugging cycle by more than 50%, and is especially suitable for multi-variety, small-batch production scenarios, reducing the debugging costs caused by stencil replacement and solder paste replacement; 3) Strong generalization ability: It supports flexible selection and parameter configuration of 9 machine learning models. The model and algorithm parameters can be adjusted according to different production environments, component types and solder paste characteristics, adapting to a variety of application scenarios and with strong compatibility. 4) Excellent operability: The system adopts a modular design and a visual operation interface, which can complete the optimization process without professional algorithm knowledge. Engineering and technical personnel can quickly get started and use it, reducing the technical threshold. 5) Outstanding engineering value: It realizes a data-driven, model-predictive, and intelligent optimization closed loop for solder paste printing process, improves the production stability and product consistency of SMT production lines, provides reusable technical solutions for the optimization of complex electronic manufacturing processes, and has broad application value.
[0082] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the specific implementation of the present invention. Any modifications or equivalent substitutions that do not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A method for optimizing process parameters of solder paste printing based on machine learning and ant colony optimization, characterized in that, The method comprises the following steps: Based on the random forest prediction model, the solder paste printing quality prediction value is obtained, and a multi-objective optimization function is constructed according to the solder paste printing quality prediction value and the target value corresponding to the prediction value; Based on the ant candidate solution generation rule, the process candidate parameters are obtained, and the printing quality prediction value is obtained by inputting the process candidate parameters into the multi-objective optimization function; The printing quality prediction value is used as heuristic information to guide the ants to search for high-quality parameter combinations in the solution space, the search direction is determined by calculating the quality prediction score of the candidate combination, the pheromone concentration is updated in the iteration process, and the optimal solution of the process candidate parameters is obtained; If the printing quality prediction value corresponding to the optimal solution is less than the printing quality prediction value corresponding to the global optimal solution, the optimal solution is updated as the global optimal solution, otherwise the global optimal solution remains unchanged; The global pheromone concentration corresponding to the parameter dimension of the global optimal solution is updated, and when the iteration number reaches the preset upper limit, the final global optimal solution, the corresponding target function value and the printing quality index prediction value are obtained, and the solder paste printing process parameter optimization is realized. 2.The method of claim 1, wherein The random forest prediction model is used to obtain the solder paste printing quality prediction value, and specifically comprises the following steps: The random forest prediction model comprises three independent regression sub-models for predicting the relative area, the relative height and the relative volume of printing, respectively; Specifically, the solder paste printing quality prediction value comprises a solder paste printing relative area prediction value, a relative height prediction value and a relative volume prediction value; Relative area prediction value Relative height prediction value Relative volume prediction value , is a random forest model, is a relative area, is a relative height, is a relative volume. 3.The method of claim 2, wherein, The multi-objective optimization function is constructed according to the solder paste printing quality prediction value and the target value corresponding to the prediction value, and specifically comprises the following steps: wherein, is a multi-objective optimization function, is a print quality target relative area value; is a print quality target relative height value; is a print quality target relative volume value.
4. The method of claim 1, wherein the method is characterized by: The process candidate parameters are obtained based on the ant candidate solution generation rule, and specifically comprises the following steps: The first Only ants in the first iteration, the first process parameters randomly generated values: wherein, is an integer random generation function, is a uniform distribution random generation function, is rounded to one decimal place; according to the first process parameter to obtain a process candidate parameter . 5.The method of claim 2, wherein The printing quality prediction value is obtained by inputting the process candidate parameters into the multi-objective optimization function, and specifically comprises the following steps: print quality candidate parameters generated for each ant , into a multi-objective optimization function: 。 6. The method of claim 1, wherein the method is characterized by: The printing quality prediction value is used as heuristic information to guide the ants to search for high-quality parameter combinations in the solution space, the search direction is determined by calculating the quality prediction score of the candidate combination, the pheromone concentration is updated in the iteration process, and the optimal solution of the process candidate parameters is obtained, and specifically comprises the following steps: Each ant corresponds to a set of candidate process parameter combinations, and the search direction is determined by calculating the quality prediction score of the candidate combination; In the In each iteration, the optimal solution for the candidate process parameters of the current iteration is found. The following conditions must be met: wherein, is the number of ants, is the number of the candidate parameters generated by the ants only.
7. The method of claim 1, wherein the method is characterized by: The global pheromone concentration corresponding to the parameter dimension of the global optimal solution is updated, and specifically comprises the following steps: The global pheromone concentration is iteratively updated in the following manner: in, For the first In the nth iteration Pheromon concentration and pheromone increment in each parameter dimension ; As a pheromone volatile factor, Let pheromone update constant be _____. The objective function value is the global optimal solution. For the first In the nth iteration Global pheromone concentration in each parameter dimension.
8. A system for optimizing parameters of a solder paste printing process based on machine learning and ant colony optimization, characterized in that, It comprises: The multi-objective optimization function construction is used to obtain the solder paste printing quality prediction value based on the random forest prediction model, and construct a multi-objective optimization function according to the solder paste printing quality prediction value and the target value corresponding to the prediction value; The prediction value acquisition module is used to obtain the process candidate parameters based on the ant candidate solution generation rule, and input the process candidate parameters into the multi-objective optimization function to obtain the printing quality prediction value; The optimal solution acquisition module is used to use the printing quality prediction value as heuristic information to guide the ants to search for high-quality parameter combinations in the solution space, determine the search direction by calculating the quality prediction score of the candidate combination, update the pheromone concentration in the iteration process, and obtain the optimal solution of the process candidate parameters. The search global optimal solution module is configured to update the optimal solution as the global optimal solution if a printing quality prediction value corresponding to the optimal solution is less than a printing quality prediction value corresponding to the global optimal solution, and otherwise, the global optimal solution remains unchanged; The process parameter optimization module is configured to update the global information concentration corresponding to the parameter dimension of the global optimal solution, and obtain a final global optimal solution, a corresponding target function value and a printing quality index prediction value when the number of iterations reaches a preset upper limit, so as to realize the optimization of the solder paste printing process parameters.
9. A terminal device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, The processor executes the computer program to implement the steps of the method for optimizing the solder paste printing process parameters based on machine learning and ant colony optimization according to any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, the computer program comprising instructions that, when executed by a computer, cause the computer to perform the method of any one of claims 1 to 9. The computer program is executed by the processor to implement the steps of the method for optimizing the solder paste printing process parameters based on machine learning and ant colony optimization according to any one of claims 1 to 7.