Method and device for predicting tinning time of printed circuit board based on machine learning

By constructing machine -learning -based BP neural networks and genetic algorithm optimization weights, the randomness and inefficient problems of printing circuit board plating during work hours are solved, and higher prediction accuracy and production efficiency are achieved.

CN119378358APending Publication Date: 2025-01-28CHINA NORTH VEHICLE RES INST
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411254191.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-09
Publication Date
2025-01-28

AI Technical Summary

Technical Problem

The existing tin-plated labor-time predictions of printed circuit boards are arbitrary and inefficient, rely on manual empirical value estimates and require large-scale production and management personnel to participate, resulting in time-consuming and labor-intensive predictions.

Method used

The method based on machine learning is used to build a neural network of reverse communication (BP), combine the weight of the genetic algorithm to optimize the weight, and use historical data to predict printing circuit board tin -plated working hours to reduce manual intervention.

Benefits of technology

It has improved the accuracy and accuracy of the tin -plated tin -plated in the printing circuit board, reducing the participation of personnel, and improving the scientific and efficiency of the production plan.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119378358A_ABST
    Figure CN119378358A_ABST
Patent Text Reader

Abstract

The invention provides a method and a device for predicting tinning time of a printed circuit board based on machine learning. According to the method, a BP neural network is adopted to predict the tinning working hours of the printed circuit board, and the input of the network is set unit tinning duration, the number of tinned pieces under the set unit tinning duration and efficiency assignment for balancing the working hours obtained by workers; the output is the single-piece tinning time of the worker. During network training, optimizing the weight of the BP neural network by using a genetic algorithm; the genetic algorithm adopts a tournament strategy to perform population selection. By using the method, the accuracy and precision of tin-plating working hour prediction of the printed circuit board can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of industrial printed circuit board tinning time prediction, and in particular to a method and device for predicting the tinning time of a printed circuit board based on machine learning. Background Art

[0002] With the rapid development of digitalization, technologies such as digital twins, artificial intelligence, and cloud computing have gradually emerged, and innovative new materials, new technologies, new processes, new methods, new models, and new services have been constantly mentioned. As a support point for innovative processes, tinning of printed circuit boards (PCBs) is the basic premise for ensuring the manufacturing of printed circuit boards in workshops. Printed circuit boards have precise integrated characteristics, and their tinning process involves manual interference and task rework. It is difficult for traditional workers to grasp the length of tinning time. Tinning hours not only support the treatment of workers, but also support the efficiency of factories and enterprises. Poor control of tinning hours indirectly guides production decisions and affects the execution of production plans. The control of tinning hours directly benchmarks the production process and process flow. With the expansion and promotion of enterprise projects, the workshop management system requires more refinement and clarity. Workshop management needs to judge the hours required for tinning of a certain type of printed circuit board under major projects in advance, and obtain working hour information to provide strategic "war chess simulation" for project development.

[0003] The existing PCB tinning time prediction has the following shortcomings:

[0004] (1) In the industrial field, the prediction of the working hours for printing printed circuit boards is still estimated and extrapolated by manual experience, and the prediction of the working hours for printing printed circuit boards is arbitrary;

[0005] (2) In the industrial field, the prediction of the man-hours for printed circuit boards requires the cooperation of production personnel and management personnel, and the tinning steps of printed circuit boards are reproduced through the production line. The prediction of the man-hours for printed circuit boards is time-consuming and laborious. Summary of the invention

[0006] In view of this, the present invention proposes a method for predicting the tinning time of printed circuit boards based on machine learning, which can be used for predicting the tinning time of printed circuit boards and optimizing the design of the production schedule of printed circuit board electroplating production lines. The scheme performs parameter fusion on the tinning time data of printed circuit boards in the workshop in recent times to realize the prediction of the tinning time of printed circuit boards, avoids the arbitrariness caused by excessive manual participation, and improves the accuracy and precision of the prediction of the tinning time of printed circuit boards.

[0007] In order to solve the above technical problems, the present invention is implemented as follows.

[0008] A method for predicting the man-hours for tinning of printed circuit boards based on machine learning, comprising:

[0009] Step 1: Obtain training samples: The input data in the training samples include the set unit tinning time, the number of tinned pieces under the set unit tinning time, and the efficiency value used to balance the workers' personal working hours; the output sample label is the worker's single-piece tinning working hours;

[0010] Step 2: construct a back propagation (BP) neural network for predicting the tinning time of printed circuit boards; use training samples for training to obtain a tinning time prediction model; during training, use a genetic algorithm to optimize the weight of the BP neural network; the genetic algorithm uses a tournament strategy to select populations;

[0011] Step 3: When predicting the tinning time of a printed circuit board, obtain the set unit tinning time, the number of tinned pieces under the set unit tinning time and the efficiency assignment, input the tinning time prediction model, and obtain the predicted result of the worker's single-piece tinning time.

[0012] Preferably, when the BP neural network is trained, the inverse of the mean square error function MSE is used as the fitness function.

[0013] Preferably, in step 1, when obtaining training samples, data within a period of history is obtained, and outliers and missing values ​​in the historical data are removed by data cleaning; the cleaning method is: if one or more of the three input data in a training sample are missing, the training sample is deleted.

[0014] Preferably, in the BP neural network, the number of neurons in the hidden layer is P=i×2+1; I is the number of neurons in the input layer;

[0015] The activation function of hidden layer neurons and output layer neurons adopts sigmoid function;

[0016] The S-type tangent function is usually used from the input layer to the hidden layer;

[0017] The S-type logarithmic function is used from the hidden layer to the output layer.

[0018] The present invention also provides a printed circuit board tinning time prediction device based on machine learning, comprising a back propagation (BP) neural network, a training sample acquisition module, and a training module;

[0019] The training sample acquisition module is used to construct training samples using historical data; in the training samples, the input data includes a set unit tinning time, the number of tinned pieces under the set unit tinning time, and an efficiency value used to balance the worker's personal working hours; the output sample label is the working hours required for the worker to tin a single piece;

[0020] The training module is used to train the BP neural network using training samples to obtain a tinning time prediction model; during training, the weight of the BP neural network is optimized using a genetic algorithm; the genetic algorithm uses a tournament strategy to select populations;

[0021] During prediction, the set unit tinning time, the number of tinned pieces under the set unit tinning time and the efficiency assignment are obtained and input into the BP neural network, and the BP neural network outputs the prediction result of the worker's single-piece tinning time.

[0022] Preferably, the training module uses the inverse of the mean square error function MSE as the fitness function for training the BP neural network.

[0023] Preferably, the training sample acquisition module includes a historical data acquisition module, a cleaning module, and a sample construction module;

[0024] The historical data acquisition module is used to acquire historical data;

[0025] The cleaning module is used to clean the historical data acquired by the historical data acquisition module to remove abnormal values ​​and missing values ​​in the historical data; the cleaning method is: if one or more of the three input data in a training sample is missing, the training sample is deleted;

[0026] The sample construction module is used to construct training samples using the cleaned historical data.

[0027] Preferably, the BP neural network includes an input layer, a hidden layer and an output layer;

[0028] The number of neurons in the hidden layer is P = i × 2 + 1; I is the number of neurons in the input layer;

[0029] The activation function of hidden layer neurons and output layer neurons adopts sigmoid function;

[0030] The S-type tangent function is usually used from the input layer to the hidden layer;

[0031] The S-type logarithmic function is used from the hidden layer to the output layer.

[0032] Beneficial effects:

[0033] (1) The present invention uses BP network to predict working hours, and selects tinning time, number of tinned pieces and efficiency assignment as input. The change of tinning time can often significantly affect the time arrangement of the entire production process. The number of tinned pieces as input allows the model to learn the nonlinear relationship between the number of pieces and working hours. The efficiency assignment enables the model to capture those factors that are difficult to directly quantify but have a significant impact on working hours.

[0034] (2) The present invention uses a genetic algorithm to optimize the weights of the BP network, further improving the accuracy and precision of the prediction of the tinning time of printed circuit boards. When optimizing the genetic algorithm, it is necessary to fully consider the application scenario, including the specific characteristics of the data and the requirements for prediction accuracy. The prediction of tinning time does not belong to regression prediction with complex environmental conditions and complex logic, and is not suitable for using algorithms that process multiple complex factors and data characteristics. The genetic algorithm parameter settings are relatively simple, and the genetic algorithm parameter settings are relatively few. The genetic algorithm has a relatively mature theoretical basis and practical experience, and is highly versatile. It is more suitable for the prediction of the tinning time of printed circuit boards.

[0035] (3) The BP network structure designed by the present invention has the number of hidden layer nodes equal to twice the number of input layer nodes plus 1. This is a heuristic rule that provides a relatively balanced structure for the network. Too few hidden layer neurons cannot capture effective features in the data, and too many neurons may lead to overfitting. In the BP network, the input layer to the hidden layer usually adopts the S-type tangent function, which is a nonlinear function. Nonlinearity allows the network to learn complex decision boundaries and representations, improve the gradient propagation effect, accelerate the convergence speed, improve the model performance and avoid the occurrence of overfitting. The S-type logarithmic function is used from the hidden layer to the output layer in the BP network. Its nonlinear characteristics enable the network to learn and represent complex input-output mapping relationships, provide sufficient gradient information, and enable the BP network to effectively adjust the network weights.

[0036] (4) The present invention adopts the tournament strategy instead of the roulette strategy when the genetic algorithm optimizes the weights of the neural network. First, the randomness of the population selection using the tournament strategy is low. In each selection process, the tournament strategy uses a fixed number of individuals to compete and selects the individual with the highest fitness. This selection method is deterministic and does not absolutely depend on the absolute size or distribution of the fitness value, thereby reducing the impact of randomness on the selection result. Secondly, the tournament strategy has strong adaptability and has good adaptability to different types of optimization problems and different fitness functions. More importantly, the tournament strategy has the advantages of high certainty, good stability, avoidance of premature convergence, low complexity, easy parallelization, and strong adaptability in the genetic algorithm compared with the roulette strategy. In the specific scenario of predicting working hours, the genetic algorithm using the tournament strategy can show stronger performance than the roulette strategy. This is mainly because the tournament strategy can reduce pseudo-randomness, avoid the excessive influence of super individuals, maintain population diversity, and is more suitable for problem solving. At the same time, the tournament strategy has the advantages of improving the convergence speed and accuracy of the algorithm, thereby better meeting the needs of predicting working hours.

[0037] (5) The present invention uses machine learning to predict the tinning time of printed circuit boards, which enhances the scientific nature of the prediction of the tinning time of printed circuit boards and reduces the personnel requirements in the tinning time prediction process. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 The overall flow chart of the method for predicting the working time of tinning of printed circuit boards proposed by the present invention;

[0039] Figure 2 It is a structural diagram of the BP network of the printed circuit board tinning process proposed by the present invention;

[0040] Figure 3 A strategy flow chart of the tournament strategy proposed by the present invention;

[0041] Figure 4 The algorithm flow chart of the optimization genetic algorithm proposed by the present invention;

[0042] Figure 5 A comparison chart of the man-hour prediction results of the printed circuit board tinning man-hour prediction model constructed by the present invention;

[0043] Figure 6 The present invention is a block diagram of the device for predicting the tinning time of a printed circuit board based on machine learning. DETAILED DESCRIPTION

[0044] The present invention is described in detail below with reference to the accompanying drawings and embodiments.

[0045] The present invention provides a method for predicting the working hours of tinning printed circuit boards based on machine learning. The core feature of the method is to construct a BP neural network and select factors that affect working hours as input data, including setting a unit tinning time, the number of tinned pieces under a set unit tinning time, and an efficiency value for balancing the working hours of individual workers. The BP neural network outputs the predicted working hours required for a worker to tin a single piece. In view of the fact that the BP network is prone to falling into a local minimum, a genetic algorithm is introduced to adjust the weights. In order to ensure the randomness of population selection in the genetic algorithm, a tournament strategy is used to control the randomness, thereby improving the performance of constructing the BP network.

[0046] Figure 1 The flowchart of the method for predicting the working time of tinning of a printed circuit board based on machine learning of the present invention is shown, as shown in the figure, comprising the following steps:

[0047] Step S1, data collection:

[0048] The present invention selects a set unit tinning time, a number of tinned pieces under the set unit tinning time, and an efficiency assignment for balancing the working hours of individual workers as model inputs.

[0049] Here, the tinning time directly reflects the total time required to complete a certain number of tinned parts. This parameter is the most intuitive and important indicator in the man-hour prediction because it is directly related to production efficiency and cost. Changes in the tinning time can often significantly affect the time schedule of the entire production process. The number of tinned pieces is another key factor in determining the man-hour requirements. Different numbers of tinned pieces naturally require different processing times. The number of tinned pieces as input allows the model to learn the nonlinear relationship between the number of pieces and man-hours. The efficiency assignment used to balance the man-hours earned by individual workers is a comprehensive indicator, which is affected by a variety of factors such as personnel proficiency and process optimization. However, its fundamental principle is more based on historical experience of man-hours, helping workers get more satisfactory man-hours, and is a man-hour adjustment parameter. For example, if the printed circuit board is of high value and workers need to be rewarded for more man-hours, a higher efficiency assignment will be given; for another example, if the workers are proficient but the printed circuit board is simple, in order to balance the man-hours of high-quality workers, a higher efficiency assignment will be given. By introducing efficiency assignment, the model can capture those factors that are difficult to directly quantify but have a significant impact on man-hours.

[0050] If a formula is used to calculate a worker's tinning time for a single piece, the following formula can be used: A worker's tinning time for a single piece = set unit tinning time / number of tinned pieces under set unit tinning time + efficiency assignment / number of tinned pieces under set unit tinning time. Therefore, the input features are selected as set unit tinning time, number of tinned pieces under set unit tinning time, and efficiency assignment.

[0051] This step records the tinning time of a single printed circuit board, the number of tinned pieces under a set unit tinning time, and the efficiency value of the tinning operation line of the workshop's printed circuit board within 3 months. Table 1 shows some historical data. Serial numbers 1 to 10 do not represent one printed circuit board, but multiple printed circuit boards for one project.

[0052] Table 1 Part of the collected data

[0053]

[0054] Step S2, data screening: perform data cleaning to remove missing values ​​in the collected data.

[0055] In this step, data is extracted and classified according to the fields related to the tinning time prediction analysis. After the extracted data is obtained, each line is set as a group of data. If one or more of the tinning time, number of tinned pieces or efficiency values ​​in each group of data is missing, then this group of data is a data group that has lost its repair value.

[0056] In the specific implementation, each group of data is traversed row by row, W ijrepresents the jth element in the i-th group of data. Each group of data has three elements, corresponding to the tinning time, the number of tinned pieces, and the efficiency assignment. For a group of data, if a certain W appears ij If it is 0, it means there is a missing value, and the data set will be deleted.

[0057] Data cleaning can be used to remove missing values ​​in the data set, thereby improving the quality of the data, ensuring that the model is built on accurate and reliable data, and avoiding inaccurate prediction results due to data quality issues.

[0058] Step S3: Establish a data set.

[0059] After cleaning, valid data is retained. A training sample is created, where the input data is: tinning time, number of tinned pieces, and efficiency assignment. The label is the working hours required for a worker to tin a single piece.

[0060] The data set is divided into training set and test set according to different ratios. In this embodiment, the data set is divided into D train The training set and D test Test set.

[0061] In order to eliminate the magnitude differences of each dimension of the data set samples and avoid the large magnitude differences between the input data and the output data, which may cause large errors in the prediction results, the present invention normalizes the data set samples after the data set is established, and the range of the processed data is between (-1, 1). The normalization processing formula is formula (2).

[0062]

[0063] Among them, X is the data before normalization; X out is the normalized data; X min is the minimum value of X in the data set, X max is the maximum value of X in the data set.

[0064] Step S4, constructing a tinning time prediction BP network.

[0065] In this embodiment, the number of neurons in the input layer of the BP network is I=3, corresponding to the three input features of tinning time, number of tinned pieces, and efficiency assignment. The number of neurons in the output layer is U=1, corresponding to the tinning working hours. The number of hidden layer layers is S=1. The number of neurons in the hidden layer is determined by the number of input neurons. The number of neurons in the hidden layer P can be obtained according to formula (3). The activation functions of the neurons in the hidden layer and the output layer use the sigmoid function. The S-type tangent function-tansig function is usually used from the input layer to the hidden layer, as shown in formula (4); the S-type logarithmic function-logsig function is used from the hidden layer to the output layer, as shown in formula (5). Formula (3) is a heuristic rule. The number of neurons in the hidden layer P is approximately twice the number of neurons in the input layer I plus one, which provides a relatively balanced structure for the network. Too few neurons in the hidden layer cannot capture the effective features in the data, and too many neurons may lead to overfitting. Formula (4) is a nonlinear function. Nonlinearity allows the network to learn complex decision boundaries and representations. Improve the gradient propagation effect, accelerate the convergence speed, improve the model performance and avoid overfitting. The nonlinear characteristics of formula (5) enable the network to learn and represent complex input-output mapping relationships. It can provide enough gradient information so that the BP network can effectively adjust the network weights.

[0066] P=I×2+1 (3)

[0067]

[0068]

[0069] Step S5: Optimize the genetic algorithm.

[0070] The present invention adds a tournament strategy into the genetic algorithm to retain and eliminate sub-populations of the genetic algorithm.

[0071] Genetic algorithm is an optimization algorithm inspired by biological evolution theory, which is used to find the optimal solution or approximate optimal solution to complex problems. Genetic algorithm simulates the natural selection and inheritance mechanism in the process of biological evolution, and searches the solution space through genetic operations between individuals in the population. The advantages of genetic algorithm are global search capability, parallelism and adaptability to nonlinearity in complex search space. However, the current genetic algorithm uses roulette strategy to select genetic population, and its selection is too random, which is not conducive to the global search for the optimal solution of the population. The tournament strategy uses replacement sampling to select the best and most optimal one to enter the offspring population, such as Figure 3 The selection process of the tournament strategy is as follows: determine the number of individuals N to be selected each time; randomly select N individuals in the population with the same selection probability, and select the individual with the best fitness value to enter the next generation population according to the fitness value of each individual; repeat the selection steps until a new population is selected.

[0072] The genetic algorithm process steps after the tournament strategy optimization population selection are as follows:

[0073] 1) Population initialization, set the evolutionary generation counter t = 0, set the maximum evolutionary generation T, and randomly generate M individuals as the initial population P(0).

[0074] 2) Calculate the fitness, and calculate the fitness of each individual in the population P(t) based on the ranking function, as shown in formula (6).

[0075] FitnV=ranking(obj) (6)

[0076] Among them, obj is the output of the last population (the output result of the last population, which contains a list of multiple objects).

[0077] 3) Selection operation: A tournament strategy is adopted to perform layer-by-layer selection based on the fitness of individuals. The selection probability is proportional to the fitness value of the individual.

[0078] 4) Crossover operation: using single-point crossover, a random crossover point is selected in the individual coding string, at which part of the data of the two ligand individuals is exchanged.

[0079] 5) Mutation operation, randomly changing the genes at certain positions of an individual to produce a new individual.

[0080] 6) Optimal solution, before obtaining the optimal individual, continue to perform population optimization operations. The overall process of steps is as follows Figure 4 shown.

[0081] Step S6, optimizing the tinning time BP network: using the genetic algorithm optimized in step S5, the weights of the constructed BP network are optimized.

[0082] The present invention places the genetic algorithm into the BP network weight calculation link. Determine the tinning time BP network structure, construct 3 input nodes and 1 output node, that is, 3 node input layers and 1 node output layer; set the population size M and the maximum evolutionary number Gmax of the optimized genetic algorithm; obtain the initial population, process the input layer data, set the population size, network weight, and network threshold; set the fitness function, and use the inverse of the mean square error function MSE as the fitness function, as shown in formula (7); obtain a new population through the optimized genetic algorithm; calculate the fitness of individuals in the new population, and terminate when the fitness meets the initial requirements or reaches the maximum number of evolutions, otherwise continue to put the new population into the optimized genetic algorithm for iteration; and finally obtain the optimal weight and threshold of the tinning time BP network.

[0083]

[0084] Among them, C is the number of training samples, t is the expected output of the neural network, and y is the predicted output of the neural network.

[0085] Step S7, training the tinning time prediction model: training based on the optimized BP network using the constructed tinning time data set, adjusting the network parameters until the predetermined tinning time prediction standard is reached.

[0086] In this embodiment, the maximum number of iterations of the training parameters is set to 1000, the learning rate is 0.001, the crossover probability of the improved genetic algorithm is 0.8, and the mutation probability is 0.01. train The training set and D test The test set is sent to the tinning time prediction network for training. The prediction model is obtained by saving the optimal weights and thresholds of the tinning time BP network after iteration.

[0087] Step S8: Prediction of tinning time.

[0088] The tinning time of a single printed circuit board, the number of tinned pieces under a set unit tinning time, and the efficiency assignment are obtained, and the tinning time prediction model is input to obtain the predicted result of the worker's single-piece tinning time.

[0089] The 199 groups of validation samples were input into the trained tinning time prediction model to test the time prediction effect. The prediction results are as follows: Figure 5 As shown. And the constant evaluation indicators MAE (mean absolute deviation), R 2 (goodness of fit) and MSE (mean square error) were used to evaluate the tinning time prediction model, and the evaluation index formulas are shown in (8)-(10).

[0090]

[0091]

[0092]

[0093] in, is the prediction result, y i is the ideal output, x is the number of samples, y is ave is the average of all ideal outputs.

[0094] The MAE index of the model of the present invention is 0.19 and 0.02 lower than that of the model based on BP network and the model based on GA-BP network respectively; the R 2The indexes are 0.006 and 0.005 lower than those of the model based on BP network and the model based on GA-BP network respectively; the MSE index of the method proposed in this invention is 0.001 lower than that of the model based on BP network and is equal to that of the model based on GA-BP network. It can be seen that the objective performance of the method proposed in this paper is better. As shown in Table 2.

[0095] Table 2 Evaluation table

[0096]

[0097] Based on the above method, the present invention also provides a printed circuit board tinning time prediction device based on machine learning, such as Figure 6 As shown, it includes a BP neural network, a training sample acquisition module, and a training module.

[0098] The training sample acquisition module is used to construct training samples using historical data; in the training samples, the input data includes the tinning time of a single printed circuit board, the number of tinned pieces under a set unit tinning time, and the efficiency assignment; the sample label is the working hours required for a worker to tin a single piece;

[0099] A training module is used to train the BP neural network using training samples to obtain a tinning time prediction model; during training, a genetic algorithm is used to optimize the weight of the BP neural network; the genetic algorithm uses a tournament strategy to select populations;

[0100] During prediction, the tinning time of a single printed circuit board, the number of tinned pieces under a set unit tinning time, and the efficiency assignment are obtained and input into the BP neural network, and the BP neural network outputs the prediction result of the worker's single-piece tinning working time.

[0101] Wherein, the training module uses the inverse of the mean square error function MSE as the fitness function for training the BP neural network.

[0102] Specifically, the training sample acquisition module includes a historical data acquisition module, a cleaning module, and a sample construction module;

[0103] The historical data acquisition module is used to acquire historical data;

[0104] The cleaning module is used to clean the historical data acquired by the historical data acquisition module to remove missing values ​​in the historical data; the cleaning method is: if one or more of the three input data in a training sample is missing, the training sample is deleted;

[0105] The sample construction module is used to construct training samples using the cleaned historical data.

[0106] The BP neural network includes an input layer, a hidden layer and an output layer; the number of neurons in the hidden layer is P=I×2+1; I is the number of neurons in the input layer; the activation functions of the neurons in the hidden layer and the output layer are sigmoid functions; the S-type tangent function is usually used from the input layer to the hidden layer; and the S-type logarithmic function is used from the hidden layer to the output layer.

[0107] The above specific embodiments only describe the design principle of the present invention. The shapes and names of the components in the description may be different and are not limited. Therefore, those skilled in the art in the field of the present invention may modify or replace the technical solutions recorded in the above embodiments; and these modifications and replacements do not deviate from the creative purpose and technical solutions of the present invention and should all fall within the protection scope of the present invention.

Claims

1. A method for predicting the working time of tinning of printed circuit boards based on machine learning, characterized in that: include: Step 1: Obtain training samples: The input data in the training samples include the set unit tinning time, the number of tinned pieces under the set unit tinning time, and the efficiency value used to balance the workers' personal working hours; the output sample label is the worker's single-piece tinning working hours; Step 2: construct a back propagation (BP) neural network for predicting the tinning time of printed circuit boards; use training samples for training to obtain a tinning time prediction model; during training, use a genetic algorithm to optimize the weight of the BP neural network; the genetic algorithm uses a tournament strategy to select populations; Step 3: When predicting the tinning time of a printed circuit board, obtain the set unit tinning time, the number of tinned pieces under the set unit tinning time and the efficiency assignment, input the tinning time prediction model, and obtain the predicted result of the worker's single-piece tinning time.

2. The method according to claim 1, characterized in that When the BP neural network is trained, the inverse of the mean square error function MSE is used as the fitness function.

3. The method according to claim 1, characterized in that Step 1: When obtaining training samples, obtain data within a period of history, and remove outliers and missing values ​​in the historical data through data cleaning; the cleaning method is: if one or more of the three input data in a training sample is missing, delete the training sample.

4. The method according to claim 1, characterized in that In the BP neural network, the number of neurons in the hidden layer is P=I×2+1; I is the number of neurons in the input layer; The activation function of hidden layer neurons and output layer neurons adopts sigmoid function; The S-type tangent function is usually used from the input layer to the hidden layer; The S-type logarithmic function is used from the hidden layer to the output layer.

5. A machine learning-based printed circuit board tinning time prediction device, characterized in that: Including back propagation (BP) neural network, training sample acquisition module, training module; The training sample acquisition module is used to construct training samples using historical data; in the training samples, the input data includes a set unit tinning time, a set number of tinned pieces under the unit tinning time, and an efficiency value used to balance the working hours of individual workers; The output sample label is the man-hours required for a worker to tin a single piece; The training module is used to train the BP neural network using training samples to obtain a tinning time prediction model; during training, a genetic algorithm is used to optimize the weight of the BP neural network; Genetic algorithms use a tournament strategy to select populations; During prediction, the set unit tinning time, the number of tinned pieces under the set unit tinning time and the efficiency assignment are obtained and input into the BP neural network, and the BP neural network outputs the prediction result of the worker's single-piece tinning time.

6. The device according to claim 5, characterized in that The training module uses the inverse of the mean square error function MSE as the fitness function for training the BP neural network.

7. The device according to claim 5, characterized in that The training sample acquisition module includes a historical data acquisition module, a cleaning module, and a sample construction module; The historical data acquisition module is used to acquire historical data; The cleaning module is used to clean the historical data acquired by the historical data acquisition module to remove abnormal values ​​and missing values ​​in the historical data; the cleaning method is: if one or more of the three input data in a training sample is missing, the training sample is deleted; The sample construction module is used to construct training samples using the cleaned historical data.

8. The device according to claim 5, characterized in that The BP neural network includes an input layer, a hidden layer and an output layer; The number of neurons in the hidden layer P = I × 2 + 1; I is the number of neurons in the input layer; The activation function of hidden layer neurons and output layer neurons adopts sigmoid function; The S-type tangent function is usually used from the input layer to the hidden layer; The S-type logarithmic function is used from the hidden layer to the output layer.