A circuit board production defect detection method and system based on image recognition
The circuit board manufacturing defect detection system, which utilizes multimodal image acquisition and adaptive optimization, solves the problems of limited detection methods and environmental interference in existing technologies. It achieves high-precision detection and real-time correction of circuit boards, thereby improving production quality control.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- 深圳市天福庾科技有限公司
- Filing Date
- 2025-09-06
- Publication Date
- 2026-06-19
AI Technical Summary
Existing circuit board manufacturing defect detection technologies are unable to simultaneously cover thermal, electrical, and optical defects in a single process. Furthermore, single detection methods are susceptible to environmental interference, resulting in insufficient accuracy and timely correction, and thus failing to form a closed-loop control across the entire process.
A multimodal image acquisition module is adopted, which combines a high-resolution industrial camera, an infrared thermal imager and an ultraviolet fluorescence source to acquire multimodal data. By fusing signals to construct composite signals, and combining a defect feature extraction module, a defect discrimination module, a real-time feedback module and a correction control module, multi-dimensional detection and real-time correction of solder joints and circuits are realized. Adaptive optimization is performed through a data learning module.
It enables high-precision detection and real-time correction of defects in circuit board production, improves the accuracy of detection and the adaptability of the system, reduces the risk of defects being passed on to subsequent processes, and enhances the quality control level of circuit board production.
Smart Images

Figure CN121121273B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of defect detection technology, specifically to a method and system for detecting defects in circuit board manufacturing based on image recognition. Background Technology
[0002] Circuit board manufacturing defects are prevalent and complex in modern electronics manufacturing. With the widespread application of surface mount technology (SMT), the integration and device density of circuit boards are constantly increasing, and high-density multilayer circuit boards have become the mainstream structural form. Against this backdrop, the processing and inspection requirements for micro-solder joints and fine lines have significantly increased. Traditional methods relying on manual visual inspection or single visual inspection are no longer sufficient to comprehensively cover defect types such as cold solder joints, false solder joints, short circuits, and particulate contamination present in production. Especially in the detection and real-time correction of micro-solder joint defects, due to the extremely small size of the solder joints and the strict process tolerances, if defects are not identified and corrected in real time during the production process, it often leads to the failure of the entire board or even the scrapping of the entire batch of products. Therefore, how to achieve high-precision detection and real-time correction has become a key issue in the circuit board manufacturing process.
[0003] However, current image detection methods are mostly limited to single-modal acquisition and static analysis, with a limited range of detection parameters, making it difficult to simultaneously cover thermal, electrical, and optical dimensions within a single process. Especially in complex production environments, single-optical detection is easily affected by external lighting interference, infrared thermal imaging lacks sufficient resolution for thermal attenuation processes, and fluorescence detection suffers from instability in identifying microparticles. These shortcomings prevent the system from forming a closed-loop control across the entire chain, thus limiting the accuracy of discrimination and the timeliness of error correction.
[0004] The inadequacy of existing testing technologies stems primarily from the contradiction between the complexity of manufacturing processes and the simplification of the testing chain. On the one hand, as solder joint sizes continue to shrink and production tolerances are compressed to the micrometer level, defects often exhibit multi-faceted characteristics, potentially including simultaneous abnormal heat dissipation, resistance deviation, and particulate contamination. On the other hand, if the testing system relies solely on a single type of parameter for judgment, it is highly susceptible to missed detections or misjudgments. When these defects are not detected and corrected in a timely manner, they often lead to solder joint failure, circuit discontinuities, or surface contamination accumulation, causing short circuits, open circuits, or thermal failures on the circuit board during subsequent power-on, functional testing, or service life, directly impacting the reliability and stability of the entire electronic device. Summary of the Invention
[0005] To address the shortcomings of existing technologies, this invention provides a method and system for detecting defects in circuit board manufacturing based on image recognition, thus solving the problems mentioned in the background art.
[0006] To achieve the above objectives, the present invention is implemented through the following technical solution: a circuit board manufacturing defect detection system based on image recognition, comprising a multimodal image acquisition module, a defect feature extraction module, a defect discrimination module, a real-time feedback module, a correction control module, and a data learning module;
[0007] The multimodal image acquisition module is configured with a high-resolution industrial camera, an infrared thermal imager, and an ultraviolet fluorescence source to perform multimodal acquisition of each production stage of the PCB board, and to obtain a composite signal Sc by fusing the comprehensive signals.
[0008] The defect feature extraction module is used to input the collected composite signal into the feature calculation model, extract data on abnormal boundaries, solder joint roundness and circuit continuity, calculate the defect feature metric Fd, and form a preliminary defect characterization.
[0009] The defect discrimination module is used to classify and calculate the extracted feature values to obtain the discrimination function value C. def Classify and identify defect types;
[0010] The real-time feedback module is used to convert the discrimination result into spatial error parameters, calculate the offset of the weld point relative to the design reference Δx, Δy, and generate the compensation amount Qw by combining the defect feature measurement Fd, and transmit it to the execution device.
[0011] The correction control module is used to drive the pick-and-place machine or welding head to perform position adjustment or secondary welding based on the compensation amount Qw, and to collect detection data again after the operation to verify the accuracy of the correction.
[0012] The data learning module is used to combine the defect feature value Fd and the discriminant function C. def The compensation amount Qw is archived, the defect database and discrimination threshold are updated, and adaptive detection and correction rules are formed for dynamic optimization in subsequent production.
[0013] Preferably, the multimodal image acquisition module includes a visible light acquisition unit, an infrared thermal imaging acquisition unit, and an ultraviolet fluorescence imaging acquisition unit;
[0014] The visible light acquisition unit is used to set up a high-resolution industrial camera to scan the printed circuit board point by point, acquiring RGB high-resolution image data of the PCB surface and solder joints, denoted as the average visible light image brightness I. rgb Extract information on the surface geometry and circuit integrity of the circuit board.
[0015] The infrared thermal imaging acquisition unit is used to monitor the local heat distribution of the solder joint using an infrared thermal imager. By analyzing the thermal field gradient, the temperature difference ΔT between the solder joint area and the adjacent substrate area is extracted to reflect the local heat dissipation difference of the solder joint.
[0016] The ultraviolet fluorescence imaging acquisition unit is used to extract local fluorescence intensity differences F by exciting an ultraviolet light source and detecting the fluorescence reflection response of the substrate. Δ It identifies the distribution of flux residues or foreign particles, reflecting the distribution characteristics of residual flux, microparticles, or foreign matter;
[0017] After the above parameters are acquired in parallel, the system uses the following fusion formula to construct and calculate the composite signal Sc:
[0018]
[0019] Among them, I rgb The value represents the average brightness of the visible light image, ΔT represents the temperature difference between the solder joint area and the adjacent substrate area, and F represents the average brightness of the visible light image. Δ Local fluorescence intensity differences;
[0020] The composite signal Sc is the result of multimodal data fusion. When the composite signal Sc is output by the module, it forms a unified data format and serves as the input for defect feature extraction. Through this process, a complete acquisition link from image acquisition to composite parameter construction is realized.
[0021] Preferably, the defect feature extraction module includes a boundary offset extraction unit, a roundness calculation unit, and a line discontinuity analysis unit;
[0022] The boundary offset extraction unit compares the edges of the CAD design baseline with those of the measured image, and calculates the offset rate δ of the pad edge by using the difference between the edge detection operator and the baseline coordinates. b It is used to characterize the degree of deviation in the component mounting position;
[0023] The roundness calculation unit is used to fit the weld joint profile, obtain its degree of conformity to an ideal circle, and obtain the weld joint roundness C. r It describes the geometric symmetry and forming consistency of the solder joint, and the value ranges between [0,1]. The closer the value is to 1, the higher the geometric uniformity.
[0024] The line discontinuity analysis unit is used for grayscale scan line continuity analysis to calculate the probability of breaks or gaps in the line and obtain the line discontinuity rate L. c This reflects the condition of breakage or excessive etching in the circuit;
[0025] Substituting the above parameters into the following defect feature measurement formula, the defect feature measurement Fd is calculated and obtained:
[0026]
[0027] In the formula, δb represents the offset rate of the pad edge, and C r L indicates the roundness of the solder joint. cLine discontinuity rate, where the comprehensive characteristic value Fd reflects the average level of defect severity.
[0028] Preferably, the defect detection module includes a heat loss detection unit;
[0029] The heat dissipation discrimination unit is used to identify whether there is thermal anomaly behavior such as cold solder joint or false solder joint by acquiring and calculating the temperature distribution of a local area of the solder joint on the circuit board in a time sequence. The infrared thermal imager performs multi-frame temperature sampling of the solder joint area at set time intervals to form temperature sequence data that changes over time. During acquisition, the difference ΔT between the temperature of the center pixel of the solder joint and the temperature of the surrounding substrate is extracted as a reference, and a curve is established in the time dimension to calculate the heat dissipation rate Hs of the solder joint. The formula is as follows:
[0030] Hs = ΔT / t;
[0031] Where ΔT is the temperature difference and t is the time variable, the degree of heat loss per unit time of the solder joint is numerically represented.
[0032] The system performs difference analysis on adjacent data points in the temperature sequence to obtain the rate of temperature change within each time step. This method yields a rate function of heat decay over time, reflecting the efficiency of heat conduction. Furthermore, the module compares the acquired ΔT with the sampling duration t to generate a thermal decay function curve.
[0033] Preferably, the defect discrimination module further includes a resistance anomaly detection unit and a particle identification unit;
[0034] The resistance anomaly detection unit is used to detect the electrical conductivity of solder joints or local circuits to determine whether there are open circuits, short circuits, or local resistance deviations. The system applies a small-amplitude detection current to key locations of solder joints or circuits through a special test probe on the circuit board and records its voltage response in real time. This process yields local resistance data Rm. The measured resistance Rm is compared with the circuit board design resistance value Rd to calculate the deviation between the two and compare it with the design value to obtain the local resistance anomaly ratio Re, which is used to identify open circuit or short circuit defects.
[0035] The particle recognition unit is used to extract microparticles or foreign matter spots based on the binarization results of fluorescence imaging, and to calculate the particle recognition coefficient Pg to identify surface contamination defects.
[0036] The three types of parameters are summarized using the following discriminant function to obtain the discriminant function value Cdef;
[0037] C def =Hs + Re + Pg;
[0038] The numerical range can correspond to different defect categories. When the discriminant function value Cdef exceeds the set threshold, it is judged as a defect of short circuit or false soldering; when the proportion of Pg is significant, it is classified as residual particles.
[0039] Preferably, the method for judging different defect categories is as follows: the defect discriminant function C def The value is compared with two preset thresholds A and B, and is divided into three grade ranges:
[0040] C def When < A, it means that the heat dissipation rate Hs, the abnormal resistance ratio Re, and the particle recognition coefficient Pg are all within the normal fluctuation range set by the process. The time-sequence attenuation curve of ΔT conforms to the cooling gradient of the standard process. The difference between the on-resistance Rm and the designed resistance Rd is less than 5%. The cumulative value of the particle area Pg is close to zero or extremely small; no adjustment is required;
[0041] A ≤ C def < B, some parameters have shown slight deviations. The attenuation rate of Hs has decreased, indicating that the heat dissipation process is slightly delayed. Re is between 5% and 15%, indicating that there is a slight difference between the on-conducting performance and the designed value. The cumulative value of Pg has increased, and the particle distribution is locally concentrated, but it has not reached the degree of blocking the circuit. The data in this range is marked as "slight defect sample", and its distribution range is recorded in the threshold update unit. The system will trigger the real-time feedback module to generate a small compensation amount Qw, and the deviation correction control module will perform a one-time position fine-tuning or local secondary soldering;
[0042] C def ≥ B, indicating that obvious abnormalities have occurred in the defects: Hs shows a very low heat attenuation rate, and the probability of false soldering is high. Re exceeds 15%, indicating that the local resistance value has deviated seriously from the designed value. The cumulative value of Pg has increased significantly, and the particles form high-density spots on the fluorescence image. The system will calculate a large compensation amount Qw through the feedback module and drive the deviation correction control module to perform multiple-step corrections: including secondary soldering, local circuit cleaning or component replacement operations. This type of data is marked as "serious defect sample" and is included in the database as a key sample. The threshold update unit will perform statistical distribution.
[0043] Preferably, the real-time feedback module includes a position error calculation unit and a compensation amount generation unit;
[0044] The position error calculation unit is used to extract the spatial coordinates of the defect area and calculate the lateral and longitudinal offsets Δx, Δy of the solder joint relative to the design reference;
[0045] The compensation amount generation unit is used to calculate the actual required deviation correction compensation amount Qw according to the offset parameters and the defect feature metric Fd:
[0046]
[0047] In the formula, Δx and Δy represent the solder joint offset, and Fd represents the defect feature measurement, which is used as a compensation amplification factor.
[0048] The correction compensation amount Qw is transmitted to the production control equipment through a standardized communication interface to realize data interaction between the detection and execution stages.
[0049] The square root term reflects the geometric amount of the offset, and multiplying it by (1+Fd) allows for adjustment based on the degree of defect. The calculated Qw will be sent as a control parameter to the downstream correction module.
[0050] Preferably, the correction control module includes a position adjustment unit and a secondary detection unit;
[0051] The position adjustment unit is used to decompose the compensation amount Qw into motion control commands, drive the actuator to complete the offset adjustment of the horizontal and vertical coordinates with micron-level precision, or trigger a secondary welding operation;
[0052] The secondary detection unit is used to re-acquire images of the compensated solder joints, verify their differences from the reference position, and output secondary detection values. If there is still a risk of offset or poor soldering, the system will re-enter the feedback loop until the set standard is met.
[0053] Preferably, the data learning module includes a feature recording unit, a threshold update unit, and an adaptive correction unit;
[0054] The feature recording unit is used to measure defect features Fd and discriminant function C generated during the circuit board manufacturing process. def And the compensation amount Qw is recorded in real time to form a long-term traceable data resource;
[0055] The threshold update unit is used to dynamically correct the numerical range of the defect discrimination function and feature values based on long-term accumulated data samples. By analyzing its distribution range under different defect types, it determines the reasonable range of the discrimination boundary, updates the discrimination boundary according to the statistical results, and adjusts the original fixed discrimination threshold to an adaptive range based on the historical data distribution.
[0056] The adaptive correction unit is used to write back the updated discrimination threshold and correction parameters to the system's discrimination and feedback loop. The latest output threshold is imported into the system's operating environment. The loading process replaces the original fixed numerical parameters, allowing the system to directly call the corrected interval in the new round of detection. The defect discrimination function C... def The classification criteria will be updated according to the latest threshold, realizing the system's self-iteration.
[0057] A method for detecting defects in circuit board manufacturing based on image recognition includes the following steps:
[0058] Step 1: Configure a high-resolution industrial camera, an infrared thermal imager, and an ultraviolet fluorescence source to perform multimodal acquisition of each production stage of the PCB board, and obtain the composite signal Sc by fusion to construct a comprehensive signal;
[0059] Step 2: Input the collected composite signal into the feature calculation model, extract the data of abnormal boundary, solder joint roundness and circuit continuity, calculate the defect feature metric Fd, and form a preliminary defect characterization;
[0060] Step 3: Perform classification calculations on the extracted feature values to obtain the discriminant function value C. def Classify and identify defect types;
[0061] Step 4: Convert the judgment result into spatial error parameters, calculate the offset of the weld point relative to the design reference Δx, Δy, and combine it with the defect feature measurement Fd to generate the compensation amount Qw, which is then transmitted to the execution device;
[0062] Step 5: Based on the compensation amount Qw, drive the pick-and-place machine or soldering head to perform position adjustment or secondary soldering, and collect the detection data again after the operation to verify the accuracy of the correction;
[0063] Step Six: Combine the defect feature value Fd and the discriminant function C def The compensation amount Qw is archived, the defect database and discrimination threshold are updated, and adaptive detection and correction rules are formed for dynamic optimization in subsequent production.
[0064] This invention provides a method and system for detecting defects in circuit board manufacturing based on image recognition, which has the following beneficial effects:
[0065] (1) During system operation, a high-resolution device is configured to perform multimodal acquisition of each production stage of the PCB board. The composite signal Sc is obtained by fusion to construct a comprehensive signal. The acquired composite signal is input into the feature calculation model to obtain the defect feature metric Fd, forming a preliminary defect characterization. The extracted feature values are classified and calculated to obtain the discriminant function value C. def The discrimination results are converted into spatial error parameters. The offsets Δx and Δy of the solder joint relative to the design reference are calculated, and a compensation amount Qw is generated by combining the defect feature metric Fd. This compensation amount drives the pick-and-place machine or soldering head to perform position adjustment or secondary soldering. After the operation, the detection data is collected again to verify the accuracy of the correction. The defect feature value Fd and the discrimination function C are then used to verify the accuracy of the correction. def Archive the compensation amount Qw, update the defect database and the discrimination threshold.
[0066] (2) This invention constructs a complete defect detection and correction process by setting up a multimodal image acquisition module, a defect feature extraction module, a defect discrimination module, a real-time feedback module, a correction control module, and a data learning module. The system can not only achieve multimodal fusion of visible light, infrared thermal imaging, and ultraviolet fluorescence signals in the production process to extract key parameters such as weld point boundary offset, roundness, and line continuity, but also classify defects through a discriminant function, thereby generating real-time compensation quantities and driving the execution equipment to complete position adjustment or secondary welding. Through the data learning module, the system realizes feature archiving, threshold updating, and adaptive correction, forming a dynamic closed-loop detection and correction mechanism, completing the entire chain of tasks including defect identification, parameter calculation, error correction, and knowledge updating.
[0067] (3) Compared with the prior art, the present invention has made improvements in both detection methods and system logic. Traditional methods mostly rely on single visual detection or fixed threshold judgment, resulting in insufficient discrimination accuracy, response lag, and limited correction capabilities in micro-weld joints, complex circuits, and multi-dimensional defect scenarios. The present invention solves the problems of single-mode interference and insufficient data dimensions by multimodal signal fusion; avoids the accumulation of errors in single-parameter judgment by combining the discrimination function with interval thresholds; realizes the linkage between detection and correction through real-time feedback and correction control; and solves the defects of traditional systems in long-term operation, such as fixed discrimination standards and insufficient adaptability, through threshold updates and adaptive correction of the data learning module.
[0068] (4) This invention not only significantly improves detection accuracy but also enhances system stability and adaptability through continuous improvement. By generating and executing compensation amounts in real time, the system can immediately correct deviations during production, reducing the risk of defects being passed on to subsequent processes. Through the archiving of defect samples and dynamic adjustment of thresholds, the system can continuously optimize the discrimination boundary during long-term operation, enhancing its adaptability to process fluctuations and environmental disturbances. Overall, this invention outperforms existing technologies in defect identification accuracy, timely correction response, and iterative optimization capabilities, thereby improving the quality control level and manufacturing reliability of circuit board production. Attached Figure Description
[0069] Figure 1 This is a block diagram of a circuit board manufacturing defect detection system based on image recognition according to the present invention;
[0070] Figure 2 This is a schematic diagram illustrating the steps of a circuit board manufacturing defect detection method based on image recognition according to the present invention.
[0071] Figure 3 This is a comparison chart of defect discrimination parameters and comprehensive functions of an image recognition-based circuit board manufacturing defect detection system according to the present invention. Detailed Implementation
[0072] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of the present invention.
[0073] Example 1
[0074] This invention provides an image recognition-based circuit board manufacturing defect detection system. Please refer to [link / reference]. Figure 1 It includes a multimodal image acquisition module, a defect feature extraction module, a defect discrimination module, a real-time feedback module, a correction control module, and a data learning module;
[0075] The multimodal image acquisition module is configured with a high-resolution industrial camera, an infrared thermal imager, and an ultraviolet fluorescence source to perform multimodal acquisition of each production stage of the PCB board, and to obtain a composite signal Sc by fusing the comprehensive signals.
[0076] The defect feature extraction module is used to input the collected composite signal into the feature calculation model, extract data on abnormal boundaries, solder joint roundness and circuit continuity, calculate the defect feature metric Fd, and form a preliminary defect characterization.
[0077] The defect discrimination module is used to classify and calculate the extracted feature values to obtain the discrimination function value C. def Classify and identify defect types;
[0078] The real-time feedback module is used to convert the discrimination result into spatial error parameters, calculate the offset of the weld point relative to the design reference Δx, Δy, and generate the compensation amount Qw by combining the defect feature measurement Fd, and transmit it to the execution device.
[0079] The correction control module is used to drive the pick-and-place machine or welding head to perform position adjustment or secondary welding based on the compensation amount Qw, and to collect detection data again after the operation to verify the accuracy of the correction.
[0080] The data learning module is used to combine the defect feature value Fd and the discriminant function C. def The compensation amount Qw is archived, the defect database and discrimination threshold are updated, and adaptive detection and correction rules are formed for dynamic optimization in subsequent production.
[0081] In this embodiment, a high-resolution industrial camera, an infrared thermal imager, and an ultraviolet fluorescence source are configured to perform multimodal acquisition of data at each stage of PCB board production. A composite signal Sc is obtained by fusing the acquired signals. This composite signal is then input into a feature calculation model to extract data on abnormal boundaries, solder joint roundness, and line continuity. The resulting defect feature metric Fd forms a preliminary defect characterization. The extracted feature values are then classified to obtain the discriminant function value C. def The defect type is classified and identified, and the identification results are converted into spatial error parameters. The offset of the solder joint relative to the design reference Δx and Δy is calculated, and a compensation amount Qw is generated by combining the defect feature metric Fd. This compensation amount is then transmitted to the execution device. Based on the compensation amount Qw, the pick-and-place machine or welding head is driven to perform position adjustment or secondary welding. After the operation, the detection data is collected again to verify the accuracy of the correction. The defect feature value Fd and the discrimination function C are then used to verify the accuracy of the correction. def The compensation amount Qw is archived, the defect database and discrimination threshold are updated, and adaptive detection and correction rules are formed for dynamic optimization in subsequent production.
[0082] Example 2
[0083] This embodiment is an explanation based on Embodiment 1. Please refer to it. Figure 1 Specifically: the multimodal image acquisition module includes a visible light acquisition unit, an infrared thermal imaging acquisition unit, and an ultraviolet fluorescence imaging acquisition unit;
[0084] The visible light acquisition unit is used to set up a high-resolution industrial camera to scan the printed circuit board point by point, acquiring RGB high-resolution image data of the PCB surface and solder joints, denoted as the average visible light image brightness I. rgb Extract information on the surface geometry and circuit integrity of the circuit board.
[0085] The infrared thermal imaging acquisition unit is used to monitor the local heat distribution of the solder joint using an infrared thermal imager. By analyzing the thermal field gradient, the temperature difference ΔT between the solder joint area and the adjacent substrate area is extracted to reflect the local heat dissipation difference of the solder joint.
[0086] The ultraviolet fluorescence imaging acquisition unit is used to extract local fluorescence intensity differences F by exciting an ultraviolet light source and detecting the fluorescence reflection response of the substrate. Δ It identifies the distribution of flux residues or foreign particles, reflecting the distribution characteristics of residual flux, microparticles, or foreign matter;
[0087] After the above parameters are acquired in parallel, the system uses the following fusion formula to construct and calculate the composite signal Sc:
[0088]
[0089] Among them, I rgbThe value represents the average brightness of the visible light image, ΔT represents the temperature difference between the solder joint area and the adjacent substrate area, and F represents the average brightness of the visible light image. Δ Local fluorescence intensity differences;
[0090] The composite signal Sc is the result of multimodal data fusion. When the composite signal Sc is output by the module, it forms a unified data format and serves as the input for defect feature extraction. Through this process, a complete acquisition link from image acquisition to composite parameter construction is realized.
[0091] The defect feature extraction module includes a boundary offset extraction unit, a roundness calculation unit, and a line discontinuity analysis unit;
[0092] The boundary offset extraction unit compares the edges of the CAD design baseline with those of the measured image, and calculates the offset rate δ of the pad edge by using the difference between the edge detection operator and the baseline coordinates. b It is used to characterize the degree of deviation in the component mounting position;
[0093] The roundness calculation unit is used to fit the weld joint profile, obtain its degree of conformity to an ideal circle, and obtain the weld joint roundness C. r It describes the geometric symmetry and forming consistency of the solder joint, and the value ranges between [0,1]. The closer the value is to 1, the higher the geometric uniformity.
[0094] The line discontinuity analysis unit is used for grayscale scan line continuity analysis to calculate the probability of breaks or gaps in the line and obtain the line discontinuity rate L. c This reflects the condition of breakage or excessive etching in the circuit;
[0095] Substituting the above parameters into the following defect feature measurement formula, the defect feature measurement Fd is calculated and obtained:
[0096]
[0097] In the formula, δb represents the offset rate of the pad edge, and C r L indicates the roundness of the solder joint. c Line discontinuity rate, where the comprehensive characteristic value Fd reflects the average level of defect severity.
[0098] δ b Cr is obtained by comparing the image edge detection with the CAD benchmark, and Lc is obtained by fitting the roundness of the outer contour of the weld point. Lc is obtained based on the statistics of the breakpoints of the grayscale scan line.
[0099] In this embodiment, by configuring a visible light acquisition unit, an infrared thermal imaging acquisition unit, and an ultraviolet fluorescence imaging acquisition unit in parallel within the multimodal image acquisition module, the simultaneous acquisition of the circuit board surface geometry, solder joint thermal distribution, and local particle fluorescence characteristics is achieved, avoiding the shortcomings of traditional single-modal detection methods in terms of information coverage. The composite signal Sc obtained through fusion calculation provides a unified multi-dimensional input for subsequent feature analysis. In the defect feature extraction module, the boundary offset rate δ b Solder joint roundness C r With line discontinuity rate L c The defect features are uniformly incorporated into the defect feature measurement formula, forming a comprehensive defect metric value Fd, achieving multi-dimensional quantification from location accuracy and geometric morphology to line integrity. This method enables the detection process to simultaneously cover defect features in three dimensions—geometric, thermal, and optical—within the same link, and generates objectively comparable numerical results through formulaic processing. Compared with existing technologies that rely on a single image or a single threshold for judgment, this invention not only improves the accuracy and completeness of defect characterization, but also establishes a quantifiable, archiveable, and iteratively optimizeable detection benchmark, thereby providing stable and reliable data support for subsequent discrimination and correction.
[0100] Example 3
[0101] This embodiment is an explanation based on Embodiment 1. Please refer to it. Figure 1 Specifically: the defect discrimination module includes a heat dissipation discrimination unit;
[0102] The heat dissipation discrimination unit is used to identify whether there is thermal anomaly behavior such as cold solder joint or false solder joint by acquiring and calculating the temperature distribution of a local area of the solder joint on the circuit board in a time sequence. The infrared thermal imager performs multi-frame temperature sampling of the solder joint area at set time intervals to form temperature sequence data that changes over time. During acquisition, the difference ΔT between the temperature of the center pixel of the solder joint and the temperature of the surrounding substrate is extracted as a reference, and a curve is established in the time dimension to calculate the heat dissipation rate Hs of the solder joint. The formula is as follows:
[0103] Hs = ΔT / t;
[0104] Where ΔT is the temperature difference and t is the time variable, the degree of heat loss per unit time of the solder joint is numerically represented.
[0105] The system performs difference analysis on adjacent data points in the temperature sequence to obtain the rate of temperature change within each time step. This method yields a rate function of heat decay over time, reflecting the efficiency of heat conduction. Furthermore, the module compares the acquired ΔT with the sampling duration t to generate a thermal decay function curve.
[0106] The defect identification module also includes a resistance anomaly detection unit and a particle identification unit;
[0107] The resistance anomaly detection unit is used to detect the electrical conductivity of solder joints or local circuits to determine whether there are open circuits, short circuits, or local resistance deviations. The system applies a small-amplitude detection current to key locations of solder joints or circuits through a special test probe on the circuit board and records its voltage response in real time. This process yields local resistance data Rm. The measured resistance Rm is compared with the circuit board design resistance value Rd to calculate the deviation between the two and compare it with the design value to obtain the local resistance anomaly ratio Re, which is used to identify open circuit or short circuit defects.
[0108] The proportion of local resistance anomaly Re is calculated using the following formula:
[0109]
[0110] Wherein, Re is the proportion of local resistance anomalies, reflecting the degree of difference between electrical performance and design value, and the calculation result is output as a resistance anomaly discrimination parameter.
[0111] The particle recognition unit is used to extract microparticles or foreign matter spots based on the binarization results of fluorescence imaging, and to calculate the particle recognition coefficient Pg to identify surface contamination defects.
[0112] The particle recognition coefficient Pg is calculated using the following formula:
[0113]
[0114] Among them, A i Let Pg represent the area of the i-th particle, and n be the total number of particles. The final Pg value is used as the output parameter of the particle identification unit to identify surface contamination defects.
[0115] The three types of parameters are summarized using the following discriminant function to obtain: Discriminant function value C def ;
[0116] C def =Hs + Re + Pg;
[0117] The numerical range can correspond to different defect categories, when the discriminant function value C def When the threshold is exceeded, it is identified as a short circuit or poor solder joint defect; when the proportion of Pg is significant, it is classified as residual particles.
[0118] The three units complement each other, providing numerical inputs from thermal, electrical, and optical dimensions respectively. Finally, the defect discrimination module uses a comprehensive formula C to determine the final result. def =Hs+Re+Pg completes the defect category determination.
[0119] The method for determining different defect categories is: Defect discriminant function C defThe numerical value is compared with two preset thresholds A and B and divided into three grade intervals:
[0120] C def When < A, it indicates that the heat dissipation rate Hs, the abnormal resistance ratio Re, and the particle recognition coefficient Pg are all within the normal fluctuation range set by the process. The timing decay curve of ΔT conforms to the cooling gradient of the standard process. The difference between the on-resistance Rm and the designed resistance Rd is less than 5%. The cumulative particle area value Pg is close to zero or extremely small; no adjustment is required.
[0121] A ≤ C def When < B, some parameters have shown a slight deviation. The decay rate of Hs has decreased, indicating that the heat dissipation process is slightly delayed. Re is between 5% and 15%, indicating a slight difference between the on-conductivity performance and the designed value. The cumulative value of Pg has increased, and the particle distribution is locally concentrated, but it has not reached the degree of blocking the circuit. The data in this interval is marked as "slight defect sample", and its distribution range is recorded in the threshold update unit. The system will trigger the real-time feedback module to generate a small compensation amount Qw, and the deviation correction control module will perform a one-time position fine-tuning or local secondary soldering.
[0122] C def ≥ B indicates that obvious abnormalities have occurred in the defects: Hs shows a very low heat decay rate, and the probability of virtual soldering is high. Re exceeds 15%, indicating that the local resistance value has deviated significantly from the designed value. The cumulative value of Pg has increased significantly, and the particles form high-density spots in the fluorescence image. The system will calculate a large compensation amount Qw through the feedback module and drive the deviation correction control module to perform multiple-step corrections: including secondary soldering, local circuit cleaning, or component replacement operations. This type of data is marked as "severe defect sample" and included in the database as a key sample. The threshold update unit will perform statistical distribution.
[0123] In this embodiment, a heat dissipation discrimination unit, a resistance abnormality detection unit, and a particle recognition unit are simultaneously introduced into the defect discrimination module to form a complementary relationship among three types of parameters: thermology, electrostatics, and optics. The heat dissipation rate Hs is obtained by calculating the decay of the temperature difference of the solder joint over time. The abnormal resistance ratio Re is obtained by comparing the measured value of the local resistance with the designed value. And the particle recognition coefficient Pg is calculated based on the fluorescence binary image. The system can complete the multi-dimensional quantitative characterization of virtual soldering, short circuit, and surface contamination in the same discrimination link, and through the discrimination function C defBy integrating three types of parameters, a unified defect discrimination standard is formed. Furthermore, the system sets two thresholds, A and B, to divide the discrimination function value into three levels: normal, minor defects, and severe defects. This allows the detection results to go beyond a binary judgment of whether or not a defect exists, instead possessing gradient classification capabilities. This provides a differentiated control basis for subsequent feedback compensation and correction operations. Compared with existing single-parameter or single-modal detection technologies, this invention significantly improves the comprehensiveness and reliability of defect discrimination, avoiding missed detections or misjudgments caused by distortion in a single dimension, thereby enhancing the accuracy and stability of defect detection and classification during circuit board production.
[0124] Example 4
[0125] This embodiment is an explanation based on Embodiment 1. Please refer to it. Figure 1 Specifically: the real-time feedback module includes a position error calculation unit and a compensation amount generation unit;
[0126] The position error calculation unit is used to extract the spatial coordinates of the defect area and calculate the lateral and longitudinal offsets Δx and Δy of the weld point relative to the design datum.
[0127] The compensation amount generation unit is used to calculate the actual required correction compensation amount Qw based on the offset parameter and the defect feature metric Fd:
[0128]
[0129] In the formula, Δx and Δy represent the solder joint offset, and Fd represents the defect feature measurement, which is used as a compensation amplification factor.
[0130] The correction compensation amount Qw is transmitted to the production control equipment through a standardized communication interface to realize data interaction between the detection and execution stages.
[0131] The square root term reflects the geometric amount of the offset, and multiplying it by (1+Fd) allows for adjustment based on the degree of defect. The calculated Qw will be sent as a control parameter to the downstream correction module.
[0132] The correction control module includes a position adjustment unit and a secondary detection unit;
[0133] The position adjustment unit is used to decompose the compensation amount Qw into motion control commands, drive the actuator to complete the offset adjustment of the horizontal and vertical coordinates with micron-level precision, or trigger a secondary welding operation;
[0134] The secondary detection unit is used to re-acquire images of the compensated solder joints, verify their differences from the reference position, and output secondary detection values. If there is still a risk of offset or poor soldering, the system will re-enter the feedback loop until the set standard is met.
[0135] The data learning module includes a feature recording unit, a threshold update unit, and an adaptive correction unit;
[0136] The feature recording unit is used to measure defect features Fd and discriminant function C generated during the circuit board manufacturing process. def And the compensation amount Qw is recorded in real time to form a long-term traceable data resource;
[0137] The threshold update unit is used to dynamically correct the numerical range of the defect discrimination function and feature values based on long-term accumulated data samples. By analyzing its distribution range under different defect types, it determines the reasonable range of the discrimination boundary, updates the discrimination boundary according to the statistical results, and adjusts the original fixed discrimination threshold to an adaptive range based on the historical data distribution.
[0138] The adaptive correction unit is used to write back the updated discrimination threshold and correction parameters to the system's discrimination and feedback loop. The latest output threshold is imported into the system's operating environment. The loading process replaces the original fixed numerical parameters, allowing the system to directly call the corrected interval in the new round of detection. The defect discrimination function C... def The classification criteria will be updated according to the latest threshold, realizing the system's self-iteration.
[0139] In this embodiment, a closed-loop control mechanism of detection, correction, and self-learning is formed through the collaborative construction of a real-time feedback module, a correction control module, and a data learning module. The real-time feedback module extracts the spatial offsets Δx and Δy of the weld point through the position error calculation unit and generates a compensation amount Qw by combining it with the defect feature metric Fd, thus realizing the quantitative conversion of detection results into control parameters. The correction control module decomposes the compensation amount Qw into precise motion commands, driving the actuator to complete position adjustment or secondary welding within a micrometer range, and performs re-verification after correction through a secondary detection unit, ensuring that offset or cold weld problems are gradually eliminated in the feedback loop. The data learning module further analyzes Fd, C... def By archiving and analyzing historical data from Qw, the system dynamically updates the discrimination threshold and implements adaptive correction, enabling continuous optimization of the discrimination boundary and correction parameters during long-term operation. Compared with existing technologies that can only perform single-detection or fixed-threshold discrimination, this invention not only achieves real-time linkage between detection and execution but also enhances the system's adaptability to process fluctuations and environmental disturbances through a self-learning mechanism. This significantly improves the correction accuracy, operational stability, and quality controllability of the circuit board manufacturing process.
[0140] Example 5
[0141] A method for detecting defects in circuit board manufacturing based on image recognition; please refer to [reference needed]. Figure 2 Specifically, it includes the following steps:
[0142] Step 1: Configure a high-resolution industrial camera, an infrared thermal imager, and an ultraviolet fluorescence source to perform multimodal acquisition of each production stage of the PCB board, and obtain the composite signal Sc by fusion to construct a comprehensive signal;
[0143] Step 2: Input the collected composite signal into the feature calculation model, extract the data of abnormal boundary, solder joint roundness and circuit continuity, calculate the defect feature metric Fd, and form a preliminary defect characterization;
[0144] Step 3: Perform classification calculations on the extracted feature values to obtain the discriminant function value C. def Classify and identify defect types;
[0145] Step 4: Convert the judgment result into spatial error parameters, calculate the offset of the weld point relative to the design reference Δx, Δy, and combine it with the defect feature measurement Fd to generate the compensation amount Qw, which is then transmitted to the execution device;
[0146] Step 5: Based on the compensation amount Qw, drive the pick-and-place machine or soldering head to perform position adjustment or secondary soldering, and collect the detection data again after the operation to verify the accuracy of the correction;
[0147] Step Six: Combine the defect feature value Fd and the discriminant function C def The compensation amount Qw is archived, the defect database and discrimination threshold are updated, and adaptive detection and correction rules are formed for dynamic optimization in subsequent production.
[0148] In this embodiment, the present invention establishes a complete closed-loop process from defect detection to correction and rule iteration by sequentially executing six steps: multimodal image acquisition, defect feature extraction, classification and discrimination, real-time feedback, correction control, and data learning. At the acquisition end, the system fuses visible light, infrared, and ultraviolet signals to obtain a composite signal Sc, achieving simultaneous detection of the geometric, thermal, and optical features of the weld joint; at the computation end, it uses feature metric Fd and discriminant function C... def The system was constructed to classify and identify defect types. At the execution end, the classification results were converted into spatial offset parameters and compensation amount Qw to drive the pick-and-place machine or welding head to complete position adjustment or secondary welding, and secondary inspection and verification were performed after the operation. At the learning end, Fd and C were archived. def With Qw, the discrimination threshold is dynamically updated to achieve adaptive correction of the system. Compared with existing technologies that rely on single visual detection and fixed threshold discrimination, this invention not only improves the accuracy of defect identification and the timeliness of real-time correction, but also enhances the system's self-learning and adaptability in long-term operation, thereby improving the quality stability and reliability of the circuit board manufacturing process.
[0149] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A circuit board manufacturing defect detection system based on image recognition, characterized in that: It includes a multimodal image acquisition module, a defect feature extraction module, a defect discrimination module, a real-time feedback module, a correction control module, and a data learning module; The multimodal image acquisition module is used to configure high-resolution equipment to perform multimodal acquisition of each production stage of the PCB board, and to obtain the composite signal Sc by fusing the comprehensive signals. The defect feature extraction module is used to input the collected composite signal into the feature calculation model, extract data on abnormal boundaries, solder joint roundness and circuit continuity, calculate the defect feature metric Fd, and form a preliminary defect characterization. The defect discrimination module is used to classify and calculate the extracted feature values to obtain the discrimination function value C. def The defect types are classified and identified. The real-time feedback module is used to convert the discrimination result into spatial error parameters, calculate the offset of the weld point relative to the design reference Δx, Δy, and generate the compensation amount Qw by combining the defect feature measurement Fd, and transmit it to the execution device. The correction control module is used to drive the pick-and-place machine or welding head to perform position adjustment or secondary welding based on the compensation amount Qw, and to collect detection data again after the operation. The data learning module is used to combine the defect feature value Fd and the discriminant function C. def Archive the compensation amount Qw and update the defect database and discrimination threshold; The multimodal image acquisition module includes a visible light acquisition unit, an infrared thermal imaging acquisition unit, and an ultraviolet fluorescence imaging acquisition unit; The visible light acquisition unit is used to set up a high-resolution industrial camera to scan the printed circuit board point by point, acquiring RGB high-resolution image data of the PCB surface and solder joints, denoted as the average visible light image brightness I. rgb Extract information on the surface geometry and circuit integrity of the circuit board. The infrared thermal imaging acquisition unit is used to monitor the local heat distribution of the solder joint using an infrared thermal imager. By analyzing the thermal field gradient, the temperature difference ΔT between the solder joint area and the adjacent substrate area is extracted to reflect the local heat dissipation difference of the solder joint. The ultraviolet fluorescence imaging acquisition unit is used to extract local fluorescence intensity differences F by exciting an ultraviolet light source and detecting the fluorescence reflection response of the substrate. Δ It identifies the distribution of flux residues or foreign particles, reflecting the distribution characteristics of residual flux, microparticles, or foreign matter; After the above parameters are acquired in parallel, the system uses the following fusion formula to construct and calculate the composite signal Sc: ; Among them, I rgb The value represents the average brightness of the visible light image, ΔT represents the temperature difference between the solder joint area and the adjacent substrate area, and F represents the average brightness of the visible light image. Δ This indicates differences in local fluorescence intensity.
2. The circuit board manufacturing defect detection system based on image recognition according to claim 1, characterized in that: The defect feature extraction module includes a boundary offset extraction unit, a roundness calculation unit, and a line discontinuity analysis unit; The boundary offset extraction unit compares the edges of the CAD design baseline with those of the measured image, and calculates the offset rate δ of the pad edge by using the difference between the edge detection operator and the baseline coordinates. b It is used to characterize the degree of deviation in the component mounting position; The roundness calculation unit is used to fit the weld joint profile, obtain its degree of conformity to an ideal circle, and obtain the weld joint roundness C. r It describes the geometric symmetry and forming consistency of the solder joint, and the value ranges between [0,1]. The closer the value is to 1, the higher the geometric uniformity. The line discontinuity analysis unit is used for grayscale scan line continuity analysis to calculate the probability of breaks or gaps in the line and obtain the line discontinuity rate L. c This reflects the condition of breakage or excessive etching in the circuit; Substituting the above parameters into the following defect feature measurement formula, the defect feature measurement Fd is calculated and obtained: ; In the formula, δb represents the offset rate of the pad edge, and C r L indicates the roundness of the solder joint. c Line discontinuity rate, where the comprehensive characteristic value Fd reflects the average level of defect severity.
3. The circuit board manufacturing defect detection system based on image recognition according to claim 1, characterized in that: The defect detection module includes a heat loss detection unit; The heat dissipation discrimination unit is used to identify whether there is thermal anomaly behavior such as cold solder joint or false solder joint by acquiring and calculating the temperature distribution of a local area of the solder joint on the circuit board in a time sequence. The infrared thermal imager performs multi-frame temperature sampling of the solder joint area at set time intervals to form temperature sequence data that changes over time. During acquisition, the difference ΔT between the temperature of the center pixel of the solder joint and the temperature of the surrounding substrate is extracted as a reference, and a curve is established in the time dimension to calculate the heat dissipation rate Hs of the solder joint. The formula is as follows: ; Where ΔT is the temperature difference and t is the time variable, the degree of heat loss per unit time of the solder joint is numerically represented.
4. The circuit board manufacturing defect detection system based on image recognition according to claim 3, characterized in that: The defect identification module also includes a resistance anomaly detection unit and a particle identification unit; The resistance anomaly detection unit is used to detect the electrical conductivity of solder joints or local circuits, determine whether there are open circuits, short circuits or local resistance deviations, and compare them with the design value to obtain the local resistance anomaly ratio Re, which is used to identify open circuit or short circuit defects. The particle recognition unit is used to extract microparticles or foreign matter spots based on the binarization results of fluorescence imaging, and to calculate the particle recognition coefficient Pg to identify surface contamination defects. The three types of parameters are summarized using the following discriminant function to obtain: Discriminant function value C def ; ; The numerical range can correspond to different defect categories, when the discriminant function value C def When the threshold is exceeded, it is identified as a short circuit or poor solder joint defect; when the proportion of Pg is significant, it is classified as residual particles.
5. The circuit board manufacturing defect detection system based on image recognition according to claim 4, characterized in that: The method for determining different defect categories is: Defect discriminant function C def The numerical values are compared with two preset thresholds A and B, and divided into three level ranges: C def When it is , it means that the heat dissipation rate Hs, the abnormal resistance ratio Re, and the particle recognition coefficient Pg are all within the normal fluctuation range set by the process. The timing decay curve of ΔT conforms to the cooling gradient of the standard process. The difference between the on-resistance Rm and the designed resistance Rd is less than 5%. The cumulative value of the particle area Pg is close to zero or extremely small; No adjustments are needed; A ≤ C def <For B, some parameters have shown a slight deviation. The decay rate of Hs has decreased, indicating a slight delay in the heat dissipation process. Re is between 5% and 15%, indicating that the conduction performance has a slight difference from the design value. The cumulative value of Pg has increased, and the particle distribution is locally concentrated, but it has not reached the level of blocking the circuit. Mark the data in this interval as "slightly defective samples", record its distribution range in the threshold update unit, the system will trigger the real-time feedback module to generate a small compensation amount Qw, and the deviation correction control module will perform a one-time position fine-tuning or local secondary welding; C def ≥B indicates a significant defect anomaly: Hs exhibits an extremely low thermal decay rate, indicating a high probability of poor soldering; Re exceeds 15%, indicating that the local resistance value has seriously deviated from the design value; Pg cumulative value has increased significantly; and particles form high-density spots on the fluorescence image. The system will calculate a large compensation amount Qw through the feedback module and drive the correction control module to perform multi-step corrections, including secondary soldering, local circuit cleaning, or component replacement. This type of data is marked as a "serious defect sample" and included in the database as a key sample. The threshold update unit will use statistical distribution.
6. The circuit board manufacturing defect detection system based on image recognition according to claim 1, characterized in that: The real-time feedback module includes a position error calculation unit and a compensation amount generation unit; The position error calculation unit is used to extract the spatial coordinates of the defect area and calculate the lateral and longitudinal offsets Δx and Δy of the weld point relative to the design datum. The compensation amount generation unit is used to calculate the actual required correction compensation amount Qw based on the offset parameter and the defect feature metric Fd: ; In the formula, Δx and Δy represent the solder joint offset, and Fd represents the defect feature measurement, which is used as a compensation amplification factor. The correction compensation amount Qw is transmitted to the production control equipment through a standardized communication interface to realize data interaction between the detection and execution stages.
7. The circuit board manufacturing defect detection system based on image recognition according to claim 1, characterized in that: The correction control module includes a position adjustment unit and a secondary detection unit; The position adjustment unit is used to decompose the compensation amount Qw into motion control commands, drive the actuator to complete the offset adjustment of the horizontal and vertical coordinates with micron-level precision, or trigger a secondary welding operation; The secondary detection unit is used to re-acquire images of the compensated solder joints, verify their differences from the reference position, and output secondary detection values. If there is still a risk of offset or poor soldering, the system will re-enter the feedback loop until the set standard is met.
8. The circuit board manufacturing defect detection system based on image recognition according to claim 1, characterized in that: The data learning module includes a feature recording unit, a threshold update unit, and an adaptive correction unit; The feature recording unit is used to measure defect features Fd and discriminant function C generated during the circuit board manufacturing process. def And the compensation amount Qw is recorded in real time to form a long-term traceable data resource; The threshold update unit is used to dynamically correct the numerical range of the defect discrimination function and feature values based on long-term accumulated data samples. By analyzing its distribution range under different defect types, it determines the reasonable range of the discrimination boundary, updates the discrimination boundary according to the statistical results, and adjusts the original fixed discrimination threshold to an adaptive range based on the historical data distribution. The adaptive correction unit is used to write back the updated discrimination threshold and correction parameters to the system's discrimination and feedback loop. The latest output threshold is imported into the system's operating environment. The loading process replaces the original fixed numerical parameters, allowing the system to directly call the corrected interval in the new round of detection. The defect discrimination function C... def The classification criteria will be updated according to the latest threshold, realizing the system's self-iteration.
9. A method for detecting manufacturing defects in circuit boards based on image recognition, applied to the circuit board manufacturing defect detection system based on image recognition as described in any one of claims 1 to 8, characterized in that: Includes the following steps: Step 1: Configure a high-resolution industrial camera, an infrared thermal imager, and an ultraviolet fluorescence source to perform multimodal acquisition of each production stage of the PCB board, and obtain the composite signal Sc by fusion to construct a comprehensive signal; Step 2: Input the collected composite signal into the feature calculation model, extract the data of abnormal boundary, solder joint roundness and circuit continuity, calculate the defect feature metric Fd, and form a preliminary defect characterization; Step 3: Perform classification calculations on the extracted feature values to obtain the discriminant function value C. def The defect types are classified and identified. Step 4: Convert the judgment result into spatial error parameters, calculate the offset of the weld point relative to the design reference Δx, Δy, and combine it with the defect feature measurement Fd to generate the compensation amount Qw, which is then transmitted to the execution device; Step 5: Based on the compensation amount Qw, drive the pick-and-place machine or soldering head to perform position adjustment or secondary soldering, and collect the detection data again after the operation to verify the accuracy of the correction; Step Six: Combine the defect feature value Fd and the discriminant function C def The compensation amount Qw is archived, the defect database and discrimination threshold are updated, and adaptive detection and correction rules are formed for dynamic optimization in subsequent production.