Circuit board spraying quality detection method based on AI vision
The AI vision-based circuit board spraying quality inspection method fills the gap in the correlation modeling between the spraying process and the curing result, realizes real-time monitoring and parameter optimization of the spraying process, and improves the accuracy and efficiency of spraying quality inspection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BOLUO XINRUILONG ELECTRONICS CO LTD
- Filing Date
- 2026-05-06
- Publication Date
- 2026-07-21
AI Technical Summary
Existing circuit board coating quality inspection methods cannot trace the causal relationship between fluid spreading behavior during the coating process and the final defect morphology, resulting in insufficient ability to diagnose the root causes of defects such as "edge sagging" and "poor local wetting".
The AI vision-based circuit board coating quality inspection method acquires multi-time-series image data, extracts the transient spreading characteristics of the sprayed droplets, utilizes a fluid spreading graph neural network model and a cross-stage quality backtracking model, and combines the cured coating image to generate differentiated quality evaluation results and output inspection reports and spraying parameter correction suggestions.
It achieves cross-stage alignment between the spraying process and the curing result, enabling the detection of defects and tracing their causes, improving the accuracy of inspection and engineering guidance, and reducing the defect rate and rework costs.
Smart Images

Figure CN122434901A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of industrial vision inspection technology, and in particular to a method for inspecting the coating quality of circuit boards based on AI vision. Background Technology
[0002] Circuit board coating is a critical process in electronics manufacturing, mainly including conformal coating, thermally conductive adhesive coating, and solder resist ink coating. The coating quality directly determines the reliability and lifespan of the circuit board in environments such as humidity, salt spray, and high temperature.
[0003] Currently, the commonly used methods for spray coating quality inspection in the industry are mainly divided into two categories: one is manual visual inspection, which relies on operators to observe the cured coating with a magnifying glass or microscope; the other is automated optical inspection based on traditional machine vision, which identifies defects by performing grayscale analysis and template matching on images of the cured coating surface. When performing static defect identification on the cured coating surface, it is usually impossible to trace the causal relationship between the fluid spreading behavior during the spraying process and the final defect morphology. The spreading, wetting, and leveling process of spray droplets on the circuit board surface is driven by a combination of physical factors such as surface tension, viscosity gradient, and substrate surface energy distribution. The minute fluctuations at the fluid edge and the defect morphology of the cured coating have a complex nonlinear mapping relationship. Detection based solely on images after curing cannot obtain information on transient fluid behavior during the spreading process, resulting in insufficient ability to diagnose the root causes of defects such as "edge sagging" and "poor local wetting." Summary of the Invention
[0004] This invention provides a circuit board coating quality inspection method based on AI vision to solve at least one of the aforementioned problems in the prior art.
[0005] This invention provides a method for inspecting the coating quality of circuit boards based on AI vision, including: Acquire multi-time-series image data of the circuit board spraying process; Transient spreading features of sprayed droplets were extracted based on multi-temporal image data; By using a fluid spread graph neural network model, transient spread features are processed to extract implicit rheological features of the spraying process; Based on implicit rheological features and combined with images of the cured coating, a cross-stage quality retrospective model is constructed using AI vision. Generate differentiated quality evaluation results based on the cross-stage quality retrospective model; Based on the differentiated quality evaluation results, an inspection report on the circuit board coating quality and suggestions for correcting coating parameters are output.
[0006] Furthermore, the transient spreading characteristics include the temporal displacement field at the droplet edge and the velocity gradient field at the spreading front.
[0007] Furthermore, the transient spreading feature includes: The multi-scale spreading entropy characteristics are calculated based on the temporal displacement field at the droplet edge and the velocity gradient field at the spreading front.
[0008] Furthermore, the fluid spread graph neural network model divides the circuit board surface into multiple spread nodes, uses transient spread features as the initial features of the nodes, integrates surface energy distribution parameters to construct physical coupling edges between nodes, and extracts features through the message passing mechanism of fluid spread constraints.
[0009] Furthermore, the cross-stage quality backtracking model maps the spraying process features to the curing quality space through a temporal-spatial dual-dimensional feature alignment network, and outputs the root cause classification and spatial location distribution of coating defects.
[0010] Furthermore, the construction process of using AI vision to build a cross-stage quality retrospective model includes: Obtain the implicit rheological features extracted by the fluid spread map neural network model and the curing quality features of the cured coating image; The implicit rheological feature sequences at different times during the spraying process are input into a temporal alignment sub-network. A multi-head attention mechanism is used to calculate the attention weights at each time step. Based on these attention weights, the implicit rheological feature sequences are weighted and compressed to obtain a fixed-dimensional process representation vector. The formula for calculating the process representation vector satisfies... Among them, Z proc The process representation vector with fixed dimensions output by the temporal alignment network; T is the total number of temporal sampling points in the spraying process; a t Let be the attention weights calculated using a multi-head attention mechanism, corresponding to the t-th sampling time, and satisfy . ; Let i be the implicit rheological feature vector of the spread graph neural network model output at layer L, corresponding to the spread node i at the t-th sampling time. i is the index of the i-th spread node among multiple spread nodes, L is the total number of layers of the fluid spread graph neural network model, and t is the time-series sampling time number of the spraying process. The attention weights are calculated using a multi-head attention mechanism, and the calculation process satisfies the following set of formulas. Among them, head k Let Q be the output vector of the k-th attention head in the multi-head attention mechanism, where k = 1, 2, ..., h, and h is the total number of attention heads; kV is the query matrix corresponding to the k-th attention head, obtained by the implicit rheological feature sequence through the first linear projection transformation; K is the key matrix, obtained by the implicit rheological feature sequence through the second linear projection transformation, and all attention heads share the same key matrix; k The value matrix corresponding to the k-th attention head is obtained by the implicit rheological feature sequence through a third linear projection transformation; K T d represents the transpose of the key matrix K; k Let be the feature dimension of the k-th attention head, whose value is equal to the dimension of the implicit rheological feature vector divided by the total number of attention heads; Softmax(·) is the normalization exponential function, which transforms each row of the attention score matrix into a probability distribution; MultiHead(Q,K,V) is the output function of the multi-head attention mechanism; Q is the query matrix Q of each attention head. k The overall query matrix is formed by combining the values of each attention head; V is the value matrix of each attention head. k The total value matrix formed by combining; Concat(head1,…,head) h W is an operation that concatenates the output vectors of the first to h attention heads along the feature dimension. O The output projection matrix is the learnable model parameter in the multi-head attention mechanism, used to map the concatenated multi-head output vector to the target feature dimension. The process representation vector and the curing quality feature are input into a spatial alignment subnetwork, and pixel-level alignment is performed in the spatial dimension through deformable convolution to obtain the aligned fused features. The fused feature calculation formula satisfies... Among them, F fusion (p0) is the aligned fused feature vector output by the spatial alignment sub-network at the target position p0 on the output feature map; p0 is the target position coordinate on the output feature map; R is the sampling grid of the deformable convolution kernel; p n w(p) is the standard offset of the nth sampling point in the sampling grid; n ) is a deformable convolution kernel at sampling point p n The convolution weights at F; cured This is a curing quality feature map extracted from the cured coating image. This feature map contains semantic information about the edge contours, thickness distribution, and surface defect regions of the cured coating; Δp n The value obtained through learning corresponds to the sampling point p. n Spatial offset; Z proc The process representation vector of the time-aligned subnetwork output; ⊙ represents the element-wise multiplication operation; The aligned and fused feature vectors are input into the root cause classification network, which outputs the root cause classification results of coating defects. The aligned and fused feature vectors are input into the defect localization network, which outputs the spatial distribution of the defects.
[0011] Furthermore, the root cause classification network includes physical and logical rules for material failure mechanisms; The root cause classification results include surface energy mismatch defects, spraying parameter mismatch defects, fluid instability defects, and substrate contamination defects.
[0012] Furthermore, the generation of differentiated quality evaluation results includes: A multi-level quality evaluation graph structure is constructed, and the spatial distribution of defects output by the cross-stage quality backtracking model is spatially overlapped and matched with the multi-level quality evaluation graph structure. The method for constructing the multi-level quality evaluation graph structure includes: Extract the functional type of each region from the circuit board design documents. The functional type of each region includes at least a no-coating region, a high-reliability coating region, a normal coating region, and a thinning-tolerant region. The multi-level quality evaluation graph structure is constructed by using each functional area as an evaluation node and the spatial adjacency relationship between areas as an evaluation edge. The node attributes of each evaluation node include regional function type, regional area, and regional importance weight, among which the regional importance weight of the forbidden area is the highest and the regional importance weight of the tolerable thinning area is the lowest. The spatial distribution of the defects is spatially overlapped and matched with the multi-level quality evaluation map structure to calculate the coverage rate index and the severity index of various defects in each functional area.
[0013] Furthermore, the calculation steps for the spatial overlap matching include: The defect probability heatmap output by the defect localization network is overlaid pixel by pixel with the spatial region of each evaluation node in the multi-level quality evaluation graph structure to obtain the ratio of the defect coverage area to the total area of each functional region, which is used as the defect coverage rate index. Based on the defect root cause classification results, the severity weights of different types of defects are assigned. Among them, surface energy mismatch defects and substrate contamination defects are assigned the highest severity weights, fluid instability defects are assigned the second highest severity weights, and spraying parameter mismatch defects are assigned the standard severity weights. The defect severity index for each functional area is obtained by multiplying the defect coverage area of each functional area by the severity weight of the corresponding defect type and summing the results.
[0014] Furthermore, the node initial feature update process includes: A diffusion-weighted graph attention mechanism is introduced, which adaptively adjusts the allocation of attention weights according to the magnitude of the surface energy gradient between adjacent spreading nodes, so that the information transmission intensity between adjacent node pairs with larger surface energy gradients is greater than that between adjacent node pairs with smaller surface energy gradients.
[0015] Compared with the prior art, the present invention has at least one of the following technical effects: 1. This invention constructs a cross-stage quality backtracking model, aligning the transient fluid characteristics of the spraying process with the cured coating image in both temporal and spatial dimensions, establishing a reverse reasoning link from "process to result". This technical means enables the detection system not only to discover defects, but also to trace the cause of the defects, filling the gap in the existing technology of lacking a model that links the spraying process with the curing result.
[0016] 2. This invention utilizes the regularization term of a graph neural network to constrain the node feature update direction to conform to the actual spreading direction driven by the surface energy gradient. Compared with purely data-driven deep learning models, this physical constraint gives the extracted implicit rheological features clear physical interpretability—the direction of feature vector change directly reflects the actual spreading behavior of the coating fluid under the action of surface energy. This not only improves the accuracy of feature extraction but also makes the subsequent root cause classification results directly correspond to physical mechanisms such as material surface energy mismatch, enhancing the engineering guidance of the detection results.
[0017] 3. This invention extracts the functional types of restricted coating areas, high-reliability coating areas, ordinary coating areas, and tolerable thinning areas from the circuit board design documents, and constructs a multi-level quality evaluation map structure, setting differentiated evaluation thresholds and importance weights for different areas. This technical approach effectively solves the problems of "ignoring minor defects in critical areas" and "misjudging normal fluctuations in non-critical areas" caused by uniform thresholds, improving the detection rate of minor defects in large areas and reducing the misjudgment rate in high-density areas.
[0018] 4. This invention not only outputs quality inspection results, but also generates specific spraying parameter correction suggestions based on the root cause classification results through a preset root cause-parameter mapping rule library, and feeds them back to the spraying equipment control system through an industrial communication protocol. This closed-loop control mechanism transforms traditional manual experience-based parameter adjustment into data-driven automated parameter correction, shortens the response time from defect discovery to process adjustment, avoids batch recurrence of the same type of defect, and reduces the defect rate and rework cost of the spraying process.
[0019] 5. This invention designs a temporal alignment sub-network and a spatial alignment sub-network in the cross-stage quality backtracking model. The temporal alignment sub-network automatically learns the influence weights of each spreading moment on the final curing quality through a multi-head attention mechanism, enabling the model to focus on the key moments that have a decisive impact on defect formation. The spatial alignment sub-network learns spatial offsets through deformable convolutions to compensate for positional drift caused by fluid spreading during the spraying process. The synergistic effect of these two sub-networks solves the alignment problem between spraying process features and curing quality features in both temporal span and spatial deformation dimensions, providing a high-quality feature fusion foundation for cross-stage inference.
[0020] 6. This invention classifies the root causes of coating defects into four categories: surface energy mismatch defects, spraying parameter mismatch defects, fluid instability defects, and substrate contamination defects. Each type of defect directly corresponds to a specific process step and adjustment parameter—surface energy mismatch defects indicate the need to adjust the preheating temperature or surface treatment process; spraying parameter mismatch defects indicate the need to adjust the spraying pressure or nozzle movement speed; fluid instability defects indicate the need to adjust the coating fluid temperature or dilution ratio; and substrate contamination defects indicate the need to strengthen the pre-cleaning process. This refined root cause classification enables the detection results to directly guide process correction, avoiding the limitations of traditional detection methods that can only "find the problem" but cannot "locate the cause."
[0021] 7. This invention integrates multi-time-series image data of the spraying process, surface morphology data, and post-curing coating image data to comprehensively evaluate the spraying quality from three dimensions: "transient fluid behavior," "surface physical properties," and "final cured morphology." Compared with existing methods that rely solely on a single static image, multimodal data fusion provides more complete physical field information, enabling the model to distinguish between "normal thickness gradients caused by differences in substrate surface energy" and "abnormal thickness abrupt changes caused by mismatch in spraying parameters," thereby improving the accuracy and robustness of defect identification. Attached Figure Description
[0022] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0023] Figure 1 This is a flowchart illustrating a circuit board coating quality inspection method based on AI vision, provided in an embodiment of the present invention. Detailed Implementation
[0024] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.
[0025] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.
[0026] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.
[0027] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if detected [the described condition or event]" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once detected [the described condition or event]," or "in response to detection [the described condition or event]."
[0028] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0029] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.
[0030] See Figure 1This embodiment provides a method for inspecting the coating quality of circuit boards based on AI vision. In this embodiment, the method is executed by an industrial control system. This industrial control system includes a programmable logic controller (PLC), an embedded industrial computer, a distributed control system (DCS), or a system composed of servers, computers, and industrial fieldbus devices. Any device capable of executing the method disclosed in this application and achieving control of industrial equipment should fall within the protection scope of this application. Figure 1 A flowchart illustrating an AI vision-based circuit board coating quality inspection method according to an embodiment of the present invention is shown below: AI vision-based circuit board coating quality inspection methods include: S100: Acquire multi-time sequence image data of the circuit board spraying process; S200, Extracting transient spreading features of sprayed droplets based on multi-time series image data; S300: Using a fluid spread map neural network model, transient spread features are processed to extract implicit rheological features of the spraying process; S400, based on implicit rheological characteristics and combined with images of the cured coating, utilizes AI vision to construct a cross-stage quality retrospective model; S500. Generate differentiated quality evaluation results based on the cross-stage quality retrospective model; S600, based on the differentiated quality evaluation results, outputs a test report on the circuit board coating quality and suggestions for correcting coating parameters.
[0031] Specifically, before acquiring multi-time sequence image data of the circuit board spraying process, S100 includes the following steps: in the stage before the coating cures behind the spraying station, image sequences of the sprayed area on the circuit board surface are acquired, and the acquisition time is from the time when the droplets contact the circuit board surface to the time when the spread is basically stable.
[0032] S200. When extracting transient spreading features of sprayed droplets based on multi-temporal image data, the following steps are included: Preprocessing the acquired multi-temporal image data, including median filtering for noise reduction and feature point-based image registration. A 3×3 or 5×5 median filter kernel is used, which is a conventional empirical setting in image preprocessing. Those skilled in the art can choose according to the image noise level, and this embodiment will not elaborate further. The temporal displacement field of the droplet edge and the velocity gradient field of the spreading front are extracted using the inter-frame difference method and dense optical flow estimation algorithm. The temporal displacement field of the droplet edge represents the position change vector of each pixel on the droplet boundary at time t relative to the initial time; the velocity gradient field of the spreading front is obtained by calculating the time derivative and spatial derivative of the displacement field, describing the rate of velocity change at different positions on the spreading front. The transient spreading features also include multi-scale spreading entropy features. The calculation method of multi-scale spreading entropy features is as follows: multi-scale wavelet decomposition is performed on the time-series displacement field, the information entropy of the sub-band coefficients of each scale is extracted, and a multi-scale spreading entropy feature vector is constructed to characterize the complexity and stability of the droplet spreading process.
[0033] S300. Using a fluid spread map neural network model, the transient spread characteristics are processed to extract the implicit rheological features of the spraying process, including the following steps: The message passing and feature update of fluid spreading constraints are constructed, and a diffusion-weighted graph attention mechanism is further introduced during the node feature update process, including the construction of spreading nodes, the construction of physical coupling edges, the message passing and feature update of fluid spreading constraints, and the node feature update process. The construction of the spreading nodes involves discretizing the surface area of the circuit board into a uniform grid with a grid spacing of 0.2 mm. Each grid cell serves as a spreading node, resulting in a total of N nodes. The initial feature vector of each node has a dimension of 16, specifically including: local mean and variance of the temporal displacement field (2 dimensions each), amplitude and direction of the velocity gradient field (2 dimensions each), multi-scale spreading entropy features (6 dimensions), and height and roughness of the surface morphology (2 dimensions each). The feature size of minute defects in circuit board coating (such as edge fingering and poor local wetting) is typically between 0.1 mm and 0.5 mm. If the grid spacing is too large (e.g., above 1 mm), the spatial details of minute defects will be lost; if the grid spacing is too small (e.g., below 0.05 mm), the number of spreading nodes will increase quadratically, causing the computational complexity of the graph neural network to exceed the real-time processing capabilities of the edge device. A grid spacing of 0.2 mm strikes a balance between spatial resolution and computational efficiency in defect detection, ensuring the ability to capture defects larger than 0.1 mm while keeping the number of nodes per circuit board within a reasonable range.
[0034] Surface topography data is pre-collected using a structured light projection device before spraying, including the relative height and surface roughness parameters at various spatial locations. It should be noted that acquiring height and roughness using structured light projection is a mature technology in this field (such as commercial sensors from Keyence and LMI), and its specific parameters (resolution, acquisition angle) fall within the scope of equipment selection, which will not be described in detail in this embodiment.
[0035] Constructing physical coupling edges involves obtaining the material type and corresponding surface energy parameters for each region on the circuit board surface. Surface energy parameters are obtained by consulting a material database, including the surface energy of copper pads, solder resist ink, and gold-plated leads. For adjacent layup nodes and the j-th adjacent layup node, if their spatial distance is less than 0.4 mm, a physical coupling edge is established. The physical constraint parameters of the edge are a 4-dimensional vector, including: surface energy gradient, node distance, and substrate type identifier (2-dimensional one-hot encoded).
[0036] The message passing and feature update of fluid spreading constraints involve a graph neural network with a total of L=4 layers. The message passing and node update process of each layer is as follows: The message passing function is implemented using a two-layer multilayer perceptron. The input is a concatenated vector of source node features, target node features, and physical constraint parameters (16+16+4=36 dimensions in total). The hidden layer has a dimension of 32, and the output message vector has a dimension of 16.
[0037] The message aggregation uses a summation aggregation method.
[0038] The node feature update function uses a gated loop unit to fuse the current node features with the aggregated message and output the updated node features.
[0039] During the node feature update process, a fluid spreading regularization term is introduced, specifically in the form of: R fluid (h i ,h j ,c ij )=‖(h i -h j )-α·▽γ ij ||² Among them, R fluid (h i ,h j ,c ij ) represents the fluid spreading regularization term, used to constrain the nodal characteristic differences between spreading node i and spreading node j to maintain consistency with the surface energy gradient direction; h i To unfold the node feature vector of node i in the current graph neural network layer; h j Let c be the node feature vector of the unfolded node j in the current graph neural network layer, where the unfolded node j is the neighboring unfolded node of the unfolded node i;ij γ is the physical constraint parameter vector of the physical coupling edge between tiling node i and tiling node j; ij α is the surface energy gradient component in the physical constraint parameters, i.e., the ratio of the difference in surface energy between the locations of spreading nodes i and j to the distance between the nodes; α is a preset spreading scaling factor used to scale the surface energy gradient component to an order of magnitude comparable to the difference in the node feature vectors; in this embodiment, α = 0.1; where, the physical meaning of this fluid spreading regularization term is that the implicit rheological features extracted by the constraint graph neural network conform to the actual spreading law of the coating fluid on the circuit board surface. According to Tanner's spreading law, the spreading speed of the coating fluid on the solid surface is proportional to the surface energy gradient, that is, the greater the difference in surface energy between adjacent regions, the more obvious the spreading trend of the fluid from the low surface energy region to the high surface energy region. In the fluid spreading regularization, (h i -h j Let be the feature difference vector between adjacent spreading nodes learned by the graph neural network. It can be understood as the model's internal representation of the fluid spreading intensity and direction between two nodes. By minimizing this regularization term, the feature difference direction learned by the model is forced to be consistent with the physical surface energy gradient direction, so that the implicit rheological features extracted by the neural network have clear physical interpretability—that is, the direction of change of the feature vector reflects the actual spreading direction of the coating fluid driven by surface energy.
[0040] In the fluid spreading regularization term, α is used to scale the surface energy gradient (in mN / m) to an order of magnitude comparable to the dimensionless value of the node feature vector difference (after mapping by the graph neural network). The surface energy gradient is 5-20 mN / m, and the typical value of the node feature difference after training is approximately 0 to 1. Setting α=0.1 ensures that the two parts of the regularization term are numerically similar, which is beneficial for the stable optimization of the loss function. The regularization term is added to the node feature update in a weighted manner, with a regularization coefficient λ=0.05. Those skilled in the art can determine this through conventional parameter tuning. The total loss function L... total =L pred +0.05·L phys ; The fluid spreading regularization term ensures that the implicit rheological features extracted by the constraint graph neural network conform to Tanner's spreading law. The regularization coefficient λ controls the contribution ratio of physical constraints to the total loss function. An excessively large λ value leads to over-reliance on physical priors, reducing the model's ability to fit actual observation data; an excessively small value renders the physical constraints ineffective. A value of 0.05 was determined through grid search experiments on the validation set. At this value, the model maintains accurate extraction of spraying process features (prediction loss does not increase significantly) while ensuring physical consistency between the node feature update direction and the surface energy gradient (physical consistency loss is reduced to a reasonable level).
[0041] The node feature update process further introduces a diffusion-weighted graph attention mechanism, which modulates the attention weights based on the magnitude of the surface energy gradient when calculating the attention weights between adjacent nodes. The modulation factor is exp(β·‖▽γ). ij The modulation factor β controls the amplification of the attention weight by the surface energy gradient in the diffusion-weighted graph attention mechanism. A value of β=0.5 results in the attention weight of adjacent node pairs with larger surface energy gradients (such as the interface between solder pads and solder resist ink) being approximately 1.6 to 2 times that of adjacent node pairs with smaller surface energy gradients (such as adjacent nodes within a large area of solder resist ink). This multiple range matches the difference in the spreading speed of the coating fluid under different surface energy gradients. If β is too large, the model may overemphasize a few high-gradient boundaries while ignoring the spreading information of large areas.
[0042] After processing through L=4 layers, the node features of the last layer are taken as the implicit rheological features of the unfolded node, with a dimension of 16. For each sampling time t, the above graph neural network forward propagation is performed to obtain the implicit rheological feature sequence. Where L is the total number of layers in the fluid spread graph neural network model, and in this embodiment, L=4; The implicit rheological feature vector corresponding to the spreading node i is output by the Lth layer of the fluid spread graph neural network model, and its dimension is 16. The implicit rheological feature vector of the spread graph neural network model at layer L, corresponding to the spread node i at sampling time t. This is a temporal feature sequence composed of the implicit rheological feature vectors of spreading node i from the first sampling time to the Tth sampling time; t is the temporal sampling time number of the spraying process, t=1,2,…,T; T is the total number of temporal sampling points in the spraying process; i is the index of the spreading node, i=1,2,…,N, where N is the total number of spreading nodes divided on the circuit board surface; the physical meaning of this implicit rheological feature sequence is that it records the complete evolution process of each spreading node during the spraying process from droplet contact surface (t=1) to basic spreading stability (t=T). This is a compressed representation of the fluid state at node i at time t, obtained through L-layer feature extraction by a fluid spread graph neural network. From a physical perspective, this sequence encodes the following key information: features in the early spreading stage (smaller t) mainly reflect droplet collision momentum and initial wetting behavior; features in the middle spreading stage (medium t) reflect the fluid migration process driven by the surface energy gradient; and features in the late spreading stage (t close to T) reflect edge stability and the final spreading morphology. This sequence provides complete temporal process information for subsequent cross-stage quality backtracking, enabling the model to infer the causes of the final solidification defects from the process features.
[0043] Specifically, S400, based on implicit rheological features and combined with images of the cured coating, utilizes AI vision to construct a cross-stage quality retrospective model, including the following steps: obtaining the curing quality features of the cured coating image, constructing a temporal alignment sub-network, constructing a spatial alignment sub-network, and root cause classification and defect localization. Obtaining the curing quality features of the cured coating image includes acquiring an image of the coating surface after the circuit board coating has fully cured. The coating surface image is input into a pre-trained semantic segmentation network (using the DeepLabV3+ architecture, with ResNet-50 as the backbone network; both DeepLabV3+ and ResNet-50 are publicly available classic deep learning model architectures, and their specific structures and training methods are common knowledge in the field. In this embodiment, this mature model is directly used as the curing quality feature extractor, without needing to explain its internal parameters one by one). Semantic feature maps of the edge contours, thickness distribution, and surface defect regions of the cured coating are extracted. The feature map size is 240×135. The original resolution of the cured coating image is 3840×2160, which is downsampled by the DeepLabV3+ backbone network (output stride 16) to obtain a 240×135 feature map. This size is the standard output size obtained by dividing the input resolution by 16, an inherent property of this model architecture, requiring no further explanation; the number of channels is 64.
[0044] The temporal alignment sub-network is constructed using a Transformer encoder structure. The implicit rheological feature sequences at different times during the spraying process are first subjected to global average pooling to obtain the global feature vector (dimension 16) at each time step, which constitutes the temporal input sequence with a length of T=300. The spraying process, from droplet contact with the surface to near-steady spreading, takes 1.5 seconds (the time required for conformal coating droplets to reach a quasi-steady state on the circuit board surface (including pads, solder resist ink, and other materials) is approximately 1 to 2 seconds. This 1.5-second acquisition duration covers the complete process of droplet contact (t=0), rapid spreading (t=0.1 to 0.8 seconds), edge relaxation, and stabilization (t=0.8 to 1.5 seconds), ensuring the timing alignment sub-network can acquire the timing context information for the entire spreading cycle). The acquisition frame rate is 200fps (the spreading process of sprayed droplets on the circuit board surface is a rapid transient behavior. Based on the typical timescale of droplet spreading in fluid mechanics (milliseconds to seconds), the characteristic change time of key spreading stages (such as initial collision and rapid spreading) is considered). The frame interval is approximately 5ms to 50ms. A frame rate of 200fps corresponds to a 5ms frame interval, which can fully capture the dynamic changes of the spreading front. If the frame rate is too low (e.g., 60fps), detailed features of the rapid spreading phase will be lost; if the frame rate is too high (e.g., above 500fps), the amount of image data and processing burden will increase dramatically, while the effective information gain will be limited. 200fps is a commonly used frame rate chosen after balancing detection accuracy and computational overhead, so the total number of frames is 1.5 × 200 = 300 frames. This value can fully cover all stages of the spreading process—including the initial collision stage (the first 30 frames), the rapid spreading stage (approximately 30 to 150 frames), and the edge stabilization stage (approximately 150 to 300 frames), providing sufficient temporal context information for the temporal alignment sub-network.
[0045] The temporal alignment subnetwork comprises four Transformer encoder layers, each employing a multi-head attention mechanism with four attention heads (h=4). Each attention head has a feature dimension of 4, where the node feature vector after global pooling has a 16-dimensional dimension (16 dimensions is a suitable dimension chosen after feature engineering. Too low a dimension (e.g., 8 dimensions) is insufficient to fully represent transient spread features and surface morphology information; too high a dimension (e.g., 32 or 64 dimensions) increases the number of model parameters and the risk of overfitting, without significantly improving the final detection accuracy. 16 dimensions represent a balance between model expressiveness and computational efficiency). This configuration is a common design paradigm for Transformer structures—a smaller feature dimension helps each head focus on different feature subspaces, the four heads can be computed in parallel, and the total number of parameters is moderate, suitable for the inference computing power of edge devices. Sine positional encoding is used. The encoder output is the context representation vector at each time step, which is then processed by a fully connected layer and a Softmax function to calculate the attention weights at each time step.
[0046] The process representation vector is obtained through a weighted summation method, and its process representation vector satisfies Among them, Z proc The process representation vector output by the temporally aligned sub-network has a fixed feature dimension and is used to comprehensively represent the transient fluid spreading information of the entire spraying process; T is the total number of temporal sampling points in the spraying process; a t Let be the attention weights corresponding to the t-th sampling time, calculated using a multi-head attention mechanism. ; The global implicit rheological feature vector, corresponding to the t-th sampling time, is the output of the fluid spread graph neural network model at layer L. This global implicit rheological feature vector is derived from the node implicit rheological features output by each spread node on the circuit board surface at layer L. It is obtained through global average pooling; where the physical meaning of this process representation vector is that it is a weighted and compressed global implicit rheological features at each moment during the spraying process into a fixed-dimensional process representation vector Z. proc Among them, the attention weight a t Automatically learned through a multi-head attention mechanism, this reflects the degree of influence of different spreading moments on the final curing quality. From a physical perspective, different stages of the spraying process contribute differently to the final coating defects: for example, fluctuations in the initial droplet collision stage may cause splatter defects, while edge instability in the later spreading stages may cause fingering defects. Attention weight 'a' t Automatic learning enables the model to focus on critical moments that have a decisive impact on defect formation, while suppressing noise interference from irrelevant moments. The process representation vector Z obtained after weighted summation is... proc It integrates transient fluid behavior information throughout the entire spraying process, providing a compact and informative input for cross-stage alignment with curing quality characteristics.
[0047] It is understandable that the specific calculation methods of the Transformer encoder and multi-head attention mechanism mentioned above are common knowledge in the field, and will not be described in detail here.
[0048] The spatial alignment sub-network is constructed using a deformable convolutional structure. The process representation vector is mapped to a 64-dimensional channel modulation vector through a fully connected layer, matching the number of channels in the solidified quality feature map. The deformable convolutional layer has a 3×3 kernel size and a sampling grid containing 9 sampling points. The standard offset is preset to {(-1,-1),(-1,0),…,(1,1)}. The spatial offset is learned by an additional convolutional layer with input [value] and output channels of 18 (corresponding to the x and y offsets of the 9 sampling points).
[0049] The calculation method for the fused feature vector is as follows: For each target location on the output feature map, the process representation vector, after being normalized by the Sigmoid function, is used as the channel weight, and then multiplied element-wise with the feature values obtained from deformable convolution sampling. The fused feature vector satisfies the following condition. Among them, F fusion (p0) is the aligned fused feature vector output by the spatial alignment sub-network at the target position p0 on the output feature map; p0 is the target position coordinate on the output feature map, represented by two-dimensional spatial coordinates (x, y); R is the sampling grid of the deformable convolution kernel, defined as the set of coordinate offsets of each sampling point in the standard convolution kernel relative to the center position; p n w(p) is the standard offset of the nth sampling point in the sampling grid R; n ) is a deformable convolution kernel at sampling point p n The convolution weight parameters at F are the learnable model parameters in the spatially aligned subnetwork; cured This is a curing quality feature map extracted from the cured coating image. This feature map contains semantic information about the edge contours, thickness distribution, and surface defect regions of the cured coating; Δp n The value obtained through learning corresponds to the sampling point p. n The spatial offset is used to dynamically adjust the sampling position of the convolution kernel to adapt to the spatial position drift caused by fluid spreading during the spraying process; Z proc Z is the process representation vector output by the time-aligned sub-network. This vector has a fixed feature dimension and is used to comprehensively represent the transient fluid spreading information of the entire spraying process; σ(·) is the Sigmoid function, used to transform the process representation vector Z proc Each component is mapped to the (0,1) interval as a channel weight coefficient; ⊙ represents element-wise multiplication, used to multiply the channel weight coefficients normalized by the Sigmoid function with the curing quality feature value obtained by deformable convolution sampling channel by channel; The physical meaning of this fused feature vector is that it achieves physical alignment and information fusion of the spraying process features and curing quality features in the spatial dimension. Due to the positional drift of the fluid during spraying—droplets may undergo overall translation or rotation during spreading due to uneven surface energy distribution—the physical points corresponding to the same spatial location in the process image and the curing image may be offset. The spatial offset Δp in the formula... n This is automatically learned by the network and used to compensate for this physical drift, ensuring that the process characterization vector and the solidification quality characteristics are fused in the correct spatial location. σ(Z) in the formula... procThe process representation vector is mapped to channel modulation weights, which physically means that the spraying process features selectively enhance or suppress the channel responses in the cured quality feature map in a "gated" manner. For example, for defects caused by surface energy mismatch, the component in the process representation vector related to this physical mechanism will activate the corresponding channel weights, making the model pay more attention to the texture features in the cured image related to surface energy anomalies. The final output fused feature F fusion It contains information on both "process causes" and "solidified results," providing a complete physical causal chain to support subsequent root cause classification and defect localization.
[0050] It is understandable that the specific implementation of deformable convolution can be found in existing literature, which is a conventional technique in this field, and will not be described in detail here.
[0051] Root cause classification and defect localization involve inputting fused features into a root cause classification network and a defect localization network. The two networks share the fused features but use different output heads.
[0052] The root cause classification network consists of two fully connected layers (dimensions 64→32→4, where the input fused features of the root cause classification network are 64-dimensional, reduced to 32-dimensional in the first layer, and reduced to 4-dimensional in the second layer, corresponding to 4 classes. Layer-by-layer reduction is a conventional design for classification networks, controlling the number of parameters while ensuring nonlinear expressive power) and a Softmax classifier, outputting the probability distribution of the 4 root cause classification results. The root cause classification network incorporates physical logic rules for material failure mechanisms, which are embedded in the weight initialization of the last layer of the classification network in the form of a decision tree, ensuring that the classification results meet the physical distinguishing conditions of the four categories: surface energy mismatch defects, spraying parameter mismatch defects, fluid instability defects, and substrate contamination defects.
[0053] For example, the decision tree rules are as follows: (1) If the spatial distribution of defects is concentrated in the interface area of different material types, and the surface energy gradient corresponding to the interface area exceeds the preset surface energy gradient threshold, then the root cause classification result of the coating defect is determined to be a surface energy mismatch type defect. (2) If the spatial distribution of defects is uniformly distributed over a large area, and the defect coverage index exceeds the preset coverage threshold, and the attention weight in the process characterization vector corresponding to the middle stage of spreading is lower than the preset middle stage of spreading weight threshold, then the root cause classification result of the coating defect is determined to be a spraying parameter mismatch defect. (3) If the edge of the spatial distribution of the defect presents an irregular finger-like or sawtooth shape, and the multi-scale spreading entropy feature exceeds the preset entropy threshold, and the attention weight in the process characterization vector corresponding to the later spreading stage is higher than the preset later spreading stage weight threshold, then the root cause classification result of the coating defect is determined to be a fluid instability defect. (4) If the spatial distribution of the defect coincides with the local low wetting area in the curing quality feature diagram, and the roughness parameter in the surface morphology data of the corresponding position is not abnormal, and the substrate type in the physical constraint parameter is identified as a non-high surface energy material, then the root cause classification result of the coating defect is determined to be a substrate contamination type defect.
[0054] The aforementioned preset thresholds (including surface energy gradient threshold, coverage threshold, mid-spreading weight threshold, entropy threshold, and late-spreading weight threshold) can be determined based on actual production process requirements and historical testing data statistics. This embodiment does not impose specific limitations on these thresholds.
[0055] The defect localization network adopts a feature pyramid network structure, performs multi-scale upsampling on the fused features, and outputs a defect probability heatmap with the same resolution as the input image.
[0056] Among them, S500, generating differentiated quality evaluation results based on the cross-stage quality backtracking model includes the following steps: constructing a multi-level quality evaluation graph structure, spatial overlap matching and index calculation, and differentiated quality evaluation; Constructing a multi-level quality evaluation map structure involves reading the circuit board design file (using Gerber or ODB++ format), parsing the layer definitions and region boundary information in the design file, and extracting the region function type of each region. Specific parsing rules are as follows: gold finger pad areas are identified and marked as no-coating areas; the bottom of BGA chips and high-density pin areas are identified and marked as high-reliability coating areas; large areas of blank substrate are identified and marked as ordinary coating areas; and areas surrounding non-critical components are identified and marked as tolerable thinning areas.
[0057] Using functional areas as evaluation nodes and spatial adjacency relationships between areas as evaluation edges, an undirected graph structure is constructed. The node attributes of each evaluation node include: area function type (4 types of one-hot encoding), area area (normalized value), and area importance weight. The preset area importance weights are: 1.0 for restricted areas, 0.8 for high-reliability coated areas, 0.5 for ordinary coated areas, and 0.2 for tolerable thinning areas. The area importance weights are set according to the degree of influence of each functional area on the final reliability of the circuit board: A weight of 1.0 for restricted areas (such as gold fingers and connector holes) is given because coating intrusion directly leads to poor electrical contact or signal transmission failure, which is a fatal defect. A weight of 0.8 for high-reliability coated areas is given because insufficient coating coverage in areas such as high-density pin areas and the bottom of BGA chips may lead to salt spray corrosion and electrochemical migration, affecting long-term reliability. A weight of 0.5 for ordinary coated areas is given because the coating in large areas of blank substrate mainly serves as moisture protection and insulation, allowing for slight thickness fluctuations. The tolerable thinning area weight of 0.2 is assigned to areas surrounding non-critical components where the coating thickness is more tolerant, thus giving them a lower weight. This weight allocation conforms to the differentiated requirements for coating quality in different areas as specified in IPC-CC-830B (Conformal Coating Standard) and IPC-A-610 (Acceptability Standard for Electronic Components).
[0058] Spatial overlap matching and index calculation involve performing pixel-by-pixel overlap calculations between the defect probability heatmap output by the defect localization network and the spatial regions of each evaluation node in the multi-level quality evaluation map structure. For each evaluation node, the number of pixels with a value greater than 0.5 in the heatmap is counted, and the ratio of this value to the total number of pixels in that region is calculated as the defect coverage index.
[0059] Based on the defect root cause classification results, a severity weight is assigned to different types of defects. The preset weights are: surface energy mismatch defects 1.0, substrate contamination defects 1.0, fluid instability defects 0.7, and spraying parameter mismatch defects 0.5. The severity weights are determined according to the actual impact of each type of defect on the coating's protective function. Surface energy mismatch defects, weighted 1.0, are caused by uneven coating thickness or edge recession due to differences in the surface energy of the substrate material. These defects result in weak local protection and are a major cause of thermal cycling failure and salt spray corrosion, thus receiving the highest severity rating. Substrate contamination defects, weighted 1.0, are caused by residual contaminants on the surface, leading to poor local wetting and directly creating blind spots in protection. Their severity is comparable to surface energy mismatch defects. Fluid instability defects, weighted 0.7, affect aesthetics and local thickness uniformity, but usually do not completely expose the substrate, so the protective function remains, and their harm is slightly lower than the previous two types. Spraying parameter mismatch defects, weighted 0.5, can be quickly eliminated by adjusting parameters and usually manifest as slight thinning over a large area rather than complete loss, making their harm relatively controllable.
[0060] The calculation of the defect severity index for each functional area includes: multiplying the coverage area of each type of defect detected within the area by its respective severity weight, summing the results, and then multiplying by the area's regional importance weight to obtain the comprehensive defect severity index for that area. This calculation method reflects the differentiated assessment logic of the impact of different functional areas and different defect types on the final reliability of the circuit board. Coating intrusion into restricted areas (such as gold fingers) can cause fatal electrical contact failures, therefore it is assigned the highest regional and defect weights; slight thickness deviations in tolerable thinning areas have negligible functional impact, therefore they are assigned lower weights. By weighting and combining the "spatial importance" (regional weight) and "hazardousness" (type weight) of defects, the generated defect severity index can more accurately reflect the actual quality risk of the circuit board. It is understood that those skilled in the art, after reading this, will clearly understand the calculation order of first weighting and summing the defect types, and then weighting and correcting the regional importance, and can complete the quantitative calculation of this index without creative effort.
[0061] Differential quality evaluation involves comparing the defect severity index of each region with preset thresholds for the corresponding functional type of the region. These preset thresholds are as follows: 0.01 for the no-coating zone, 0.05 for the high-reliability coating zone, 0.15 for the normal coating zone, and 0.30 for the tolerable thinning zone. If the threshold is exceeded, the region is considered unqualified; if it is close to the threshold (greater than 80% of the threshold), it is considered marginally acceptable and requires attention; otherwise, it is considered acceptable. The thresholds for each region are set according to their functional requirements and tolerance for defects: the no-coating zone threshold of 0.01 indicates that the no-coating zone requires absolutely no coating intrusion, but due to the ±1 pixel positioning error in pixel-level detection, setting it to 0.01 (i.e., 1% exceeding the limit) balances the stringency of detection with tolerance for minor positioning errors. The high-reliability coating zone threshold of 0.05 refers to the IPC-CC-830B requirements for the integrity of coating coverage in critical areas, allowing minor defects of no more than 5% of the area. The threshold of 0.15 for the general coating area is based on the coating quality standards of general industrial electronic products, and area defects within 15% are considered not to affect the overall protective performance. The threshold of 0.30 for the tolerable thinning area is the highest tolerance for defects in this area, and the 30% threshold can avoid misjudgment and production line shutdowns caused by excessive stringency.
[0062] S600, based on the differentiated quality evaluation results, outputs a circuit board coating quality inspection report and coating parameter correction suggestions, including the following steps: inspection report generation, coating parameter correction suggestion generation, instruction issuance and execution; Inspection report generation. Summarize the quality evaluation results of each functional area and generate an inspection report in JSON format. The report includes: overall pass / fail determination (if any area fails, the whole system fails), heat map of defect distribution in each functional area (embedded as a Base64 encoded image), defect root cause classification statistics (area percentage of each type of defect), and defect severity index for each area.
[0063] Spraying parameter correction suggestions are generated. When the quality evaluation result is unqualified or marginally qualified, spraying parameter correction suggestions are output based on the root cause classification results and a pre-defined root cause-parameter mapping rule library. The mapping rule library is stored in the form of IF-THEN rules, and the rules include: If the root cause is classified as a surface energy mismatch defect, then it is recommended to adjust the preheating temperature by +5°C. If the root cause is classified as a spraying parameter mismatch defect, then it is recommended to adjust the spraying pressure by an amount equal to the current value multiplied by 0.9. If the root cause is classified as a fluid instability defect, then it is recommended to adjust the coating fluid temperature by +3°C. The IF root cause classification is a substrate contamination type defect. THEN recommends strengthening the pre-cleaning process.
[0064] Command Issuance and Execution. The inspection report and correction suggestions are sent to the spraying equipment control system via the industrial Ethernet interface using the OPCUA communication protocol. The spraying equipment control system parses the parameter correction commands in the OPCUA data packet and automatically adjusts parameters such as spraying pressure, nozzle movement speed, and preheating temperature. The specific implementation of the communication interface includes: pre-configured OPCUA server address, a node ID mapping table (mapping parameter names to device register addresses), and a security policy using Basic256Sha256. After successful command issuance, the system returns a confirmation response, completing the closed-loop feedback.
[0065] Transient spreading characteristics include the temporal displacement field at the droplet edge and the velocity gradient field at the spreading front.
[0066] Transient spreading characteristics include: Multi-scale spreading entropy features are calculated based on the temporal displacement field at the droplet edge and the velocity gradient field at the spreading front.
[0067] The fluid spread graph neural network model divides the circuit board surface into multiple spread nodes, uses transient spread features as the initial features of the nodes, integrates surface energy distribution parameters to construct physical coupling edges between nodes, and extracts features through the message passing mechanism of fluid spread constraints.
[0068] It should be noted that physical coupling edges are edge structures connecting adjacent spreading nodes. Their physical significance lies in encoding the driving effect of surface energy differences between adjacent physical elements on fluid spreading behavior. According to Tanner's spreading law, the spreading speed of the coating fluid on a solid surface is proportional to the surface energy gradient. The physical constraint parameters carried by the physical coupling edges (including surface energy gradient, inter-node distance, and substrate type identifier) quantify this physical law—the greater the surface energy gradient, the stronger the driving force for fluid spreading from low surface energy regions to high surface energy regions. In the message transmission process of the fluid spreading graph neural network, the physical coupling edges modulate the information transmission intensity between adjacent nodes in the form of physical constraints, so that the direction and intensity of feature propagation conform to the actual physical spreading law of the coating fluid on the circuit board surface.
[0069] The cross-stage quality backtracking model maps the spraying process features to the curing quality space through a temporal-spatial dual-dimensional feature alignment network, and outputs the root cause classification and spatial location distribution of coating defects.
[0070] The process of building a cross-stage quality retrospective model using AI vision includes: Obtain implicit rheological features extracted from the fluid spread map neural network model and curing quality features from the cured coating image; The implicit rheological feature sequences at different times during the spraying process are input into a temporal alignment sub-network. A multi-head attention mechanism is used to calculate the attention weights at each time step. Based on these attention weights, the implicit rheological feature sequences are weighted and compressed to obtain a fixed-dimensional process representation vector. The formula for calculating the process representation vector satisfies... Among them, Z proc The process representation vector with fixed dimensions output by the temporal alignment network; T is the total number of temporal sampling points in the spraying process; a t Let be the attention weights corresponding to the t-th sampling time, calculated using a multi-head attention mechanism. ; Let i be the implicit rheological feature vector of the spread graph neural network model output at layer L, corresponding to the spread node i at the t-th sampling time. i is the index of the i-th spread node among multiple spread nodes, L is the total number of layers of the fluid spread graph neural network model, and t is the time-series sampling time number of the spraying process. Attention weights are calculated using a multi-head attention mechanism, and the calculation process satisfies the following set of formulas. Among them, head k Let Q be the output vector of the k-th attention head in the multi-head attention mechanism, where k = 1, 2, ..., h, and h is the total number of attention heads; k V is the query matrix corresponding to the k-th attention head, obtained by the implicit rheological feature sequence through the first linear projection transformation; K is the key matrix, obtained by the implicit rheological feature sequence through the second linear projection transformation, and all attention heads share the same key matrix; k The value matrix corresponding to the k-th attention head is obtained by the implicit rheological feature sequence through a third linear projection transformation; K T d represents the transpose of the key matrix K; k Let be the feature dimension of the k-th attention head, whose value is equal to the dimension of the implicit rheological feature vector divided by the total number of attention heads; Softmax(·) is the normalization exponential function, which transforms each row of the attention score matrix into a probability distribution; MultiHead(Q,K,V) is the output function of the multi-head attention mechanism; Q is the query matrix Q of each attention head. k The overall query matrix is formed by combining the values of each attention head; V is the value matrix of each attention head. k The total value matrix formed by combining; Concat(head1,…,head) h W is an operation that concatenates the output vectors of the first to h attention heads along the feature dimension. OThe output projection matrix is the learnable model parameter in the multi-head attention mechanism, used to map the concatenated multi-head output vector to the target feature dimension. The process representation vector and the solidification quality feature are input into a spatial alignment subnetwork. Pixel-level alignment is then performed in the spatial dimension using deformable convolution to obtain the aligned fused features. The fused feature calculation formula satisfies: Among them, F fusion (p0) is the aligned fused feature vector output by the spatial alignment sub-network at the target position p0 on the output feature map; p0 is the target position coordinate on the output feature map; R is the sampling grid of the deformable convolution kernel; p n w(p) is the standard offset of the nth sampling point in the sampling grid; n ) is a deformable convolution kernel at sampling point p n The convolution weights at F; cured This is a curing quality feature map extracted from the cured coating image. This feature map contains semantic information about the edge contours, thickness distribution, and surface defect regions of the cured coating; Δp n The value obtained through learning corresponds to the sampling point p. n Spatial offset; Z proc is the process representation vector of the temporally aligned subnetwork output; ⊙ represents the element-wise multiplication operation.
[0071] The aligned and fused feature vectors are input into the root cause classification network, which outputs the root cause classification results of coating defects.
[0072] The aligned and fused feature vectors are input into the defect localization network, which outputs the spatial distribution of the defects.
[0073] Root cause classification networks include the physical and logical rules governing material failure mechanisms.
[0074] The root cause classification results include surface energy mismatch defects, spraying parameter mismatch defects, fluid instability defects, and substrate contamination defects.
[0075] Specifically, the training process of the fluid spread graph neural network model includes: Multi-time-series image data of the spraying process of 200 circuit boards and corresponding post-curing coating images were collected. The root cause type and defect location mask for each circuit board were manually labeled. The dataset was divided into training, validation, and test sets in a 7:2:1 ratio. In the first stage, a fluid spread graph neural network model was trained separately. The loss function included: node feature prediction task loss (mean squared error, the difference between the predicted node features and the actual values at the next time step) and physical consistency loss (the mean of the fluid spread regularization term). The optimizer used was Adam, with an initial learning rate of 0.001, and 100 training epochs (the first 100 epochs were determined based on the validation set loss curve observation—after about 80 epochs, the validation loss tended to stabilize, and another 20 epochs were added to ensure sufficient convergence without overfitting. The second 80 epochs were also based on the early stopping strategy on the validation set to prevent overfitting of the newly added network modules). In the second stage, the parameters of the fluid spread graph neural network model were frozen, and the temporal alignment sub-network, spatial alignment sub-network, root cause classification network, and defect localization network of the cross-stage quality backtracking model were trained. The total loss function is a weighted sum of the root cause classification cross-entropy loss and the defect localization Dice loss, with weights of 0.3 and 0.7, respectively. The defect localization task, due to its higher spatial accuracy requirements and greater training difficulty, is given a higher weight of 0.7, which helps the model focus more on learning the accurate spatial distribution of defects during training. The root cause classification task is relatively easy to converge, and a weight of 0.3 is sufficient to achieve satisfactory classification accuracy. This weighting ratio was determined through ablation experiments on the validation set, ensuring that the evaluation metrics for both tasks reach optimal levels.
[0076] Specifically, the optimizer used is Adam, which combines momentum and adaptive learning rate. It is widely used in training graph neural networks and Transformer structures and is a standard technique in this field. Its algorithm details are common knowledge and do not require further explanation.
[0077] The initial learning rate was preset to 0.0005, and training lasted for 80 epochs. During the second training phase, the parameters of the fluid spreading graph neural network model were frozen, and only the temporal alignment, spatial alignment, classification, and localization networks were trained. Since the input features were relatively stable at this point, using a lower initial learning rate of 0.0005 avoided compromising the effectiveness of the extracted implicit rheological features while ensuring smooth convergence of newly added network modules. For model deployment, the trained model was converted to ONNX format, inference was accelerated using TensorRT, and the model was run on an NVIDIA Jetson AGX Orin edge computing unit. The initial learning rate of 0.001 was used for training the fluid spreading graph neural network model using the Adam optimizer; 0.001 is the standard recommended initial learning rate for the Adam optimizer in similar graph neural network tasks. This learning rate ensures fast convergence in the early stages of training without causing instability due to excessive gradients. On the validation set, the loss function stabilized after 100 epochs of training, and no overfitting was observed.
[0078] The generated differentiated quality assessment results include: Construct a multi-level quality evaluation graph structure and spatially overlap and match the spatial location distribution of defects output by the cross-stage quality backtracking model with the multi-level quality evaluation graph structure. Methods for constructing multi-level quality assessment graph structures include: Extract the functional type of each area from the circuit board design documents. The functional type of each area should include at least the restricted coating area, the high reliability coating area, the normal coating area, and the thinning tolerance area. Using each functional area as an evaluation node and the spatial adjacency between areas as evaluation edges, a multi-level quality evaluation graph structure is constructed. The node attributes of each evaluation node include regional function type, regional area, and regional importance weight, among which the regional importance weight of the forbidden area is the highest and the regional importance weight of the tolerable thinning area is the lowest. The spatial distribution of defects is spatially overlapped and matched with the structure of the multi-level quality evaluation map to calculate the coverage rate index and the severity index of various types of defects in each functional area.
[0079] In another embodiment, for circuit boards where complete design files are unavailable (e.g., missing Gerber files), an image-based region function type identification method is employed. Using template matching technology, the feature contours of key components such as solder pads, gold fingers, and BGA chips are identified in the cured coating image, and the region function type is automatically classified based on a preset template library. The template library contains standard CAD contour graphics of common components, and the matching similarity threshold is set to 0.85. The similarity threshold of 0.85 is a commonly used empirical threshold in the field of image template matching—above this threshold, the matched region is confirmed to be highly similar to the standard components in the template library, and the identification confidence level is acceptable; below this threshold, it indicates that the region may be an irregular shape or a non-standard component, and it is not forcibly classified, but instead a conservative processing strategy (such as marking it as a normal coating area) is adopted. The value of 0.85 strikes a balance between recognition accuracy and recall, and the false recognition rate is tested to be less than 5%.
[0080] The calculation steps for spatial overlap matching include: The defect probability heatmap output by the defect localization network is overlaid pixel by pixel with the spatial region of each evaluation node in the multi-level quality evaluation graph structure to obtain the ratio of the defect coverage area to the total area of each functional region, which is used as the defect coverage rate index. Based on the defect root cause classification results, the severity weights of different types of defects are assigned. Among them, surface energy mismatch defects and substrate contamination defects are assigned the highest severity weights, fluid instability defects are assigned the second highest severity weights, and spraying parameter mismatch defects are assigned the standard severity weights. The defect severity index for each functional area is obtained by multiplying the defect coverage area of each functional area by the severity weight of the corresponding defect type and summing the results.
[0081] The node initial feature update process includes: introducing a diffusion-weighted graph attention mechanism. The diffusion-weighted graph attention mechanism adaptively adjusts the distribution of attention weights according to the magnitude of the surface energy gradient between adjacent spread nodes, so that the information transmission intensity between adjacent node pairs with larger surface energy gradients is greater than that between adjacent node pairs with smaller surface energy gradients.
[0082] It should be noted that spreading nodes are mesh units obtained by discretizing the circuit board surface, with each spreading node corresponding to a physical micro-region on the circuit board surface. From a physical perspective, each spreading node carries the transient spreading characteristics of that micro-region during the spraying process (including the temporal displacement field of the droplet edge and the velocity gradient field of the spreading front) as well as surface morphology properties (including relative height and surface roughness). The density of spreading nodes determines the spatial resolution of the model for the sprayed droplet spreading process—the smaller the node spacing, the better it can capture the spatial details of minute defects (such as edge fingering and localized poor wetting). The fluid spreading graph neural network model uses spreading nodes as the basic computational unit, simulating the fluid spreading behavior of sprayed droplets between different regions of the circuit board surface by transmitting and aggregating information between the spreading nodes.
[0083] The diffusion-weighted graph attention mechanism, based on the standard graph attention mechanism, introduces an attention weight modulation factor based on surface energy gradient. Its physical meaning is that adjacent spreading node pairs with larger surface energy gradients (such as the interface between solder pads and solder resist ink) receive higher information transmission weights, while adjacent spreading node pairs with smaller surface energy gradients (such as adjacent nodes within a large area of solder resist ink) receive lower information transmission weights. This differentiated weighting strategy simulates the real spreading behavior of coating fluid on the circuit board surface—at material interfaces with significant surface energy differences, the fluid spreading speed is fast and the mutual influence is strong; in regions of the same material with uniform surface energy, the fluid spreading speed is relatively uniform and the mutual influence is weak. Through this mechanism, the graph neural network automatically focuses on material interface regions that have a key impact on defect formation during feature extraction, improving the physical interpretability of the extracted implicit rheological features.
[0084] It is understandable that "multi-level" refers to the level of evaluation granularity (such as regional level → sub-regional level).
[0085] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0086] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0087] In the embodiments disclosed in this application, it should be understood that the disclosed devices / terminal equipment and methods can be implemented in other ways. For example, the device / terminal equipment embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling or direct coupling or communication connection may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0088] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
Claims
1. A circuit board coating quality inspection method based on AI vision, characterized in that, include: Acquire multi-time-series image data of the circuit board spraying process; Transient spreading features of sprayed droplets were extracted based on multi-temporal image data; By using a fluid spread graph neural network model, transient spread features are processed to extract implicit rheological features of the spraying process; Based on implicit rheological features and combined with images of the cured coating, a cross-stage quality retrospective model is constructed using AI vision. Generate differentiated quality evaluation results based on the cross-stage quality retrospective model; Based on the differentiated quality evaluation results, an inspection report on the circuit board coating quality and suggestions for correcting coating parameters are output.
2. The method for inspecting the coating quality of circuit boards based on AI vision according to claim 1, characterized in that, The transient spreading characteristics include the temporal displacement field at the droplet edge and the velocity gradient field at the spreading front.
3. The method for inspecting the coating quality of circuit boards based on AI vision according to claim 2, characterized in that, The transient spreading characteristics include: The multi-scale spreading entropy characteristics are calculated based on the temporal displacement field at the droplet edge and the velocity gradient field at the spreading front.
4. The method for inspecting the coating quality of circuit boards based on AI vision according to claim 1, characterized in that, The fluid spread graph neural network model divides the circuit board surface into multiple spread nodes, uses transient spread features as the initial features of the nodes, integrates surface energy distribution parameters to construct physical coupling edges between nodes, and extracts features through the message passing mechanism of fluid spread constraints.
5. The method for inspecting the coating quality of circuit boards based on AI vision according to claim 1, characterized in that, The cross-stage quality backtracking model maps the spraying process features to the curing quality space through a temporal-spatial dual-dimensional feature alignment network, and outputs the root cause classification and spatial location distribution of coating defects.
6. The method for inspecting the coating quality of circuit boards based on AI vision according to claim 1, characterized in that, The process of constructing a cross-stage quality retrospective model using AI vision includes: Obtain the implicit rheological features extracted by the fluid spread map neural network model and the curing quality features of the cured coating image; The implicit rheological feature sequences at different times during the spraying process are input into a temporal alignment sub-network. A multi-head attention mechanism is used to calculate the attention weights at each time step. Based on these attention weights, the implicit rheological feature sequences are weighted and compressed to obtain a fixed-dimensional process representation vector. The formula for calculating the process representation vector satisfies... Among them, Z proc The process representation vector with fixed dimensions output by the temporal alignment network; T is the total number of temporal sampling points in the spraying process; a t Let be the attention weights calculated using a multi-head attention mechanism, corresponding to the t-th sampling time, and satisfy . ; Let i be the implicit rheological feature vector of the spread graph neural network model output at layer L, corresponding to the spread node i at the t-th sampling time. i is the index of the i-th spread node among multiple spread nodes, L is the total number of layers of the fluid spread graph neural network model, and t is the time-series sampling time number of the spraying process. The attention weights are calculated using a multi-head attention mechanism, and the calculation process satisfies the following set of formulas. Among them, head k Let Q be the output vector of the k-th attention head in the multi-head attention mechanism, where k = 1, 2, ..., h, and h is the total number of attention heads; k V is the query matrix corresponding to the k-th attention head, obtained by the implicit rheological feature sequence through the first linear projection transformation; K is the key matrix, obtained by the implicit rheological feature sequence through the second linear projection transformation, and all attention heads share the same key matrix; k The value matrix corresponding to the k-th attention head is obtained by the implicit rheological feature sequence through a third linear projection transformation; K T d represents the transpose of the key matrix K; k Let be the feature dimension of the k-th attention head, whose value is equal to the dimension of the implicit rheological feature vector divided by the total number of attention heads; Softmax(·) is the normalization exponential function, which transforms each row of the attention score matrix into a probability distribution; MultiHead(Q,K,V) is the output function of the multi-head attention mechanism; Q is the query matrix Q of each attention head. k The overall query matrix is formed by combining the values of each attention head; V is the value matrix of each attention head. k The total value matrix formed by combining; Concat(head1,…,head) h W is an operation that concatenates the output vectors of the first to h attention heads along the feature dimension. O The output projection matrix is the learnable model parameter in the multi-head attention mechanism, used to map the concatenated multi-head output vector to the target feature dimension. The process representation vector and the curing quality feature are input into a spatial alignment subnetwork, and pixel-level alignment is performed in the spatial dimension through deformable convolution to obtain the aligned fused features. The fused feature calculation formula satisfies... Among them, F fusion (p0) is the aligned fused feature vector output by the spatial alignment sub-network at the target position p0 on the output feature map; p0 is the target position coordinate on the output feature map; R is the sampling grid of the deformable convolution kernel; p n w(p) is the standard offset of the nth sampling point in the sampling grid; n ) is a deformable convolution kernel at sampling point p n Convolution weight parameters at F; cured This is a curing quality feature map extracted from the cured coating image. This feature map contains semantic information about the edge contours, thickness distribution, and surface defect regions of the cured coating; Δp n The value obtained through learning corresponds to the sampling point p. n Spatial offset; Z proc The process representation vector of the time-aligned subnetwork output; ⊙ represents the element-wise multiplication operation; The aligned and fused feature vectors are input into the root cause classification network, which outputs the root cause classification results of coating defects. The aligned and fused feature vectors are input into the defect localization network, which outputs the spatial distribution of the defects.
7. The method for inspecting the coating quality of circuit boards based on AI vision according to claim 6, characterized in that, The root cause classification network includes physical and logical rules for material failure mechanisms; The root cause classification results include surface energy mismatch defects, spraying parameter mismatch defects, fluid instability defects, and substrate contamination defects.
8. The method for inspecting the coating quality of circuit boards based on AI vision according to claim 1, characterized in that, The generated differentiated quality evaluation results include: A multi-level quality evaluation graph structure is constructed, and the spatial distribution of defects output by the cross-stage quality backtracking model is spatially overlapped and matched with the multi-level quality evaluation graph structure. The method for constructing the multi-level quality evaluation graph structure includes: Extract the functional type of each region from the circuit board design documents. The functional type of each region includes at least a no-coating region, a high-reliability coating region, a normal coating region, and a thinning-tolerant region. The multi-level quality evaluation graph structure is constructed by using each functional area as an evaluation node and the spatial adjacency relationship between areas as an evaluation edge. The node attributes of each evaluation node include regional function type, regional area, and regional importance weight, among which the regional importance weight of the forbidden area is the highest and the regional importance weight of the tolerable thinning area is the lowest. The spatial distribution of the defects is spatially overlapped and matched with the multi-level quality evaluation map structure to calculate the coverage rate index and the severity index of various defects in each functional area.
9. The method for inspecting the coating quality of circuit boards based on AI vision according to claim 8, characterized in that, The calculation steps for spatial overlap matching include: The defect probability heatmap output by the defect localization network is overlaid pixel by pixel with the spatial region of each evaluation node in the multi-level quality evaluation graph structure to obtain the ratio of the defect coverage area to the total area of each functional region, which is used as the defect coverage rate index. Based on the defect root cause classification results, the severity weights of different types of defects are assigned. Among them, surface energy mismatch defects and substrate contamination defects are assigned the highest severity weights, fluid instability defects are assigned the second highest severity weights, and spraying parameter mismatch defects are assigned the standard severity weights. The defect severity index for each functional area is obtained by multiplying the defect coverage area of each functional area by the severity weight of the corresponding defect type and summing the results.
10. The circuit board coating quality inspection method based on AI vision according to claim 4, characterized in that, The node initial feature update process includes: A diffusion-weighted graph attention mechanism is introduced, which adaptively adjusts the allocation of attention weights according to the magnitude of the surface energy gradient between adjacent spreading nodes, so that the information transmission intensity between adjacent node pairs with larger surface energy gradients is greater than that between adjacent node pairs with smaller surface energy gradients.