PCB defect distribution anomaly identification method, production supervision method and system
By generating defect distribution maps using AI technology and combining them with unsupervised learning and pre-trained models, abnormal processes in PCB production can be automatically identified and located. This solves the problem of inaccurate defect location in existing technologies and enables efficient anomaly identification and process adjustment.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-29
- Publication Date
- 2026-04-10
AI Technical Summary
Existing technologies cannot achieve full data analysis in PCB production, resulting in insufficient defect location and accuracy. They rely on engineer experience and DOE verification, and cannot quickly identify and adjust abnormal processes.
An AI-based approach is used to generate a defect distribution map using optical inspection equipment. By combining unsupervised learning clustering algorithms and pre-trained models, abnormal defects are automatically identified and located. The AI model analyzes the distribution characteristics of defect blocks, predicts the anomaly category, and performs diagnosis by combining production log information.
It enables full data analysis, automatic identification and location of abnormal processes, reduces manual intervention, improves the accuracy and efficiency of defect location, adapts to process drift and new problems, and achieves system self-optimization and continuous learning.
Smart Images

Figure CN121414754B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of PCB, in particular to a PCB defect distribution anomaly identification method, production supervision method and system. BACKGROUND
[0002] The products obtained in multiple processes of PCB production will be subjected to multiple detection processes such as AOI, VRS, ET, etc. to obtain the distribution of defects on the products.
[0003] In the production link of manufacturing industry, the operators and engineers cannot directly confirm and locate which process caused the large number of quality abnormal products, and cannot directly adjust and improve the quality of subsequent products.
[0004] The existing factory finds that the product has a large number of abnormalities. The method is that the engineering and quality engineers collect, draw, and preliminarily judge and locate the product problem data defect map, check the log data of the batch of products flowing through the key process, and give a judgment according to historical experience. More rigorous is to take idle or problem machine adjustment equipment parameters to carry out DOE (Design of Experiments) test verification.
[0005] At present, in the industry, when a large number of continuous production quality abnormalities occur, engineering, quality and quality improvement departments will intervene. First, collect abnormal material number and batch data, second, confirm the proportion of different defects and detailed defect map, preliminarily estimate which processes and equipment caused the problem according to historical experience; second, draw different distributions and total distributions by drawing topographic map and hot spot map, and confirm the more detailed processes and equipment according to experience; then extract and investigate the log data of related processes and equipment, filter and verify according to the production time of abnormal boards. If there is historical experience, the problem can be directly located and the equipment parameters can be adjusted. If there is insufficient historical data experience, DOE verification analysis is needed. Engineering samples are carried out, and whether the problem board can be reproduced is confirmed by adjusting the parameters, or whether the board yield is improved and improved after adjusting the parameters. In the above steps, the existing enterprise has designed some software to complete part of the work, such as automatic extraction of abnormal data, drawing of defect distribution map, process positioning, etc. However, there is no complete integrated solution, and engineers need to rely on historical experience and DOE verification analysis. In the above description, the production manufacturing department, engineering department, quality department, quality improvement department and even equipment department in the traditional mode need to be linked to execute the work flow.
[0006] Generally speaking, the traditional method of relying on engineers to conduct positioning analysis and experimental verification cannot analyze all data, and usually uses sampling analysis processing, so the continuity, accuracy, time and causality of the data are not fully covered, which may lead to insufficient data range and continuity of the verification extraction, and the positioning and accuracy of the problem will be discounted.
[0007] The disclosure of the above background art is only used to assist in understanding the concept and technical solutions of the present application, and does not necessarily give technical teaching. SUMMARY
[0008] The purpose of the present application is to provide a solution of AI-based PCB defect distribution anomaly recognition for program full-process automatic processing.
[0009] To achieve the above purpose, the technical scheme adopted by the present application is as follows:
[0010] An AI-based PCB defect distribution anomaly recognition method, comprising the following steps:
[0011] Scanning and detecting each circuit board by using an optical detection device, generating a defect distribution map corresponding to each circuit board according to the detection result, and associating the defect distribution map with the corresponding detection time;
[0012] Reserving a defect block of a preset type in the defect distribution map by using an unsupervised learning clustering algorithm;
[0013] According to the morphological characteristics of the reserved defect block, the defect distribution map meeting the preset abnormal characteristics is screened out as a board pattern;
[0014] Calling a pre-trained AI model, the AI model analyzes the distribution characteristics of the defect block on the screened board pattern, and further predicts the category to which the board pattern belongs;
[0015] If the prediction result is that the board pattern belongs to a preset abnormal category, an abnormal reason diagnosis result corresponding to the prediction result is output;
[0016] If the prediction result is that the board pattern does not belong to the preset abnormal category, the production log information related to the corresponding detection time is searched, if there is abnormal log information, the abnormal reason diagnosis result corresponding to the abnormal log information is output, and a potential abnormality mark is reserved for the board pattern; if there is no abnormal log information, a diagnosis result belonging to a normal category is output;
[0017] The board pattern with the reserved potential abnormality mark is configured to retrain the AI model subsequently.
[0018] Further, any one of the above technical solutions or a combination of multiple technical solutions is reserved, and the reserved defect blocks are respectively marked with contour lines.
[0019] Further comprising, after screening out the board pattern with the preset abnormal characteristics:
[0020] Lowering the transparency of the area block within the contour line in the board pattern, so that when the AI model analyzes the board pattern, it only pays attention to the shape of the contour line and its distribution direction in the board pattern.
[0021] Further, any one of the technical solutions or a combination of the technical solutions, the AI model is trained by the following way:
[0022] Collecting learning samples, including defect distribution image samples of circuit boards and artificially labeled type labels, the type labels including normal category, flip board process abnormal category, pressing process abnormal category and electroplating process abnormal category, wherein the defect distribution image samples corresponding to the flip board process abnormal category have the characteristic that the defects are arranged in a straight line on the single side edge of the board pattern, the defect distribution image samples corresponding to the pressing process abnormal category have the characteristic that the defects are arranged in a straight line on the double side edge of the board pattern, and the defect distribution image samples corresponding to the electroplating process abnormal category have the characteristic that the defects are arranged in a cluster on the top part of the board pattern and in a cluster in the middle of the bottom part.
[0023] Training the AI model using the collected learning samples until the trained model converges.
[0024] Further, any one of the technical solutions or a combination of the technical solutions, the flip board process abnormal category, the pressing process abnormal category and the electroplating process abnormal category correspond to different defect types.
[0025] The defect distribution map generated by the optical detection equipment is associated with the type information of each defect;
[0026] Only the defect blocks of the defect type corresponding to the flip board process abnormal category are retained in the defect distribution map by the unsupervised learning clustering algorithm, and if the retained defect blocks meet the abnormal characteristic that the defects are arranged in a straight line on the single side edge of the map, the current defect distribution map is determined as a first type board pattern.
[0027] Only the defect blocks of the defect type corresponding to the pressing process abnormal category are retained in the defect distribution map by the unsupervised learning clustering algorithm, and if the retained defect blocks meet the abnormal characteristic that the defects are arranged in a straight line on the double side edge of the map, the current defect distribution map is determined as a second type board pattern.
[0028] The unsupervised learning clustering algorithm only retains the defect blocks of the defect type corresponding to the plating process abnormality category in the defect distribution map, and if the retained defect blocks meet the abnormality characteristics arranged in the top block set and the bottom middle set in the map, the current defect distribution map is determined as a third type of board pattern.
[0029] Further, any of the technical solutions or combinations of the technical solutions, the defect type corresponding to the plating process abnormality category includes short circuit, crimping, crease, scratch;
[0030] The defect type corresponding to the pressing process abnormality category includes short circuit, crimping, and scratch.
[0031] The defect type corresponding to the plating process abnormality category includes protrusion and hole filling protrusion.
[0032] Further, any of the technical solutions or combinations of the technical solutions, the image classification network of ResNet or EfficientNet is used as the backbone of the AI model, and the last layer of the image classification network is modified into normal category, plating process abnormality category, pressing process abnormality category, and plating process abnormality category.
[0033] Further, any of the technical solutions or combinations of the technical solutions, the AI model is further trained to predict confidence;
[0034] If the confidence of the prediction result of the AI model reaches the preset confidence threshold, a diagnostic report corresponding to the prediction result is output;
[0035] If the confidence of the prediction result of the AI model does not reach the preset confidence threshold, a potential abnormality mark is retained for the corresponding board pattern;
[0036] The board pattern with the potential abnormality mark is submitted for manual review, and the review result is used as the type label corresponding to the board pattern;
[0037] According to the board pattern with the potential abnormality mark and the type label obtained by manual review, the AI model is retrained to optimize and update the AI model.
[0038] Further, any of the technical solutions or combinations of the technical solutions, the AI model is further trained to predict confidence;
[0039] If the prediction result of the AI model is that the board pattern belongs to a preset abnormality category, and the confidence of the prediction result reaches a preset confidence threshold, an abnormality reason diagnosis result corresponding to the prediction result is output.
[0040] If the prediction result of the AI model is that the board pattern belongs to a preset abnormal category, and the confidence of the prediction result does not reach a preset confidence threshold, then based on the prediction result, the production log information corresponding to the abnormal category is associated, and the production log information related to the corresponding detection time is retrieved, if there is no abnormal log information among them, then the board pattern is retained with a potential abnormality mark; if there is abnormal log information among them, then a diagnosis result is output according to the prediction result and the abnormal log information;
[0041] If the prediction result of the AI model is that the board pattern belongs to a normal category, and the confidence of the prediction result reaches a preset confidence threshold, then a diagnosis result belonging to the normal category is output.
[0042] If the prediction result of the AI model is a normal category, and the confidence of the prediction result does not reach a preset confidence threshold, then based on the prediction result, the production log information corresponding to the abnormal category is associated, and the production log information related to the corresponding detection time is retrieved, if there is no abnormal log information among them, then a diagnosis result belonging to the normal category is output; if there is abnormal log information among them, then the board pattern is retained with a potential abnormality mark.
[0043] Further, any one of the technical solutions or a combination of the technical solutions described above is trained by the following method to make the AI model predict the confidence:
[0044] The last layer of the image classification network serving as the backbone of the AI model outputs scores of various prediction categories, the scores of various categories are converted into probability distributions through an activation function, the maximum probability value among them is taken as the confidence, and the activation function includes one or more of Softmax, sigmoid, relu, and tanh functions.
[0045] Further, any one of the technical solutions or a combination of the technical solutions described above is trained by the following method to make the AI model predict the confidence:
[0046] The AI model is constructed as two or more sub-models of the same structure, and the two or more sub-models are trained with at least different learning samples; the standard deviation or entropy of the prediction results of the multiple models is calculated according to the prediction results of the two or more sub-models on the same board pattern; and the confidence corresponding to the standard deviation or entropy is determined according to a preset mapping relationship or function relationship, wherein the greater the standard deviation or entropy, the lower the corresponding confidence.
[0047] Further, any one of the technical solutions or a combination of the technical solutions described above is trained by the following method to make the AI model predict the confidence:
[0048] The unsupervised learning clustering algorithm is used to calculate the morphological similarity between the reserved defect block and the preset abnormal feature, wherein the unsupervised learning clustering algorithm is one or more of DBScan, Kmeans, MeanShift and OPTICS.
[0049] If the morphological similarity reaches the preset similarity threshold, it is determined that the defect distribution map of the reserved defect block is a board pattern conforming to the preset abnormal feature; if the morphological similarity does not reach the preset similarity threshold, the abnormality identification of the defect distribution map of the reserved defect block is stopped.
[0050] Further, any of the technical solutions or a combination of the technical solutions is further provided before the defect distribution map of the preset type of defect block is reserved by the unsupervised learning clustering algorithm.
[0051] The scanning detection data of all circuit boards is collected and stored in a database;
[0052] The yield of the circuit board is calculated, and if the yield is normal, the yield of the circuit board is continuously monitored;
[0053] If the yield is abnormal, the abnormal circuit board is screened out, and a corresponding defect distribution map of the abnormal circuit board is generated.
[0054] According to another aspect of the present application, a PCB production supervision method is provided, comprising the following steps:
[0055] Based on the abnormality identification method as described above, the AI model predicts the category to which the board pattern corresponding to each circuit board belongs;
[0056] If the prediction result is that the board pattern belongs to the flip board process abnormal category, the flip board process equipment is repaired;
[0057] If the prediction result is that the board pattern belongs to the press process abnormal category, the press process equipment is repaired;
[0058] If the prediction result is that the board pattern belongs to the electroplating process abnormal category, the electroplating process equipment is repaired.
[0059] According to still another aspect of the present application, a PCB production system is provided, comprising process equipment, AOI equipment, an abnormality identification system and a prompt device, wherein the AOI equipment is configured to perform optical scanning detection on the circuit board processed by the process equipment, generate a defect distribution map corresponding to the circuit board one by one according to the detection result, and associate the defect distribution map with the corresponding detection time;
[0060] The abnormality identification system comprises the following modules:
[0061] an unsupervised learning clustering algorithm module configured to retain defect blocks of a preset type in the defect distribution map;
[0062] an unsupervised learning clustering algorithm module configured to filter out a defect distribution map meeting a preset abnormal feature as a board pattern according to the morphological features of the retained defect blocks;
[0063] a pre-trained AI model configured to analyze the distribution features of the defect blocks on the filtered board pattern, and further predict the category to which the board pattern belongs;
[0064] if the prediction result is that the board pattern belongs to a preset abnormal category, the prompting device prompts maintenance of the relevant process equipment;
[0065] if the prediction result is that the board pattern does not belong to a preset abnormal category, the production log information of each process equipment in a time period corresponding to the detection time is retrieved, if there is abnormal log information, an abnormal reason diagnosis result corresponding to the abnormal log information is output, and a potential abnormality mark is retained for the board pattern; if there is no abnormal log information, a diagnosis result belonging to a normal category is output;
[0066] the board pattern retaining the potential abnormality mark is configured to be retrained subsequently.
[0067] Further, any one of the technical solutions or a combination of the technical solutions is configured to perform the PCB defect distribution abnormality identification method as described above.
[0068] The technical solutions provided by the application have the following beneficial effects:
[0069] a. According to the actual work flow and experience on site, certain rules and phenomena exist in the distribution of different defects on the board, and after the actual data are combined, correlation hypothesis verification, independence hypothesis verification and exclusivity hypothesis verification, it is confirmed that there is a causal relationship, and based on this, AI is combined to realize automatic identification and positioning of abnormal processes, which is used for adjusting parameters and improving, and the essence is to structure expert knowledge and solidify and scale application through an AI model;
[0070] b. Instead of operating from a microscopic level, it is analyzed from the macro defect distribution level of the whole batch and the whole board, automatic data collection, drawing, filtering, problem process identification and positioning through a preset and trained AI model are realized, and a diagnosis report can be issued in combination with actual process logs (based on actual conditions); engineers do not need to perform manual identification and operation, and a large amount of operation is reduced;
[0071] c. The data are tracked and collected in whole, the data of each batch of boards can be determined, and the data source has high accuracy;
[0072] d. The process and equipment can be flexibly selected for combination, and the single process equipment can be applied to process abnormality identification. BRIEF DESCRIPTION OF DRAWINGS
[0073] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments described in the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0074] Figure 1 The flowchart of the AI-based PCB defect distribution abnormality identification method provided for an exemplary embodiment of the present application is shown.
[0075] Figure 2 The schematic diagram of retaining the defect blocks of a preset type in the defect distribution map and marking the contour line by using an unsupervised learning clustering algorithm is provided for an exemplary embodiment of the present application.
[0076] Figure 3 The defect distribution image corresponding to the abnormality category of the flipping process is provided for an exemplary embodiment of the present application.
[0077] Figure 4 The defect distribution image corresponding to the abnormality category of the pressing process is provided for an exemplary embodiment of the present application.
[0078] Figure 5 The defect distribution image corresponding to the abnormality category of the electroplating process is provided for an exemplary embodiment of the present application.
[0079] Figure 6 The flowchart of the first abnormality identification method using AI model prediction confidence is provided for an exemplary embodiment of the present application.
[0080] Figure 7 The flowchart of the second abnormality identification method using AI model prediction confidence is provided for an exemplary embodiment of the present application.
[0081] Figure 8 The flowchart of the abnormality identification method combined with yield judgment is provided for an exemplary embodiment of the present application.
[0082] Figure 9 The flowchart of the PCB production supervision method is provided for an exemplary embodiment of the present application.
[0083] Figure 10A structural block diagram of a PCB production system is provided for an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0084] In order for those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor should fall within the scope of protection of the present application.
[0085] It should be noted that the terms "first", "second", and the like in the specification and claims of the present application and the above-described drawings are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, device, product, or apparatus that includes a series of steps or units does not have to be limited to only those steps or units clearly listed, but can include other steps or units that are not clearly listed or inherent to these processes, methods, products, or apparatuses.
[0086] The present application needs to use data analysis tools based on certain production background knowledge (such as equipment, quality, production process, equipment knowledge, software development and database development knowledge, data collection-cleaning-analysis related knowledge) to mine the rules of defect distribution on the PCB, so as to intelligently identify and locate the abnormal process, and then adjust and improve the process parameters.
[0087] In an embodiment of the present application, an AI-based PCB defect distribution abnormality identification method is provided, as shown in Figure 1 The abnormality identification method includes the following steps:
[0088] S100: Scanning and detecting each circuit board by using an automatic optical inspection device (AOI), generating a defect distribution map corresponding to each circuit board according to the detection result, and associating the defect distribution map with the corresponding detection time;
[0089] S200: retaining a preset type of defect block in the defect distribution map by an unsupervised learning clustering algorithm, the unsupervised learning clustering algorithm including one or more of DBScan, K-means, Hierarchical Clustering, Mean-Shift, OPTICS, and GMM; taking the DBScan algorithm as an example, the radius, density, and learning period parameters are adjusted according to actual conditions when calculating the defect block, and a graph is drawn and output at the same time, and specifically, the retained defect block is identified by using a contour line, as shown in Figure 2
[0090] Regarding the variant algorithm of DBScan, the points on the original plane coordinates are matrix processed, the matrix elements are merged in the near distance, and on this basis, the matrix is taken as new data, and the defect coordinate distances are unified to a unit 1 level, and the blank interval is removed.
[0091] S300: screening a defect distribution map that meets a preset abnormal feature according to the morphological characteristics of the retained defect block, as a plate graph;
[0092] After screening the plate graph that meets the preset abnormal feature, it further includes: reducing the transparency of the area block in the contour line in the plate graph, so that when the AI model is called to analyze the plate graph in the next step S400, only the contour line shape and its distribution direction in the plate graph are paid attention to.
[0093] S400: calling a pre-trained AI model, the AI model analyzing the distribution characteristics of the defect block on the screened plate graph, and further predicting the category to which the plate graph belongs; the structure and training method of the AI model are described in detail below.
[0094] If the prediction result is that the plate graph belongs to a preset abnormal category, an abnormal reason diagnosis result corresponding to the prediction result is output;
[0095] If the prediction result is that the plate graph does not belong to a preset abnormal category, production log information related to the corresponding detection time is searched, if there is abnormal log information, an abnormal reason diagnosis result corresponding to the abnormal log information is output, and a potential abnormality mark is retained for the plate graph; if there is no abnormal log information, a diagnosis result belonging to a normal category is output;
[0096] The plate graph retaining the potential abnormality mark is configured to retrain the AI model subsequently.
[0097] Finally, after storing the result of abnormal identification in the database, a report is generated in real time, and can be broadcasted to the customer's designated mailbox, DingTalk, etc. communication interface for broadcast notification.
[0098] The embodiment combines traditional image processing, unsupervised clustering, supervised AI model and production data analysis to form a closed-loop quality analysis and improvement system. Step S200 / S300 is used for preliminary screening, and step S400 is used for fine identification and processing by an AI model to exert its powerful pattern recognition and generalization ability: in step S200, DBScan is used to quickly filter out obvious meaningless defects, and in step S300, morphological feature analysis is used to quickly screen out defects meeting the preset, which greatly reduces the sample amount and complexity of the subsequent AI model to be processed, reduces the difficulty of AI training and the probability of misjudgment, and improves the system efficiency.
[0099] The board pattern with potential abnormality marking is an edge case where the AI model is uncertain or the current knowledge base is incomplete. By manually reviewing such cases, the system can accumulate key learning samples for subsequent model retraining and evolution, enabling the model to continuously learn new abnormal patterns, adapt to process drift and new problems on the production line, and achieve self-optimization and continuous learning of the system.
[0100] The embodiment also fully utilizes multi-source data fusion: not only analyzing defect distribution maps (result data), but also correlating detection time to trace production logs (process data): when the AI model judges the classification result as "normal", it does not easily conclude, but cross- validates whether there is an abnormal record in the production process. This "result-process" double-checking mechanism greatly improves the reliability of diagnosis and can discover some defect patterns caused by specific production events (such as instantaneous equipment failure, material batch switching) that the AI model has not learned yet.
[0101] In one embodiment, an image classification network using ResNet or EfficientNet is used as the backbone of the AI model, and the last layer of the image classification network is modified to include normal category, board flipping process abnormal category, pressing process abnormal category, and electroplating process abnormal category.
[0102] In a specific embodiment, the AI model is trained by the following method:
[0103] Learning samples are collected, including defect distribution image samples of circuit boards and manually labeled type labels, which include normal category, board flipping process abnormal category, pressing process abnormal category, and electroplating process abnormal category. The defect distribution image samples corresponding to the board flipping process abnormal category have the feature that the defects are arranged in a straight line on one side edge of the board pattern, as shown in FIG. 1B, which indicates that the stress mechanical structure on one side of the board flipping process in the pre-process has deviated from the normal range; the defect distribution image samples corresponding to the pressing process abnormal category have the feature that the defects are arranged in a straight line on both side edges of the board pattern, as shown in FIG. 1C, which indicates that the pressing process has deviated from the normal range. Figure 3 Figure 4 As shown, it is indicated that the pressure applied by the two rollers on the lower side in the pressing process in the previous process is too large; the defect distribution image sample corresponding to the abnormal category of the electroplating process has the characteristics that the defects are arranged in the top part block set of the plate pattern and in the middle set at the bottom, as shown in Figure 5 As shown, it is indicated that there is an abnormality in the electroplating process in the previous process;
[0104] The above is essentially to structure the expert knowledge, that is, in the research stage, according to the collaborative research and analysis of production, engineering, quality, and quality improvement departments, the distribution and shape of the overall defect of different products in different defects or defect groups in actual production are counted and listed, and the causal relationship with the process in production is confirmed. For example, the long strip-shaped defect distribution mainly appears on the left side in the defect distribution map. After investigation, it is estimated that this kind of defect distribution is caused by improper setting of the pressure parameter of the plate turning process in the production of the plate turning process. The expert knowledge is solidified and applied on a large scale through the AI model.
[0105] The AI model is trained using the collected learning samples until the trained model converges. Specifically, the data set can be divided into training set, validation set and independent test set according to the proportion. The weighted cross-entropy loss function is used to alleviate the class imbalance problem, the model parameters are optimized on the training set, the performance is monitored on the validation set and overfitting is prevented, the best model is selected through early stopping method, and finally the model performance is evaluated on the independent test set to ensure its generalization ability. The evaluation indexes include accuracy, precision, recall and F1 score of each category.
[0106] Specifically, the plate turning process abnormal category, the pressing process abnormal category, and the electroplating process abnormal category correspond to different defect types;
[0107] The defect distribution map generated by the optical detection device is associated with the type information of each defect therein;
[0108] Through the DBScan algorithm (or other unsupervised learning clustering algorithms such as K-means, Hierarchical Clustering, Mean-Shift, OPTICS or GMM), only the defect blocks of the defect type corresponding to the plate turning process abnormal category are retained in the defect distribution map. If the retained defect blocks meet the abnormal characteristics that the single side edge in the map is arranged in a straight line, the current defect distribution map is determined as a first type plate pattern;
[0109] The DBScan algorithm (or other unsupervised learning clustering algorithms such as K-means, Hierarchical Clustering, Mean-Shift, OPTICS or GMM) is used to retain only the defect blocks of the defect type corresponding to the pressing process abnormal category in the defect distribution map. If the retained defect blocks meet the abnormal characteristics of the straight line arrangement of the double-side edges in the map, the current defect distribution map is determined as the second type of board pattern.
[0110] The DBScan algorithm (or other unsupervised learning clustering algorithms such as K-means, Hierarchical Clustering, Mean-Shift, OPTICS or GMM) is used to retain only the defect blocks of the defect type corresponding to the pressing process abnormal category in the defect distribution map. If the retained defect blocks meet the abnormal characteristics of the straight line arrangement of the double-side edges in the map, the current defect distribution map is determined as the second type of board pattern.
[0111] In summary, the AI model outputs not only a binary judgment of normal / abnormal, but also an abnormal reason diagnosis result (turnover process abnormal category / pressing process abnormal category / plating process abnormal category), which directly provides an executable action guide for process engineers and greatly shortens the Root Cause Analysis (RCA) time.
[0112] In one specific embodiment, the defect type corresponding to the turnover process abnormal category includes short circuit, crimping, crease, scratch;
[0113] The defect type corresponding to the pressing process abnormal category includes short circuit, crimping, scratch;
[0114] The defect type corresponding to the plating process abnormal category includes protrusion, hole filling protrusion.
[0115] Based on this specific embodiment, in step S100, the AOI scanning circuit board obtains a defect distribution map A. In step S200, the clustering ability of the DBScan algorithm (or other unsupervised learning clustering algorithms such as K-means, Hierarchical Clustering, Mean-Shift, OPTICS or GMM) is used to filter out specific defect types according to the spatial density characteristics, and filter out other non-target type defects. Then, the defect type corresponding to the turnover process abnormal category, i.e., the defect blocks of the short circuit, crimping, crease, and scratch types, are selected / retained, to obtain a defect distribution sub-map A1. If the retained defect blocks meet the abnormal characteristics of the straight line arrangement of the single-side edge in the map, as shown in Figure 3 , the defect distribution sub-map A1 is determined as the target board pattern A1' that needs to be recognized by the AI model.
[0116] Similarly, in step S200, the DBScan algorithm (or other unsupervised learning clustering algorithms such as K-means, Hierarchical Clustering, Mean-Shift, OPTICS or GMM) is used to screen out / only retain the defect types corresponding to the pressing process abnormal category, i.e. short circuit, crimping, scratch type defect blocks, to obtain a defect distribution subgraph A2, if the retained defect blocks in the subgraph A2 conform to the abnormal characteristics of the straight line arrangement of the double-sided edges in the graph, as shown in Figure 4 , the defect distribution subgraph A2 is determined as the target board graph A2' that needs to be identified by the AI model; in step S200, the DBScan algorithm (or other unsupervised learning clustering algorithms such as K-means, Hierarchical Clustering, Mean-Shift, OPTICS or GMM) is used to screen out / only retain the defect types corresponding to the electroplating process abnormal category, i.e. protrusion, hole filling protrusion type defect blocks, to obtain a defect distribution subgraph A3, if the retained defect blocks in the subgraph A3 conform to the abnormal characteristics of the arrangement of the top block set in the graph and the middle set at the bottom, as shown in Figure 5 , the defect distribution subgraph A3 is determined as the target board graph A3' that needs to be identified by the AI model.
[0117] For example, as shown in Figure 2 , the DBScan calculated defect blocks are identified by contour lines as shown in Figure 2 , in step S300, the unsupervised learning clustering algorithm is used again to calculate the morphological similarity between the retained defect blocks and the preset abnormal characteristics, wherein the unsupervised learning clustering algorithm is one or more of DBScan, Kmeans, MeanShift, OPTICS; the program performs secondary processing on the defect distribution block graph through scaling, edge smoothing, dilation, erosion and other algorithms to ensure that the drawing graph is more accurate and the features of the graph are retained as much as possible, and to increase the preprocessing function in the graph processing. If the morphological similarity reaches the preset similarity threshold, the defect distribution graph of the retained defect block is determined as the board graph that conforms to the preset abnormal characteristics; if the morphological similarity does not reach the preset similarity threshold, the abnormal identification of the defect distribution graph of the retained defect block is stopped. Obviously, Figure 2 , the distribution of the identified defect blocks is similar to the abnormal characteristic of the straight line arrangement of the single-sided edge in the graph represented by Figure 3 , the morphological similarity of the contour line in Figure 2 reaches the threshold, the area block within the contour line is further adjusted to low transparency to obtain a board graph to input the AI model, and the operation of adjusting the transparency to low makes the specific defect points in the contour line area not be displayed, so that the AI model only pays attention to the shape of the contour line and its distribution direction in the board graph when analyzing the board graph.
[0118] In a further optimized embodiment, the AI model is further trained to predict a confidence level; the corresponding abnormality identification method process is as shown in Figure 6
[0119] If the confidence level of the prediction result of the AI model reaches a preset confidence threshold, a diagnostic report corresponding to the prediction result is output;
[0120] If the confidence level of the prediction result of the AI model does not reach the preset confidence threshold, a potential abnormality label is reserved for the board pattern;
[0121] The board pattern with the reserved potential abnormality label is submitted for manual review, and the review result is taken as a type label;
[0122] According to the board pattern with the reserved potential abnormality label and the type label obtained through manual review, the AI model is retrained to optimize and update the AI model.
[0123] In another further optimized embodiment, the AI model is further trained to predict a confidence level; the corresponding abnormality identification method process is as shown in Figure 7
[0124] If the prediction result of the AI model is that the board pattern belongs to a preset abnormality category, and the confidence level of the prediction result reaches a preset confidence threshold, an abnormality cause diagnosis result corresponding to the prediction result is output;
[0125] If the prediction result of the AI model is that the board pattern belongs to a preset abnormality category, and the confidence level of the prediction result does not reach a preset confidence threshold, based on the prediction result, production log information corresponding to the abnormality category is associated, and production log information related to the corresponding detection time is retrieved, if there is no abnormal log information therein, a potential abnormality label is reserved for the board pattern; if there is abnormal log information therein, a diagnosis result is output according to the prediction result and the abnormal log information;
[0126] If the prediction result of the AI model is that the board pattern belongs to a normal category, and the confidence level of the prediction result reaches a preset confidence threshold, a diagnostic result belonging to the normal category is output;
[0127] If the prediction result of the AI model is a normal category, and the confidence level of the prediction result does not reach a preset confidence threshold, based on the prediction result, production log information corresponding to the abnormality category is associated, and production log information related to the corresponding detection time is retrieved, if there is no abnormal log information therein, a diagnostic result belonging to the normal category is output; if there is abnormal log information therein, a potential abnormality label is reserved for the board pattern.
[0128] In the above embodiments, the AI model not only predicts whether the board pattern belongs to the normal category or the preset abnormal category, but also predicts the corresponding confidence level. Figure 6 and Figure 7 One common point of the above embodiments is that when the AI model predicts a low confidence level, the hovering decision is made, and the process data (i.e., the traceability log information) is combined to make a joint decision, effectively preventing the AI model from making a wrong judgment in a situation where it is not sure; and according to the AI model recognition result that deviates from the log information, the corresponding board pattern is marked as a potential abnormality, as described above, the edge cases that the AI model is uncertain or the current knowledge base is incomplete are accumulated, providing key learning samples for subsequent model retraining and evolution, enabling the model to continuously learn new abnormal patterns, and achieving self-optimization and continuous learning of the system.
[0129] Through logical consideration of the confidence level, the AI model is upgraded from a static defect classifier to a dynamic, adaptive, and more reliable diagnostic model.
[0130] In one embodiment, the AI model is trained to predict the confidence level by:
[0131] The last layer of the image classification network serving as the backbone of the AI model outputs scores of various prediction categories, and the scores of each category are converted into a probability distribution through an activation function, with the maximum probability value as the confidence level, and the activation function includes one or more of Softmax, sigmoid, relu, and tanh functions.
[0132] In another embodiment, the AI model is trained to predict the confidence level by:
[0133] The AI model is constructed as two or more sub-models with the same structure, and the two or more sub-models are trained with at least different learning samples; the standard deviation or entropy of the prediction results of the multiple models is calculated according to the prediction results of the two or more sub-models on the same board pattern; and the confidence level corresponding to the standard deviation or entropy is determined according to a preset mapping relationship or functional relationship, wherein the greater the standard deviation or entropy, the lower the corresponding confidence level.
[0134] In a specific embodiment, before retaining the defect blocks of the preset type in the defect distribution map by the unsupervised learning clustering algorithm, the following steps are further included:
[0135] Collecting the scan detection data of all circuit boards and storing them in a database;
[0136] Calculating the yield of the circuit board, and if the yield is normal, continuing to monitor the yield of the circuit board;
[0137] If the yield is abnormal, the abnormal circuit board with poor quality is screened out, and a corresponding defect distribution map of the abnormal circuit board is generated, as shown in Figure 8 . That is, a certain tolerance range is provided for the yield of the circuit board. Only when the yield is not up to standard, it indicates that the process abnormality is probably present. At this time, the content of the above embodiment is used to identify the PCB defect distribution.
[0138] In an embodiment of the present application, a PCB production supervision method is provided, as shown in Figure 9 .
[0139] Based on the abnormality identification method as described above, the AI model predicts the category to which the board pattern corresponding to each circuit board belongs;
[0140] If the prediction result is that the board pattern belongs to the flip board process abnormality category, the flip board process equipment is overhauled;
[0141] If the prediction result is that the board pattern belongs to the press process abnormality category, the press process equipment is overhauled;
[0142] If the prediction result is that the board pattern belongs to the electroplating process abnormality category, the electroplating process equipment is overhauled.
[0143] According to still another aspect of the present application, a PCB production system is provided, as shown in Figure 10 . The PCB production system includes process equipment, AOI equipment, an abnormality identification system, and a prompt device. The AOI equipment is configured to perform optical scanning detection on the circuit board processed by the process equipment, generate a defect distribution map corresponding to the circuit board according to the detection result, and associate the defect distribution map with the corresponding detection time.
[0144] The abnormality identification system includes the following modules:
[0145] A DBScan algorithm module configured to retain defect blocks of a preset type in the defect distribution map;
[0146] An unsupervised learning clustering algorithm module configured to screen out defect distribution maps that meet the preset abnormality characteristics as board patterns according to the morphological characteristics of the retained defect blocks;
[0147] A pre-trained AI model configured to analyze the distribution characteristics of the defect blocks on the screened board patterns, and further predict the category to which the board pattern belongs;
[0148] If the prediction result is that the board pattern belongs to the preset abnormal category, the prompt device makes a prompt to overhaul the related process equipment;
[0149] If the prediction result is that the board pattern does not belong to the preset abnormal category, the production log information of each process equipment in the time period corresponding to the detection time is retrieved, if there is abnormal log information therein, the abnormal reason diagnosis result corresponding to the abnormal log information is output, and the potential abnormality mark is reserved for the board pattern; if there is no abnormal log information therein, the diagnosis result belonging to the normal category is output.
[0150] The board pattern with the reserved potential abnormality mark is configured to be retrained subsequently to the AI model.
[0151] It should be noted that the PCB production system provided in the embodiment and the PCB defect distribution abnormality identification method provided in the above embodiment belong to the same inventive concept, that is, the abnormality identification system in the embodiment is configured to perform the PCB defect distribution abnormality identification method as described in the above embodiment, and the entire content of the PCB defect distribution abnormality identification method embodiment is incorporated herein by reference, and will not be repeated.
[0152] The application increases the implementation of related algorithms, such as the program automatically performing DBScan algorithm on the defect graph for block processing. In the past, engineers need to observe each graph one by one, and if there are not many defect patterns on some boards and the distribution is relatively scattered, they are directly filtered. However, in the present patent, the DBScan algorithm can automatically draw the defect graph into blocks, and combined with morphological filtering. Furthermore, after the distribution of the defect graph, the present patent embeds an AI model to automatically identify which category the pattern distribution belongs to, without the need for engineers to perform manual identification and work, reducing a large amount of manual work.
[0153] Compared with the traditional method of collecting data, drawing and analyzing, and DOE improvement after discovering problems manually, the present application uses program algorithms combined with AI models to actually locate abnormal processes, skipping the process of finding problems, which is more simple and efficient, and does not require engineers to analyze and study to locate problem processes, eliminating the possible human tendency factors in the middle.
[0154] Furthermore, compared with the traditional method of at least multiple batches of problems being discovered by people before intervening in the investigation, the present application can track each batch using AI technology, locate each board, and has high data source accuracy. The collected data is continuous time production data, which is comprehensive and continuous, and combined with the time of the production equipment to form time sequence analysis.
[0155] The application uses a program to collect full data, maintains the integrity of the data, compared with the traditional method, the engineer preferentially extracts the data corresponding to the board with serious problems, as a special case of cutting in research, the traditional method will ignore some random and accidental factors caused by the problem, and the traditional method highly depends on artificial experience, which is a great challenge to engineers.
[0156] It should be noted that, in this text, relational terms such as first and second are used only to distinguish one entity or operation from another, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. Moreover, the terms "include", "contain" or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or equipment including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or equipment. Without more limitations, the element defined by the statement "including a" does not exclude the presence of other identical elements in the process, method, article or equipment including the element.
[0157] The above is only a specific embodiment of the present application, and it should be pointed out that for ordinary skilled in the art, without departing from the principles of the present application, a number of improvements and refinements can be made, which should be considered as the protection scope of the present application.
Claims
1. An AI-based PCB defect distribution anomaly identification method, characterized by, The method comprises the following steps: scanning and detecting each circuit board by using an optical detection device, generating a defect distribution map corresponding to each circuit board according to the detection result, and associating the defect distribution map with the corresponding detection time; retaining a preset type of defect block in the defect distribution map by using an unsupervised learning clustering algorithm, the unsupervised learning clustering algorithm including one or more of DBScan, K-means, Hierarchical Clustering, Mean-Shift, OPTICS, and GMM; screening a defect distribution map meeting a preset abnormal feature according to the morphological characteristics of the retained defect block, as a board pattern; calling a pre-trained AI model, the AI model analyzing the distribution characteristics of the defect block on the screened board pattern, and further predicting the category to which the board pattern belongs; if the prediction result is that the board pattern belongs to a preset abnormal category, outputting an abnormal reason diagnosis result corresponding to the prediction result; if the prediction result is that the board pattern does not belong to the preset abnormal category, retrieving production log information related to the corresponding detection time, if there is abnormal log information, outputting an abnormal reason diagnosis result corresponding to the abnormal log information, and retaining a potential abnormality mark for the board pattern; if there is no abnormal log information, outputting a diagnosis result belonging to a normal category; the board pattern retaining the potential abnormality mark is configured to be retrained on the AI model subsequently. 2.The AI-based PCB defect distribution abnormality identification method of claim 1, wherein, The retained defect blocks are respectively marked with contour lines; after screening the board pattern meeting the preset abnormal feature, the method further comprises: lowering the transparency of the area block within the contour line in the board pattern, so that the AI model only pays attention to the morphology of the contour line and its distribution direction in the board pattern when analyzing the board pattern. 3.The AI-based PCB defect distribution abnormality identification method of claim 1, wherein, The AI model is trained in the following way: collecting learning samples, including defect distribution image samples of circuit boards and artificially labeled type labels, the type labels including a normal category, a plate turning process abnormal category, a pressing process abnormal category, and an electroplating process abnormal category, wherein the defect distribution image samples corresponding to the plate turning process abnormal category have the feature that defects are arranged in a straight line on one side edge of the board pattern, the defect distribution image samples corresponding to the pressing process abnormal category have the feature that defects are arranged in a straight line on both side edges of the board pattern, and the defect distribution image samples corresponding to the electroplating process abnormal category have the feature that defects are arranged in a cluster on the top part of the board pattern and in a cluster on the middle part of the bottom; training the AI model by using the collected learning samples until the trained model converges. 4.The AI-based PCB defect distribution abnormality identification method of claim 3, wherein, The plate turning process abnormal category, the pressing process abnormal category, and the electroplating process abnormal category respectively correspond to different defect types; The defect distribution map generated by the optical detection device is associated with the type information of each defect; only retaining the defect block of the defect type corresponding to the plate turning process abnormal category in the defect distribution map by using the unsupervised learning clustering algorithm, if the retained defect block meets the abnormal feature of being arranged in a straight line on one side edge in the map, determining the current defect distribution map as a first type board pattern; The defect blocks of the defect type corresponding to the pressing process abnormality category are reserved in the defect distribution map by an unsupervised learning clustering algorithm, and if the reserved defect blocks meet the abnormality characteristic of being arranged in a straight line on both sides of the map, the current defect distribution map is determined as a second type of board pattern; The defect blocks of the defect type corresponding to the electroplating process abnormality category are reserved in the defect distribution map by an unsupervised learning clustering algorithm, and if the reserved defect blocks meet the abnormality characteristic of being arranged in the top part of the map and in the middle of the bottom part, the current defect distribution map is determined as a third type of board pattern. 5.The AI-based PCB defect distribution abnormality identification method of claim 4, wherein, The defect type corresponding to the turning plate process abnormality category includes short circuit, crumpling, crease, and scratch; The defect type corresponding to the pressing process abnormality category includes short circuit, crumpling, and scratch; The defect type corresponding to the electroplating process abnormality category includes protrusion and hole filling protrusion. 6.The AI-based PCB defect distribution abnormality identification method of claim 3, wherein, An image classification network using ResNet or EfficientNet is used as the backbone of the AI model, and the last layer of the image classification network is modified into normal category, turning plate process abnormality category, pressing process abnormality category, and electroplating process abnormality category. 7.The AI-based PCB defect distribution abnormality identification method of claim 3, wherein, The AI model is further trained to predict confidence; If the confidence of the prediction result of the AI model reaches a preset confidence threshold, a diagnostic report corresponding to the prediction result is output; If the confidence of the prediction result of the AI model does not reach the preset confidence threshold, a potential abnormality mark is reserved for the corresponding board pattern; The board pattern with the potential abnormality mark is submitted for manual review, and the review result is used as the type label corresponding to the board pattern; The AI model is retrained according to the board pattern with the potential abnormality mark and the type label obtained by manual review, so as to optimize and update the AI model. 8.The AI-based PCB defect distribution abnormality identification method of claim 3, wherein, The AI model is further trained to predict confidence; If the prediction result of the AI model is that the board pattern belongs to a preset abnormality category, and the confidence of the prediction result reaches a preset confidence threshold, an abnormal reason diagnosis result corresponding to the prediction result is output; If the prediction result of the AI model is that the board pattern belongs to a preset abnormality category, and the confidence of the prediction result does not reach a preset confidence threshold, based on the prediction result, the production log information corresponding to the abnormality category is associated, and the production log information related to the detection time is retrieved, if there is no abnormal log information, a potential abnormality mark is reserved for the board pattern; if there is abnormal log information, a diagnosis result is output according to the prediction result and the abnormal log information; If the prediction result of the AI model is that the board pattern belongs to a normal category, and the confidence of the prediction result reaches a preset confidence threshold, a diagnosis result belonging to the normal category is output. If the prediction result of the AI model is a normal category, and the confidence of the prediction result does not reach a preset confidence threshold, based on the prediction result, the production log information corresponding to the abnormal category is associated, and the production log information related to the corresponding detection time is retrieved, if there is no abnormal log information in it, the diagnostic result belonging to the normal category is output; if there is abnormal log information in it, the potential abnormality mark is reserved for the board pattern. 9.The AI-based PCB defect distribution abnormality identification method of claim 7 or 8, wherein, The AI model is trained to predict confidence by the following method: The last layer of the image classification network serving as the backbone of the AI model outputs scores of various prediction categories, and the scores of each category are converted into a probability distribution through an activation function, the maximum probability value of which is taken as the confidence, and the activation function includes one or more of Softmax, sigmoid, relu, and tanh functions. 10.The AI-based PCB defect distribution abnormality identification method of claim 7 or 8, wherein, The AI model is trained to predict confidence by the following method: The AI model is constructed as two or more sub-models of the same structure, and the two or more sub-models are trained with at least different learning samples; the standard deviation or entropy of the prediction results of the multiple models is calculated according to the prediction results of the two or more sub-models on the same board pattern; and the confidence corresponding to the standard deviation or entropy is determined according to a preset mapping relationship or function relationship, wherein the greater the standard deviation or entropy, the lower the corresponding confidence. 11.The AI-based PCB defect distribution abnormality identification method of any one of claims 1 to 8, wherein, The board pattern meeting the preset abnormal feature is screened out by the following method: An unsupervised learning clustering algorithm is used to calculate the morphological similarity between the retained defect block and the preset abnormal feature, wherein the unsupervised learning clustering algorithm is one or more of DBScan, Kmeans, MeanShift, and OPTICS; If the morphological similarity reaches a preset similarity threshold, the defect distribution map of the retained defect block is determined as a board pattern meeting the preset abnormal feature; if the morphological similarity does not reach the preset similarity threshold, the abnormal identification of the defect distribution map of the retained defect block is stopped. 12.The AI-based PCB defect distribution abnormality identification method according to any one of claims 1 to 8, characterized in that, Before retaining the defect block of the preset type in the defect distribution map by the unsupervised learning clustering algorithm, it further includes: Collecting the scanning detection data of all circuit boards and storing them in a database; Calculating the yield of the circuit boards, if the yield is normal, continue to monitor the yield of the circuit boards; If the yield is abnormal, filter out the abnormal circuit boards, and generate the corresponding defect distribution map for the abnormal circuit boards.
13. A method of supervising production of PCBs, characterized by, It includes the following steps: Based on the abnormal identification method of any one of claims 3 to 10, the AI model predicts the category to which the board pattern corresponding to each circuit board belongs; If the prediction result is that the board pattern belongs to the flip board process abnormal category, the flip board process equipment is overhauled; If the prediction result is that the board pattern belongs to the press process abnormal category, the press process equipment is overhauled; If the prediction result is that the board pattern belongs to the electroplating process abnormal category, the electroplating process equipment is overhauled.
14. A PCB production system characterized by comprising: The method comprises the following steps: a process equipment, an AOI equipment, an anomaly identification system and a prompt device, wherein the AOI equipment is configured to perform optical scanning detection on a circuit board processed by the process equipment, generate a defect distribution map corresponding to the circuit board according to the detection result, and associate the defect distribution map with the corresponding detection time; The anomaly identification system comprises the following modules: An unsupervised learning clustering algorithm module configured to retain a defect block of a preset type in the defect distribution map; An unsupervised learning clustering algorithm module configured to filter out a defect distribution map meeting a preset anomaly feature as a board pattern according to the morphological features of the retained defect block; A pre-trained AI model configured to analyze the distribution features of the defect block on the filtered board pattern, and further predict the category to which the board pattern belongs; If the prediction result is that the board pattern belongs to a preset abnormal category, the prompt device makes a prompt to repair the relevant process equipment; If the prediction result is that the board pattern does not belong to the preset abnormal category, the production log information of each process equipment in the time period corresponding to the detection time is retrieved, if there is abnormal log information, the abnormal reason diagnosis result corresponding to the abnormal log information is output, and a potential abnormality mark is retained for the board pattern; if there is no abnormal log information, a diagnosis result belonging to a normal category is output; The board pattern retaining the potential abnormality mark is configured to be retrained by the AI model subsequently.
15. The PCB production system of claim 14, wherein, The anomaly identification system is configured to perform the PCB defect distribution anomaly identification method as claimed in any one of claims 1 to 12.
Citation Information
Patent Citations
Two-dimensional PCB appearance defect real-time automatic detection technology based on deep learning
CN111754456A
PCB defect detection method, device, equipment and medium
CN115239635A