A PCB defect intelligent detection and root cause tracing method
By constructing cross-domain physical simulation data and fusing multi-source information, the problem of high-frequency PCB defect detection and root cause tracing was solved, achieving high-precision detection and intelligent diagnosis, and improving detection efficiency and the accuracy of root cause tracing.
Patent Information
- Application Number
- CN202610707361.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-21
- Publication Date
- 2026-08-04
AI Technical Summary
Existing technologies struggle to achieve high-precision defect detection and root cause analysis in high-frequency printed circuit boards (PCBs). Traditional methods suffer from low detection rates and high false alarm rates in high-noise environments, and root cause analysis relies on human experience, resulting in low efficiency.
A method combining cross-domain physical simulation data construction and multi-source information fusion is adopted. Synthetic defect samples are generated by using a three-dimensional physical model and BRDF characteristics. Detection is performed by combining a deep learning network with frequency domain texture suppression and spatial domain defect enhancement. Furthermore, causal link reasoning is performed using a graph attention network, and a quality knowledge graph is constructed for root cause tracing.
It significantly improves the detection rate and accuracy of minute defects in high-noise environments, enables automatic, rapid, and interpretable reasoning of defect root causes, shortens the anomaly investigation cycle, and forms a complete solution from detection to decision support.
Smart Images

Figure FT_1 
Figure FT_2 
Figure FT_3
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent inspection technology, specifically to a method and system for intelligent inspection and root cause tracing of PCB defects based on multi-source information fusion. Background Technology
[0002] High-frequency printed circuit boards (PCBs) are core components of cutting-edge electronic devices such as 5G communications and high-speed computing. Their circuit precision often reaches the micrometer level, and any tiny defect (such as micro-notches or residual copper) can lead to signal integrity issues, seriously affecting product yield. Currently, high-frequency PCB quality control faces the dual challenges of "difficult detection" and "slow analysis": On the one hand, the inherent complex fiberglass braided texture of high-frequency substrates creates strong background noise, resulting in low detection rates and high false alarm rates for tiny defects by traditional machine vision and general deep learning models in such high-noise environments; on the other hand, tracing the root cause of defects relies heavily on the experience and judgment of process experts, requiring manual verification of data such as materials, equipment, and process parameters scattered across various systems, leading to low analysis efficiency and difficulty in effectively accumulating and reusing diagnostic knowledge.
[0003] Existing technical solutions are mostly limited to a single step, making it difficult to achieve an integrated closed loop of detection and diagnosis, such as:
[0004] At the defect detection level, traditional Generative Adversarial Networks (GANs) can only fit two-dimensional pixel distributions and lack realistic modeling of physical optical properties such as the bidirectional reflectance distribution function (BRDF) of high-frequency PCB substrates. This results in an inability to accurately reproduce the luster of metal materials like copper foil, the physical occlusion shadows of microcracks or notches, and subsurface scattering. Consequently, there is a significant "neighborhood shift" between synthesized images and real production line data, limiting the benefits of synthesized data for model training. Furthermore, because the periodic fiberglass texture of high-frequency PCBs is highly coupled with minute defect features in the spatial domain, traditional spatial domain convolutional neural networks struggle to effectively decouple them, leading to a persistently high false positive rate.
[0005] At the diagnostic analysis level, simple statistical process control (SPC) or expert system rule bases are difficult to handle complex process relationships that are multi-source, high-dimensional, and nonlinear in the manufacturing process. Moreover, existing systems generally lack an effective mechanism for strictly aligning multi-source heterogeneous data such as visual images and MES manufacturing parameters that are acquired asynchronously, resulting in low data fusion quality and the inability to form reliable causal link inference.
[0006] Therefore, there is an urgent need for a technical solution that can integrate the challenges of high-precision detection and intelligent diagnosis, so as to achieve closed-loop intelligent quality control from defect perception and analysis to process decision support. Summary of the Invention
[0007] This invention proposes an intelligent detection and root cause tracing method for PCB defects to solve the problems of difficulty in detecting high-frequency PCB micro-defects and slow root cause tracing in the existing technology.
[0008] The technical solution of the present invention is as follows:
[0009] A method for intelligent detection and root cause tracing of PCB defects includes the following steps:
[0010] S100: Cross-domain physical simulation data construction: Obtain the good product image of the target high-frequency PCB, establish a three-dimensional physical model based on the material mechanical properties of the target defects and the causes of processing stress, and extract the bidirectional reflection distribution function (BRDF) characteristics of the good product substrate;
[0011] Using physically based ray tracing rendering technology, BRDF characteristics are used as material property inputs. The 3D physical defect model is fused with the good product background image, and a feature alignment algorithm is used to eliminate the neighborhood offset, generating a physically realistic synthetic defect sample library.
[0012] S200: Training of a joint frequency-space defect detection model: Constructing a deep learning network that includes a frequency-domain texture suppression pathway and a spatial-domain defect enhancement pathway; The texture suppression pathway is used to decouple the frequency-domain features of the image and directionally weaken the periodic background texture frequency bands to generate a spatial suppression mask;
[0013] The spatial defect enhancement pathway integrates a coordinate attention mechanism to capture long-distance spatial dependencies and focus on defect saliency regions. The network calculates the texture information entropy of local regions of the feature map through an adaptive fusion module and dynamically allocates the fusion weights of the two pathways according to the density and complexity of the background texture to train the defect detection model.
[0014] S300: Multi-source information fusion and feature extraction: Deploy the trained detection model on the edge side, perform inference on PCB images collected in real time on the production line, and output the category, location and high-dimensional visual feature vector of the defect;
[0015] The size of the time sliding window is set according to the average delay of the production line network and the constant of change of physical parameters. The visual features of defects detected online are spatiotemporally aligned and numerically compensated with the production process parameters and material batch features asynchronously recalled from the MES / ERP system through the unique identification code of the PCB board.
[0016] Among them, linear interpolation is performed within the window to calculate the current estimated value, or a degradation compensation mechanism is triggered and a low confidence flag is attached when there is a severe lack of data throughout the sliding window.
[0017] Finally, the aligned and compensated production features and visual features are stitched together to construct a multimodal fusion feature;
[0018] S400: Quality Knowledge Graph Construction and Update: Defines a knowledge graph ontology containing three types of nodes: manufacturing resources, process, and quality entities;
[0019] Visual features, production features, manually confirmed root causes of defects, and corrective measures are stored as associated triples in a graph database to construct and continuously update a quality knowledge graph.
[0020] S500: Causal link reasoning based on graph attention network: When a new defect is detected, a local reasoning subgraph is constructed in the quality knowledge graph with the defect node as the center. The multi-hop search depth of this subgraph is 2 to 3 hops.
[0021] The graph attention network (GAT) is used to calculate the influence weights of adjacent process nodes and material nodes on the central defect node in the subgraph and aggregate the features. Finally, a list of potential process root causes and corresponding corrective action suggestions are output, sorted by causal probability score.
[0022] Furthermore, in step S100, establishing a three-dimensional physical model based on the material mechanical properties of the target defect specifically includes:
[0023] S111: Obtain the local processing stress parameters of the target high-frequency PCB under specific processing steps;
[0024] S112: Based on the energy balance criterion of fracture mechanics, evaluate the critical conditions for micro-tears or peels of materials under local processing stress in order to determine the geometric depth and deformation characteristics of the defect section;
[0025] S113: Introducing fractal functions, based on the set fractal dimension and spatial frequency parameters, to calculate the three-dimensional height perturbation of the defect edge surface, so as to parametrically characterize the roughness morphology of the defect edge;
[0026] S114: Combining geometric depth, deformation features and edge roughness morphology to drive the generation of a three-dimensional defect mesh model with physical stress traces;
[0027] The specific characteristics of the bidirectional reflectance distribution function (BRDF) extracted from the good substrate include:
[0028] S121: Use photometric equipment to perform multi-angle illumination and observation sampling on high-frequency PCB substrates to obtain radiance distribution data under different incident angles and observation angles;
[0029] S122: Based on the micro-surface theory, the radiance distribution data is deconstructed into diffuse reflection components and specular reflection components;
[0030] S123: Extract material parameters that characterize the optical features of the substrate. Material parameters include diffuse reflectance, specular reflection intensity, and surface roughness.
[0031] S124: Construct a BRDF model to characterize the substrate reflection characteristics. The model uses the normal distribution function to characterize the specular diffusion characteristics, the geometric occlusion function to characterize the self-occlusion effect of the micro-morphology, and the Fresnel term to characterize the law of reflection intensity changing with angle.
[0032] The feature alignment algorithm for eliminating neighborhood offset specifically includes:
[0033] S131: Construct an adversarial network consisting of a feature extractor and a domain discriminator;
[0034] S132: Define the domain of the synthesized image as the source domain and the domain of the real acquired image as the target domain. Use a feature extractor to extract image features and use a neighborhood discriminator to distinguish the domain source of the input features in order to calculate the adversarial loss.
[0035] S133: During the backpropagation process of network training, a gradient inversion layer (GRL) is introduced between the feature extractor and the neighborhood discriminator to invert the gradient of the neighborhood classification calculation.
[0036] S134: Based on the minimax game criterion, the feature extractor and the domain discriminator are jointly optimized, forcing the feature extractor to learn and output domain-independent general physical texture features.
[0037] Furthermore, in step S200, the specific implementation method of the frequency domain texture suppression path is as follows:
[0038] S211: Obtain the feature map of the input image, perform a fast Fourier transform, and decouple the frequency domain signal into an amplitude spectrum and a phase spectrum;
[0039] S212: Adaptive high-frequency threshold segmentation of the amplitude spectrum is performed, and the characteristic spectral bright spot clusters representing periodic background texture are dynamically extracted using the density clustering algorithm;
[0040] S213: An anisotropic notch filter is constructed based on the energy distribution characteristics of bright spot clusters, and attenuation is performed only on the corresponding frequency band in the amplitude spectrum;
[0041] S214: Reconstruct the attenuated amplitude spectrum with the unprocessed original phase spectrum, and perform an inverse transform to generate a spatial suppression mask;
[0042] The specific implementation method of the spatial defect enhancement path is as follows:
[0043] S221: Perform global average pooling and position encoding on the feature map of the input image along the horizontal and vertical coordinate directions respectively to capture long-distance spatial dependencies, focus on potential defect saliency regions, and output spatially enhanced feature map;
[0044] The specific implementation method of the adaptive fusion module is as follows:
[0045] S231: Calculate the texture information entropy of local regions in the input image. For regions with high texture complexity, increase the weight of the spatial suppression mask. For regions with low texture complexity, increase the weight of the spatial enhancement feature map. The two-path outputs are dynamically weighted and fused to train the defect detection model.
[0046] The formula for fusion of the two pathways is:
[0047] ;
[0048] in This represents the final feature map output after adaptive fusion. The feature map represents the output of the spatial defect enhancement path. This represents the spatial suppression mask generated by the frequency domain texture suppression path. This represents the fusion weight coefficients dynamically output by the network based on the local region's texture information entropy.
[0049] Furthermore, in step S300, the specific methods for performing spatiotemporal alignment and numerical compensation include:
[0050] S311: Extract the spatiotemporal metadata of the defect images detected online. The spatiotemporal metadata includes the product unique identifier and the image generation timestamp.
[0051] S312: Obtain the time series set of corresponding process parameters recorded in the Manufacturing Execution System (MES); perform spatial constraint matching to ensure that the product identification code of the extracted process parameter is consistent with the product unique identification code of the defect image;
[0052] S313: Perform time window constraint matching, set a time sliding window based on the image generation timestamp, and extract only discrete parameter sampling points that fall within the time sliding window;
[0053] S314: When the image timestamp cannot be precisely coincided with the discrete parameter timestamp recorded by MES, if there are two valid sampling points before and after within the entire sliding window, then extract the two valid sampling points before and after and perform a linear interpolation algorithm to calculate the current estimated value.
[0054] If data is severely missing and cannot be interpolated due to network packet loss throughout the sliding window, a degradation compensation mechanism is triggered. The zero-order hold strategy is used to call the most recent valid process parameters for forward filling, or the historical moving average is calculated as a substitute, and a low confidence label is attached to the compensation data at the same time.
[0055] Specific methods for constructing multimodal fusion features include:
[0056] S321: Obtain the high-dimensional visual feature vector output by the edge detection model;
[0057] S322: Obtain the structured process feature vector after spatiotemporal alignment and numerical compensation, and obtain its corresponding confidence level label;
[0058] S323: Weighted penalty is applied to the structured process feature vector based on the confidence level label;
[0059] S324: Use the feature alignment projection matrix to perform spatial mapping and feature splicing on high-dimensional visual feature vectors and weighted structured process feature vectors to construct multimodal fusion features.
[0060] Furthermore, in the knowledge graph ontology of step S400, the manufacturing resource nodes include equipment entities and material batch entities;
[0061] Process nodes include process entity and process parameter entity; quality entity nodes include defect type entity and defect feature entity.
[0062] Entities are connected by edges that represent relationships of "belonging to", "causing", "occurring in", and "using".
[0063] Methods for constructing and updating quality knowledge graphs include:
[0064] S410: Using preset mapping rules, high-dimensional visual feature vectors are transformed into implicit representations of quality entities, and all production parameters are transformed into structured attributes of process nodes.
[0065] S420: Real-time acquisition of verified root causes and corrective measures from production site feedback, conversion of them into new associated triples, incremental injection into the graph database, and synchronous triggering recalculation of local graph weights to achieve knowledge evolution;
[0066] Specifically, the recalculation of the local weights of the trigger graph is as follows: when the system receives a manually verified defect root cause, it automatically extracts the local topological path between the defect and the relevant process nodes, and recalculates the causal association weights on the path based on historical statistical patterns and new cases to correct inference biases.
[0067] Furthermore, in step S500, the specific method of the Graph Attention Network (GAT) includes:
[0068] The input encoding layer embeds the attribute information of the nodes in the knowledge graph into the representation, generating an initial feature vector;
[0069] The multi-head attention layer employs K independent and parallel attention mechanisms. For each attention head, the initial feature vectors of the defect center node and its neighboring nodes are linearly transformed and concatenated, and the unnormalized attention score is calculated using the LeakyReLU nonlinear activation function.
[0070] The feature aggregation layer uses the Softmax function to normalize the attention scores within the same neighborhood to obtain the actual influence weight. Based on the influence weight, the feature vectors of neighboring nodes are weighted and summed. The outputs of K attention heads are then concatenated and activated to generate the aggregated features of the defect center node that integrate the process background of the neighborhood.
[0071] The causal output layer feeds the aggregated features into a multilayer perceptron (MLP) and maps them to a preset causal probability space through a sigmoid activation function, outputting the causal link probability values between the defect center node and each adjacent process node or material node.
[0072] The method for constructing the local reasoning subgraph is as follows:
[0073] S510: Based on the spatiotemporal consistency constraint, using the unique identifier of the PCB with the defect to be diagnosed as the index, only process parameter records and material consumption batches that coincide with the production timestamp of the board and belong to its actual physical process path are selected as candidate nodes.
[0074] S520: Perform related attribute filtering, retrieve the preset feature mapping expert table according to the current defect type, and remove feature nodes that are not related in terms of physical mechanism to retain potentially related features;
[0075] S530: Implement topological hop count limitation, radiate the retrieval outward from the defect node, and limit the search depth of the local reasoning subgraph to 2 to 3 hops.
[0076] Furthermore, step S600 is included:
[0077] The system receives user feedback on root cause hypotheses and action suggestions output by the system, and updates the quality knowledge graph with the confirmed correct "defect-root cause-action" pairs as new triple knowledge, thereby enabling continuous self-learning and optimization of the system.
[0078] Furthermore, including:
[0079] Physical simulation data generation module: used to execute step S100;
[0080] Defect Detection Model Module: This module is used to deploy and execute the model trained in step S200. It is deployed on edge computing devices to perform real-time inference on images captured by production line cameras. After the model training is completed, it is also used to perform lightweight processing on the trained model. Specifically, this includes: using a channel-level pruning algorithm to remove redundant channels with weights close to zero in the model to compress the model size, and calibrating the precision of the network parameters from 32-bit floating-point to 8-bit integer.
[0081] Multi-source information fusion processing module: used to execute step S300;
[0082] Knowledge graph construction and management module: used to execute step S400, and includes a knowledge graph storage unit for storing related data;
[0083] Root Cause Reasoning and Decision Engine Module: Used to execute step S500, this module is deployed on a cloud server;
[0084] Human-computer interaction and feedback learning module: used to display results, receive feedback and execute step S600.
[0085] Another object of the present invention is to provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of any of the methods described above.
[0086] Another object of the present invention is to provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the methods described above.
[0087] The beneficial effects of this invention are as follows:
[0088] 1. High detection accuracy: By constructing a dual-path network of physical simulation data and domain adaptive data, the problem of interference from complex textures in high-frequency PCBs has been solved in a breakthrough, significantly improving the detection rate and accuracy of small defects in high-noise backgrounds, while also solving the cold start problem of scarce industrial defect samples.
[0089] 2. Intelligent Diagnosis: By constructing a quality knowledge graph, fragmented testing data, process data and expert experience are deeply integrated. Combined with spatiotemporal alignment and GAT reasoning, data silos are broken down, and the cumulative deviation of parameters across processes is accurately quantified and traced. This enables automatic, rapid and interpretable reasoning of the root cause of defects, and significantly shortens the anomaly investigation cycle.
[0090] 3. System self-evolution: Through the human-machine feedback loop, the system can continuously accumulate and optimize knowledge, moving from "experience-driven" to "data and knowledge-driven" intelligent decision-making;
[0091] 4. High practicality: It forms a complete solution from online detection and real-time diagnosis to decision support, which can be directly deployed on the production line to shorten the response time for quality problems and improve process stability. Attached Figure Description
[0092] Figure 1 This is an overall flowchart of the present invention, showing the complete closed loop from data synthesis, model training to online detection, information fusion, knowledge graph construction, intelligent reasoning and feedback learning;
[0093] Figure 2 This is a schematic diagram of cross-domain physical simulation data generation in this invention, showing the processing flow of the micro-notch defect sample synthesis algorithm based on physical simulation (covering parametric 3D modeling, ray tracing rendering and domain adaptation), as well as the visual instance correspondence from the underlying 3D defect model to the final high-fidelity synthesized training sample;
[0094] Figure 3 This is a schematic diagram of the dual-path attention network in this invention, showing how the input image is processed through the "texture suppression path" and the "defect enhancement path", and how the final feature map is generated through the adaptive fusion module.
[0095] Figure 4 This is a schematic diagram of the ontology structure of the quality knowledge graph in this invention, showing examples of core categories such as manufacturing resources, processes, and quality entities and their interrelationships in the form of nodes and connections;
[0096] Figure 5 This is a schematic diagram of the decision support interface in this invention, simulating a software interface that displays defect images, detection boxes, a list of associated process parameters, and inferred root cause hypotheses (with confidence levels) and corrective action suggestions.
[0097] Figure 6 This is the overall system execution framework in this invention;
[0098] Figure 7 This is a schematic diagram of the local reasoning subgraph of the quality knowledge graph in this invention, which shows the hierarchical screening mechanism based on spatiotemporal consistency, related attribute filtering and topological hop count limit when the system extracts local subgraphs from the global knowledge graph, as well as the complete logic of aggregating 1-hop and 2-hop adjacent nodes with a specific defect as the center for graph neural network reasoning.
[0099] Figure 8 This is an architecture diagram of the system in this invention, showing the components such as edge devices, cloud servers, databases, and human-machine interfaces, as well as their data flow relationships. Detailed Implementation
[0100] The technical solutions of the present invention will be clearly and completely described below with reference to the embodiments of the present invention. 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.
[0101] like Figure 1 As shown, the overall method flow provided in this embodiment includes: offline data simulation construction and model training, and online detection-fusion-inference-feedback closed loop.
[0102] The offline phase includes steps S100 to S200:
[0103] Step S100: Physical simulation data construction. First, obtain images of good PCBs and extract their BRDF optical properties. Combined with the three-dimensional mechanical model of defects, generate high-fidelity synthetic samples using physical rendering technology. A feature alignment algorithm is then used to eliminate the domain offset between the simulation data and the actual shooting data. Specifically, "domain offset" refers to the statistical difference between the synthetic image domain (source domain) generated based on physical rendering and the real image domain (target domain) actually captured by the production line camera in terms of underlying pixel distribution, sensor inherent noise, and illumination perturbations. To eliminate this offset, this embodiment employs a domain-adaptive feature alignment algorithm based on adversarial learning: the system constructs an adversarial network containing a feature extractor and a domain discriminator, and inputs both the rendered synthetic image and the real defect-free image collected from the production line into the feature extractor to map to a shared implicit space; the domain discriminator is dedicated to distinguishing the domain source (synthetic or real) of the input features; by introducing an adversarial loss function between the two to conduct a minimax game, the feature extractor is forced to learn and output domain-independent general texture features, thereby smoothing out the barrier between simulation data and real-world data at the underlying data distribution level, ensuring that synthetic defect samples can be directly used for downstream detection model training without degradation.
[0104] Step S200: Train a dual-path deep learning network using the generated synthetic sample library. By decoupling the texture suppression path and the defect enhancement path, the model is able to extract small defect features in a high-noise background.
[0105] The online collaboration phase includes steps S300 to S500:
[0106] Step S300: Deploy the trained model on the edge to perform inference on PCB images acquired in real time from the production line, and output the category, location, and high-dimensional visual feature vector of the defects. Through the PCB unique identifier (SN / QR code) and time sliding window mechanism, the visual features of defects detected online are spatiotemporally aligned with the production process parameters and material batch characteristics recalled from the MES / ERP system.
[0107] Step S400: Map the fused features to the preset ontology graph, use the graph attention network (GAT) to perform causal link prediction in the local subgraph, and output the root cause hypothesis and corrective measures jointly confirmed by humans and machines.
[0108] Step S500: Subsequently, the results of human confirmation are captured through feedback learning to achieve incremental updates of map knowledge and closed-loop optimization of model performance.
[0109] Example 1
[0110] Based on the above embodiments, the specific operation mechanism of "establishing a three-dimensional physical model based on the material mechanical properties of the target defect" in step S100 is explained as follows:
[0111] This embodiment derives the material's morphology under stress limits based on the fracture and deformation mechanics of high-frequency PCB copper foil or resin substrate. It is assumed that the local processing stress experienced by the high-frequency PCB during lamination or etching is... According to the Griffith energy balance criterion in linear elastic fracture mechanics (LEFM), the dynamic conditions for microcrack propagation can be characterized as follows:
[0112] ;
[0113] in, Energy release rate; The critical fracture toughness of the material; The characteristic half-length of a microcrack; This refers to the Young's modulus of the PCB substrate or copper foil. Based on this, the system calculates the critical depth and angle required to satisfy the tearing condition.
[0114] Example 2
[0115] Building upon the above embodiments, in order to parametrically generate realistic edge tear morphologies in 3D modeling software, the system further introduces the Weierstrass-Mandelbrot (WM) fractal function to describe the 3D height perturbation of the defect edge surface, the expression of which is:
[0116] ;
[0117] in, This represents the high perturbation value of the edge roughness; This is the amplitude scaling factor; The fractal dimension (used to control the burr-like appearance and roughness of defect edges; typically taken as 1.2 for high-frequency PCB copper foil tearing) is used. <1.8), This is the spatial frequency scaling parameter.
[0118] By combining the aforementioned mechanical depth and fractal edge features, the system can drive the generation of a three-dimensional mesh model with realistic physical stress traces.
[0119] Example 3
[0120] Based on the above embodiments, in order to more clearly illustrate the operation effect of this physical modeling mechanism, the following calculation example of local defect generation is provided:
[0121] When a "micro-notch in copper foil" defect occurs on the production line due to abnormal pressing stress, the system first extracts the mechanical stress under the current processing technology. Young's modulus of high-frequency PCB copper foil By substituting the above Griffith energy balance criterion formula, the system determines that the energy release rate in this region has exceeded the critical value. And the theoretical geometric cross-sectional depth of the micro-notch is derived as follows: .
[0122] Subsequently, to simulate the realistic tearing and burr sensation at the edge of the micro-notch, the system invoked the WM fractal function calculation module. Considering the physical characteristics of high-frequency PCB copper foil, the system calculated the fractal dimension. Set to 1.5 (this value is usually between 1.2 and 1.5). Values between 1 and 8 are selected to match the characteristics of metal tearing, and are combined with specific spatial frequency parameters. Generate a highly perturbable matrix.
[0123] Ultimately, the system will calculate the result. The cross-sectional depth features are fused with the edge perturbation matrix generated based on fractal functions to drive the generation of a 3D defect mesh model with jagged edges and highly realistic physical edges in 3D space, thus completely eliminating the distortion caused by traditional methods that rely solely on hand-drawn sketches or 2D smooth stretching. Figure 2 )
[0124] Example 4
[0125] Based on the above embodiments, the specific operation mechanism of the "BRDF optical quantization and rendering model of high-frequency PCB substrate" in step S100 is explained as follows:
[0126] In the physical ray tracing rendering stage, to accurately reproduce the complex surface texture of high-frequency PCBs (such as PTFE substrates or composite resins), the system employs the Cook-Torrance BRDF model based on microsurface theory. Its bidirectional reflection distribution function... Defined as a linear combination of diffuse reflection and specular reflection terms, its expression is:
[0127] ;
[0128] in, and These are the diffuse reflectance and specular reflectance of the material, respectively, measured using a variable-angle photometer. The microsurface normal distribution function (usually using the GGX distribution) is related to the surface roughness. Directly related to controlling the diffusion area of highlights; This is a geometric occlusion function used to calculate the self-occlusion and shadowing effects of light within a microscopic torn section; This is a Fresnel term that describes how the reflection intensity changes with the observation angle and the refractive index of the material.
[0129] Example 5
[0130] Based on the above embodiments, in order to more clearly illustrate the effect of this model, the following calculation case on optical synthesis of high-frequency PCB substrates is provided:
[0131] Assuming the high-frequency PCB substrate under test is a polytetrafluoroethylene (PTFE) composite material, the system first samples it using a variable-angle photometer and then fits the data to obtain its diffuse reflectance. Specular reflectance Surface roughness parameters ;
[0132] When rendering a 3D physical model of a defect, if the incident light rays strike the defect sidewall at a small angle:
[0133] Specular simulation: The system uses Function computation, because The lower temperature creates a clearly defined, energy-concentrated metallic highlight area.
[0134] Shading simulation: Because the defect has a certain cross-sectional depth, the system uses... The function automatically calculates the shadow area on the backlit side wall, simulating a realistic sense of depth;
[0135] Edge enhancement: When the observation angle tends to be large (grazing), the Fresnel term is used to enhance the edge enhancement. Through calculation, the system automatically increases the reflection intensity, restoring the unique enhanced reflection phenomenon of the PCB surface when viewed from a low angle.
[0136] Through precise quantization and physical rendering of the aforementioned BRDF characteristics, the synthetic defect image generated in this embodiment strictly adheres to the laws of physical optics, eliminating the defects of unnatural light and shadow distribution and lack of depth information in images generated by traditional algorithms. This significantly improves the adaptability of the subsequent detection model to the real production line environment (corresponding to...). Figure 2 ).
[0137] Example 6
[0138] Based on the above embodiments, the specific operating mechanism and mathematical model of "eliminating neighborhood offset by using a feature alignment algorithm" in step S100 are explained:
[0139] After physical rendering is complete, in order to completely smooth out the compositing domain (source domain, denoted as ) based on software rendering ) and the actual target domain captured by the production line camera (target domain, denoted as The statistical barriers between the underlying sensor and the sensor based on inherent noise and illumination perturbations are addressed in this embodiment by constructing a feature extractor. and Domain Discriminator An adversarial network.
[0140] The core of this adversarial network lies in establishing a minimax game. Its adversarial loss function... Defined as:
[0141] ;
[0142] in, This indicates the calculation of mathematical expectation; and These represent the input synthetic defect image and the real defect-free image, respectively. Neighborhood discriminator. The optimization goal is to distinguish the domain origin of features as accurately as possible (even if...) maximize).
[0143] To make the feature extractor To "deceive" the discriminator, the system cleverly introduces a Gradient Reversal Layer (GRL) between the feature extractor and the discriminator during network training. During forward propagation, the GRL acts as an identity transformation; while during backpropagation, the GRL multiplies the gradient returned from the domain classification by a negative constant (i.e., inverts the gradient). This forces the global optimization objective of the entire adversarial network to transform into:
[0144] ;
[0145] Example 7
[0146] Based on the above embodiments, in order to more intuitively illustrate the effect of this mechanism, the following explanation of the underlying feature alignment is provided:
[0147] When the system inputs a synthetic high-frequency PCB image with Blender rendering smoothing artifacts, the discriminator initially easily identifies it as "fake" (source domain) and generates a large classification gradient. However, due to the presence of GRL, the feature extractor receives the opposite update instruction, and it is forced to adjust its own convolution kernel parameters to actively learn and extract a frequency distribution that is highly similar to the noise of the camera sensor on the real production line.
[0148] As the minimax game continues to iterate, the accuracy of the discriminator will eventually decrease and stabilize at around 50% (i.e., it will be completely unable to distinguish whether the feature comes from real footage or rendering).
[0149] At this point, the feature extractor The system has successfully learned "domain-independent" general physical texture features. Through this feature-level alignment, the system ensures that the synthetic defect samples generated by pure software highly overlap with the actual production line data in the feature space, avoiding "neighborhood shift" that would cause accuracy degradation in downstream detection models when applying synthetic data.
[0150] Example 8
[0151] Based on the above embodiments, addressing the problem of high spatial coupling between the complex fiberglass braided texture background and minute defect features in high-frequency PCBs, this embodiment designs and trains a dual-path decoupling feature extraction network, aiming to achieve active suppression of background texture and targeted enhancement of defect features. Based on the above embodiments, the specific operating mechanism of the "dual-path network" in step S200 is explained:
[0152] 1. Frequency Domain Texture Suppression Path
[0153] This pathway identifies and eliminates periodic background interference by extracting the frequency domain distribution of the feature map. Specifically, the process involves first acquiring the input feature map output from the backbone network, then performing a two-dimensional fast Fourier transform (2D-FFT) on it as a multi-channel signal to obtain the input spectrum. :
[0154] ;
[0155] The system identifies the center frequency coordinates of characteristic bright spots representing the circumferential texture of glass fibers in the spectrum. And based on the preset stopband radius Constructing a Gaussian notch filter Minimize the frequency domain components where texture energy is concentrated:
[0156] ;
[0157] in, The frequency domain coordinates are those obtained after the Fourier transform of the feature map; For the identification of the first The center frequency coordinates of the bright spots in the fiberglass texture From the current frequency domain point to the th The Euclidean distance of the center of the bright spot; From the current frequency domain point to the th The Euclidean distance between frequency domain points (i.e., centers of symmetrical bright spots) whose centers are conjugate symmetrical; The preset stopband radius; This represents the total number of periodic conjugate bright spot pairs identified.
[0158] To illustrate, when the production line collects a sheet of size... The high-frequency PCB local feature map of the pixel, after 2D-FFT, has its spectral center shifted to coordinates (128, 128). The system detects the generation caused by the fiberglass cloth weaving. For the significant high-frequency texture bright spot, its coordinates are located at (150, 150) and the expected conjugate symmetric coordinates at (106, 106). The stopband radius is set. Frequency domain signal after notch filtering After inverse FFT (iFFT) to restore to the spatial domain, a spatial suppression mask is generated. This achieves pixel-level background attenuation.
[0159] 2. Spatial defect enhancement pathway:
[0160] This pathway integrates a coordinate attention mechanism, embedding spatial location information into the channel features by performing global average pooling in the horizontal (X) and vertical (Y) directions of the feature map. Its output feature map... It can effectively amplify the significant response of non-periodic abrupt changes such as electrical connection anomalies, gaps, and microcracks.
[0161] 3. Adaptive weighted fusion and texture entropy adjustment mechanism:
[0162] The core innovation of this embodiment lies in dynamically adjusting the contribution of the two pathways using local texture information entropy. First, the system performs normalized grayscale histogram statistics on local windows of the input image to calculate its local texture information entropy. ;
[0163] in, Represents the gray level within a local window The probability of occurrence This represents the total number of gray levels.
[0164] Subsequently, the system uses a learnable nonlinear mapping function to... Converted into dynamic fusion weight coefficients :
[0165] ;
[0166] When a region with extremely dense fiber interweaving (high entropy region) is detected, the coefficient As the value approaches 1, the system outputs the final feature map through an adaptive fusion formula. .
[0167] Example 9
[0168] Based on the above embodiments, the specific mechanism for adaptive fusion of the frequency domain and spatial domain paths in step S200 is explained:
[0169] This fusion process dynamically adjusts the weights using the local region texture information entropy, and its fusion formula is as follows:
[0170] ;
[0171] in This represents the final feature map output after adaptive fusion, which is used for subsequent global average pooling and visual feature vector transformation. The feature map represented by the spatial defect enhancement path amplifies the saliency response of small defects through the coordinate attention mechanism, but its inherent defect is that it may also amplify the periodic reflective noise of the high-frequency PCB background. This represents the spatial suppression mask generated by the frequency domain texture suppression path, and the values of its elements range from... Between 0 and 1. The closer the value is to 0, the higher the probability that the pixel location belongs to a periodic fiberglass texture, and it needs to be strongly suppressed; This represents the fusion weight coefficients dynamically output by the network based on the local region texture information entropy, and their values range from [value range missing]. The denser and more complex the fiberglass texture in a local area (such as the area where warp and weft yarns intersect), the higher the information entropy and the better the network distribution. The closer the value is to 1, the worse it is in smooth resin areas. The value approaches 0.
[0172] To illustrate the effect of this fusion mechanism, suppose a camera on the production line captures an image of a high-frequency PCB. The system then targets a specific coordinate point within the image. Feature fusion calculations were performed. This coordinate point is located precisely in the area where the dense warp and weft threads of the fiberglass cloth intersect and overlap.
[0173] (a) Parameter extraction: Due to the extremely complex texture in this region, the network calculates that its local texture information entropy is high, and dynamically generates a high fusion coefficient. Meanwhile, the spatial defect enhancement pathway is interfered with by glass fiber reflection at this point, resulting in a higher characteristic activation value. The frequency domain suppression path precisely captures this periodic noise, generating a lower mask value at that point. .
[0174] (b) Substitution of formulas and calculation:
[0175] ;
[0176] (c) Analysis of calculation results:
[0177] The above calculation examples show that the artificially high characteristic value originally caused by strong fiberglass reflection is actually due to the fact that... Under the adjustment of the adaptive fusion formula, it is significantly attenuated to 38.4. This means that the system highly trusts the "suppression mask" of the frequency domain path in textured regions, effectively filtering out background artifacts; conversely, if the point is located in a smooth, textureless region (i.e., (approaching 0), the second term on the right side of the formula This will take the lead, thereby preserving the true defect characteristics to the greatest extent, and ultimately achieving a perfect balance between "noise reduction" and "fidelity".
[0178] Example 10
[0179] Based on the above embodiments, the specific operation mechanism and formula derivation of the "multi-source information spatiotemporal alignment method" in step S300 are explained:
[0180] In real-world industrial settings, there is a significant mismatch between the camera's acquisition frequency (typically in the millisecond range) and the MES system's sensor sampling frequency (typically in the second or minute range), often accompanied by network jitter. Without rigorous spatiotemporal alignment, subsequent causal inference will be based on incorrect data associations. This embodiment constructs a rigorous dual-matching constraint model.
[0181] First, a spatiotemporal constraint model is established: defining the defect images detected online. Its spatiotemporal metadata is a binary tuple. ,in It is a unique identifier for the product. A precise timestamp generated for the image. Define the time series set of a specific process parameter (such as etchant concentration, pressing temperature, etc.) recorded in the MES system as:
[0182] ;
[0183] Before the system can perform data fusion, it must meet the following two prerequisite constraints:
[0184] (1) Spatial constraints: It is necessary to ensure (Or ensure that both belong to the same production batch);
[0185] (2) Time window constraint: Set the sliding window boundary as The system only extracts parameter sampling points that fall within the window for alignment calculation.
[0186] Example 11
[0187] To more clearly illustrate the operational logic of this spatiotemporal alignment mechanism, the following specific calculation example regarding "etching solution concentration estimation" is provided:
[0188] Assuming the production line camera is in A photo with the number was taken. The system analyzes high-frequency PCBs and detects "side-etching" defects. It needs to correlate this defect image with the current etching solution concentration parameters. A time-sliding window is set. minutes, that is, the search window is MES system records The etching solution concentration sensor data for this batch is reported every minute. The system retrieved two discrete sampling points within this window:
[0189] Sampling point 1: ;
[0190] Sampling point 2: ;
[0191] At this time, the image timestamp It did not precisely coincide with the sampling time point of MES (i.e.) The system triggers a high-precision spatiotemporally aligned linear interpolation algorithm to estimate the target value. The calculation formula is:
[0192] ;
[0193] Substituting the above case data into the formula, we obtain: in the case numbered... The estimated actual concentration of the etching solution for the plate as it passes the camera is [value missing]. This estimate eliminates the step error introduced by discrete sampling.
[0194] Assuming network jitter occurs on the production line during this period, the search window No valid data was reported. The system traced back to the nearest valid historical sampling point:
[0195] Historical sampling points: ;
[0196] At this point, the system triggers a degradation compensation mechanism, employing a zero-order hold strategy for forward filling:
[0197] ;
[0198] Meanwhile, to prevent this outdated data from misleading subsequent graph neural networks, the system dynamically calculates and adds a low-confidence decay flag. Let the time decay constant of the etching solution concentration be... (Indicating relatively slow concentration changes), the time difference between the current image timestamp and historical sampling points. Minutes, substitute into the formula to calculate:
[0199] ;
[0200] The system's final output concentration estimate is It is weighted with a confidence level of 0.86.
[0201] After the above scenario processing, regardless of whether the network environment is stable, the system can output continuous structured process parameters with reliability indicators. Subsequently, these parameters are weighted according to their confidence level (such as 0.86 in scenario B) and then precisely concatenated with the high-dimensional visual feature vector of the defect, thereby providing high-quality, contamination-free multimodal input data for the graph neural network (GAT).
[0202] Example 12
[0203] Based on the above embodiments, the specific operation mechanism and formula derivation of "constructing multimodal fusion features" in step S300 are explained.
[0204] After completing the spatiotemporal alignment and numerical compensation of multi-source heterogeneous data (such as acquiring data on etchant concentration, pressing temperature, etc. after interpolation or degradation compensation), the system needs to deeply fuse these low-level numerical features with high-dimensional image visual features. Simple numerical stitching cannot solve the problem of spatial distribution differences of heterogeneous features, so this embodiment introduces a projection stitching mechanism with confidence penalty.
[0205] Define the high-dimensional visual feature vector output by edge-end visual detection models (such as dual-path attention networks) as: The structured process feature vector after alignment compensation is defined as follows: For process parameters that trigger degradation compensation (zero-order hold) due to network packet loss, the system dynamically calculates and adds a low-confidence attenuation flag. .
[0206] To align these two modalities within a shared implicit semantic space, the system constructs multimodal fusion features. Its core feature splicing formula is:
[0207] ;
[0208] in, and The projection matrix is used to align the learnable features of the visual branch and the process branch, respectively, to unify the feature dimensions of the two and eliminate the difference in dimensions. Indicates based on confidence level Element-wise weighted penalties are applied to the process parameter features (for normally spatiotemporally aligned data). Regarding outdated compensation data, ); This means concatenating the two sets of feature vectors after projection mapping along the channel dimension.
[0209] Example 13
[0210] Based on the above embodiments, the four-layer core computational logic of the "Graph Attention Network (GAT)" in step S500 and its practical application derivation are explained:
[0211] 1. Input Encoding Layer: The attribute information (such as process temperature, pressure, material number, etc.) of the nodes in the knowledge graph of step S400 is embedded and represented as the input feature vector. .
[0212] Assume the system extracts the central defect node. (Signal loss), and locked four key neighbor nodes in its local inference subgraph: node (Pressure bonding process - actual pressure), nodes (Material - dielectric constant of prepreg), nodes (Etching process - chemical concentration), nodes (Equipment - Etching machine maintenance frequency).
[0213] 2. Multi-head attention layer: adopts An independent and parallel attention mechanism analyzes the defect center node from different dimensions. with neighboring nodes The correlation, the coefficient of attention The calculation expression is:
[0214] ;
[0215] Among them, coefficient Indicates the first The process node for the first The impact importance score of each defect node The function is the introduced nonlinear activation function. For trainable attention weight vectors, For each attention head, an independent learning matrix is provided. For neighboring nodes, including process parameter characteristics or material characteristics, This is the defect center node.
[0216] Assuming the model learns from historical data that the combination of "abnormal dielectric constant of prepreg" and "specific pressing pressure" easily leads to signal loss, a nonlinear activation function is used. After calculation, the unnormalized scores obtained are as follows: ;
[0217] 3. Feature Aggregation Layer: Scoring of all neighboring nodes for the defect center node. Influence weights are obtained by performing Softmax normalization. Features of neighboring nodes The node's new feature representation is generated by weighted summation of its weights and a nonlinear activation function. The expression is:
[0218] ;
[0219] ;
[0220] in, It refers to all multi-hop process and material nodes associated with the defect center node. The influence weights generated by Softmax represent the proportion of contribution accounted for by a specific process node. It is a non-linear activation function. This is the aggregated feature of all key neighbor nodes.
[0221] The influence weight of each node is calculated by normalizing using the Softmax function; for example, the dielectric constant node of the prepreg is used. It achieved the highest attention weight. Actual pressure node of the pressurization Obtained the second highest power The remaining etch-related nodes have extremely low weights.
[0222] In the feature aggregation layer, the system uses the weights calculated above to perform a weighted summation of the features of neighboring nodes: After the above calculation, the updated defect center node features are obtained. The abnormal attribute information of "prepreg" and "pressing pressure" has been aggregated, while the normal etching process information has been successfully filtered out.
[0223] 4. Causal Output Layer: Concatenation The features extracted by each independent attention branch, including equipment parameters, material batches, and environmental elements, are merged into a comprehensive vector. The aggregated features are fed into a fully connected layer (MLP) for causal probability mapping. Finally, the inference results are output as causal link probability values P between defect nodes and each process / material node through a sigmoid activation function, expressed as:
[0224] ;
[0225] ;
[0226] in, It is the combined long vector of all attention head output vectors. It represents the probability of causal association between a specific process node and the current defect node.
[0227] Finally, at the causal output layer, the system will The features aggregated by each attention head are concatenated and fed into a fully connected layer (MLP). After... The activation function mapping ultimately outputs the causal association probability between the defect and each candidate root cause:
[0228] ;
[0229] ;
[0230] ;
[0231] Example 14: Construction of Cross-Domain Physics Simulation Data (corresponding to) Figure 2 )
[0232] Based on the above embodiments, in actual production, real samples of high-frequency PCB defects are extremely scarce, which can easily lead to overfitting of deep learning models under small sample training. To completely solve this data bottleneck, this system adopts a physical-level data augmentation scheme that combines fracture mechanics and ray tracing technology:
[0233] like Figure 2 As shown, the system parametrically defines the three-dimensional geometric cross-sectional features of defects based on the fracture mechanics model of copper foil under machining stress. Different depths are generated in the 3D modeling software. Sidewall Inclination The system then extracts the bidirectional reflectance distribution function (BRDF) parameters (such as diffuse reflectance, specular reflection intensity, and roughness) of the high-frequency PCB surface and performs high-fidelity rendering in a physical rendering engine (such as Blender Cycles).
[0234] In this process, the system utilizes a ray tracing algorithm to rigorously simulate the subsurface scattering and occlusion shadows generated by coaxial light sources on the edges of micro-notches in a real production line. Finally, an adversarial discriminator from the domain adaptation algorithm is used to further reduce the differences in noise and texture distribution between the rendered image and the actual image. Ultimately, as... Figure 2 As shown, the system outputs synthetic defect training samples with high physical consistency and close resemblance to real-world production line footage. This method, generated entirely in software, effectively constructs a high-quality defect sample library covering various edge morphologies, providing a solid data foundation for the training of subsequent detection models.
[0235] Example 15: Training of Domain-Adaptive Defect Detection Model (corresponding) Figure 3 )
[0236] Based on the above embodiments, a network is constructed with an improved CSPDarknet backbone and incorporating a frequency-spatial dual-path attention mechanism.
[0237] Texture suppression path (frequency domain): A two-dimensional fast Fourier transform (2D-FFT) is performed on the input feature map to identify and extract the characteristic spectral bright spots generated by the periodic weaving of the PCB fiberglass cloth in the frequency domain. This frequency component is then directionally removed using a notch filter, and the image is restored to the spatial domain via an inverse transform to generate a background texture suppression mask. Defect Enhancement Pathway (Spatial Domain): Employs a coordinate attention module to locate salient regions of minute defects through feature pooling in both horizontal and vertical directions. Adaptive Fusion Module: Calculates the texture entropy of local regions. In fiber optic cross-sections with high texture entropy, the system automatically increases the fusion weights of the suppression pathway. The fused feature map is composed of: Calculation. The fused feature map. After global average pooling, it is transformed into a fixed-dimensional visual feature vector, which is used as the embedding representation of subsequent knowledge graph nodes.
[0238] Example 16: Quality Knowledge Graph Construction and Reasoning (corresponding) Figures 4 to 6 )
[0239] Based on the above embodiments, such as Figure 4As shown, the knowledge graph contains entities such as "Etch01 (Etching Machine)," "Cu-Batch202403 (Copper Foil Batch)," "Process - Pattern Transfer," and "Defect - Insufficient Linewidth." These entities are connected through relationships such as "hasParameter," "useMaterial," and "causeBy." When an "Insufficient Inner Layer Linewidth" defect is detected online, the system automatically references the board's process log and finds that it used "Cu-Batch202403" and passed through "Etch01 (Etching Machine)."
[0240] Inference engine startup: 1) Rule matching: Trigger expert rule for "insufficient linewidth -> excessive etching or poor resist".
[0241] 2) Image retrieval: Searching the image revealed three historical cases with the common characteristics of "using Cu-Batch202403" and "passing through Etch01", and the root cause was "abnormal surface roughness of the copper foil in this batch, which led to a decrease in dry film adhesion and side etching of the resist after pattern transfer".
[0242] 3) GNN inference: The graph neural network embedding suggests that the "copper foil roughness" and "etching rate" nodes are closely related in the context of this defect.
[0243] Based on the above results, such as Figure 5 The system outputs the following on the interactive interface: "Highest confidence root cause (85%): Abnormal surface treatment of copper foil batch Cu-Batch202403 caused insufficient resist adhesion during the pattern transfer process, leading to lateral etching. Recommendations: a) Suspend the use of this batch of copper foil; b) Increase the micro-etching amount by 0.2μm for in-process products." After the engineer adopts the recommendations and verifies their effectiveness, they can confirm through the interface. The system automatically generates a new ternary set (defect - caused by copper foil batch - measures to adjust micro-etching parameters) and updates the map, completing one learning cycle. The overall workflow of the system is as follows: Figure 6 As shown.
[0244] Example 17: Local Inference Subgraph Construction Mechanism and Application Examples (corresponding to) Figure 7 )
[0245] Based on the above embodiments, such as Figure 7 As shown, the system's methods and rules for selecting adjacent nodes in the quality knowledge graph include:
[0246] Spatiotemporal consistency constraint: The system uses the unique identifier (ID) of the PCB with the defect to be diagnosed as an index to search the graph for all nodes that coincide with the production timestamp of the board and pass through the physical process path. Only process parameters and material batches consumed within the processing cycle of the board are selected as adjacent nodes.
[0247] Topological hop limit: To ensure the focus of reasoning, the system sets the search depth of local reasoning subgraphs to 2 to 3 hops.
[0248] Attribute filtering: The system presets a feature mapping table based on the defect type (e.g., open circuit, short circuit, surface contamination) and extracts only nodes that are physically related to that type of defect.
[0249] Based on the above rules, in this exemplary embodiment, when a signal loss defect is detected in a batch of high-frequency PCBs, the system uses the defect node as the center and retrieves the parameters of the "lamination process" and "etching process" that the batch of boards passed through according to the production log. The system extracts 1-hop nodes (actual lamination pressure, real-time etching solution concentration) and 2-hop nodes (prepreg batch used in the lamination process, nozzle maintenance frequency of the etching machine). Graph neural network calculations reveal that although the etching parameters are normal, the combined characteristics of the "prepreg batch" and "lamination pressure" are highly similar to historical high-loss cases, and its influence weight α is automatically increased. The system finally outputs the root cause ranking: 1. Prepreg dielectric constant deviation (confidence level 0.88); 2. Insufficient lamination pressure compensation (confidence level 0.65).
[0250] Example 18: System Deployment
[0251] Based on the above embodiments, such as Figure 8 As shown, the system of this invention can be deployed in a cloud-based collaborative architecture. The edge-side deployment performs channel-level pruning and INT8 quantization on the detection model, handling real-time image processing, and uploading the results to the cloud. The cloud server runs the knowledge graph, inference engine, and human-computer interaction services. Data from systems such as MES / ERP are integrated into the cloud via interfaces. This architecture ensures both real-time detection and leverages the powerful computing capabilities of the cloud for complex analysis and knowledge management.
[0252] The above are merely preferred embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
[0253] Ablation experiments need to be provided by the company on a specific basis:
[0254]
[0255] Simulate different MES data packet loss rates and observe the changes in the accuracy of root cause inference (RCA):
[0256]
[0257] Testing the root cause localization accuracy and inference latency of the GAT network at different search depths (Hop).
[0258]
[0259] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for intelligent detection and root cause tracing of PCB defects, characterized in that, Includes the following steps: S100: Cross-domain physical simulation data construction: Obtain the good product image of the target high-frequency PCB, establish a three-dimensional physical model based on the material mechanical properties of the target defects and the causes of processing stress, and extract the bidirectional reflection distribution function characteristics of the good product substrate; Using physically based ray tracing rendering technology, BRDF characteristics are used as material property inputs. The 3D physical defect model is fused with the good product background image, and a feature alignment algorithm is used to eliminate the neighborhood offset, generating a physically realistic synthetic defect sample library. S200: Training of a joint frequency-space defect detection model: Constructing a deep learning network that includes a frequency-domain texture suppression pathway and a spatial-domain defect enhancement pathway; The texture suppression pathway is used to decouple the frequency-domain features of the image and directionally weaken the periodic background texture frequency bands to generate a spatial suppression mask; The spatial defect enhancement pathway integrates a coordinate attention mechanism to capture long-distance spatial dependencies and focus on defect saliency regions. The network calculates the texture information entropy of local regions of the feature map through an adaptive fusion module and dynamically allocates the fusion weights of the two pathways according to the density and complexity of the background texture to train the defect detection model. S300: Multi-source information fusion and feature extraction: Deploy the trained detection model on the edge side, perform inference on PCB images collected in real time on the production line, and output the category, location and high-dimensional visual feature vector of the defect; The size of the time sliding window is set according to the average delay of the production line network and the constant of change of physical parameters. The visual features of defects detected online are spatiotemporally aligned and numerically compensated with the production process parameters and material batch features asynchronously recalled from the MES / ERP system through the unique identification code of the PCB board. Among them, linear interpolation is performed within the window to calculate the current estimated value, or a degradation compensation mechanism is triggered and a low confidence flag is attached when there is a severe lack of data throughout the sliding window. Finally, the aligned and compensated production features and visual features are stitched together to construct a multimodal fusion feature; S400: Quality Knowledge Graph Construction and Update: Defines a knowledge graph ontology containing three types of nodes: manufacturing resources, process, and quality entities; Visual features, production features, manually confirmed root causes of defects, and corrective measures are stored as associated triples in a graph database to construct and continuously update a quality knowledge graph. S500: Causal link reasoning based on graph attention network: When a new defect is detected, a local reasoning subgraph is constructed in the quality knowledge graph with the defect node as the center. The multi-hop search depth of this subgraph is 2 to 3 hops. The graph attention network is used to calculate the influence weights of adjacent process nodes and material nodes on the central defect node in the subgraph and aggregate the features. Finally, a list of potential process root causes and corresponding corrective action suggestions are output, sorted by causal probability score.
2. The intelligent PCB defect detection and root cause tracing method according to claim 1, characterized in that, In step S100, establishing a three-dimensional physical model based on the material mechanical properties of the target defect specifically includes: S111: Obtain the local processing stress parameters of the target high-frequency PCB under specific processing steps; S112: Based on the energy balance criterion of fracture mechanics, evaluate the critical conditions for micro-tears or peels of materials under local processing stress in order to determine the geometric depth and deformation characteristics of the defect section; S113: Introducing fractal functions, based on the set fractal dimension and spatial frequency parameters, to calculate the three-dimensional height perturbation of the defect edge surface, so as to parametrically characterize the roughness morphology of the defect edge; S114: Combining geometric depth, deformation features and edge roughness morphology to drive the generation of a three-dimensional defect mesh model with physical stress traces; The specific characteristics of the bidirectional reflectance distribution function extracted from a good substrate include: S121: Use photometric equipment to perform multi-angle illumination and observation sampling on high-frequency PCB substrates to obtain radiance distribution data under different incident angles and observation angles; S122: Based on the micro-surface theory, the radiance distribution data is deconstructed into diffuse reflection components and specular reflection components; S123: Extract material parameters that characterize the optical features of the substrate. Material parameters include diffuse reflectance, specular reflection intensity, and surface roughness. S124: Construct a BRDF model to characterize the substrate reflection characteristics. The model uses the normal distribution function to characterize the specular diffusion characteristics, the geometric occlusion function to characterize the self-occlusion effect of the micro-morphology, and the Fresnel term to characterize the law of reflection intensity changing with angle. The feature alignment algorithm for eliminating neighborhood offset specifically includes: S131: Construct an adversarial network consisting of a feature extractor and a domain discriminator; S132: Define the domain of the synthesized image as the source domain and the domain of the real acquired image as the target domain. Use a feature extractor to extract image features and use a neighborhood discriminator to distinguish the domain source of the input features in order to calculate the adversarial loss. S133: During the backpropagation process of network training, a gradient inversion layer is introduced between the feature extractor and the neighborhood discriminator to invert the gradient of the neighborhood classification calculation. S134: Based on the minimax game criterion, the feature extractor and the domain discriminator are jointly optimized, forcing the feature extractor to learn and output domain-independent general physical texture features.
3. The intelligent PCB defect detection and root cause tracing method according to claim 2, characterized in that, In step S200, the specific implementation method of the frequency domain texture suppression path is as follows: S211: Obtain the feature map of the input image, perform a fast Fourier transform, and decouple the frequency domain signal into an amplitude spectrum and a phase spectrum; S212: Adaptive high-frequency threshold segmentation of the amplitude spectrum is performed, and the characteristic spectral bright spot clusters representing periodic background texture are dynamically extracted using the density clustering algorithm; S213: An anisotropic notch filter is constructed based on the energy distribution characteristics of bright spot clusters, and attenuation is performed only on the corresponding frequency band in the amplitude spectrum; S214: Reconstruct the attenuated amplitude spectrum with the unprocessed original phase spectrum, and perform an inverse transform to generate a spatial suppression mask; The specific implementation method of the spatial defect enhancement path is as follows: S221: Perform global average pooling and position encoding on the feature map of the input image along the horizontal and vertical coordinate directions respectively to capture long-distance spatial dependencies, focus on potential defect saliency regions, and output spatially enhanced feature map; The specific implementation method of the adaptive fusion module is as follows: S231: Calculate the texture information entropy of local regions in the input image. For regions with high texture complexity, increase the weight of the spatial suppression mask. For regions with low texture complexity, increase the weight of the spatial enhancement feature map. The two-path outputs are dynamically weighted and fused to train the defect detection model. The formula for fusion of the two pathways is: ; in This represents the final feature map output after adaptive fusion. The feature map represents the output of the spatial defect enhancement path. This represents the spatial suppression mask generated by the frequency domain texture suppression path. This represents the fusion weight coefficients dynamically output by the network based on the local region's texture information entropy.
4. The intelligent PCB defect detection and root cause tracing method according to claim 3, characterized in that, In step S300, the specific methods for performing spatiotemporal alignment and numerical compensation include: S311: Extract the spatiotemporal metadata of the defect images detected online. The spatiotemporal metadata includes the product unique identifier and the image generation timestamp. S312: Obtain the time series set of corresponding process parameters recorded in the manufacturing execution system; perform spatial constraint matching to ensure that the product identification code of the extracted process parameter is consistent with the product unique identification code of the defect image; S313: Perform time window constraint matching, set a time sliding window based on the image generation timestamp, and extract only discrete parameter sampling points that fall within the time sliding window; S314: When the image timestamp cannot be precisely coincided with the discrete parameter timestamp recorded by MES, if there are two valid sampling points before and after within the entire sliding window, then extract the two valid sampling points before and after and perform a linear interpolation algorithm to calculate the current estimated value. If data is severely missing and cannot be interpolated due to network packet loss throughout the sliding window, a degradation compensation mechanism is triggered. The zero-order hold strategy is used to call the most recent valid process parameters for forward filling, or the historical moving average is calculated as a substitute, and a low confidence label is attached to the compensation data at the same time. Specific methods for constructing multimodal fusion features include: S321: Obtain the high-dimensional visual feature vector output by the edge detection model; S322: Obtain the structured process feature vector after spatiotemporal alignment and numerical compensation, and obtain its corresponding confidence level label; S323: Weighted penalty is applied to the structured process feature vector based on the confidence level label; S324: Use the feature alignment projection matrix to perform spatial mapping and feature splicing on high-dimensional visual feature vectors and weighted structured process feature vectors to construct multimodal fusion features.
5. A method for intelligent detection and root cause tracing of PCB defects according to claim 4, characterized in that, In the knowledge graph ontology of step S400, the manufacturing resource nodes include equipment entities and material batch entities; Process nodes include process entities and process parameter entities; Quality entity nodes include defect type entities and defect feature entities; Entities are connected by edges representing relationships of "belonging to", "causing", "occurring in", and "using". Methods for constructing and updating quality knowledge graphs include: S410: Using preset mapping rules, high-dimensional visual feature vectors are transformed into implicit representations of quality entities, and all production parameters are transformed into structured attributes of process nodes. S420: Real-time acquisition of verified root causes and corrective measures from production site feedback, conversion of them into new associated triples, incremental injection into the graph database, and synchronous triggering recalculation of local graph weights to achieve knowledge evolution; Specifically, the recalculation of the local weights of the trigger graph is as follows: when the system receives a manually verified defect root cause, it automatically extracts the local topological path between the defect and the relevant process nodes, and recalculates the causal association weights on the path based on historical statistical patterns and new cases to correct inference biases.
6. A method for intelligent detection and root cause tracing of PCB defects according to claim 5, characterized in that, In step S500, the specific methods for graph attention networks include: The input encoding layer embeds the attribute information of the nodes in the knowledge graph into the representation, generating an initial feature vector; The multi-head attention layer employs K independent and parallel attention mechanisms. For each attention head, the initial feature vectors of the defect center node and its neighboring nodes are linearly transformed and concatenated, and the unnormalized attention score is calculated using the LeakyReLU nonlinear activation function. The feature aggregation layer uses the Softmax function to normalize the attention scores within the same neighborhood to obtain the actual influence weight. Based on the influence weight, the feature vectors of neighboring nodes are weighted and summed. The outputs of K attention heads are then concatenated and activated to generate the aggregated features of the defect center node that integrate the process background of the neighborhood. The causal output layer feeds the aggregated features into the multilayer perceptron and maps them to a preset causal probability space through the Sigmoid activation function, outputting the causal link probability values between the defect center node and each adjacent process node or material node. The method for constructing the local reasoning subgraph is as follows: S510: Based on the spatiotemporal consistency constraint, using the unique identifier of the PCB with the defect to be diagnosed as the index, only process parameter records and material consumption batches that coincide with the production timestamp of the board and belong to its actual physical process path are selected as candidate nodes. S520: Perform related attribute filtering, retrieve the preset feature mapping expert table according to the current defect type, and remove feature nodes that are not related in terms of physical mechanism to retain potentially related features; S530: Implement topological hop count limitation, radiate the retrieval outward from the defect node, and limit the search depth of the local reasoning subgraph to 2 to 3 hops.
7. A method for intelligent detection and root cause tracing of PCB defects according to claim 6, characterized in that, Including step S600: The system receives user feedback on root cause hypotheses and action suggestions output by the system, and updates the quality knowledge graph with the confirmed correct "defect-root cause-action" pairs as new triple knowledge, thereby enabling continuous self-learning and optimization of the system.
8. A system for implementing the method as described in any one of claims 1-7, characterized in that, include: Physical simulation data generation module: used to execute step S100; Defect detection model module: Used to deploy and execute the model trained in step S200. This module is deployed on edge computing devices for real-time inference of images captured by production line cameras; Furthermore, after the model training is completed, it is also used to perform lightweight processing on the trained model. Specifically, it includes: using a channel-level pruning algorithm to remove redundant channels with weights close to zero in the model to compress the model size, and calibrating the precision of the network parameters from 32-bit floating-point to 8-bit integer. Multi-source information fusion processing module: used to execute step S300; Knowledge graph construction and management module: used to execute step S400, and includes a knowledge graph storage unit for storing related data; Root Cause Reasoning and Decision Engine Module: Used to execute step S500, this module is deployed on a cloud server; Human-computer interaction and feedback learning module: used to display results, receive feedback and execute step S600.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of any one of the methods as claimed in claims 1-7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps of any of the methods described in claims 1-7.
