A PCB cutting monitoring method and system based on machine vision

By constructing a three-dimensional morphological feature vector and analysis model, and dynamically adjusting the light source parameters, the problem of unstable image data during PCB cutting was solved, achieving high-precision and high-stability cutting results.

CN122265709APending Publication Date: 2026-06-23HUNAN HENGSHENGXING TECHNOLOGY CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
HUNAN HENGSHENGXING TECHNOLOGY CO LTD
Filing Date
2026-03-17
Publication Date
2026-06-23

AI Technical Summary

Technical Problem

Existing machine vision monitoring solutions are susceptible to interference from differences in PCB surface materials and three-dimensional feature coupling during PCB cutting, resulting in unstable image data and affecting cutting accuracy.

Method used

By collecting image data and surface physical data of PCB samples from different angles under different light sources, a three-dimensional morphological feature vector is constructed. The analysis model is then trained to predict the optimal light source configuration, adjust the light source parameters to identify the cutting path, and generate compensation instructions.

Benefits of technology

It achieves high contrast and feature clarity of images under high dynamic range, improves the accuracy and consistency of cutting path recognition, reduces burrs and cutting scrap rate, and improves the precision and stability of cutting process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122265709A_ABST
    Figure CN122265709A_ABST
Patent Text Reader

Abstract

The application provides a PCB cutting monitoring method and system based on machine vision, and relates to the field of machine vision. The method comprises the following steps: collecting image data of a PCB sample at different angles under different light sources, and calculating an imaging quality evaluation index; collecting physical data of the surface of the PCB sample, forming a three-dimensional topographic feature vector, and storing the three-dimensional topographic feature vector in association with the imaging quality evaluation index to form a paired data set; training an analysis model comprising a three-dimensional topographic feature encoder and a light source response predictor using the paired data set; collecting a cutting image of a PCB to be cut, extracting a three-dimensional topographic feature of the PCB to be cut, and obtaining optimal light source configuration parameters through the analysis model; adjusting the light source to a corresponding state based on the optimal light source configuration parameters, identifying a cutting path of the cutting image, and generating a compensation instruction for driving a cutting execution mechanism. The technical problem of unstable image data caused by the coupling interference of differences in PCB surface materials and three-dimensional features is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of machine vision, and in particular to a PCB board cutting monitoring method and system based on machine vision. Background Technology

[0002] During PCB (Printed Circuit Board) cutting and processing, online monitoring technology based on machine vision is the core support for achieving high-precision and high-yield cutting operations. This technology typically uses an industrial camera and a controllable light source to work together. By acquiring real-time images of the PCB surface, image processing algorithms are used to identify the contour features to be cut, thereby guiding the actuator to complete a precise physical cut. As electronic products develop towards higher density and miniaturization, the component layout on PCBs is becoming increasingly compact, and the spacing between lines is becoming increasingly fine, which places extremely high demands on the environmental adaptability of vision monitoring systems.

[0003] Existing visual monitoring solutions generally employ a combination of fixed light source illumination and fixed-parameter image algorithms. Based on a preset set of illumination angles and intensities, images are continuously acquired during the cutting process, and edge information is extracted using image algorithms. However, the PCB surface in actual production environments exhibits typical high dynamic range reflectivity, meaning that within the same field of view, there are multiple materials such as copper traces, pads, solder mask, and exposed substrate. Copper traces and pads typically have extremely high specular reflectivity, while solder mask is mostly a diffuse reflective surface, resulting in a significant difference in reflectivity between the two. When a fixed light source illuminates at a specific angle, highly reflective areas are prone to localized specular reflection, causing saturation of the camera's image sensor in these areas and resulting in image overexposure. Consequently, detailed information of key geometric features such as pad edges and trace corners is "submerged" in a white halo, preventing subsequent edge detection algorithms from extracting the true contour coordinates, thus causing positioning errors. Furthermore, the PCB surface is not an ideal two-dimensional plane. The mounted components (such as capacitors, resistors, and connectors) have significant height differences, contributing to the complexity of the surface's three-dimensional morphology. Under a fixed light source angle, components of a certain height will cast unavoidable "hard shadows" on the PCB substrate or adjacent components. The light intensity in these shadow areas is extremely low, resulting in a decrease in the image signal-to-noise ratio, manifested as reduced imaging contrast and blurred features. Therefore, it is difficult to distinguish between the real physical boundaries and the shadow interference boundaries, which in turn affects the accuracy of the overall cutting. Summary of the Invention

[0004] This application provides a PCB board cutting monitoring method and system based on machine vision, which solves the technical problem that the existing technology is easily affected by the differences in PCB surface materials and the coupling interference of three-dimensional features, resulting in unstable image data.

[0005] To achieve the above objectives, this application adopts the following technical solution: Firstly, a machine vision-based PCB board cutting monitoring method includes: acquiring image data of PCB samples from different angles under different light sources, calculating imaging quality evaluation indicators, which at least include contrast-to-noise ratio and overexposure rate; acquiring physical data of the PCB sample surface, constructing a three-dimensional morphological feature vector, and storing it in association with the imaging quality evaluation indicators to form a paired dataset; using the paired dataset to train an analysis model containing a three-dimensional morphological feature encoder and a light source response predictor, the analysis model including a three-dimensional morphological feature encoder that learns and outputs implicit feature vectors of the PCB sample and a light source response predictor that predicts the imaging quality score of the corresponding light source based on the implicit feature vectors; acquiring images of the PCB to be cut, extracting the three-dimensional morphological features to be cut, and obtaining optimal light source configuration parameters through the analysis model; adjusting the light source to the corresponding state based on the optimal light source configuration parameters, identifying the cutting path of the image to be cut, and generating compensation commands for driving the cutting actuator.

[0006] In conjunction with the first aspect mentioned above, in one possible implementation, the process of acquiring physical data of the PCB sample surface to construct a three-dimensional topographic feature vector specifically includes: acquiring three-dimensional point cloud data of the PCB sample and constructing a three-dimensional topographic feature vector. The three-dimensional topographic feature vector includes normal tilt angle reflectivity coupling feature, multispectral absorption difference feature, height difference shadow correlation feature, and curvature light field focusing feature. The normal tilt angle reflectivity coupling feature is composed of the coupling between the surface normal tilt angle and the peak specular reflectivity of the corresponding region, used to quantify the geometric optical relationship between the incident angle of the light source and specular reflection. The multispectral absorption difference feature is composed of the absorption rate difference of different material types at a preset wavelength, used to quantify the selective absorption characteristics of the material to the spectrum. The height difference shadow correlation feature is composed of the maximum height difference in the micro-region and the theoretical shadow length at the preset incident light source angle, used to quantify the geometric influence of the three-dimensional structure on the light source shadow. The curvature light field focusing feature is composed of the local curvature of the surface and the dome light source applicability index, used to quantify the influence of the surface curvature on the light field focusing effect.

[0007] In conjunction with the first aspect mentioned above, one possible implementation of the analysis model construction and training process specifically includes: constructing a deep learning network as the analysis model based on the paired dataset. The analysis model includes a 3D shape feature encoder, a light source response predictor, and an optimal light source selector. The 3D shape feature encoder obtains 3D shape feature vectors from the paired dataset, extracts and outputs low-dimensional implicit feature vectors through convolutional and pooling layers. These implicit feature vectors characterize the essential geometric and material properties that cannot be directly observed but determine the optical response. The light source response predictor obtains the implicit feature vectors and outputs imaging quality score vectors corresponding to all light source configurations through fully connected layers and normalized exponential function layers. ,in The probability of obtaining a high-quality image by configuring the j-th light source is given by K, where K is the total number of light source configurations. The optimal light source selector selects the optimal light source configuration parameters based on the imaging quality score vector S and using differentiable selection logic.

[0008] In conjunction with the first aspect mentioned above, in one possible implementation, the process of the 3D topography feature encoder learning and outputting the implicit feature vector of the PCB sample specifically includes: the 3D topography feature encoder acquiring a paired dataset and calling the 3D topography feature vector; performing hierarchical convolution operations on the 3D topography feature vector to extract geometric-optical coupling feature maps under different receptive fields, wherein the multi-scale geometric convolution module contains parallel dilated convolution kernels; based on the geometric-optical coupling feature map, obtaining the interaction feature map by calculating the cross-covariance matrix between different level feature maps, explicitly modeling the physical constraint relationship between the normal tilt angle, material absorptivity, height difference, and curvature; applying attention weights in the channel dimension and spatial dimension to the interaction feature map respectively, outputting the attention feature map; and performing global average pooling and nonlinear dimensionality reduction on the attention feature map to obtain the implicit feature vector.

[0009] In conjunction with the first aspect mentioned above, one possible implementation also includes a process of co-monitoring the PCB sample surface and electrical components. Specifically, this includes: collecting electrical test results of the PCB sample based on a depth monitoring test network, which includes a first test line located at the expected cut-off layer and a second test line located at the adjacent inner warning layer; calling a preset electrical judgment logic and combining it with the electrical test results to obtain a depth qualification label, which serves as a ground truth label for the internal cutting state; associating and storing the depth qualification label with three-dimensional morphological features to form an enhanced training sample with the internal depth ground truth; and performing multi-task extended training on the analysis model based on the enhanced training sample to obtain a target analysis model. This target analysis model is used to simultaneously predict the optimal light source configuration parameters and the predicted cutting depth, and to invert the internal cutting quality through surface morphological features.

[0010] In conjunction with the first aspect mentioned above, in one possible implementation, the depth monitoring test network specifically includes a first test line, a second test line, vertical interconnect vias, and test pads: the first test line is a serpentine continuous conductor laid on the expected cut-off layer, and is distributed in a dense grid pattern within the cut path projection area to ensure that the cut depth at all locations can be detected; the second test line is a conductor laid on the inner adjacent warning layer, and is staggered from the first test line in horizontal projection to provide a safety margin for cut depth; the vertical interconnect vias are drilled from the PCB surface layer to the inner layer where the first and second test lines are located, and are copper-plated inside the holes to achieve electrical connection; the test pads are located on the PCB surface layer and are electrically connected to the first and second test lines through the vertical interconnect vias for contact with the probes of the flying probe test unit.

[0011] In conjunction with the first aspect mentioned above, in one possible implementation, the process of acquiring electrical test results specifically includes: acquiring the test network coordinate file corresponding to the PCB sample, the test network coordinate file including the coordinate positions of the first test line and the test pads connected to the first test line; the motion controller of the flying probe test unit drives the independent probe of the flying probe test unit to move above the corresponding test pad according to the test network coordinate file, and controls the probe to fall vertically onto the pad surface with a preset pressure value through a servo motor; applying a DC test voltage to the independent probe, and simultaneously collecting the loop current value by a high-precision current detection circuit to obtain the electrical test status, and binding it with the unique identifier ID of the corresponding PCB sample to generate electrical test results.

[0012] In conjunction with the first aspect mentioned above, in one possible implementation, the process of calling a preset electrical judgment logic and combining it with electrical test results to obtain a depth qualification label specifically includes: obtaining the topology feature parameters and electrical test results of the depth monitoring test network; the depth judgment logic engine performing state decoding and filtering on the topology feature parameters and electrical test results according to preset physical constraint rules to obtain decoded qualified data; obtaining the serpentine line spacing, line width, and number of serpentine line segments of the decoded qualified data, calculating the depth estimate, and encapsulating it into a depth qualification label for output.

[0013] Secondly, a PCB board cutting monitoring system based on machine vision is provided, comprising: a multimodal data acquisition module for acquiring image data of PCB samples from different angles under different light sources, calculating imaging quality evaluation indicators, which include at least contrast-to-noise ratio and overexposure rate; acquiring physical data of the PCB sample surface to form a three-dimensional morphological feature vector, and storing it in association with the imaging quality evaluation indicators to form a paired dataset; a morphological light field association modeling module for training an analysis model containing a three-dimensional morphological feature encoder and a light source response predictor using the paired dataset, the analysis model including a three-dimensional morphological feature encoder that learns and outputs implicit feature vectors of the PCB sample and a light source response predictor that predicts the imaging quality score of the corresponding light source based on the implicit feature vectors; and online adaptive imaging execution. The module acquires images of the PCB to be cut and extracts its 3D topographic features. It then analyzes the model to obtain the optimal light source configuration parameters. Based on these parameters, it adjusts the light source to the corresponding state, identifies the cutting path of the image, and generates compensation commands to drive the cutting actuator. The electrical depth monitoring and verification module, deployed in parallel with the online adaptive imaging execution platform, performs electrical tests on the PCB with its built-in depth monitoring test network after cutting, obtains the test results, and generates depth qualification labels. The cross-layer data fusion engine module connects to both the online adaptive imaging execution platform and the electrical depth monitoring and verification platform. It synchronizes and associates the depth qualification labels with the 3D topographic features acquired before cutting, forming fusion training samples with ground truth depth values.

[0014] In conjunction with the second aspect mentioned above, in one possible implementation, the morphological light field correlation modeling module is also used to acquire fusion training samples and incrementally update the analysis model to update the analysis model to predict the internal cutting depth through surface three-dimensional morphological features.

[0015] This application provides a machine vision-based PCB board cutting monitoring method and system. It constructs a paired dataset by simultaneously acquiring image quality indicators and 3D morphological data of the PCB sample surface from different light source angles. This decouples the abstract problem of imaging instability into a quantifiable mathematical relationship between 3D morphological features and image quality, establishing an intrinsic mapping relationship between the physical properties of the PCB surface and its optical response. This enables precise quantification and decoupling of imaging influencing factors, eliminating the simplistic attribution of overexposure or shadows to improper lighting. Simultaneously, the 3D morphological feature encoder in the analysis model compresses complex physical data into implicit feature vectors, allowing the model to deeply understand the material and geometric characteristics of the PCB. The light source response predictor then directly infers the optimal light source configuration parameters based on this understanding, avoiding the inefficient reliance on repeated manual adjustments of lighting in traditional visual inspection. Through forward computation, the model proactively locks in light source parameters that maximize contrast-to-noise ratio and reduce overexposure before the cutting action, ensuring high-quality input images from the source. Finally, the optimal lighting environment is dynamically customized based on the current 3D morphological characteristics of the PCB, enabling image acquisition and cutting path recognition to be completed under optimal visual conditions. This suppresses copper foil reflections and component shadows caused by the high dynamic range characteristics of the PCB, ensuring high image contrast and feature clarity. Consequently, the accuracy and consistency of cutting path recognition are improved, resulting in reduced burrs at the cutting edges, increased dimensional accuracy, and a significant decrease in the scrap rate caused by misidentification, comprehensively enhancing the precision and stability of the PCB cutting process.

[0016] It should be understood that the descriptions of technical features, technical solutions, beneficial effects, or similar language in this application do not imply that all features and advantages can be achieved in any single embodiment. Rather, it is understood that the description of a feature or beneficial effect means that a specific technical feature, technical solution, or beneficial effect is included in at least one embodiment. Therefore, the descriptions of technical features, technical solutions, or beneficial effects in this specification do not necessarily refer to the same embodiment. Furthermore, the technical features, technical solutions, and beneficial effects described in this embodiment can be combined in any suitable manner. Those skilled in the art will understand that embodiments can be implemented without one or more specific technical features, technical solutions, or beneficial effects of a particular embodiment. In other embodiments, additional technical features and beneficial effects may be identified in specific embodiments that do not embody all embodiments. Attached Figure Description

[0017] Figure 1 A flowchart illustrating a PCB board cutting monitoring method based on machine vision, provided for an embodiment of this application; Figure 2This is a flowchart illustrating the steps of collecting physical data from the surface of a PCB sample and constructing a three-dimensional morphology feature vector in a PCB board cutting monitoring method based on machine vision provided in an embodiment of this application. Figure 3 This is a flowchart illustrating the steps of training an analysis model containing a three-dimensional shape feature encoder and a light source response predictor using a paired dataset in a PCB board cutting monitoring method based on machine vision provided in this application embodiment. Figure 4 A flowchart illustrating the steps of co-monitoring the PCB sample surface and electrical components in a PCB board cutting monitoring method based on machine vision provided in this application embodiment; Figure 5 This is a schematic diagram of a PCB board cutting monitoring system based on machine vision, provided in an embodiment of this application. Detailed Implementation

[0018] In the description of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B. The "and / or" in this document is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, and B alone. Furthermore, "at least one" means one or more, and "multiple" means two or more. The terms "first," "second," etc., do not limit the quantity or order of execution, and "first," "second," etc., do not necessarily imply differences.

[0019] It should be noted that, in this application, the terms "exemplary" or "for example" are used to indicate that something is being described as an example, illustration, or illustration. Any embodiment or design described as "exemplary" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or design solutions. Specifically, the use of terms such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.

[0020] like Figure 1 As shown in the figure, an embodiment of this application provides a PCB board cutting monitoring method based on machine vision, including: Step 101: Collect image data of PCB samples from different angles under different light sources, and calculate the imaging quality evaluation index. The imaging quality evaluation index includes at least the contrast-to-noise ratio and the overexposure rate.

[0021] In some implementations, a representative PCB sample is selected, and its surface is finely divided into meshes. For each tiny partition, a 3D topography sensing unit (such as a laser profilometer) is activated to accurately collect physical data such as the height, local curvature, and surface normal tilt angle of that area, forming a 3D topography feature vector for that area.

[0022] At this time, the programmable light source array switches sequentially according to the preset K combinations (covering different wavelengths, incident angles, light intensities and polarization states). Each time a light source is switched, the high-resolution industrial camera simultaneously acquires an image of the area.

[0023] For each acquired image, its imaging quality evaluation metrics, namely contrast-to-noise ratio and overexposure rate, are calculated in real time. The three-dimensional topographic feature vector of each region is then associated and stored one-to-one with the K sets of imaging quality evaluation metrics obtained using K different light sources in that region, constructing a structured paired dataset.

[0024] For example, on an FPC flexible board containing dense BGA solder joints and smooth copper foil, it is divided into a 1mm × 1mm grid. In a certain grid area covering the BGA solder joints, the 3D topography sensing unit measures that there are obvious curvature changes and height differences in this area.

[0025] Subsequently, the light source array was used in eight different configurations, including 0° coaxial light, 30° ring blue light, and dome light. When using 30° ring blue light, the calculated contrast-to-noise ratio of the acquired image was 15dB, with an overexposure rate of 2%. However, when using 0° coaxial light, due to specular reflection at the solder joints, the overexposure rate surged to 35%, and the contrast-to-noise ratio dropped to 5dB. Therefore, the morphological features of this area were paired and stored with eight sets of data (light source configuration, imaging indicators) to form a basic sample.

[0026] Step 102: Collect physical data of the PCB sample surface, construct a three-dimensional morphological feature vector, and store it in association with the imaging quality evaluation index to form a paired dataset.

[0027] Among them, the three-dimensional morphology feature vector is a set of parameters that describe the micro-geometry and physical properties of the PCB surface. It includes height, curvature, tilt angle and material type (obtained by quickly coarsely classifying reflectivity data collected in the preprocessing stage using a preset threshold, aiming to provide key material background information for the model), which is used to quantitatively characterize the physical state of a specific area.

[0028] In some implementations, the three-dimensional shape perception unit in a multimodal data acquisition platform is used, for example, by employing multi-view structured light projection technology, to scan every tiny area of ​​a PCB sample that has been meshed and partitioned, thereby acquiring its high-resolution three-dimensional point cloud data.

[0029] Based on these point cloud data, the height features, local curvature, and surface normal tilt angle of the region are calculated and extracted by the algorithm. Combined with reflectivity information, the material type is determined. These four physical parameters are combined into a complete four-dimensional vector, namely a three-dimensional morphological feature vector.

[0030] Simultaneously, images of this region under K different light source configurations were acquired using a multi-light source imaging unit at the same coordinate system, and the corresponding imaging quality evaluation indicators (contrast-to-noise ratio and overexposure rate) were calculated. This means that the region identifier can be used as an index to establish a one-to-one correspondence and binding between the region's 3D topographic feature vector and its imaging quality evaluation indicators under each light source. Finally, all paired information from all regions is aggregated to form a structured paired dataset, which is stored in the database.

[0031] For example, in data acquisition for an FPC flexible circuit board, a region covering the gold fingers (copper) and the adjacent substrate is processed. The 3D topography sensing unit measures the height of the gold finger portion in this region as 35μm, with a local curvature close to 0 (considered a plane), a normal tilt angle of 8°, and the material type is labeled "copper"; while the adjacent substrate region has a height of 30μm, a curvature of 0, a tilt angle of 2°, and a material type of "FR4". This vector consisting of four values ​​can be denoted as... Meanwhile, the imaging quality indicators of this region under eight light sources, including ring light and coaxial light, have been calculated. Ultimately, a line resembling a "region" was obtained. : The data “={35μm,0,8°,copper},Q ring light={CNR:18dB,overexposure:3%},Q coaxial light={CNR:8dB,overexposure:35%}...” was stored in the paired dataset.

[0032] Step 103: Train an analysis model containing a 3D topography feature encoder and a light source response predictor using a paired dataset. The analysis model includes a 3D topography feature encoder that learns and outputs implicit feature vectors of PCB samples and a light source response predictor that predicts the imaging quality score of the corresponding light source based on the implicit feature vectors.

[0033] The analysis model is a deep learning network composed of multiple cascaded sub-networks, used to learn the mapping relationship between 3D topography and optimal light source. The 3D topography feature encoder is a sub-network in the analysis model that compresses and encodes the input high-dimensional physical data into a low-dimensional, abstract feature representation. The implicit feature vector is a deep feature extracted from the original physical data by the 3D topography feature encoder; it is not directly observable but can characterize the essential geometric and material properties of the sample. The light source response predictor is another sub-network in the analysis model. Its input is the implicit feature vector, and its output is the image quality score corresponding to different light source configurations. The image quality score is a value between 0 and 1, representing the probability of obtaining a high-quality image under that light source configuration.

[0034] In some implementations, the 3D topographic feature vectors from the paired dataset are used as input and fed into a 3D topographic feature encoder. This encoder uses a 3-layer convolutional neural network combined with spatial pyramid pooling. It extracts local geometric features through the sliding calculation of convolutional kernels, then retains multi-scale spatial information through pooling layers, and finally performs feature compression and fusion through a 2-layer fully connected network to output a 128-dimensional implicit feature vector.

[0035] The light source response predictor receives implicit feature vectors. Since the predictor consists of a 3-layer fully connected network, it can perform layer-by-layer linear transformations and non-linear activations, ultimately outputting a K-dimensional vector through a Softmax layer, where the value of each dimension is... This is the imaging quality score corresponding to the j-th light source configuration.

[0036] During training, the analysis model can retrieve actual imaging quality evaluation metrics corresponding to the input 3D shape feature vector from the paired dataset. After normalization, a K-dimensional label vector is generated as the "standard answer" for the predicted score. Simultaneously, the Adam optimizer is used to calculate the ranking loss and consistency loss between the predicted score and the label through backpropagation. Based on this, the gradient descent method is used to iteratively update the weight parameters of all neurons in the 3D shape feature encoder and the light source response predictor until the model's prediction accuracy on the validation set reaches a preset threshold. Finally, an analysis model capable of accurately predicting the light source imaging quality score is obtained.

[0037] Step 104: Acquire the image of the PCB to be cut and extract the three-dimensional morphological features to be cut. Obtain the optimal light source configuration parameters through analysis model.

[0038] Among them, the optimal light source configuration parameters refer to the type of light source and its specific settings that can achieve the best imaging quality in the area to be cut, obtained through analysis model reasoning. These parameters include the combination of parameters such as wavelength, incident angle, light intensity, exposure time, and polarization state of the light source.

[0039] In some implementations, during online execution, when the cutting head moves to the cutting position to be measured, the three-dimensional topography rapid perception unit in the online adaptive imaging execution platform is first triggered. Using single-frame structured light projection technology, point cloud data of the area to be cut is acquired in a very short time (e.g., 0.05 seconds), and the three-dimensional topography feature vector of the area is extracted from it. The feature vector specifically includes at least one of the following: normal tilt angle reflectivity coupling feature, multispectral absorption difference feature, height difference shadow correlation feature, and curvature light field focusing feature, which is used to comprehensively quantify the geometric and optical properties of the area.

[0040] The 3D topographic feature vector is then input into a lightweight analysis model deployed in the edge computing unit. The 3D topographic feature encoder first performs forward computation on the input vector to generate the corresponding implicit feature vector. Next, the light source response predictor performs forward computation based on this implicit feature vector, outputting a vector containing K imaging quality scores.

[0041] Finally, the optimal light source selector deployed on the FPGA uses differentiable Top-1 selection logic (implemented through Gumbel-Softmax for end-to-end computation) to select the light source index corresponding to the highest score from K scores as the optimal light source configuration parameter, and sends this parameter instruction to the light source array controller.

[0042] Step 105: Adjust the light source to the corresponding state based on the optimal light source configuration parameters, identify the cutting path of the image to be cut, and generate compensation commands to drive the cutting actuator.

[0043] In some implementations, after obtaining the optimal light source configuration parameters, the corresponding light source is turned on and its parameters are set within milliseconds by the light source array controller, so that the area to be cut is illuminated under the best lighting conditions.

[0044] Subsequently, a high-resolution industrial camera acquires a single clear image of the area. The acquired image is then preprocessed to enhance features. Edge detection algorithms (such as the Canny operator) or deep learning-based semantic segmentation models (such as U-Net) are used to extract the edges of the cutting path. The centerline of the cutting path is extracted using morphological dilation and thinning operators, resulting in a series of sub-pixel level coordinate point sequences.

[0045] Simultaneously, based on the preset theoretical cutting path coordinates converted from the PCB design file (Gerber file), the actual cutting path coordinates identified by the visual positioning algorithm are compared with the theoretical path coordinates. A coordinate transformation model (such as a hand-eye calibration matrix) can then be used to calculate the positional and angular deviations in the X and Y directions. Finally, the obtained deviation values ​​are converted into compensation commands for the cutting actuator. These commands contain the required displacement and direction adjustments for each motion axis and are sent to the servo controller or laser galvanometer controller via bus communication to achieve real-time dynamic correction of the cutting trajectory.

[0046] For example, on an FPC flexible circuit board laser cutting production line, a 30° annular blue light was activated according to the MLA model recommendation. The acquired image of the gold finger area was clear with sharp edges. The vision processing unit ran the U-Net model to segment the cutting path from the image and extract the actual path point sequence. After comparing it with the theoretical path parsed from the Gerber file, an offset of 0.12mm in the X direction and 0.05mm in the Y direction was found, along with an angular deviation of 0.3°. The cutting deviation calculation module input these deviations into the PID controller, generating a set of compensating motion commands: X-axis +0.12mm, Y-axis +0.05mm, and rotation of the galvanometer angle by 0.3°. This command was sent to the laser galvanometer controller, enabling the laser cutting beam to travel precisely along the theoretically designed path.

[0047] Based on the above technical solution, by collecting image data of PCB samples under different light sources and calculating the contrast-to-noise ratio and overexposure rate, and combining this with surface physical data to construct a three-dimensional morphology feature vector and storing it in association to form a paired dataset, the problem of blurred imaging quality can be quantified into computable structured data. Using the paired dataset, an analytical model containing a three-dimensional morphology feature encoder and a light source response predictor is trained, enabling the model to learn the deep mapping relationship from three-dimensional physical features to the optimal light source response. This achieves intelligent decision-making for light source configuration, solving the inefficiency problem of traditional reliance on repeated manual adjustment of the light source. During use, the three-dimensional morphology features of the PCB to be cut can be collected online, and the optimal light source configuration parameters can be obtained in real time through the analytical model. The knowledge learned offline can be applied to the online production scenario, achieving dynamic light source adaptation for each cutting point and solving the problem of poor imaging consistency caused by individual PCB differences on the production line. Finally, the light source state is adjusted according to the optimal light source, and the cutting path is identified to generate compensation instructions, transforming high-quality imaging results into precise cutting execution actions, forming a complete closed loop from clear vision to accurate cutting, solving the problem of disconnect between visual monitoring and cutting control.

[0048] In another possible implementation of the embodiments of this application, combined with Figure 1-2 As shown, the process of collecting physical data from the surface of a PCB sample and constructing a three-dimensional topographic feature vector can be achieved through steps 201 to 205, which are explained in detail below: Step 201: Collect 3D point cloud data of PCB samples and construct 3D topographic feature vectors. The 3D topographic feature vectors include normal tilt angle reflectivity coupling features, multispectral absorption difference features, height difference shadow correlation features, and curvature light field focusing features.

[0049] In some implementations, a high-precision laser profilometer or multi-view structured light projection technology is used to scan each tiny area of ​​a PCB sample that has been finely divided into grids, thereby obtaining its high-resolution three-dimensional point cloud data.

[0050] Based on this point cloud data, the surface normal tilt angle of each region is calculated using an algorithm, and combined with synchronously acquired reflectivity data, a geometric optical model is constructed: The normal tilt angle is coupled with the peak specular reflectivity to form a normal tilt angle reflectivity coupling feature; By analyzing the differences in reflectance intensity of the region under different preset wavelengths (such as 630nm for red light, 470nm for blue light, and 525nm for green light), the multispectral absorption difference characteristics are quantitatively extracted. By calculating the maximum height difference of the point cloud within the region and combining it with the preset incident light source angle, the theoretical shadow length is calculated according to the shadow length formula, and the height difference shadow association feature is constructed. By calculating the local curvature of the point cloud and combining it with the applicability index of the dome light source and the ring light source under that curvature, the curvature light field focusing feature is formed.

[0051] Finally, the calculated features are combined into a multi-dimensional feature vector, which serves as a comprehensive representation of the three-dimensional topography of the region.

[0052] Step 202: The normal tilt angle reflectivity coupling feature is formed by the coupling of the surface normal tilt angle and the peak reflectivity of the corresponding region, and is used to quantify the geometric optical relationship between the incident angle of the light source and the specular reflection.

[0053] The surface normal tilt angle refers to the angle between the normal direction of the PCB surface and the perpendicular optical axis (such as the optical axis of a camera) or a preset reference direction, which determines the geometric direction in which the region produces specular reflection of incident light. The peak specular reflectivity refers to the maximum value of the reflected light intensity in the region when the incident angle of the light source and the surface normal tilt angle satisfy a specific geometric relationship (i.e., the incident angle equals the reflection angle).

[0054] In some implementations, 3D point cloud data is acquired, and the surface normal tilt angle θ(x,y) of each pixel or each tiny facet is calculated using a point cloud normal estimation algorithm (such as principal component analysis, PCA). Simultaneously, in the multi-light source imaging unit, a programmable light source array is controlled to illuminate the area successively at different incident angles (e.g., from 0° to 60° in 5° increments). Each time an angle is switched, a high-resolution industrial camera acquires an image, and the grayscale value of the corresponding area is extracted from the image as the reflectivity intensity data at that angle.

[0055] Subsequently, each pair of incident angle and reflectivity intensity data was processed using a curve fitting algorithm (such as Gaussian fitting or polynomial fitting) to find the incident angle of the light source corresponding to the maximum reflectivity. This maximum value is the peak reflectivity of the specular surface, and the corresponding angle verifies the geometric relationship with the surface normal tilt angle.

[0056] The surface normal tilt angle and the peak specular reflectivity can be coupled to form a two-dimensional coupled feature vector, which can quantify the intrinsic relationship between the geometric tilt of the micro-region and its optical tendency to produce strong specular reflection.

[0057] For example, in the gold finger area of ​​an FPC flexible circuit board, the 3D topography sensing unit measured the surface normal tilt angle of a copper foil finger to be 8°. Subsequently, the multi-light source unit illuminated the area by changing the incident angle of the ring light source from 0° to 20° at 2° intervals. The acquired image sequence shows: When the incident angle is 0°, the image is normal; When the incident angle increases to 8°, the gold finger area suddenly becomes an extremely bright white spot in the image, with an overexposure rate of 90%. The corresponding gray value at this time is the peak value of specular reflectance. However, once the angle of incidence exceeds 8°, the area gradually returns to normal brightness.

[0058] The system can then record the normal tilt angle of 8° and the peak gray value of 255, forming a coupling feature of (8°, 255). This feature clearly informs subsequent MLA models that when encountering copper areas with a tilt angle of 8°, light sources with an incident angle of around 8° must be absolutely avoided. Instead, light sources such as dome lights or other angled light sources should be selected to ensure image quality.

[0059] Step 203: The multispectral absorption difference characteristics are composed of the differences in absorption rates of different material categories at preset wavelengths, which are used to quantitatively characterize the selective absorption characteristics of materials to the spectrum.

[0060] Material category refers to the material type of different areas on the PCB surface, mainly including copper foil lines and pads, FR4 glass fiber substrate, solder resist ink, and component bodies, etc. Different materials have unique optical reflection and absorption characteristics. Preset multiple wavelengths refer to several specific wavelengths of illumination light preset by the system, usually including red light (such as 630nm, to enhance the contrast of plastics and substrates), blue light (such as 470nm, to enhance the details of metal edges), and green light (such as 525nm, to enhance aluminum components and general lighting).

[0061] In some implementations, during the offline data acquisition phase, the three-dimensional shape perception unit in the multimodal data acquisition platform is used to quickly and coarsely classify the material category of each micro-region of the PCB sample by combining reflectance data and using a preset threshold algorithm, thus initially distinguishing the copper region, FR4 substrate region and solder resist ink region.

[0062] Subsequently, the programmable light source array is controlled to sequentially switch between multiple preset wavelength light sources (such as red light 630nm, blue light 470nm, and green light 525nm). Under the premise of keeping the incident angle, light intensity, and other parameters of the light source completely consistent, each area marked with a material category is independently illuminated, and images of the corresponding wavelengths are simultaneously acquired by a high-resolution industrial camera.

[0063] For each image, the average gray value of the region is extracted as the reflected light intensity index. Based on the ratio of incident light intensity to reflected light intensity, the absorption rate of the material for that wavelength is calculated in reverse using the formula [absorption rate = 1 - (reflected light intensity / incident light intensity)].

[0064] For each micro-region, a set of wavelength and absorptivity data pairs corresponding to the material type of that region can be obtained. For example, the copper region has low absorptivity under blue light and medium absorptivity under red light, while the FR4 substrate has low absorptivity under red light and high absorptivity under blue light.

[0065] Finally, the data obtained above are vectorized and combined to form a multidimensional feature vector. This vector fully quantifies the selective absorption characteristics of the material in this region to different spectra, that is, the multispectral absorption difference characteristics.

[0066] For example, on a PCB sample that simultaneously contains dense copper lines and exposed FR4 substrate, a 1mm × 1mm grid area covering the edges of the copper lines and their adjacent substrate is processed.

[0067] Based on a coarse classification by reflectivity, the area was categorized into two material types: "copper" and "FR4". Subsequently, while maintaining a constant 0° coaxial light angle, the light source array sequentially switched between red, blue, and green light for illumination. Analysis of the acquired image data showed: Under blue light illumination, the grayscale value of the copper circuit area is 220 (high reflectivity), while the grayscale value of the FR4 substrate area is 80 (medium reflectivity), resulting in a contrast ratio of 140. Under red light illumination, the grayscale value of the copper circuit area is 180, the grayscale value of the FR4 substrate area is 150, and the contrast ratio is only 30. Under green light, the contrast between the two is approximately 90.

[0068] This allows us to calculate that copper has low absorption of blue light (approximately 14%) and moderate absorption of red light (approximately 29%), while FR4 has extremely low absorption of red light (approximately 12%) and high absorption of blue light (approximately 69%). This set of material, wavelength, and absorption rate data is integrated into a multispectral absorption difference feature vector, clearly indicating that using blue light illumination in this area maximizes the boundary contrast between the copper circuitry and the FR4 substrate, providing a crucial decision-making basis for subsequent model recommendations of the optimal light source wavelength.

[0069] Step 204: The height difference shadow association feature is composed of the maximum height difference within the micro-region and the theoretical shadow length under the preset incident light source angle, and is used to quantitatively characterize the geometric influence of the three-dimensional structure on the light source shadow.

[0070] The maximum height difference refers to the vertical distance between the highest and lowest points within a single gridded section of the PCB surface, typically formed by the difference in elevation between the component body, solder joint, or circuit protrusion and the substrate plane. The preset incident light source angle is the fixed incident direction corresponding to each light source configuration pre-set in the system's light source array, including the illumination directions of different types of light sources such as low-angle ring lights (15°-30°) and high-angle ring lights. The theoretical shadow length is the geometric extension length of the dark area formed on the back surface of an obstacle of a certain height when light shines at a specific incident angle, based on the principles of geometric optics. Its value can be calculated by multiplying the height difference by the tangent of the incident angle.

[0071] In some implementations, three-dimensional point cloud data is acquired, and the Z-axis coordinates of all points within the region are calculated using a point cloud analysis algorithm. Then, the maximum and minimum height values ​​are extracted, and the difference between the two is the maximum height difference ΔH within the micro-region.

[0072] The system retrieves the incident angle corresponding to each light source configuration from a pre-defined database of light source parameters. This includes precise incident angle information, especially for high-shadow-risk light sources such as low-angle ring lights (e.g., 15°, 30°). For each preset light source angle, based on the shadow formation principles of geometric optics, a theoretical shadow length calculation formula is applied. Parallel calculations were performed to obtain the theoretical shadow extension length that would be generated in the area under the given height difference and with illumination from this angled light source. .

[0073] After completing the calculations for all preset light source angles, the original height difference ΔH is compared with a set of theoretical shadow length values ​​calculated for different incident angles. 1, 2,..., K} is coupled with features to form a multi-dimensional feature vector containing height information and multi-angle shadow prediction results. This vector directly quantifies the degree of shadow interference that the 3D structure may cause under illumination from various candidate light sources. That is, the greater the height difference and the greater the incident angle of the light source, the longer the theoretical shadow length and the more serious the potential impact on image quality.

[0074] For example, when processing a PCB sample with surface-mount capacitors of 1.5mm height, a grid area covering the capacitors and their adjacent substrates is scanned and analyzed. Calculations using point cloud data show that the maximum height difference ΔH between the top of the capacitor and the substrate surface within this area is 1.5mm.

[0075] Then, the preset light source parameters were retrieved, including two configurations: a 15° low-angle ring light and a 45° high-angle ring light. The theoretical shadow length calculation formula was then used. For an incident angle of 15°, the theoretical shadow length L1 = 1.5mm × tan(15°) ≈ 1.5mm × 0.268 ≈ 0.402mm; For a 45° incident angle, the theoretical shadow length L2 = 1.5mm × tan(45°) = 1.5mm × 1 = 1.5mm. Therefore, (ΔH = 1.5mm, L1 = 0.402mm, L2 = 1.5mm) can be combined to form the height difference shadow-related feature vector for this region. This feature clearly informs the subsequent model: if a 45° light source is used, a shadow as long as 1.5mm will be generated on the backlight side of the component, completely covering the adjacent fine circuit area; while the shadow generated by a 15° light source is shorter and has less impact on imaging. If a 0° coaxial light source configuration exists, because its incident angle is 0°, tan(0°) = 0, and the theoretical shadow length is 0, it is marked as the optimal choice, thus prioritizing the recommendation of a shadowless light source at the decision-making level.

[0076] Step 205: The curvature light field focusing feature is composed of the local curvature of the surface and the dome light source applicability index, which is used to quantitatively characterize the influence of the surface curvature on the light field focusing effect.

[0077] Surface local curvature refers to the degree of curvature of the geometry within a microscopic region of the PCB surface. It is obtained by calculating the first and second derivatives of the height field and reflects the drastic change in surface curvature from a flat surface to a curved surface (such as the edge of a BGA solder ball or the bending of component leads). A larger curvature value indicates more severe surface curvature. A dome light source is a type of light source that achieves uniform illumination through diffuse reflection from the inner wall of a hemispherical shape. It can project light onto the object under test from almost any angle, effectively suppressing specular reflection and hard shadows. Light field focusing effect refers to the degree to which light converges or diverges on the microscopic geometry when different types of light sources illuminate a curved surface. Ring light may create localized bright areas on a convex surface, while dome light achieves uniform illumination.

[0078] In some implementations, a three-dimensional shape perception unit is used to perform high-precision scanning on each gridded partition of the PCB sample to obtain the three-dimensional point cloud data of the region. The principal curvature of each pixel or micro-surface is calculated by a differential geometry algorithm, and then the local surface curvature C(x,y) of the region is statistically obtained. The average curvature or Gaussian curvature is usually used as a representative value. The larger the curvature value, the more severe the surface bending.

[0079] Subsequently, a calculation model for the suitability index of the dome light source is constructed based on optical simulation or empirical data. The calculated local curvature C can then be input into a preset suitability function f(C), which is typically a piecewise function or a Sigmoid curve. When the curvature C is below a preset threshold T1 (e.g., 0.05 μm...), the applicability index is calculated. - ¹, when the curvature C is approximately planar, the dome light source applicability index output is relatively low (e.g., 0.2), indicating that directional light sources such as ring lights may be better; when the curvature C is higher than the preset threshold T2 (e.g., 0.2μm), the dome light source applicability index output is relatively low (e.g., 0.2μm). - ¹ When the curvature is severely bent, the applicability index output is close to a high value of 1.0, and the dome light source is strongly recommended; when the curvature is between the two, the applicability index rises smoothly with the increase of curvature.

[0080] Finally, the original local curvature C is compared with the dome light source suitability index calculated for this region. Feature coupling is performed to form a two-dimensional feature vector (C, This quantifies the special requirements of surface curvature on light field distribution, namely, the more severe the curvature, the more necessary it is to use a dome light source to ensure imaging uniformity.

[0081] For example, when processing a PCB sample containing BGA packages, an analysis was performed on a mesh region covering the edges of the BGA solder balls: using 3D point computing, the average curvature of this region reached 0.25 μm. - ¹, much higher than 0.01 μm in the planar region - ¹ indicates that the surface curvature is extremely severe. This curvature value C=0.25 can then be input into the dome light source suitability function. Since this value exceeds the preset threshold T2=0.2μm... - ¹, Applicability Index The output was 0.98 (close to 1.0). Meanwhile, the normal tilt angle in this region varies considerably (from -30° to +30°), and the material contains copper solder balls and solder resist ink. Multispectral analysis shows that copper has a high reflectivity to blue light. If only the normal tilt angle reflectivity coupling characteristics are considered, an attempt could be made to select a ring light at a specific angle to match the local tilt angle; however, the intervention of curvature light field focusing characteristics changes this decision-making path: a high applicability index... =0.98 This value receives a high weight during the feature fusion stage, ultimately forcing the model to select the dome light source as the optimal configuration. In actual imaging, the BGA area image illuminated by the dome light source is uniform and clear, with complete outlines of all solder balls and no local overexposure or shadow interference, verifying the effectiveness of this feature.

[0082] Based on the above technical solutions, the normal tilt angle reflectivity coupling feature establishes a deterministic mapping between the microscopic geometric tilt angle and the specular reflection peak, accurately quantifying the physical conditions for overexposure in highly reflective areas (such as copper foil and solder pads). This allows the feature to actively avoid incident angles matching the normal tilt angle during the light source selection stage, suppressing local overexposure at the imaging source and ensuring the visibility of key geometric features. Simultaneously, the multispectral absorption difference feature introduces the material's absorption rate differences for specific wavelengths. By quantifying the spectral response fingerprints of different materials such as copper, FR4 substrate, and solder resist ink, it can intelligently select the optimal wavelength based on the material composition of the area under test, maximizing the contrast between the circuit edge and the background, and solving the problem of insufficient feature discrimination under single white light illumination. The height difference shadow association feature transforms the height data obtained from 3D measurements into theoretical shadow length predictions at multiple angles, quantifying the degree of shadow interference generated by protruding structures such as components under different light source incident angles. This allows for the priority selection of light sources with strong shadow suppression capabilities (such as coaxial or dome lighting), ensuring that details in shadow-covered areas are not obscured. Ultimately, the curvature light field focusing feature forces the introduction of the dome light source applicability index in high curvature regions (such as the edge of BGA solder balls), covering the decision results of other levels of features, prioritizing the imaging uniformity of curved areas, and solving the problem that directional light sources are prone to producing local light spots on severely curved surfaces.

[0083] In another possible implementation of the embodiments of this application, combined with Figure 1-3 As shown, training an analytical model containing a 3D topography feature encoder and a light source response predictor using a paired dataset can be achieved through the following steps 301 to 304, which are explained in detail below: Step 301: Based on the paired dataset, construct a deep learning network as an analysis model. The analysis model includes a 3D shape feature encoder, a light source response predictor, and an optimal light source selector.

[0084] The 3D shape feature encoder is a sub-network in the analysis model, used to compress the input high-dimensional 3D shape feature vector into a low-dimensional implicit feature vector through convolution and pooling operations. The light source response predictor is another sub-network in the analysis model; its input is the implicit feature vector, and it outputs a vector containing the imaging quality scores of all light source configurations through fully connected layers and normalized exponential function layers. The optimal light source selector is a module that uses differentiable selection logic to select the optimal light source configuration parameters based on the imaging quality score vector output by the light source response predictor.

[0085] In some implementations, a deep learning network is built based on a paired dataset, enabling the 3D shape feature encoder to obtain 3D shape feature vectors from the paired dataset. Then, geometric-optical coupling feature maps under different receptive fields are extracted through hierarchical convolution operations. Physical constraints can be explicitly modeled by calculating the cross-covariance matrix. Channel and spatial attention weights are then applied, and finally, implicit feature vectors are obtained through global average pooling and nonlinear dimensionality reduction.

[0086] The light source response predictor obtains this implicit feature vector, and through a fully connected layer and a normalized exponential function layer, outputs an imaging quality score vector corresponding to all light source configurations. .

[0087] Finally, the optimal light source selector selects the optimal light source configuration parameters based on the score vector S using differentiable selection logic (such as Gumbel-Softmax), thus achieving end-to-end decision-making from 3D topography to the optimal light source.

[0088] Step 302: The 3D shape feature encoder obtains the 3D shape feature vectors from the paired dataset, extracts and outputs low-dimensional implicit feature vectors through convolutional and pooling layers. The implicit feature vectors are used to characterize the essential geometric and material properties that cannot be directly observed but determine the optical response.

[0089] The process of the 3D topography feature encoder learning and outputting the implicit feature vector of the PCB sample includes: the 3D topography feature encoder acquiring the paired dataset and calling the 3D topography feature vector; performing hierarchical convolution operations on the 3D topography feature vector to extract geometric-optical coupling feature maps under different receptive fields (containing feature representations of the coupling relationship between surface geometric features (such as height and curvature) and optical response characteristics (such as reflection and shadow), and the multi-scale geometric convolution module containing parallel dilated convolution kernels; based on the geometric-optical coupling feature map, calculating the cross-covariance matrix between different level feature maps (a mathematical tool used to measure the correlation between different feature maps, which is used to show the statistical dependence between modeling features when constructing interactive feature maps), explicitly modeling the physical constraint relationship between normal tilt angle, material absorptivity, height difference, and curvature, to obtain the interactive feature map; applying channel-dimensional attention weights and spatial-dimensional attention weights to the interactive feature map respectively, and outputting the attention feature map; and performing global average pooling and nonlinear dimensionality reduction on the attention feature map to obtain the implicit feature vector.

[0090] In some implementations, a 3D topographic feature vector containing normal tilt reflectivity coupling features, multispectral absorption difference features, height difference shadow association features, and curvature light field focusing features is retrieved from the paired dataset. At this time, the encoder performs a hierarchical convolution operation on the vector. Its multi-scale geometric convolution module performs parallel computation through multiple dilated convolution kernels with different dilation rates, thereby extracting geometric optical coupling feature maps under different receptive fields, thus capturing cross-scale geometric optical information from local details to global structure.

[0091] The encoder then uses the obtained geometric-optical coupling feature map to explicitly model the constraint relationship between four physical quantities—normal tilt angle, material absorptivity, height difference, and curvature—by calculating the cross-covariance matrix between feature maps at different levels, thereby fusing and generating an interactive feature map.

[0092] Subsequently, the encoder applies attention weights in the channel dimension (for filtering key feature channels) and spatial dimension (for focusing on key spatial regions) to the interactive feature map, and outputs an enhanced attention feature map.

[0093] Finally, global average pooling is performed on the attention feature map to integrate global contextual information, and then nonlinear dimensionality reduction is performed through a fully connected layer to finally output a low-dimensional implicit feature vector rich in physical meaning, which serves as the input to the light source response predictor.

[0094] For example, when processing a mixed region containing BGA solder balls and copper foil, the input 3D topographic feature vector includes the curvature value of that region (0.25 μm). - ¹) and normal tilt angle (ranging from -30° to +30°). In this case, during the hierarchical convolution operation, the convolution kernel with a small receptive field extracts the local curvature features of a single solder ball, while the dilated convolution kernel with a large receptive field captures the layout information of the entire solder ball array. By calculating the cross-covariance matrix of feature maps at different levels, the model learns a strong correlation between high curvature and drastically changing normal tilt angles, thus generating interactive feature maps.

[0095] After applying spatial attention, the model focuses on key transition areas such as the edge of the solder ball; After applying channel attention, the model enhances the feature channels that express curvature information.

[0096] Finally, through global average pooling and dimensionality reduction, a 128-dimensional implicit feature vector is obtained, which highly condenses the physical essence of the region's "high curvature and large tilt angle changes".

[0097] Step 303: The light source response predictor obtains the implicit feature vector, and outputs the imaging quality score vector corresponding to all light source configurations through a fully connected layer and a normalized exponential function layer. , where sj is the probability that the j-th light source configuration can obtain a high-quality image, and K is the total number of light source configurations.

[0098] In some implementations, the light source response predictor first obtains the extracted implicit feature vectors from the 3D shape feature encoder, which are then fed into a network composed of multiple fully connected layers. At this point, the fully connected layer will gradually map the high-dimensional implicit features to a dimensional space with the same number of light source configuration types K through layer-by-layer linear transformation and nonlinear activation (such as the ReLU function), thereby extracting deep scoring features related to the light source imaging effect.

[0099] Next, this K-dimensional score feature vector is passed to the final normalized exponential function layer. This layer transforms the original score value into a probability distribution with a sum of 1 through exponential operation and normalization, which is the image quality score vector S.

[0100] At this point, each component in the vector The value ∈(0,1) precisely quantifies the probability that the j-th light source configuration can achieve high-quality imaging effects such as high contrast-to-noise ratio and low overexposure in this region. Thus, the light source response predictor completes the mapping from abstract implicit features to specific, comparable light source quality probabilities.

[0101] For example, when processing a PCB area containing exposed copper traces and FR4 substrate, the 128-dimensional implicit feature vector output by the 3D topography feature encoder is fed into the light source response predictor. At this time, the three-layer fully connected network inside the predictor (with dimensions changing from 128 to 64 to 32 to 8) abstracts and maps the features layer by layer, generating an 8-dimensional original score vector.

[0102] Subsequently, the Softmax layer normalizes this vector, outputting the final image quality score vector S=[0.05,0.02,0.10,0.03,0.70,0.04,0.03,0.03]. This vector clearly shows that for this region, the fifth light source configuration (assuming a blue ring light) has a 70% probability of producing a high-quality image, while other configurations have significantly lower probabilities, thus providing unambiguous instructions for the optimal light source selector.

[0103] Step 304: The optimal light source selector selects the optimal light source configuration parameters based on the imaging quality score vector S using differentiable selection logic.

[0104] Differentiable selection logic is a special mathematical calculation method that can simulate the operation of selecting the maximum value from a set of probability values ​​during neural network training. This allows the gradient of the entire selection process to be backpropagated, enabling end-to-end training of the model. Light source configuration parameters refer to the specific combination of control commands used to uniquely determine a lighting state. These typically include adjustable physical quantities such as the wavelength of the light source, incident angle, light intensity, exposure time, and polarization state.

[0105] In some implementations, the optimal light source selector first receives the imaging quality score vector passed from the light source response predictor. This allows the call to differentiable selection logic for processing. For each score... Add random noise that follows a Gumbel distribution, then apply the Softmax function to the noise-added values ​​and set a temperature parameter τ.

[0106] When the temperature parameter τ approaches 0, the output of Gumbel-Softmax approximates a one-hot vector, where the position with the highest probability is close to 1 and the other positions are close to 0, thus achieving soft selection of the optimal index.

[0107] At this point, multiplying the output approximate one-hot vector by the matrix composed of all light source configuration parameters yields the weighted optimal light source configuration parameters. Since the entire process consists of continuous functions, the gradient can smoothly propagate back through the Gumbel-Softmax layer to the preceding light source response predictor and 3D shape feature encoder, enabling the entire analysis model to be jointly optimized end-to-end in a supervised or unsupervised manner.

[0108] For example, when processing a high-curvature BGA region on a PCB, the imaging quality score vector S output by the light source response predictor is [0.05, 0.10, 0.70, 0.15], corresponding to coaxial light, ring light, dome light, and polarized light, respectively.

[0109] At this point, the optimal light source selector employs Gumbel-Softmax logic, with a temperature parameter τ=0.5. After adding Gumbel noise and performing calculations, an approximate one-hot vector [0.01, 0.02, 0.96, 0.01] is output. This vector is then weighted and synthesized with a preset light source configuration parameter matrix (e.g., the parameters for the dome light are [λ=full spectrum, θ_inc=diffuse, I=80]), resulting in optimal light source configuration parameters that are almost entirely determined by the dome light parameters. This result is then sent to the light source controller, thus activating the dome light source for the image to be acquired, effectively avoiding localized overexposure of the BGA solder ball surface.

[0110] Based on the above technical solution, a 3D shape feature encoder compresses the high-dimensional shape feature vectors in the paired dataset into low-dimensional implicit feature vectors through convolutional pooling operations. This solves the problem of traditional methods struggling to extract decisive optical features from complex geometry and materials, enabling the model to deeply understand the essential properties of highly reflective and high-curvature areas on the PCB surface, laying a feature foundation for subsequent accurate prediction. Secondly, the light source response predictor, also based on this implicit feature vector, outputs imaging quality score vectors for all light source configurations through fully connected layers and Softmax layers. This transforms abstract physical features into quantifiable probability distributions, solving the imaging instability problem caused by material differences and 3D structural interference under fixed light source schemes, and achieving intelligent matching of light source parameters from experience-based tuning to data-driven processes. Finally, the optimal light source selector uses differentiable selection logic to select the optimal light source configuration parameters from the score vectors, overcoming the non-differentiability problem of traditional hard selection operations. This allows the entire model to perform end-to-end joint optimization, ensuring the real-time output of the best lighting scheme in actual production, thereby guaranteeing the accuracy of cutting path recognition.

[0111] In another possible implementation of the embodiments of this application, combined with Figure 1-4 As shown, the process of co-monitoring the PCB sample surface and electrical components can be achieved through the following steps 401 to 404, which are explained in detail below: Step 401: Collect electrical test results of PCB samples based on the deep monitoring test network. The deep monitoring test network includes a first test line located at the expected cut-off layer and a second test line located at the inner adjacent warning layer.

[0112] The depth monitoring test network is a dedicated electrical test circuit system pre-designed and built into each layer of the PCB. It consists of test conductors located on different internal circuit layers, vertical interconnect vias connecting these conductors, and test pads on the PCB surface. Its overall continuity status changes after the PCB is cut, allowing for precise deduction of the actual cut depth through electrical testing. The electrical test result refers to the continuity status data obtained by applying electrical signals to the depth monitoring test network using automated testing equipment and detecting the loop current or voltage. It is typically represented by a binary judgment result of open circuit or short circuit. The first test line is a dedicated copper foil conductor laid on the precise layer (i.e., the cut-off layer) inside the PCB where the cutting process is expected to stop. It adopts a continuous serpentine layout to cover the entire projected area of ​​the cutting path. When the cutting depth reaches the layer exactly, the conductor remains intact and is in a short-circuit state. When the cutting depth exceeds the layer and cuts below, the conductor is cut and is in an open circuit state (i.e., as long as the cutting depth touches or exceeds the target layer, at least one serpentine conductor will be cut, thus achieving comprehensive depth monitoring coverage without blind spots). The second test lead is another set of dedicated copper foil conductors laid on the inner adjacent layer (i.e., the warning layer) of the layer containing the first test lead. Its horizontal projection is offset from the first test lead to avoid damage from normal-depth cuts. When the cut depth is too deep and penetrates the layer, the conductor is severed, creating an open circuit (i.e., the cut depth is allowed to fluctuate within the range of touching the first test lead but not damaging the second test lead; this range is typically set to 0.05mm to 0.1mm based on PCB lamination tolerances and cutting equipment precision, ensuring both detection sensitivity and avoiding excessive alarms due to normal process fluctuations). Vertical interconnect vias are drilled from the PCB surface to the inner layer containing the first and second test leads, with copper plating inside the holes for electrical connection (i.e., during PCB manufacturing, online AOI optical inspection and continuity testing are required to ensure reliable connection of each via, avoiding misjudgments of cut depth due to open or short circuits in the vias themselves). Test pads are located on the PCB surface and are electrically connected to the first and second test leads via vertical interconnects, for contact with the probes of the flying probe test unit.

[0113] In some implementations, the expected cut-off layer of the area to be cut is determined based on the product specifications during the computer-aided design phase of the PCB. Then, a first test line with continuous serpentine traces is deployed within the projection range of the predetermined cutting path on that layer to ensure that the copper foil traces densely cover the entire area to be cut with a line width of 0.15mm and a line spacing of 0.2mm.

[0114] Meanwhile, a second test line is deployed on the inner adjacent layer of the layer where the first test line is located. This set of lines is staggered from the first test line by about half a line spacing (approximately 0.1 mm) in horizontal projection to avoid accidental contact at normal cutting depth.

[0115] After completing the inner layer circuit design, dedicated test pads can be set in the blank positions near the edge of the cutting area on the PCB surface. Vertical holes are drilled from these pads to the blind holes in the inner layer where the first and second test lines are located. Vertical interconnecting vias are formed through the copper plating process inside the holes, thereby enabling the electrical signals of the inner layer test lines to be led out to the surface layer.

[0116] This allows for the direct acquisition of electrical test results, specifically including: obtaining the test network coordinate file corresponding to the PCB sample. The test network coordinate file includes the coordinate positions of the first test line and the test pads connected to the first test line; that is, when a PCB enters the flying probe testing station after completing the cutting process, the industrial barcode reader at the station entrance first scans the Data Matrix QR code on the edge of the PCB to obtain the unique identifier ID of the PCB and uploads it to the main control computer. The main control computer retrieves the pre-stored test network coordinate file from the manufacturing execution system based on this ID. This file records the coordinate data of all test pads of this model of PCB in XML format. For example, the coordinates of pad C1 connected to the first test line are (X12345, Y67890), and the coordinates of pad B1 connected to the second test line are (X12365, Y67870).

[0117] The motion controller of the flying probe test unit (typically a high-speed motion control card based on DSP or FPGA, responsible for parsing coordinate data in the test network coordinate file and driving the probes to move at high speed along the planned path through a closed-loop servo control algorithm) drives the independent probes of the flying probe test unit (independently movable test probes in the flying probe test unit, usually made of tungsten steel or beryllium copper alloy, with a sharp conical or four-claw head, each probe equipped with an independent servo motor drive system and Z-axis pressure control mechanism) to move above the corresponding test pads according to the test network coordinate file. The servo motors then control the probes to drop vertically onto the pad surface at a preset pressure value. The coordinate file is transmitted to the motion controller of the flying probe test unit via the EtherCAT real-time industrial Ethernet bus. At this point, the trajectory planning algorithm inside the motion controller calculates the optimal movement path and speed curve for each probe based on these coordinate points. Subsequently, the motion controller sends pulse commands to the servo motor drivers of the four independent probes, driving the probes to move at high speed along the X and Y axes at an interpolation speed of 3000 times per minute to approximately 2mm above the target pad coordinates. Then, the Z-axis servo motor activates the position loop control mode.

[0118] A DC test voltage is applied to an independent probe, while a high-precision current detection circuit collects the loop current value to obtain the electrical test status (a binary judgment result obtained after the current detection circuit collects the data and compares it with a preset threshold, usually represented as "short circuit" (current flows) or "open circuit" (no current flows). This result is then bound to the unique identifier ID of the corresponding PCB sample to generate the electrical test result. Specifically, the probe is controlled to descend vertically with a preset pressure value of 2.0N until it contacts the pad surface. When the pressure sensor detects that the contact force has reached the preset value, the Z-axis stops descending and maintains this position. At this time, the DC power module inside the test unit applies a 5V test voltage to the probe, and the high-precision current detection circuit begins to collect the loop current at a sampling rate of 10,000 times per second. After a 50ms stabilization time, the average value is taken. If the average current is greater than the preset threshold of 1mA, it is judged as a short circuit and a logic value of "1" is recorded; if it is less than 0.1mA, it is judged as an open circuit and a logic value of "0" is recorded. This binary electrical test status is bound to the previously read PCB unique identifier ID to form a complete test record data packet, which is uploaded to the quality database for storage via industrial Ethernet.

[0119] The flying probe testing process of a 5G communication base station PCB is illustrated as an example. The PCB model is ZTE-5G-V3, and four test pads C1, C2, B1, and B2 are set near its blind slot cutting area. At the testing station, the barcode reader scans the QR code on the PCB edge to obtain the ID "20240715-001-0234". The main control computer then retrieves the corresponding test network coordinate file, recording the coordinates of C1 as (45.234mm, 32.567mm) and C2 as (45.434mm, 32.567mm). The motion controller drives probes 1 and 2 of the four probes to move above C1 and C2 respectively. After the Z-axis descends and contacts, a 5V voltage is applied. The current detection circuit measures a loop current of 2.35mA, which is greater than 1mA, thus determining that the C1-C2 network is in a short-circuit state and recording "1".

[0120] Subsequently, probes 3 and 4 were moved to coordinates (45.334mm, 32.367mm) and (45.534mm, 32.367mm) on B1 and B2 respectively for testing. The measured current was 0.02mA, which is less than 0.1mA, and the B1-B2 network was determined to be in an open circuit state, recorded as "0". The final generated electrical test result data packet is {ID:20240715-001-0234,C1C2:1,B1B2:0,Timestamp:20240715143025}. After this data packet is uploaded to the quality database, it is associated with the previously stored 3D topographic features of the PCB for subsequent model training and depth determination.

[0121] Step 402: Call the preset electrical judgment logic, combine it with the electrical test results, and obtain the depth qualified label. The depth qualified label serves as the truth value label of the internal cutting state.

[0122] Specifically, this includes: acquiring the topological characteristic parameters of the deep monitoring test network (including at least the misalignment distance between the first test line and the second test line, which is used to quantify the unique set of parameters describing the geometric structure and physical arrangement of the deep monitoring test network) and electrical test results (binary on / off state data obtained by contact electrical measurement of the PCB surface test pads through flying probe test units, including at least the on / off state of the first test line and the on / off state of the second test line). The deep decision logic engine (a hardware or software processing unit that integrates preset physical constraint rules, used to automatically decode and filter the input topology feature parameters and electrical test results) decodes and filters the topology feature parameters and electrical test results according to preset physical constraint rules to obtain decoded qualified data (intermediate data that is determined to be within the qualified cutting depth range after being decoded and filtered by the deep decision logic engine). Obtain the serpentine line spacing, line width, and number of serpentine segments from the decoded qualified data, calculate the depth estimate, and encapsulate it into a depth-qualified label for output.

[0123] In some implementations, after the flying probe testing unit completes the electrical measurements on the PCB, it retrieves the test network coordinate file and design parameter file corresponding to the PCB model from the manufacturing execution system, and parses the topology characteristic parameters from them, including at least the misalignment spacing between the first test line and the second test line. .

[0124] Simultaneously, electrical test result data packets from the flying probe test unit are received via industrial Ethernet. The first test line continuity status S1 and the second test line continuity status S2, which are bound to the unique identifier ID of the PCB, are obtained from the data packets. S1 and S2 are both binary values ​​(1 indicates short circuit and 0 indicates open circuit).

[0125] This will activate the deep decision-making logic engine, combining S1, S2, and... The engine then loads its internal physical constraint rule processing unit. At this point, the engine will decode the state according to three preset rules: If S1=0 and S2=0 are detected, the decoding is "overcut" state; If S1=1 and S2=1 are detected, the decoding is "undercut" state; If S1=1 and S2=0 are detected, the data is decoded as "qualified" and marked as qualified data to proceed to the next process.

[0126] Once the data is marked as qualified for decoding, the engine automatically triggers the depth estimation process to obtain the serpentine line spacing of the test network from the design parameter file. and line width The number N of serpentine segments cut during the first test lead cutting process is analyzed from historical data of the high-precision current detection circuit (obtained by the number of instantaneous open-circuit pulses appearing in the detected current waveform). A preset depth estimation formula can then be invoked. Calculations are performed to obtain an estimated depth value. .

[0127] Finally, the state decoding result ("overcut" / "undercut" / "qualified") can be compared with the depth estimate. The system performs structured encapsulation to generate a complete depth-qualified label, which is then output to the central quality database via an industrial bus and stored in association with the 3D topographic features and adaptive light source image at the same cutting point.

[0128] The physical constraint rules are constructed based on the physical modeling of the cutting process, specifically as follows: When the cutting depth touches or exceeds the target layer where the first test line is located, the first test line is cut off, and S1 changes from 1 to 0; When the cutting depth reaches the warning layer where the second test line is located, the second test line is cut off, and S2 changes from 1 to 0; while the misalignment spacing This defines the depth safety window that exists between the time the first test line is cut and the time the second test line is cut.

[0129] Taking a 24-layer PCB used in 5G communication base stations as an example, it requires a blind slot depth control cut of 0.8mm on the surface of the 8th layer (target layer). If, in the preset test network topology characteristic parameters, the misalignment distance between the first test line and the second test line... The serpentine line spacing is 0.08mm. The line width is 0.2mm. It is 0.1mm.

[0130] After the flying probe testing unit completed the test on the PCB, the output electrical test results were as follows: the current measured at pads C1-C2 connected to the test lines on layer 8 was 2.3mA, which was determined to be a short circuit (S1=1); the current measured at pads B1-B2 connected to the warning lines on layer 7 was 0.02mA, which was determined to be an open circuit (S2=0). The deep judgment logic engine obtained S1=1, S2=0 and After reaching 0.08mm, it is decoded as "qualified" according to preset rules and marked as qualified data. Subsequently, the engine analyzes the waveform record from the high-precision current detection circuit and finds three rapid current fluctuations at the moment of cutting, indicating that the number of cut serpentine segments N=3. Substituting these values ​​into the depth estimation formula, the following calculation is performed: =3×(0.2mm / 2)+(0.1mm / 2)=0.35mm. Since the target layer is located 0.8mm below the PCB surface, this depth estimate indicates that the actual cutting depth extends 0.35mm downwards from the target layer surface, which is exactly within the safety window (0mm to 0.08mm+ below the target layer surface). Ultimately, the depth approval label on the package output reads "Approved, Depth = 350μm".

[0131] Step 403: Associate and store the depth-qualified labels with the 3D topographic features to form an enhanced training sample with internal depth ground truth.

[0132] In some implementations, the central quality control computer simultaneously receives two data sources via an industrial Ethernet bus: depth qualification label data packets and 3D topographic feature data packets. It can then invoke a timing synchronization service, using the Data Matrix QR code ID laser-engraved on the PCB edge as the primary key, to perform consistency checks on the two data packets, ensuring that the depth qualification labels and 3D topographic features originate from the same cutting area and the same inspection cycle.

[0133] After the verification is passed, the data fusion engine starts the association mapping operation, taking the status judgment and depth estimation value in the depth qualified label as target fields and appending them to the end of the data record with three-dimensional shape features as the main body, forming a complete one-to-one key-value pair data structure.

[0134] Subsequently, the database write interface is invoked to write the key-value pairs in batches to a specially constructed training sample storage area via a high-speed data bus. This storage area uses a columnar storage engine, with the 3D shape feature vector as the row key and the fields of the depth-qualified labels as column families, ensuring efficient batch reading of features and labels during subsequent model training.

[0135] At the same time, the sample index table is automatically updated after the write operation is completed, recording the storage location, generation time, and corresponding PCB model identifier of the newly added training samples.

[0136] Step 404: Perform multi-task extended training on the analysis model based on the enhanced training samples to obtain the target analysis model. The target analysis model is used to simultaneously predict the optimal light source configuration parameters and the predicted cutting depth, and to invert the internal cutting quality through surface morphology features.

[0137] Extended training refers to the process of introducing new supervisory signals and network branches into the original analysis model, and iteratively updating the model parameters using the newly added training samples. The target analysis model is a functionally enhanced deep learning network obtained after extended training. Its input is still three-dimensional shape features, and the output layer includes both the original light source response prediction branch and the newly added depth prediction branch.

[0138] In some implementations, when the number of accumulated samples in the training sample storage area reaches a preset threshold (e.g., 5000), the extended training process of the analysis model is automatically triggered. At this time, training samples can be loaded in batches from the storage area. Each sample contains a three-dimensional shape feature vector as input and a corresponding depth qualification label (including state judgment and depth estimation value) as a supervision signal.

[0139] The model version management service is invoked to load the weights of the currently deployed analysis model from the model library as initial parameters for extended training. Subsequently, a new depth prediction decoder branch is added after the output of the original analysis model's 3D shape feature encoder. This branch consists of a three-layer fully connected network, with its input dimension aligned with the dimension of the implicit feature vector output by the 3D shape feature encoder (128-dimensional). After a layer-by-layer linear transformation from 128 to 64 to 1 and ReLU nonlinear activation, it finally outputs a continuous scalar value as the predicted cutting depth.

[0140] During training, the depth prediction decoder is jointly optimized with the original 3D shape feature encoder and light source response predictor. Loss function The expression form is: ,in The ranking loss is the result of the original light source prediction. The mean squared error loss for depth prediction. This is the balance factor (default is 0.3).

[0141] During training, the Adam optimizer was used with an initial learning rate of 0.0001 and a batch size of 64. In each iteration, both the light source prediction loss and depth prediction loss were calculated simultaneously, and the gradients were passed to both the depth prediction decoder and the shared 3D shape feature encoder via backpropagation. After 20 iterations, the depth prediction error on the validation set converged to within ±15μm. At this point, training was stopped, and the updated model weights were solidified, forming the target analysis model. This target analysis model then receives 3D shape features as input. After the 3D shape feature encoder extracts implicit feature vectors, the calculations are performed in parallel on two paths: one path outputs the optimal light source configuration parameters from the light source response predictor, and the other path outputs the cut depth prediction values ​​from the depth prediction decoder. Finally, the two outputs are synchronously packaged and deployed to an online inference environment.

[0142] Based on the above technical solution, by pre-setting a first test line located at the expected cutting cut-off layer and a second test line on the adjacent inner warning layer inside the PCB, and utilizing serpentine routing and staggered layout, a comprehensive coverage of the cutting depth and a safety margin design are achieved, solving the technical blind spot of traditional methods that cannot perceive the internal cutting depth online. Secondly, by pre-setting electrical judgment logic to decode the test results and generate a depth qualification label, the abstract cutting depth is transformed into a quantifiable status indicator, achieving a precise mapping from physical cutting to electrical judgment, overcoming the production challenges of delayed and costly micro-slice damage detection. Simultaneously, the depth label is associated with and stored with three-dimensional morphological features to form training samples with true depth values, opening up the data channel between electrical results and visual features, enabling the model to learn the implicit correlation between surface morphology and internal cutting quality. Finally, based on this sample, the analysis model is extended and trained to obtain the target analysis model, which simultaneously predicts the cutting depth value while outputting the optimal light source configuration, achieving a functional leap from seeing the surface to seeing the interior. This enables comprehensive inspection based primarily on visual prediction and secondarily on electrical sampling, reducing the frequency of online testing and cycle time loss, while ensuring in-depth control capabilities for non-destructive full inspection, and improving cutting accuracy, yield rate and production continuity.

[0143] The above primarily describes the solutions of the embodiments of this application from the perspective of device implementation. It is understood that each device, for example, a machine vision-based PCB board cutting and monitoring system, includes at least one of the hardware structures and software modules corresponding to each function in order to achieve the above-mentioned functions. Those skilled in the art should readily recognize that, based on the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware 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.

[0144] This application embodiment can divide a machine vision-based PCB board cutting and monitoring system into functional units based on the above method example. For example, each function can be divided into separate functional units, or two or more functions can be integrated into the same processing unit. The integrated unit can be implemented in hardware or as a software functional unit. It should be noted that the unit division in this application embodiment is illustrative and only represents one logical functional division; other division methods may be used in actual implementation.

[0145] When using integrated units, Figure 5The diagram illustrates a possible structure of a machine vision-based PCB board cutting monitoring system as described in the above embodiments. The machine vision-based PCB board cutting monitoring system includes: The multimodal data acquisition module is used to acquire image data of PCB samples from different angles under different light sources, calculate imaging quality evaluation indicators, including at least contrast-to-noise ratio and overexposure rate; acquire physical data of the PCB sample surface, construct a three-dimensional morphological feature vector, and store it in association with the imaging quality evaluation indicators to form a paired dataset. The morphological light field correlation modeling module uses paired datasets to train an analysis model that includes a 3D topography feature encoder and a light source response predictor. The analysis model includes a 3D topography feature encoder that learns and outputs implicit feature vectors of PCB samples and a light source response predictor that predicts the imaging quality score of the corresponding light source based on the implicit feature vectors. The online adaptive imaging execution module acquires the image to be cut on the PCB and extracts the three-dimensional shape features to be cut. It obtains the optimal light source configuration parameters through analysis model. Based on the optimal light source configuration parameters, it adjusts the light source to the corresponding state, identifies the cutting path of the image to be cut, and generates compensation commands to drive the cutting execution mechanism. The electrical depth monitoring and verification module is deployed in parallel with the online adaptive imaging execution platform. It is used to perform electrical tests on PCBs with built-in depth monitoring test networks after cutting, obtain electrical test results and generate depth qualification labels. The cross-layer data fusion engine module is used to connect to the online adaptive imaging execution platform and the electrical depth monitoring and verification platform respectively. It is used to synchronize and associate depth qualified labels with the three-dimensional topographic features acquired before cutting to form fusion training samples with depth ground truth.

[0146] In one possible implementation, the morphological light field correlation modeling module is also used to acquire fused training samples and incrementally update the analysis model to update the analysis model to predict the internal cutting depth through surface three-dimensional morphological features.

[0147] The fusion training samples consist of depth-qualified labels generated by the electrical depth monitoring and verification platform and 3D topographic features collected by the online adaptive imaging execution platform. These are then time-synchronized and associated with each other by the cross-layer data fusion engine module, forming a dataset with depth ground truth. Incremental update training refers to the process of iteratively optimizing parameters based on the original analysis model using newly generated fusion training samples. The updated analysis model, i.e., the target analysis model, adds the ability to predict internal cutting depth through surface 3D topographic features, achieving a functional leap from simply optimizing light source configuration to simultaneously predicting cutting quality.

[0148] In some implementations, the three-dimensional topographic features of the PCB to be cut are acquired by the online adaptive imaging execution platform before cutting, and the depth qualification label generated by the electrical depth monitoring and verification platform after the PCB is cut and tested by flying probes is received.

[0149] The unique identifier ID of the PCB can be used as the primary key to accurately synchronize and associate the three-dimensional morphological features of the same PCB before cutting with the depth qualification label after cutting, forming a structured fusion training sample and storing it in the database.

[0150] Once the number of accumulated fusion training samples reaches a preset threshold (e.g., 5000), the morphology-light field correlation modeling module automatically triggers the incremental update training process.

[0151] During training, the model loads the original analysis model weights as initial parameters and uses the 3D topographic features from the fused training samples as input. The depth estimates from the depth qualification labels are used as supervision signals. The model's original 3D topographic feature encoder and the newly added depth prediction branch are jointly optimized using the backpropagation algorithm, adjusting the network weights. It typically employs an elastic weight consolidation algorithm to prevent catastrophic forgetting, ensuring that the model learns new capabilities without losing its original optimal light source prediction ability. The final result is a target analysis model that can simultaneously output light source configuration parameters and cut depth prediction values.

[0152] Taking a 5G communication base station PCB depth control cutting production line as an example, the three-dimensional morphological features of the area to be cut of a PCB are collected by an online adaptive imaging execution platform before cutting. These features include information such as the normal tilt angle of the copper foil in the area and the curvature of the BGA solder balls.

[0153] After the PCB is cut, it is sent to the flying probe test unit to perform electrical tests on the built-in 8th layer (target layer) test line and 7th layer (warning layer) test line. The result is "short circuit on the 8th layer test line and open circuit on the 7th layer test line". Based on this, the depth determination logic engine outputs a "qualified" label and estimates the actual cutting depth as 350μm by the number of serpentine lines that are cut.

[0154] At this point, the cross-layer data fusion engine module binds the "350μm" depth qualification label to the 3D topographic features of the PCB before cutting, forming a fusion training sample. After the production line accumulates 10,000 such samples, the morphological light field correlation modeling module initiates incremental training. When faced with a new PCB with similar 3D topographic features, the updated target analysis model can not only predict that a 30° blue ring light should be used to obtain the best image, but also simultaneously predict that its cutting depth is approximately 355μm. Since this predicted value falls within the qualification range, the cutting quality can be determined to be qualified without further electrical testing.

[0155] Although this application has been described herein in conjunction with various embodiments, those skilled in the art, by reviewing the accompanying drawings, the disclosure, and the appended claims, will understand and implement other variations of the disclosed embodiments in carrying out the claimed application. In the claims, the word "comprising" does not exclude other components or steps, and "a" or "an" does not exclude multiple components. A single processor or other unit can implement several functions listed in the claims. While different dependent claims may recite certain measures, this does not mean that these measures cannot be combined to produce good results.

[0156] Although this application has been described in conjunction with specific features and embodiments, it is obvious that various modifications and combinations can be made thereto without departing from the spirit and scope of this application. Accordingly, this specification and drawings are merely exemplary illustrations of this application as defined by the appended claims, and are considered to cover any and all modifications, variations, combinations, or equivalents within the scope of this application. Clearly, those skilled in the art can make various alterations and modifications to this application without departing from the spirit and scope of this application. Thus, if such modifications and variations of this application fall within the scope of the claims of this application and their equivalents, this application is also intended to include such modifications and variations.

Claims

1. A PCB board cutting monitoring method based on machine vision, characterized in that, include: Image data of PCB samples under different light sources and at different angles are collected, and imaging quality evaluation indicators are calculated. The imaging quality evaluation indicators include at least contrast-to-noise ratio and overexposure rate. Physical data of the PCB sample surface are collected to form a three-dimensional morphological feature vector, which is then associated with and stored with imaging quality evaluation indicators to form a paired dataset. An analytical model comprising a 3D topography feature encoder and a light source response predictor is trained using the paired dataset. The analytical model comprises a 3D topography feature encoder that learns and outputs implicit feature vectors of the PCB samples and a light source response predictor that predicts the imaging quality score of the corresponding light source based on the implicit feature vectors. Acquire images of the PCB to be cut and extract its three-dimensional morphological features. Analyze the model to obtain the optimal light source configuration parameters. Based on the optimal light source configuration parameters, the light source is adjusted to the corresponding state, the cutting path of the image to be cut is identified, and a compensation command for driving the cutting actuator is generated.

2. The PCB board cutting monitoring method based on machine vision according to claim 1, characterized in that, The process of collecting physical data from the surface of the PCB sample to construct a three-dimensional topographic feature vector specifically includes: Three-dimensional point cloud data of PCB samples are collected to construct a three-dimensional topographic feature vector. The three-dimensional topographic feature vector includes normal tilt angle reflectivity coupling feature, multispectral absorption difference feature, height difference shadow correlation feature, and curvature light field focusing feature. The normal tilt angle reflectivity coupling feature is formed by the coupling of the surface normal tilt angle and the peak reflectivity of the corresponding region, and is used to quantify the geometric optical relationship between the incident angle of the light source and the specular reflection. The multispectral absorption difference feature is composed of the difference in absorption rate of different material categories at a preset wavelength, and is used to quantitatively characterize the selective absorption characteristics of the material to the spectrum. The height difference shadow association feature is composed of the maximum height difference in the micro-region and the theoretical shadow length under the preset incident light source angle, and is used to quantitatively characterize the geometric influence of the three-dimensional structure on the light source shadow. The curvature light field focusing feature is composed of the local curvature of the surface and the dome light source applicability index, and is used to quantitatively characterize the influence of the surface curvature on the light field focusing effect.

3. The PCB board cutting monitoring method based on machine vision according to claim 1, characterized in that, The construction and training process of the analytical model specifically includes: Based on the paired dataset, a deep learning network is constructed as an analysis model, which includes a 3D shape feature encoder, a light source response predictor, and an optimal light source selector. The three-dimensional shape feature encoder obtains the three-dimensional shape feature vector from the paired dataset, and extracts and outputs a low-dimensional implicit feature vector through convolutional and pooling layers. The implicit feature vector is used to characterize the essential geometric and material properties that cannot be directly observed but determine the optical response. The light source response predictor acquires the implicit feature vector and, through a fully connected layer and a normalized exponential function layer, outputs an imaging quality score vector corresponding to all light source configurations. ,in The probability of obtaining a high-quality image by configuring the j-th light source, where K is the total number of light source configurations; The optimal light source selector selects the optimal light source configuration parameters based on the imaging quality score vector S using differentiable selection logic.

4. The PCB board cutting monitoring method based on machine vision according to claim 3, characterized in that, The process by which the three-dimensional topography feature encoder learns and outputs the implicit feature vector of the PCB sample specifically includes: The 3D topography feature encoder acquires the paired dataset and calls the 3D topography feature vector; The three-dimensional topographic feature vector is subjected to hierarchical convolution operation to extract geometric optical coupling feature maps under different receptive fields. The multi-scale geometric convolution module contains parallel dilated convolution kernels. Based on the aforementioned geometric-optical coupling feature map, an interactive feature map is obtained by calculating the cross-covariance matrix between feature maps of different levels, explicitly modeling the physical constraint relationships between normal tilt angle, material absorptivity, height difference, and curvature. Attention weights in the channel dimension and spatial dimension are applied to the interaction feature map respectively, and the resulting attention feature map is output. The attention feature map is subjected to global average pooling and nonlinear dimensionality reduction to obtain implicit feature vectors.

5. A PCB board cutting monitoring method based on machine vision according to any one of claims 1-4, characterized in that, It also includes the process of co-monitoring the surface and electrical components of the PCB sample, specifically including: The electrical test results of the PCB sample are collected based on a deep monitoring test network, which includes a first test line located at the expected cut-off layer and a second test line located at the inner adjacent warning layer. The preset electrical judgment logic is invoked, and combined with the electrical test results, a depth qualified label is obtained. The depth qualified label serves as the truth value label of the internal cutting state. The depth-qualified labels are associated with and stored with the three-dimensional shape features to form an enhanced training sample with internal depth ground truth. The analysis model is extended and trained using the enhanced training samples to obtain a target analysis model. The target analysis model is used to simultaneously predict the optimal light source configuration parameters and the predicted cutting depth, and to invert the internal cutting quality through surface morphology features.

6. The PCB board cutting monitoring method based on machine vision according to claim 5, characterized in that, The deep monitoring test network specifically includes the first test line, the second test line, vertical interconnect vias, and test pads: The first test line is a serpentine continuous wire laid on the expected cut-off layer and distributed in a dense grid pattern within the projection area of ​​the cut path to ensure that the cut depth at all locations can be detected. The second test line is a conductor laid on the inner adjacent warning layer, and is staggered from the first test line in horizontal projection to provide a safety margin for cutting depth. The vertical interconnect vias are drilled from the PCB surface to the inner layer where the first and second test lines are located, and the holes are plated with copper to achieve electrical connection. The test pad is located on the PCB surface and is electrically connected to the first and second test lines through the vertical interconnect vias, for contact with the probes of the flying probe test unit.

7. The PCB board cutting monitoring method based on machine vision according to claim 5, characterized in that, The process of obtaining the electrical test results specifically includes: Obtain the test network coordinate file corresponding to the PCB sample. The test network coordinate file includes the coordinate positions of the first test line and the test pads connected by the first test line. The motion controller of the flying probe test unit drives the independent probe of the flying probe test unit to move above the corresponding test pad according to the test network coordinate file, and controls the probe to fall vertically onto the pad surface with a preset pressure value through the servo motor. A DC test voltage is applied to the independent probe, and the loop current value is collected by a high-precision current detection circuit to obtain the electrical test status. This status is then bound to the unique identifier ID of the corresponding PCB sample to generate the electrical test result.

8. The PCB board cutting monitoring method based on machine vision according to claim 5, characterized in that, The process of invoking the preset electrical judgment logic and combining it with the electrical test results to obtain the depth qualification label specifically includes: Obtain the topology characteristics of the deep monitoring test network and the electrical test results; The deep judgment logic engine decodes and filters the topology feature parameters and electrical test results according to preset physical constraint rules to obtain decoded qualified data. Obtain the serpentine line spacing, line width, and number of serpentine segments from the decoded qualified data, calculate the depth estimate, and encapsulate it into a depth qualified label for output.

9. A PCB board cutting monitoring system based on machine vision, characterized in that, include: The multimodal data acquisition module is used to acquire image data of PCB samples from different angles under different light sources, calculate imaging quality evaluation indicators, and the imaging quality evaluation indicators include at least contrast-to-noise ratio and overexposure rate; acquire physical data of the PCB sample surface, construct a three-dimensional morphological feature vector, and store it in association with the imaging quality evaluation indicators to form a paired dataset. The morphological light field correlation modeling module uses the paired dataset to train an analysis model that includes a three-dimensional topography feature encoder and a light source response predictor. The analysis model includes a three-dimensional topography feature encoder that learns and outputs the implicit feature vectors of the PCB sample and a light source response predictor that predicts the imaging quality score of the corresponding light source based on the implicit feature vectors. The online adaptive imaging execution module acquires the image of the PCB to be cut and extracts the three-dimensional shape features to be cut. It obtains the optimal light source configuration parameters through analysis model. Based on the optimal light source configuration parameters, it adjusts the light source to the corresponding state, identifies the cutting path of the image to be cut, and generates compensation commands for driving the cutting execution mechanism. An electrical depth monitoring and verification module is deployed in parallel with the online adaptive imaging execution platform. It is used to perform electrical tests on the PCB with a built-in depth monitoring test network after cutting, obtain electrical test results, and generate a depth qualified label. The cross-layer data fusion engine module is used to connect to the online adaptive imaging execution platform and the electrical depth monitoring and verification platform respectively, and is used to perform time-series synchronization and association binding of the depth qualified label with the three-dimensional morphological features acquired before cutting to form a fusion training sample with depth ground truth.

10. A PCB board cutting monitoring system based on machine vision according to claim 9, characterized in that: The morphological light field correlation modeling module is also used to acquire the fusion training samples and incrementally update the analysis model to update the analysis model to predict the internal cutting depth through surface three-dimensional morphological features.