A multilayer circuit board drilling defect automatic detection method and system
Patent Information
- Application Number
- CN202611215833.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-12
- Publication Date
- 2026-10-30
AI Technical Summary
更重要的是,实际生产中正常钻孔的形态特征分布非理想规整,存在合理工艺波动区间,而传统阈值分割或模板匹配方法难以有效刻画这种分布式边界,导致正常样本被误判为缺陷或微小缺陷被漏判
[0018]与现有技术相比,本发明提供的一种多层线路板钻孔缺陷自动检测方法,能够提高钻孔内部隐蔽缺陷的检出率与判别的鲁棒性。
Smart Images

Figure CN123015476A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of multilayer circuit board technology, and in particular, it relates to an automatic detection method and system for drilling defects in multilayer circuit boards. Background Technology
[0002] As the core interconnect carrier of electronic devices, the drilling quality of multilayer circuit boards directly affects the reliability of interlayer conductivity and the yield of finished products. With the increase in the number of circuit board layers and the development of finer hole diameters, defects such as rough hole walls, perpendicularity deviations, and interlayer delamination cracks are easily generated during the drilling process. Traditional visual inspection and contact measurement methods are inefficient and have a high rate of missed detection, making it difficult to meet the quality control requirements of mass production. Existing automated optical inspection (AOI) technology mainly analyzes the hole morphology based on single-view two-dimensional images, which can only identify visible surface defects and cannot detect hidden damage inside the hole wall and at the interlayer interface. Furthermore, it lacks accurate characterization of the complete three-dimensional morphology of the drilled hole. In recent years, some studies have introduced methods such as ultrasonic or optical coherence tomography to obtain depth information, but multi-source data are often analyzed independently, lacking a unified characterization framework. More importantly, the morphological characteristics of normal drilled holes in actual production are not ideally regular and have reasonable process fluctuation ranges. Traditional threshold segmentation or template matching methods are difficult to effectively characterize this distributed boundary, leading to normal samples being misjudged as defects or minor defects being missed. Summary of the Invention
[0003] The purpose of this invention is to provide an automatic detection method and system for drilling defects in multilayer circuit boards, so as to overcome the shortcomings of the prior art and improve the detection rate and robustness of the identification of hidden defects inside the drill holes.
[0004] One embodiment of this application provides an automatic detection method for drilling defects in multilayer circuit boards, the method comprising:
[0005] The system acquires drilling images of the surface of multilayer circuit boards, and simultaneously obtains the depth direction of the drilling and the reflection signals of the interlayer interfaces to generate a multi-source image set for characterizing the morphological features of the drilling.
[0006] The multi-source image set is subjected to pixel-level fusion and edge enhancement processing to extract the borehole contour, borehole wall verticality and interlayer delamination geometric parameters of each borehole, and to construct a multi-dimensional feature descriptor subset of the borehole.
[0007] Based on the known multidimensional feature descriptor subset of normal borehole samples, the features of normal borehole samples are mapped to a high-dimensional feature space through a kernel function during the offline training phase. The minimum hypersphere that encloses all feature points of normal borehole samples is solved in the high-dimensional feature space. The center coordinates and radius length of the hypersphere are recorded to generate a normal borehole distribution boundary model.
[0008] The multidimensional feature descriptor subset of the borehole to be tested is input into the normal borehole distribution boundary model, the spatial distance from the feature vector of the borehole to be tested to the center of the hypersphere is calculated, and the deviation sequence of each borehole to be tested is generated by combining the radius length.
[0009] Based on the deviation sequence, defects are determined for each borehole to be tested. Boreholes with a deviation less than or equal to the radius length are determined as normal boreholes, and boreholes with a deviation greater than the radius length are determined as defective boreholes. The location coordinates and deviation level of the defective boreholes are output according to the deviation values from largest to smallest, generating a detection result set that includes the distribution of defect locations and the severity of deviation.
[0010] Another embodiment of this application provides an automatic detection system for drilling defects in multilayer circuit boards, the system comprising:
[0011] The acquisition module is used to acquire drilling images of the surface of multilayer circuit boards, and simultaneously obtain the depth direction of the drilling and the reflection signals of the interlayer interface to generate a multi-source image set to characterize the morphological features of the drilling.
[0012] The processing module is used to perform pixel-level fusion and edge enhancement processing on the multi-source image set, extract the borehole contour, borehole wall verticality and interlayer layering fracture geometric parameters of each borehole, and construct a multi-dimensional feature descriptor subset of the borehole.
[0013] The recording module is used to map the features of normal borehole samples to a high-dimensional feature space through a kernel function during the offline training phase, based on a subset of multidimensional feature descriptions of known normal borehole samples. In this high-dimensional feature space, the module solves for the minimum hypersphere that encloses all feature points of normal borehole samples, records the center coordinates and radius of the hypersphere, and generates a normal borehole distribution boundary model.
[0014] The generation module is used to input the multi-dimensional feature descriptor subset of the borehole to be tested into the normal borehole distribution boundary model, calculate the spatial distance from the feature vector of the borehole to be tested to the center of the hypersphere, and generate the deviation sequence of each borehole to be tested in combination with the radius length.
[0015] The determination module is used to determine the defects of each borehole to be tested according to the deviation sequence. Boreholes with a deviation less than or equal to the radius length are determined as normal boreholes, and boreholes with a deviation greater than the radius length are determined as defective boreholes. The module outputs the location coordinates and deviation level of the defective boreholes according to the deviation values from large to small, and generates a detection result set containing the defect location distribution and deviation severity.
[0016] Another embodiment of this application provides a storage medium storing a computer program, wherein the computer program is configured to execute the method described in any of the preceding claims when running.
[0017] Another embodiment of this application provides an electronic device including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the method described in any of the preceding claims.
[0018] Compared with existing technologies, the automatic detection method for drilling defects in multilayer circuit boards provided by this invention can improve the detection rate and robustness of judgment of hidden defects inside the drill holes. Attached Figure Description
[0019] Figure 1 The hardware structure block diagram of a computer terminal for an automatic detection method for drilling defects in multilayer circuit boards provided in an embodiment of the present invention;
[0020] Figure 2 A flowchart illustrating an automatic detection method for drilling defects in multilayer circuit boards provided by an embodiment of the present invention;
[0021] Figure 3 This is a schematic diagram of the structure of an automatic detection system for drilling defects in multilayer circuit boards provided in an embodiment of the present invention. Detailed Implementation
[0022] The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0023] This invention first provides an automatic detection method for drilling defects in multilayer circuit boards. This method can be applied to electronic devices, such as computer terminals, specifically ordinary computers.
[0024] The following detailed explanation uses a computer terminal as an example. Figure 1 This is a hardware structure block diagram of a computer terminal for an automatic detection method of drilling defects in multilayer circuit boards provided in an embodiment of the present invention. Figure 1 As shown, the computer device includes a processor, memory, and network interface connected via a system bus, wherein the memory may include non-volatile storage media and internal memory.
[0025] See Figure 2 The present invention provides an automatic detection method for drilling defects in multilayer circuit boards, which may include the following steps:
[0026] S201: Acquire drilling images of the surface of a multilayer circuit board, and simultaneously obtain the depth direction of the drilling and the reflection signals of the interlayer interface to generate a multi-source image set for characterizing the morphological features of the drilling.
[0027] Specifically, microscopic images of the surface of multilayer circuit boards can be acquired using industrial cameras to obtain top-view two-dimensional grayscale images of each drill hole opening, generating a dataset of drill hole surface images.
[0028] The core of this step is to use a high-resolution optical imaging system to obtain the top-view topographic information of the drilled holes on the surface of the multilayer circuit board, providing basic image data for subsequent hole contour extraction and geometric parameter calculation. The specific implementation method is as follows:
[0029] The industrial camera employs a high-resolution area-array CMOS sensor paired with a telecentric optical lens to form a microscopic imaging unit. The telecentric lens, with its object-side telecentricity, eliminates perspective errors at different heights, ensuring that the geometric dimensions of the aperture edge in the image are strictly proportional to its actual size. This avoids dimensional measurement deviations caused by minor warping of the circuit board surface. The imaging system achieves a lateral resolution of 2μm / pixel, sufficient to clearly distinguish surface defects such as minute burrs, chipped edges, and copper foil warping at the drilled aperture. The illumination system uses a ring-shaped diffused LED light source to uniformly illuminate the circuit board surface at a low angle, creating a clear grayscale contrast between the drilled aperture wall and the board surface. Simultaneously, it suppresses specular reflection glare from the copper foil surface, ensuring clear grayscale transitions and stable features at the aperture edge.
[0030] During image acquisition, the multi-layer circuit board is fixed on a high-precision XY motion platform. The platform moves the circuit board region by region along a preset grid path. An industrial camera triggers capture at each acquisition position, with a single field of view coverage of 12mm × 9mm. A 15% overlap is maintained between adjacent fields of view for feature matching during subsequent image stitching. After each field of view is acquired, the system automatically records the corresponding platform coordinates with a precision of 1μm, ensuring that the position coordinates of each subsequent drill hole can be traced back to the global coordinate system of the circuit board. Images are stored in 8-bit grayscale format, with grayscale values ranging from 0 to 255, where 0 represents pure black and 255 represents pure white. The interior of the drill hole exhibits low grayscale values due to the difficulty of light penetration, while the circuit board substrate and copper foil surface exhibit medium to high grayscale values. The grayscale difference between the two is typically greater than 80, providing a good contrast basis for subsequent edge detection.
[0031] In the example, a multilayer circuit board measuring 300mm×200mm has 2400 drill holes. After field-by-field acquisition and image stitching, a high-resolution surface microscopic image covering the entire board is obtained. The morphology, position, and shape features of each drill hole are completely recorded. All images are stored in the drill hole surface image dataset according to the acquisition order and corresponding coordinates for subsequent feature extraction processes.
[0032] By scanning layer by layer along the borehole depth direction using a laser triangulation sensor, radial distance data at each depth of the borehole inner wall is obtained, generating a borehole depth direction contour dataset.
[0033] The core of this step is to use the principle of laser triangulation to perform layer-by-layer scanning of the borehole wall in the depth direction, obtaining the radial dimensions and inner wall morphology of the borehole at different depth sections, providing quantitative data for borehole wall perpendicularity calculation and depth direction defect identification. The specific implementation method is as follows:
[0034] The laser triangulation distance sensor consists of a semiconductor laser emitter, an imaging lens, and a position-sensitive detector. The laser emitter emits a red laser beam with a wavelength of 650nm, which is focused and projected onto the inner surface of the borehole. The scattered light reflected from the inner wall is converged by the imaging lens onto the photosensitive surface of the position-sensitive detector. Based on the offset of the light spot on the detector and combined with trigonometric relationships, the distance from the sensor to the measured inner wall surface can be calculated. The sensor has a depth measurement resolution of 1μm and a radial distance measurement accuracy of 3μm, which is sufficient to distinguish minute irregularities and drill marks on the borehole wall surface.
[0035] During scanning, the laser sensor is mounted on a precision lifting slide along the Z-axis. The slide drives the sensor to descend at a constant speed of 5 mm / s along the central axis of the borehole. A distance sample is triggered every 0.02 mm of descent, meaning the sampling interval along the depth direction is 20 μm. The sensor completes a 360-degree circumferential scan at each depth position, with 360 circumferential sampling points. This means one radial distance data point is acquired for every 1 degree, thus obtaining the complete inner wall contour of that depth section. For a typical multilayer board borehole with a depth of 3 mm, a total of 150 depth sections can be acquired, each containing 360 radial distance data points. The data volume is sufficient and the resolution is high, enabling a complete reconstruction of the three-dimensional morphology of the borehole's inner wall.
[0036] In the example, a borehole with a nominal diameter of 0.3 mm and a depth of 2.4 mm, after layer-by-layer scanning, yields the inner wall contour data of 120 depth sections from the borehole opening to the bottom. By analyzing the radial distance variations at different depth sections, the borehole wall's taper, perpendicularity, and defects such as local pits and protrusions can be calculated. All radial distance data for each depth section corresponds one-to-one with its corresponding depth coordinates and is uniformly stored in the borehole depth direction contour dataset according to the borehole number, providing complete data support for the subsequent extraction of borehole wall perpendicularity parameters.
[0037] By transmitting a preset high-frequency ultrasonic wave toward the borehole sidewall using an ultrasonic scanning microscope, the reflected echo signals from different interlayer interfaces are received, and the amplitude and arrival time of each reflected waveform are recorded to generate an interlayer interface reflection signal dataset.
[0038] The core of this step is to utilize the reflection characteristics of high-frequency ultrasonic waves at the interfaces of different media to detect the bonding state of the interfaces between layers below the borehole sidewall, identify internal defects such as interlayer delamination and voids, and compensate for the limitation of optical and laser methods that can only observe the surface. The specific implementation method is as follows:
[0039] The ultrasonic scanning microscope uses a high-frequency focused ultrasonic transducer as the detection unit. The transducer's center operating frequency is 100MHz, corresponding to a wavelength of approximately 15μm in the epoxy resin substrate. It possesses extremely high longitudinal resolution, capable of clearly distinguishing the interface between a copper foil layer and the substrate layer with a thickness of only 20μm. The transducer is mounted on a scanning arm that can rotate and move up and down along the central axis of the borehole. During scanning, the transducer uses water as the coupling medium to emit high-frequency ultrasonic waves towards the sidewall of the borehole. After the ultrasonic waves penetrate the substrate, they are reflected when they encounter interfaces with different acoustic impedances. The reflected echoes are received by the same transducer and converted into electrical signals.
[0040] The preset high-frequency ultrasonic pulse repetition frequency is 5kHz. A sinusoidal pulse consisting of three cycles is emitted at each detection location. The pulse energy is precisely calibrated to ensure that the ultrasonic wave can penetrate the entire thickness of the plate and return a detectable echo signal, without signal saturation or distortion due to excessive energy. The system records the amplitude and arrival time of each echo. The amplitude reflects the difference in acoustic impedance between the media on both sides of the interface, while the arrival time corresponds to the depth of the interface. Given the speed of sound, the arrival time and depth satisfy the relationship d = v × t / 2, where d represents the interface depth, v represents the speed of ultrasonic wave propagation in the substrate, t represents the echo arrival time, and the coefficient 2 represents the round-trip propagation of the ultrasonic wave.
[0041] In the example, an 8-layer multilayer circuit board has seven interlayer interfaces distributed sequentially below the drilled hole sidewalls. Each interface generates a characteristic echo. Under normal circumstances, the amplitude of each echo is stable and the arrival time is uniformly distributed. When a delamination crack appears at a certain interlayer interface, the interface changes from a solid contact to an air gap, and the acoustic impedance difference increases sharply. The amplitude of the corresponding echo will increase significantly. At the same time, due to the presence of the air layer, the echo amplitude of subsequent deeper interfaces will show a significant attenuation. By analyzing the changes in echo amplitude and arrival time, the depth and circumferential expansion range of the delamination defect can be accurately located. The echo waveform data of all detection locations are stored in the interlayer interface reflection signal dataset according to the drill hole number and circumferential angle, providing a basis for subsequent determination of interlayer delamination cracks.
[0042] The borehole surface image dataset, borehole depth direction profile dataset, and interlayer interface reflection signal dataset are associated by borehole number, and an image index relationship between the surface layer and each inner layer is established for each borehole, ultimately generating a multi-source image set.
[0043] The core of this step is to uniformly associate and index the detection data from three different sources and dimensions according to the unique identifier of the borehole, forming a complete multi-source feature data package for each borehole. This provides a structured data foundation for subsequent fusion processing and feature extraction. The specific implementation method is as follows:
[0044] The borehole numbers employ a globally unique coding system, with each borehole corresponding to a unique identifier string. The coding rules include the circuit board batch number, board number, row number, and column number, ensuring that duplication or confusion does not occur throughout the production and inspection process. The association operation uses the borehole locations identified in the surface image dataset as a baseline. Based on the global coordinates of each borehole, it retrieves the corresponding scan data from the depth profile dataset and the interlayer reflection dataset, completing a one-to-one correspondence among the three types of data through coordinate matching. The tolerance range for coordinate matching is set to 20μm. Considering the slight positioning deviations between different acquisition systems, data within this tolerance range are considered to be from the same borehole.
[0045] After data association is completed, the system establishes a multi-level image index relationship for each borehole. The index structure uses the borehole number as the primary key, and is divided into three sub-items: surface image index, depth profile index, and interlayer reflection index. The surface image index records the pixel coordinate range and field of view number of the borehole in the surface mosaic image; the depth profile index records the storage address and corresponding depth value of each depth section data; and the interlayer reflection index records the echo waveform data address and corresponding detection angle of each circumferential angular position. The index relationship is organized in a tree structure, which has high query efficiency. During subsequent processing, all multi-source data of the borehole can be quickly located and retrieved by the borehole number.
[0046] In the example, borehole B07-R12-C45 has a surface image index pointing to a region in field of view number 23 with coordinates ranging from 1245×890 to 1395×1040 pixels. Its depth profile index points to a profile data block containing 120 depth sections, and its interlayer reflection index points to echo waveform data at 360 circumferential angular positions. These three types of data are closely linked through a unified borehole number, forming a complete multi-source information package for that borehole. The associated data and index structure of all boreholes are then aggregated to form a unified multi-source image set, serving as the input data source for subsequent pixel-level fusion and feature extraction processes.
[0047] S202, perform pixel-level fusion and edge enhancement processing on the multi-source image set, extract the borehole contour, borehole wall verticality and interlayer layering fracture geometric parameters of each borehole, and construct a multi-dimensional feature descriptor subset of the borehole;
[0048] Specifically, pixel-level spatial registration can be performed on the surface image and depth contour image of the same borehole in a multi-source image set. The mutual information maximization method is used to align images of different resolutions to a unified pixel coordinate system and generate a registered fused image.
[0049] The core of this step is to precisely align surface 2D images and depth contour images from different sensors, with different resolutions and imaging mechanisms, pixel by pixel in spatial location. This eliminates coordinate offsets and scale inconsistencies caused by sensor installation deviations and field-of-view differences, laying a unified spatial benchmark for subsequent feature extraction. The specific implementation method is as follows:
[0050] Pixel-level spatial registration refers to the ability to map the pixel coordinates of corresponding physical points in two images one-to-one, achieving sub-pixel accuracy. This ensures that surface and depth features are spatially identical during subsequent fusion processing. The surface image, acquired by an industrial camera, has a resolution of 2048 pixels by 2048 pixels, with each pixel corresponding to a physical size of 2.5 micrometers. It primarily reflects the two-dimensional planar morphology of the borehole opening. The depth contour image, generated by a laser triangulation sensor, consists of a sequence of discrete radial distance points along the depth direction, with a lateral sampling interval of 5 micrometers and a depth sampling interval of 2 micrometers. It primarily reflects the three-dimensional morphology of the borehole's inner wall. Since the two types of images differ in resolution, coordinate system origin, and scale, a unified pixel coordinate system must be established through a registration algorithm.
[0051] Mutual information maximization is an image registration method based on statistical information theory. It finds the optimal spatial transformation parameters by measuring the statistical correlation between the gray-level distributions of two images. The larger the mutual information value, the higher the correspondence between the two images. The mutual information is calculated based on the joint probability distribution and the marginal probability distribution, and is expressed as MI(A,B)=H(A)+H(B)-H(A,B), where MI(A,B) represents the mutual information value between image A and image B, H(A) represents the information entropy of image A, H(B) represents the information entropy of image B, and H(A,B) represents the joint entropy of the two images. During the registration process, the system uses an affine transformation model as the basis for spatial transformation. The transformation parameters include five parameters: horizontal translation, vertical translation, rotation angle, horizontal scaling factor, and vertical scaling factor. By iteratively optimizing these parameters, the mutual information value is maximized, at which point the two images reach the optimal alignment state.
[0052] In the example, the origin of the initial coordinate system of the surface image is located at the top left corner of the image, while the origin of the initial coordinate system of the depth contour image is located at the top of the borehole center axis. Initially, the center offset between the two images is approximately 12 pixels, the rotation deviation is approximately 0.8 degrees, and the scale deviation is approximately 3%. The system uses gradient descent to iteratively optimize the transformation parameters, with an initial step size of 0.5 pixels. The iteration termination condition is that the continuous change in mutual information value is less than 0.001 bits. After approximately 80 iterations, the mutual information value increases from the initial 1.2 bits to 3.8 bits, achieving a registration accuracy of 0.3 pixels, meeting the pixel-level registration requirements. After registration, the depth contour image is resampled to the same 2048-pixel multiplied by 2048-pixel resolution as the surface image. All pixels are aligned to a unified pixel coordinate system, generating a registered fused image. This fused image contains both surface grayscale information and depth information; each pixel corresponds to both the surface grayscale value and the radial distance value in the depth direction.
[0053] Anisotropic diffusion filtering is applied to the registered fused image to enhance the edges, preserving the sharp features of the aperture edges while suppressing background noise. Then, the Canny edge detection operator is used to extract the sub-pixel level contour point sequence of the aperture boundary to generate the aperture contour geometric parameter set.
[0054] The core of this step is to effectively suppress image noise and improve the edge signal-to-noise ratio while preserving the details of the aperture edge. Then, a high-precision edge detection algorithm is used to extract the precise contour of the aperture, providing reliable boundary data for subsequent geometric parameter calculations. The specific implementation method is as follows:
[0055] Anisotropic diffusion filtering is an image smoothing method based on partial differential equations. Its core feature is that the diffusion intensity adaptively adjusts with changes in the local image gradient. Strong diffusion is applied in flat regions to suppress noise, while weak diffusion or even reverse diffusion is applied in edge regions to preserve and enhance edges. The expression for the diffusion equation is as follows: In the formula, I_t represents the rate of change of image gray level over time, and div represents the divergence operator. Represents the image gradient. The diffusion coefficient function represents the image diffusion coefficient, and its value varies with the gradient magnitude. When the gradient magnitude is small, the diffusion coefficient is large, and the image is smoothed; when the gradient magnitude is large, the diffusion coefficient is small, and edges are preserved. The diffusion coefficient function is in exponential form, and its expression is: In the formula, k represents the gradient threshold parameter, which is used to control the boundary between the edge and the flat region.
[0056] In the example, the anisotropic diffusion filter iteration count was set to 15, the time step to 0.15, and the gradient threshold k to 25. After filtering, the noise standard deviation in the image background region decreased from 12 grayscale values to 3 grayscale values, demonstrating significant noise suppression. Simultaneously, the gradient magnitude at the aperture edge increased from the initial 80 to 110, enhancing edge contrast by approximately 37%, without any edge position shift, achieving edge-preserving noise reduction. After filtering, the system uses the Canny edge detection operator to extract the aperture boundary. The Canny operator's processing flow includes four steps: Gaussian filtering smoothing, calculating gradient magnitude and direction, non-maximum suppression, dual-threshold detection, and edge connection. The standard deviation of the Gaussian filter is set to 1.2 to further smooth the image and reduce false edges; the Sobel operator is used to calculate the gradient components in the horizontal and vertical directions respectively; non-maximum suppression is used to refine the edge width to the single-pixel level; in the dual threshold detection, the high threshold is set to 60 and the low threshold is set to 20. Points above the high threshold are judged as strong edges, points between the two thresholds and connected to strong edges are judged as weak edges, and the remaining points are discarded.
[0057] After edge detection, the system performs sub-pixel precision enhancement on the extracted single-pixel edges. It uses the gray-scale moment method to calculate the precise sub-pixel position of edge points, and solves for the precise coordinates of the edges by using the gray-scale distribution moments of the edge points and their neighboring pixels, improving the edge positioning accuracy from the integer pixel level to 0.05 pixels. Finally, a sub-pixel contour point sequence of the aperture boundary is extracted, containing approximately 1200 contour points, with each point's coordinate accuracy reaching the 0.1 micrometer level. Based on the contour point sequence, the system calculates the geometric parameter set of the aperture contour, including six parameters: aperture diameter, roundness, center coordinates, ellipticity, perimeter, and area. In the example, a drill hole with a nominal diameter of 0.8 mm has a measured average aperture diameter of 0.802 mm, a roundness error of 0.008 mm, and a center coordinate deviation of 0.012 mm. All parameters are output with sub-pixel precision.
[0058] Extract the depth-radial distance curves of the left and right sides of the borehole inner wall from the borehole depth direction profile dataset, fit the straight line equations of the two side walls respectively and calculate the angle between them and the borehole central axis. The difference between the angle and 90 degrees is used as the borehole wall verticality at that depth, and generate a borehole wall verticality parameter sequence.
[0059] The core of this step is to quantitatively calculate the inclination of the borehole inner wall at different depth positions based on the depth-direction contour scanning data, accurately characterize the perpendicularity deviation of the borehole wall, and provide key three-dimensional morphological parameters for borehole processing quality assessment. The specific implementation method is as follows:
[0060] The borehole depth profile dataset was generated layer by layer along the borehole axis by a laser triangulation sensor. The data format is an ordered sequence of depth values and corresponding radial distance values. The scanning range covers the entire depth from the borehole opening to the bottom, with a total scanning depth of 3.2 mm and a depth direction sampling interval of 0.02 mm. A total of 160 depth sections were collected, and 360 radial distance points were uniformly sampled along the circumference of each section, with a sampling angle interval of 1 degree. The radial distance values of the left and right sides were extracted from the full circumferential data. Using the borehole center axis as a reference, the radial distance on the left corresponds to the 0-degree direction, and the radial distance on the right corresponds to the 180-degree direction. Depth-radial distance curves for the left and right sides were constructed respectively. Each curve contains 160 data points, with the horizontal axis representing the depth value and the vertical axis representing the radial distance value at the corresponding depth.
[0061] The system employs the least squares method to fit a straight line to the depth-radial distance data of the two side walls. The fitted line equation is in the form of r = a・z + b, where r represents the radial distance in millimeters; z represents the depth value in millimeters; a represents the slope of the line, reflecting the rate of inclination of the wall along the depth direction; and b represents the intercept, corresponding to the radial distance at the orifice position. The least squares method solves for the optimal parameters a and b by minimizing the sum of squared residuals between the measured data points and the fitted line. The sum of squared residuals is expressed as S = Σ(r_i - (a・z_i + b))^2, where r_i represents the measured radial distance at the i-th depth point, and z_i represents the depth value at the i-th depth point. The summation iterates through all 160 data points. By taking the partial derivative of S and setting it to zero, the optimal values of a and b can be obtained.
[0062] After fitting, the angle between the wall line and the borehole center axis is calculated. The borehole center axis is vertical, corresponding to an angle of 90 degrees. The inclination angle θ of the wall line is calculated from the slope a, expressed as θ=arctan(|a|), where θ represents the angle between the wall line and the horizontal plane, in degrees. The borehole wall verticality is defined as the difference between this angle and 90 degrees, i.e., verticality deviation Δθ=|90°-θ|, in degrees. The larger this value, the more severe the borehole wall inclination and the worse the verticality. In the example, the slope a of the fitted line on the left wall is 0.0032, corresponding to an inclination angle θ of 89.82 degrees, and a verticality deviation of 0.18 degrees; the slope a of the fitted line on the right wall is -0.0028, corresponding to an inclination angle θ of 89.84 degrees, and a verticality deviation of 0.16 degrees.
[0063] To more precisely reflect the variation of borehole wall perpendicularity along the depth direction, the system employs a sliding window segmented fitting method. The window length is set to 0.4 mm, and the sliding step size is set to 0.1 mm. Local perpendicularity deviations are calculated segment by segment along the depth direction, generating a sequence of borehole wall perpendicularity parameters. This sequence contains 29 perpendicularity data points, covering the entire depth range from 0.2 mm below the borehole opening to 0.2 mm above the borehole bottom. Each data point corresponds to a local perpendicularity deviation value at a specific depth location. In the example, the average perpendicularity deviation for the entire borehole is 0.17 degrees, and the maximum perpendicularity deviation occurs at a depth of 2.1 mm, with a value of 0.23 degrees. This parameter sequence comprehensively reflects the variation of borehole wall perpendicularity along the depth direction.
[0064] The arrival time and amplitude of reflected waves from each interlayer interface are extracted from the interlayer interface reflection signal dataset. When the arrival time of the reflected wave is abnormally advanced and the amplitude is significantly attenuated, it is determined that there is a layering fracture at the interlayer interface. The depth and location of the fracture and the range of the extension angle along the borehole circumference are recorded as interlayer layering fracture parameters. Finally, the borehole profile geometric parameter set, borehole wall verticality parameter sequence and interlayer layering fracture parameters are merged into a multidimensional feature descriptor subset for each borehole.
[0065] The core of this step is to use interlayer reflection signals obtained by ultrasonic scanning microscopy to determine whether there are delamination defects in the interlayer by analyzing the time-domain characteristics of the reflected waves, and to accurately locate the spatial position and extent of the defects. Finally, the three types of feature parameters with different dimensions are integrated into a unified multidimensional feature descriptor, providing complete feature input for the subsequent defect detection model. The specific implementation method is as follows:
[0066] The interlayer interface reflection signal dataset was generated by an ultrasonic scanning microscope. The working principle involves emitting high-frequency ultrasonic waves towards the borehole sidewall. When these waves encounter interfaces with different acoustic impedances, they are reflected. By receiving the reflected echoes and analyzing their arrival time and amplitude, the state of the interlayer interface can be inferred. The ultrasonic scanning microscope operates at a frequency of 75 MHz, at which the longitudinal resolution reaches 10 micrometers, enabling the resolution of interlayer structures thicker than 15 micrometers. The scanning method involves point-by-point scanning along the borehole circumference, with a circumferential sampling interval of 2 degrees, resulting in 180 scanning points throughout the circumference. Each scanning point corresponds to a complete A-scan waveform, with a waveform sampling rate of 500 MHz and a sampling depth range of 0 to 4 millimeters, encompassing a total of 4000 sampling points.
[0067] The reflected wave information of each layer interface is extracted from each A-scan waveform. The multilayer circuit board contains 8 layers of copper foil and 7 layers of dielectric substrate stacked alternately, thus there are 7 interlayer interfaces, corresponding to 7 main reflected wave peaks. The time to arrival of the reflected wave refers to the time interval from the emission of the ultrasonic wave to the reception of the reflected echo. This time is proportional to the interface depth, with a proportionality coefficient of half the speed of sound in the medium, expressed as d=v・t / 2, where d represents the interface depth in millimeters; v represents the speed of sound in the medium in meters per second; and t represents the time to arrival of the reflected wave in microseconds. In the example, the speed of sound in the dielectric substrate is 5400 meters per second, the first layer interface depth is 0.1 millimeters, and the corresponding time to arrival of the reflected wave is approximately 0.037 microseconds. The amplitude of the reflected wave refers to the peak voltage of the reflected wave, reflecting the reflection intensity at the interface. The larger the amplitude, the greater the difference in acoustic impedance on both sides of the interface, and the more complete the interface.
[0068] When a delamination crack exists at the interlayer interface, the acoustic impedance of the air filling the crack is much lower than that of the substrate material, causing strong reflection of ultrasonic waves at the crack. Some energy is reflected back prematurely, resulting in an abnormally early arrival time of the reflected wave at the corresponding interface. Simultaneously, less energy passes through the crack to reach the lower interface, leading to a significant attenuation of the reflected wave amplitude at the lower interface. The system's threshold is set as follows: if the reflected wave arrival time advance is greater than 5% and the amplitude attenuation is greater than 30%, a delamination crack is determined to exist at the interlayer interface. In the example, under normal conditions, the arrival time of the reflected wave at the third interface is 0.185 microseconds, and the amplitude is 120 millivolts. When a delamination crack exists, the arrival time becomes 0.172 microseconds, the advance is 7%, the amplitude becomes 72 millivolts, and the attenuation is 40%. Both indicators exceed the threshold, thus a delamination crack is determined to exist.
[0069] After identifying a layered fracture, the system records the fracture's depth and circumferential expansion range. The depth is calculated from the arrival time of the anomalous reflected wave, with an accuracy of 5 micrometers; the circumferential expansion range is calculated by counting the number of scan points where the fracture feature appears consecutively, with an accuracy of 2 degrees. In the example, the fracture depth is 0.52 millimeters, and the circumferential expansion angle range is 48 degrees, corresponding to a circular interval from 76 degrees to 124 degrees. Finally, the system concatenates 38 feature values—6 parameters from the borehole profile geometry parameter set, 29 parameters from the borehole wall perpendicularity parameter sequence, and 3 parameters from the interlayer layered fracture parameter—in a fixed order to form a multidimensional feature descriptor set for each borehole. This descriptor comprehensively covers the multidimensional feature information of the borehole from its surface morphology to its internal structure.
[0070] S203, based on the known normal borehole sample multidimensional feature descriptor subset, maps the normal borehole sample features to a high-dimensional feature space through a kernel function during the offline training stage, and solves the minimum hypersphere that surrounds all the feature points of the normal borehole samples in the high-dimensional feature space, records the center coordinates and radius length of the hypersphere, and generates a normal borehole distribution boundary model.
[0071] Specifically, a multidimensional feature descriptor subset of each sample can be extracted from a known normal borehole sample library. All feature values of each sample are concatenated into a one-dimensional feature vector in a fixed order. All feature vectors are then standardized to have a mean of zero and a variance of one, generating a standardized normal sample feature vector set.
[0072] The core of this step is to organize the multi-dimensional and multi-dimensional borehole feature data into a standardized vector form, providing input data with a standardized format and consistent scale for subsequent kernel function mapping and hypersphere solving, and eliminating the interference of differences in feature dimensions on model training. The specific implementation method is as follows:
[0073] The normal borehole sample library is a collection of qualified borehole data that has been manually inspected and confirmed to be free of any defects. The samples cover multilayer circuit board boreholes with different hole diameters, layer thicknesses, and processing batches. The sample quantity is sufficient and evenly distributed, fully representing the characteristic distribution patterns of normal boreholes. The sample library in this example contains 2000 normal borehole samples, each corresponding to a borehole on a 12-layer circuit board. The hole diameters cover three mainstream sizes: 0.2mm, 0.3mm, and 0.5mm, and the board thickness ranges from 1.2mm to 3.2mm, ensuring the model has good generalization ability. Each sample's multidimensional feature descriptor subset contains three main categories of features: borehole profile geometric parameters, borehole wall perpendicularity parameter sequence, and interlayer delamination parameters. The orifice profile geometric parameters include four features: equivalent orifice diameter, roundness error, orifice ellipse ratio, and orifice edge roughness. The orifice wall perpendicularity parameter sequence is uniformly sampled along the drilling depth, with one perpendicularity measurement taken every 0.1 mm of depth, generating 20 perpendicularity feature values for a 2.0 mm thick board. The interlayer delamination fracture parameters include three features: the reflected wave amplitude ratio at each layer interface, the reflected wave arrival time offset, and the fracture circumferential propagation angle. A 12-layer circuit board corresponds to 11 interlayer interfaces, totaling 33 features. These three types of features comprise a total of 57 dimensions, constituting a complete multidimensional feature descriptor for each drilled sample.
[0074] Feature vector concatenation is performed according to a fixed order: first, four features representing the orifice profile geometry are concatenated; then, 20 orifice wall verticality features are concatenated sequentially from shallow to deep; finally, three fracture features from each layer are concatenated sequentially from top to bottom according to the interlayer interface. Ultimately, each sample forms a one-dimensional feature vector of length 57. Because the physical meanings and numerical ranges of different features vary greatly—for example, the orifice diameter is on the order of 0.5 mm, while the reflected wave amplitude ratio is on the order of 0.8, and the verticality deviation is on the order of 0.05 degrees—directly inputting these features into the model would cause features with larger values to dominate distance calculations, while the contributions of features with smaller values would be submerged. Therefore, standardization is necessary. Standardization employs a zero-mean, unit-variance method. For each feature dimension, the mean μ_i and standard deviation σ_i of all samples in that dimension are calculated, where i represents the feature dimension index, ranging from 1 to 57. Then, the original value x of each sample in that dimension is subtracted from the mean μ_i and divided by the standard deviation σ_i to obtain the standardized feature value z, expressed as z = (x - μ_i) / σ_i. After standardization, the mean of each feature dimension is 0, and the variance is 1, ensuring all features are on the same numerical scale and that each dimension contributes a balanced weight to subsequent distance calculations.
[0075] In the example, the first feature is the equivalent diameter of the orifice. The mean μ_1 of the 2000 samples is 0.302 mm, and the standard deviation σ_1 is 0.015 mm. The original orifice diameter of a certain sample is 0.312 mm, and the standardized value is (0.312-0.302) / 0.015=0.667. The fifth feature is the verticality of the orifice wall at the first depth position. The mean μ_5 is 0.12 degrees, and the standard deviation σ_5 is 0.04 degrees. The original verticality deviation of a certain sample is 0.18 degrees, and the standardized value is (0.18-0.12) / 0.04=1.5. After standardizing all 57 features of the 2000 samples one by one, a set of standardized normal sample feature vectors is generated. Each vector in this set is a 57-dimensional zero-mean unit variance vector, which can be directly used for subsequent kernel function calculations.
[0076] The Gaussian radial basis kernel function is selected as the mapping kernel. The kernel function value between each pair of samples in the standardized normal sample feature vector set is calculated, the kernel matrix is constructed and centered to generate a centered kernel matrix.
[0077] The core of this step is to map samples from the low-dimensional original feature space to a high-dimensional feature space using a kernel function. This allows normal samples that were originally non-linearly distributed in the low-dimensional space to be tightly enclosed by a compact hypersphere in the high-dimensional space. At the same time, the influence of sample distribution offset is eliminated by centering the kernel matrix, ensuring the accuracy of the subsequent hypersphere solution. The specific implementation method is as follows:
[0078] The Gaussian radial basis function (RBF) kernel is one of the most commonly used kernel functions in the field of support vector data description. Its core function is to nonlinearly map sample points in the original low-dimensional feature space to a high-dimensional or even infinite-dimensional feature space, transforming the complex nonlinear distribution problem in the original space into a relatively simple geometric problem in the high-dimensional space. The expression for the Gaussian RBF kernel is K(x_i,x_j)=exp(-||x_i-x_j||^2 / (2σ^2)), where x_i and x_j represent the i-th and j-th standardized sample feature vectors, respectively, ||x_i-x_j|| represents the Euclidean distance between the two vectors, and σ represents the width parameter of the kernel function, used to control the range of the kernel function and the degree of nonlinearity of the mapping. The larger the value of σ, the smoother the kernel function, the lower the dimensionality of the mapped feature space, and the coarser the fit to the sample distribution; the smaller the value of σ, the sharper the kernel function, the higher the dimensionality of the mapped feature space, and the finer the fit to the sample distribution, but too small a value of σ can easily lead to overfitting of the model. In the example, σ is set to 5.0. This parameter was determined through cross-validation optimization, which achieves the best balance between fitting accuracy and generalization ability.
[0079] The kernel matrix is an n x n symmetric matrix, where n is the total number of normal samples (2000 in this example). The element K_ij in the i-th row and j-th column of the matrix equals the Gaussian radial basis function kernel value between the i-th and j-th samples. Because the kernel function is symmetric, K_ij equals K_ji, therefore the kernel matrix is symmetric. The diagonal elements K_ii are all 1, since the distance between a vector and itself is 0; substituting this into the kernel function expression, exp(0) = 1. When constructing the kernel matrix, the kernel function value between each pair of samples is calculated sequentially. For 2000 samples, a total of 2000 × 2000 = 4000000 kernel function values need to be calculated. Using symmetry, the computational load can be halved. In the example, the standardized Euclidean distance between the first and second samples is 2.3. Substituting this into the kernel function, we get K_12=exp(-2.3^2 / (2×5^2))=exp(-5.29 / 50)=exp(-0.1058)=0.8997. This value represents the inner product of the two samples in the high-dimensional feature space. The closer the value is to 1, the more similar the two samples are in the high-dimensional space, and the closer they are.
[0080] Kernel matrix centering is performed to eliminate the influence of the overall sample distribution deviating from the origin in the high-dimensional feature space, ensuring that the center of the hypersphere obtained in subsequent solutions is aligned with the center of the sample distribution. The specific method for centering is to first calculate the mean of each row of the kernel matrix and the overall mean, and then correct each element K_ij using the formula K'_ij=K_ij-(1 / n)Σ_kK_ik-(1 / n)Σ_kK_kj+(1 / n^2)Σ_kΣ_IK_kI, where K'_ij is the element of the centered kernel matrix, Σ_kK_ik represents the sum of all elements in the i-th row, Σ_kK_kj represents the sum of all elements in the j-th column, Σ_kΣ_IK_kI represents the sum of all elements in the entire kernel matrix, and n is the total number of samples. After centering, the mean vector of all sample vectors in the high-dimensional feature space becomes zero, and the sample distribution is symmetrical about the origin. The resulting minimum hypersphere can then most tightly enclose all sample points, avoiding an excessively large hypersphere radius due to overall sample offset, which would reduce the model's sensitivity to defect detection. In the example, after centering, the mean of all elements in the kernel matrix becomes 0, and the diagonal elements change from 1 to approximately 0.082, reflecting the dispersion of samples relative to the distribution center in the high-dimensional space.
[0081] Using the centered kernel matrix as input, the dual optimization problem of the minimum hypersphere is solved iteratively by the sequence minimum optimization algorithm to obtain the Lagrange multipliers corresponding to each normal sample, and samples with multipliers greater than zero are selected as support vectors to generate a set of support vectors and their corresponding multiplier values.
[0082] The core of this step is to use an efficient iterative optimization algorithm to find the minimum volume hypersphere that can enclose all normal samples in the high-dimensional feature space, obtain the Lagrange multipliers corresponding to each sample, and then select the support vectors that determine the boundary of the hypersphere, providing basic data for subsequent calculations of the sphere's center and radius. The specific implementation method is as follows:
[0083] The original form of the minimum hypersphere problem is to find a hypersphere with center *a* and radius *R* in a high-dimensional feature space, such that all feature points mapped from normal samples lie inside or on the surface of the sphere, while minimizing the volume of the sphere (i.e., minimizing the radius *R*). This problem is a constrained convex optimization problem, which is extremely difficult to solve directly in high-dimensional space. Therefore, it is transformed into a dual problem by introducing Lagrange multipliers. The goal of the dual problem is to maximize a quadratic function of Lagrange multipliers *α_i*, with constraints including that each multiplier *α_i* is greater than or equal to 0 and less than or equal to an upper limit *C*, and the sum of all multipliers equals 1. *C* is a penalty parameter used to control the model's tolerance for abnormal samples. A larger *C* value means a more rigorous encirclement of normal samples and a lower allowable false positive rate; a smaller *C* value means a more lenient model with stronger generalization ability but potentially higher false negative rate. In the example, *C* is set to 0.05, meaning that a maximum of 5% of normal samples are allowed to be falsely identified as defects, ensuring detection sensitivity while avoiding overly sensitive models.
[0084] The Sequence Minimum Optimization algorithm is an efficient algorithm for solving support vector quadratic programming problems. Its core idea is to select only two multipliers for optimization in each iteration, decomposing the complex multivariate optimization problem into a series of simplest two-variable optimization subproblems. Each subproblem has an analytical solution, eliminating the need to call a general numerical optimization solver, thus resulting in extremely high computational efficiency, making it particularly suitable for handling kernel matrix optimization problems with large sample sizes. The algorithm's iterative process is as follows: First, initialize all multipliers α_i to uniform distribution values, i.e., each α_i = 1 / n; then, in each iteration, select the two multipliers that most severely violate the KKT conditions as optimization targets, keeping all other multipliers unchanged, and solve for the optimal update values of these two multipliers and update them; next, check whether all multipliers satisfy the KKT conditions. If there are still multipliers that do not satisfy the conditions, continue to the next iteration until all multipliers satisfy the KKT conditions or the number of iterations reaches a preset upper limit, at which point the algorithm converges.
[0085] In the example, the optimization problem with 2000 samples converged after approximately 120 iterations, ultimately yielding 2000 values for the Lagrange multiplier α_i. The vast majority of these samples correspond to a multiplier α_i equal to 0; these samples are located inside the hypersphere and have no impact on the hypersphere's position and size. Only a small number of samples correspond to multipliers α_i greater than 0; these samples are located on the surface of the hypersphere and determine the hypersphere's center position and radius, and are referred to as support vectors. The example ultimately selected 68 support vectors, approximately 3.4% of the total samples. These support vectors correspond to samples with relatively extreme features among the normal samples, closest to the defect boundary, such as the sample with the largest orifice roundness error, the sample with the largest orifice wall perpendicularity deviation, and the sample with the lowest interlayer reflection amplitude. Together, they form the boundary between normal and defective samples. Support vectors with multipliers greater than zero and less than C are located on the surface of the hypersphere, while support vectors with multipliers equal to C are located outside the hypersphere and are considered acceptable boundary anomaly samples. In the example, among the 68 support vectors, 62 have multipliers between 0 and C, and 6 have multipliers equal to C, indicating a reasonable overall distribution.
[0086] Based on the set of support vectors and their multiplier values, the expression of the hypersphere's center coordinates in the high-dimensional feature space is calculated, and the kernel space distance from any support vector to the center of the sphere is calculated as the hypersphere radius, ultimately generating a normal borehole distribution boundary model.
[0087] The core of this step is to use the obtained support vectors and multipliers to derive the kernel space representation of the hypersphere's center in high-dimensional space, and to calculate the hypersphere's radius. This ultimately constructs a normal borehole distribution boundary model that can be used for defect detection, providing a criterion for calculating the deviation of subsequent test samples. The specific implementation method is as follows:
[0088] The coordinates of the center of a hypersphere in a high-dimensional feature space cannot be directly expressed as an explicit expression because the feature space after mapping by the Gaussian radial basis function kernel has extremely high or even infinite dimensions, making it impossible to directly represent the specific coordinates of the center with a finite-dimensional vector. However, based on the theoretical derivation of support vector data description, the center can be represented as the weighted sum of the feature vectors after mapping all support vectors, with the weights being the corresponding Lagrange multipliers. The expression for the center 'a' is a = Σ_iα_iφ(x_i), where α_i is the Lagrange multiplier corresponding to the i-th support vector, and φ(x_i) is the mapping vector of the i-th support vector x_i in the high-dimensional feature space. The summation iterates through all support vectors. Although φ(x_i) cannot be calculated directly, the squared distance from any sample x to the center a can be indirectly calculated using a kernel function. The derived expression is ||φ(x)-a||^2=K(x,x)-2Σ_iα_iK(x,x_i)+Σ_iΣ_jα_iα_jK(x_i,x_j), where K(x,x) is the kernel function value between sample x and itself, which is always equal to 1; K(x,x_i) is the kernel function value between sample x and the i-th support vector; and K(x_i,x_j) is the kernel function value between the i-th and j-th support vectors. The entire expression consists entirely of kernel function values and multipliers, without the need to explicitly calculate high-dimensional mapping vectors. This is the core technique of the kernel method, namely the kernel trick.
[0089] The radius R of the hypersphere is calculated by selecting any support vector whose multiplier is greater than zero and less than C. The distance from this support vector to the center of the hypersphere is the radius, because such support vectors lie strictly on the surface of the hypersphere, and their distance to the center is exactly equal to the radius. To improve calculation accuracy, the average distance from multiple boundary support vectors to the center can also be used as the radius value, reducing numerical calculation errors. In the example, support vector number 37 is selected for calculation. The multiplier α_37 of this sample is 0.023, which is between 0 and C, and belongs to a typical boundary support vector. Substituting into the distance squared formula, the first term K(x_37,x_37)=1; the second term is 2 multiplied by the sum of the products of all support vector multipliers and their corresponding kernel function values, and the result is 1.874; the third term is the sum of the weighted products of the kernel function values of all support vectors pairwise, and the result is 0.912. Therefore, the distance squared value is 1-1.874+0.912=0.038, and the square root gives a radius R of approximately 0.195. Five more boundary support vectors were randomly selected and calculated separately. The obtained radius values were 0.193, 0.196, 0.194, 0.197, and 0.195, with an average value of 0.195, which is consistent with the single calculation result, verifying the accuracy of the radius calculation.
[0090] The normal borehole distribution boundary model consists of three parts: the mean and standard deviation parameters of each dimension required for standardization, the set of support vectors and their corresponding multiplier values, and the radius of the hypersphere. After the model is built, for any borehole sample to be tested, its feature vectors only need to be processed according to the same standardization process, then the distance to the center of the sphere is calculated by substituting it into the distance formula, and then compared with the radius to determine whether the borehole belongs to the normal distribution range. The model built in the example shows that the false detection rate of normal samples is 3.2%, which is basically consistent with the theoretical tolerance corresponding to the set C value. The detection rate of samples containing typical defects such as borehole deviation, borehole wall roughness, and interlayer delamination reaches 98.7%, which can effectively distinguish between normal boreholes and defective boreholes. The model has a small storage size, only needing to store the feature data and multiplier values of 68 support vectors, as well as the radius and standardization parameters, with a total data volume of less than 10KB, which is convenient for deployment and operation in embedded detection devices. The detection time of a single sample is less than 1 millisecond, which meets the real-time requirements of high-speed online detection.
[0091] S204, input the multi-dimensional feature descriptor subset of the borehole to be tested into the normal borehole distribution boundary model, calculate the spatial distance from the feature vector of the borehole to be tested to the center of the hypersphere, and generate the deviation sequence of each borehole to be tested by combining the radius length;
[0092] Specifically, the same standardization process as in the offline training phase can be performed on the multidimensional feature descriptor subset of each borehole to be tested. The standardized feature vector is then used as the input feature vector of the sample to be tested to generate the standardized feature vector of the sample to be tested.
[0093] The core of this step is to transform the original multidimensional features of the borehole to be tested into a unified numerical scale space according to the same rules as in the offline training phase. This eliminates the differences in units and value ranges between different feature dimensions, ensuring that the test sample and the training sample are in a completely comparable feature space. This avoids deviations in subsequent distance calculations due to inconsistent feature scales. The specific implementation method is as follows:
[0094] The standardization process employs a zero-mean, unit-variance standardization approach, performing the transformation independently for each feature dimension. The transformation formula is x_std = (x - mu) / sigma, where x represents the original feature value, mu represents the mean of that feature dimension on the training set, sigma represents the standard deviation of that feature dimension on the training set, and x_std represents the standardized feature value. The standardization of the test samples must strictly reuse the mean and standard deviation vectors calculated during the training phase; it cannot be recalculated using the statistics of the test samples themselves, otherwise it will cause a shift in the feature space and compromise the consistency of the model's decision boundaries. Each borehole under test contains a multidimensional feature descriptor subset comprising three main categories: borehole profile geometric parameters, borehole wall verticality parameter sequence, and interlayer delamination fracture parameters, totaling 48 features. The borehole profile category includes 12 dimensions, covering indicators such as borehole ellipticity, borehole area deviation, borehole roundness error, and borehole edge roughness. The borehole wall verticality category includes 32 dimensions, covering the verticality deviation value at a sampling point every 0.2 mm along the borehole depth direction. The interlayer delamination fracture category includes 4 dimensions, covering fracture depth location, circumferential propagation angle, reflected wave amplitude attenuation rate, and reflected wave time offset.
[0095] In the example, we take the original feature vector of a borehole to be tested. The original value of the borehole ellipticity is 0.023 mm. The mean (mu) of this feature dimension in the training set is 0.015 mm, and the standard deviation (sigma) is 0.004 mm. Substituting these values into the formula, we obtain a standardized value of 2.0, meaning that the borehole ellipticity of the borehole to be tested is 2 standard deviations higher than the average level of normal samples. Next, we take the verticality deviation at a depth of 1.2 mm in the borehole wall verticality sequence. The original value is 0.8 degrees. The mean of the verticality deviation at this location in the training set is 0.3 degrees, and the standard deviation is 0.25 degrees. The standardized value is 2.0. After transforming all 48 features according to the mean and standard deviation of their respective dimensions, we obtain a one-dimensional standardized feature vector of length 48. The values of each dimension in the vector are all within a scale range centered at zero and with unit variance, making the values between different dimensions directly comparable. After standardization, the system will perform integrity checks on the feature vectors to ensure that there are no missing values or outliers. Once the checks are passed, the feature vectors will be used as the formal input feature vectors for the test sample, and will be used for subsequent kernel function calculations and distance determination.
[0096] Using the set of support vectors and kernel function in the normal borehole distribution boundary model, the kernel function value between the standardized feature vector of the test sample and each support vector is calculated to generate the kernel function value vector of the test sample.
[0097] The core of this step is to map the standardized feature vector of the test sample to the same high-dimensional feature space as the training sample using a kernel function, establishing a similarity metric between the test sample and all support vectors. This provides the basic data for subsequently calculating the distance from the test sample to the center of the hypersphere. The specific implementation is as follows:
[0098] The kernel function used is the Gaussian radial basis function (RBF) kernel. The essence of the Gaussian RBF kernel is to map linearly inseparable samples in a low-dimensional space to an infinite-dimensional feature space, transforming the originally nonlinear classification boundary into a linearly separable hypersphere in the high-dimensional space. This allows a single-class hypersphere model to characterize the distribution boundary of normal samples. The kernel width parameter has been determined to its optimal value through cross-validation during offline training and is directly reused in the testing phase to ensure consistency of the mapping space. Support vectors are boundary samples selected from all normal training samples, with corresponding Lagrange multipliers greater than zero. These samples determine the position and size of the hypersphere and are the core elements constituting the normal borehole distribution boundary model.
[0099] In the example, the normal borehole distribution boundary model contains 36 support vectors. The closer the support vector is, the larger its kernel function value, reflecting the higher the similarity between the test sample and the support vector in the high-dimensional space. After calculating the kernel function value for the test sample and all 36 support vectors one by one, a kernel function value vector of length 36 is obtained. Each element in the vector corresponds to the kernel function calculation result of one support vector. This vector completely records the positional relationship of the test sample relative to all boundary support vectors in the high-dimensional feature space and is the only input data for subsequent calculation of the distance to the center of the sphere. Double-precision floating-point arithmetic is used in the kernel function calculation process to ensure that the calculation accuracy meets the distance determination requirements and avoids misjudgment due to numerical errors.
[0100] Based on the kernel function value vector of the sample to be tested and the kernel space expression of the center of the hypersphere, calculate the squared distance value from the feature vector of the sample to be tested to the center of the hypersphere, and output the distance value as the original spatial distance value of the sample to be tested, thus generating a sequence of original distance values for each sample to be tested.
[0101] The core of this step is to use the sphere center expression constructed by support vectors and Lagrange multipliers to indirectly calculate the squared distance from the test sample to the sphere center through algebraic operations of the kernel function without explicitly calculating the coordinates of the sphere center in high-dimensional space. This avoids the curse of dimensionality problem caused by direct calculation in high-dimensional space. The specific implementation method is as follows:
[0102] The expression for the center of the hypersphere in the high-dimensional feature space is a weighted summation, meaning the center vector equals the sum of the mapping vectors of all support vectors in the high-dimensional space multiplied by their corresponding Lagrange multipliers. Since the dimensions of the high-dimensional space are extremely high or even infinite, the coordinates of the center cannot be directly calculated. Therefore, a kernel function technique is used to transform distance calculation into an algebraic operation of the kernel function. The derivation formula for the squared distance from the test sample to the center is the same.
[0103] In the example, for a multilayer circuit board containing 256 drill holes, the system sequentially performs the above calculation process for each drill hole to be tested. Each drill hole corresponds to an original distance value. The distance values of all drill holes are arranged in order of drill hole number to generate a sequence of original distance values for each sample to be tested. Each value in the original distance value sequence directly reflects the degree of deviation of the corresponding drill hole from the center of the normal sample distribution in the high-dimensional feature space. The larger the value, the more the feature combination of the drill hole deviates from the distribution range of the normal samples, and the higher the possibility of defects. During the calculation process, sufficient significant digits are retained for all intermediate results to ensure that the accuracy of the final distance value can support the subsequent fine-level classification.
[0104] The original distance value sequence of each test sample is compared with the radius length of the hypersphere one by one. The difference between each distance value and the radius length is calculated, and the difference is divided by the radius length to make it dimensionless, finally generating the deviation sequence of each test borehole.
[0105] The core of this step is to convert the absolute distance value into a relative deviation ratio relative to the hypersphere radius, thereby achieving comparability of judgment results between different batches and models with different parameters. At the same time, the positive or negative value of the difference directly distinguishes between normal and defective products, providing a unified quantitative benchmark for subsequent defect grading and sorting. The specific implementation method is as follows:
[0106] The hypersphere radius R is a quantitative representation of the normal sample distribution boundary. All samples located inside or on the surface of the hypersphere are considered normal samples, while all samples located outside the hypersphere are considered abnormal samples, i.e., defective samples. The radius value is calculated using support vectors during the training phase. The distance from any support vector to the center of the sphere is taken as the radius. Since all support vectors are located on the hypersphere, the distance values corresponding to any support vector are equal. The deviation is calculated using the formula delta = (DR) / R, where delta represents the deviation, D represents the original distance from the sample to the center of the sphere, and R represents the hypersphere radius. When delta is less than or equal to zero, it indicates that the sample is located inside or on the surface of the hypersphere, which is considered a normal borehole; when delta is greater than zero, it indicates that the sample is located outside the hypersphere, which is considered a defective borehole. The deviation is expressed as a relative proportion, eliminating the influence of differences in the absolute value of the radius under different model parameters. This makes the detection results from different production lines and different plate types comparable laterally and facilitates the unified setting of defect level classification thresholds.
[0107] In the example, the radius R of the hypersphere is 0.165. Taking the original distance D of one borehole to be tested as 0.142, the deviation delta is calculated as (0.142 - 0.165) / 0.165 = -0.139. This value is less than zero, indicating a normal borehole. Taking the original distance D of another borehole to be tested as 0.198, the deviation delta is calculated as (0.198 - 0.165) / 0.165 = 0.200. This value is greater than zero, indicating a defective borehole, with a deviation equivalent to 20% of the radius. For a circuit board containing 256 boreholes, the system sequentially calculates the deviation for each borehole, mapping the calculation results to the borehole numbers to generate a complete deviation sequence. Each element in the deviation sequence contains the borehole number and its corresponding deviation value, ranging from negative values (normal) to positive values (defective), with larger values indicating more severe defects. The generation of the deviation sequence completes the mapping from the original feature space to the defect severity space, providing direct data basis for subsequent defect judgment, level classification, and result ranking. After the sequence is generated, data verification is performed to ensure that all boreholes have corresponding deviation values, with no omissions or outliers, thus guaranteeing the completeness and reliability of the detection results.
[0108] S205, according to the deviation sequence, each borehole to be tested is judged for defects. Boreholes with deviation less than or equal to the radius length are judged as normal boreholes, and boreholes with deviation greater than the radius length are judged as defective boreholes. The location coordinates and deviation level of the defective boreholes are output according to the deviation value from large to small, and a detection result set containing the defect location distribution and deviation severity is generated.
[0109] Specifically, it is possible to iterate through each borehole identifier and its corresponding deviation value in the deviation sequence, mark boreholes with a deviation less than or equal to zero as normal boreholes, and mark boreholes with a deviation greater than zero as defective boreholes, thereby generating a defect judgment label sequence for each borehole.
[0110] The core of this step is to perform a binary classification judgment on each borehole to be tested based on the hypersphere boundary model. Using the zero deviation value as the dividing threshold, all boreholes to be tested are divided into two categories: normal and defective. This provides a basic judgment basis for subsequent defect classification and result output. The specific implementation method is as follows:
[0111] The deviation sequence is a standardized judgment index after dimensionless processing. Each borehole corresponds to a deviation value, which physically represents the relative deviation between the distance of the feature vector of the borehole under test to the center of the hypersphere of the normal sample and the radius of the hypersphere. When the deviation is less than or equal to zero, it means that the feature points of the borehole under test fall inside or on the boundary of the hypersphere of the normal sample distribution, and its multidimensional feature combination is consistent with the statistical distribution of the normal borehole, with no significant anomalies. When the deviation is greater than zero, it means that the feature points of the borehole under test exceed the distribution boundary of the normal sample, and its morphological characteristics deviate from the statistical range of the normal borehole, significantly increasing the probability of defects. Using zero as the judgment threshold essentially uses the statistical distribution boundary of the normal sample as the judgment benchmark. All samples within the boundary are considered normal, and samples outside the boundary are considered defects. This judgment method based on single-class classification does not require defect samples to participate in training and is particularly suitable for industrial inspection scenarios where there are many types of borehole defects in multilayer circuit boards and defect samples are scarce.
[0112] The traversal process proceeds sequentially according to the drill hole numbers. Each drill hole carries a unique drill hole identifier, which corresponds one-to-one with the drill hole number acquired during the data acquisition phase, ensuring that the judgment result can be traced back to a specific physical location. In the example, a standard multilayer circuit board has 1280 drill holes to be tested. The system reads the deviation value of each drill hole sequentially from 1 to 1280. Drill hole number 356 has a deviation value of -0.12, which is less than zero, so it is marked as a normal drill hole. Drill hole number 724 has a deviation value of 0.08, which is greater than zero, so it is marked as a defective drill hole. Drill hole number 981 has a deviation value of exactly zero, indicating that its feature point falls exactly on the hypersphere boundary, and it is marked as a normal drill hole according to the judgment rules. The entire traversal process adopts a sequential access mode, and the time complexity is linearly related to the total number of drill holes. For thousands of drill holes, the time taken for a single judgment is no more than 5 milliseconds, which fully meets the cycle time requirements of online real-time detection.
[0113] A boundary buffer mechanism is also implemented during the judgment process. For boreholes with deviation values within a very small range near zero, such as samples with an absolute deviation value less than 0.02, the system will additionally mark them as being in a boundary pending state. Although these boreholes have completed binary classification according to the threshold rules, they will be specially marked in subsequent detection results to facilitate manual review by quality inspectors and reduce the risk of boundary misjudgment. The width of this buffer band, 0.02, was determined through statistical verification of a large number of samples. It will not cause too many false detections but can effectively capture potential defects near the boundary. After traversing and judging all boreholes, the system generates a defect judgment label sequence of the same length as the total number of boreholes. Each position corresponds to the judgment result of a borehole, providing complete judgment basis data for subsequent defect screening and classification processing.
[0114] Filter out entries marked as defective boreholes from the defect judgment label sequence, extract the position coordinates and deviation values of each defective borehole, and sort them in descending order of deviation values to generate a defective borehole sorting list.
[0115] The core of this step is to screen all boreholes identified as defective from all boreholes to be tested, extract key attribute information, and sort them according to severity, placing the most severe defects at the top for easier subsequent tiered processing and priority re-inspection. The specific implementation method is as follows:
[0116] The filtering operation takes the defect identification label sequence as input, checks the label status of each borehole one by one, extracts the entries labeled as defective boreholes, and simultaneously extracts the corresponding position coordinates and deviation values of each borehole. The position coordinates are derived from the borehole position mapping relationship established during the image acquisition phase. Each borehole has a corresponding two-dimensional plane coordinate system: the horizontal coordinate (x) represents the borehole's position along the length of the circuit board, and the vertical coordinate (y) represents the borehole's position along the width of the circuit board. The coordinate unit is millimeters, and the origin is set at the lower left corner of the circuit board. This coordinate system is completely consistent with the coordinate system in the circuit board design file, facilitating subsequent comparison with design data and location-based rework. The deviation value is directly read from the deviation sequence, retaining four decimal places to ensure sorting accuracy.
[0117] In the example, 32 defective drill holes were detected on a circuit board. Each defective drill hole carries three core pieces of information: x-coordinate, y-coordinate, and deviation value. For example, defective drill hole number 156 has an x-coordinate of 42.35mm, a y-coordinate of 18.72mm, and a deviation of 0.45; defective drill hole number 678 has an x-coordinate of 125.68mm, a y-coordinate of 76.34mm, and a deviation of 1.23; and defective drill hole number 1024 has an x-coordinate of 210.15mm, a y-coordinate of 145.89mm, and a deviation of 0.76. After filtering, the system sorts these 32 defective drill holes in descending order of deviation value, with the one with the largest deviation value placed first and the one with the smallest deviation value placed last. The sorting algorithm uses quicksort, and for a scale of tens to hundreds of defective drill holes, the sorting time is negligible.
[0118] The generated defective borehole sorting list, after sorting, contains three fields for each record: borehole number, location coordinates, and deviation value. The boreholes at the top of the list have the largest deviation and the most severe defects, while those at the bottom have smaller deviations and relatively minor defects. This descending order of severity has significant engineering value. Firstly, it allows quality inspectors to prioritize the most serious defects, improving re-inspection efficiency. Secondly, it provides an ordered data foundation for subsequent automatic grading; grading can be done directly on the sorted list by threshold segments without needing to traverse all data again. The sorted list also retains the index of the original borehole number, ensuring that each defect record can be accurately traced back to its corresponding physical borehole, preventing the loss of original location information during the sorting operation.
[0119] Based on the deviation values of each defective borehole in the defective borehole sorting list, they are divided into three levels: minor defects, moderate defects, and severe defects. The level identifiers are then mapped to the corresponding location coordinates to generate a defective borehole level mapping table.
[0120] The core of this step is to discretize the continuous deviation values into three defect levels, thereby quantifying and classifying the severity of defects. This makes the detection results more engineering-operable and facilitates the adoption of differentiated processing strategies based on different levels. The specific implementation method is as follows:
[0121] The defect severity classification uses a threshold segmentation method. Two grading thresholds are set within the positive deviation range, dividing the entire defect range into three sub-ranges corresponding to minor, moderate, and severe defects. The first-level threshold T_1 is the boundary between minor and moderate defects, and the second-level threshold T_2 is the boundary between moderate and severe defects. The values of these two thresholds are determined based on statistical analysis of a large amount of actual production data, combined with the quality acceptance standards of the PCB industry and the impact of different defect severity levels on the electrical performance and reliability of the product. In the example, T_1 is set to 0.3 and T_2 is set to 0.8. That is, boreholes with a deviation greater than 0 and less than or equal to 0.3 are classified as minor defects, those with a deviation greater than 0.3 and less than or equal to 0.8 are classified as moderate defects, and those with a deviation greater than 0.8 are classified as severe defects.
[0122] Minor defects correspond to a deviation range of 0 to 0.3. While the boreholes in this range deviate from the normal distribution boundary, the deviation is small, typically manifesting as minor burrs at the borehole opening or slight roughness exceeding the tolerance standard on the borehole wall—appearance-related defects that do not affect basic electrical performance. These defects generally do not require rework and can be naturally eliminated through process adjustments in subsequent steps, or released directly within the allowable quality tolerance range. Moderate defects correspond to a deviation range of 0.3 to 0.8. The boreholes in this range exhibit moderate deviation, potentially including significant deviations in borehole wall perpendicularity and localized interlayer micro-cracks. These defects require marking and manual re-inspection to confirm whether they affect product performance before deciding on rework. Severe defects correspond to a deviation range of 0.8 or higher. The boreholes in this range exhibit significant deviation, typically including obvious borehole wall holes, severe interlayer delamination, and borehole diameter exceeding tolerances—serious defects that directly affect the electrical connection reliability and insulation performance of the circuit board, requiring rework or scrapping.
[0123] After the grading is completed, the system associates the grade identifier of each defective drill hole with its location coordinates, generating a defective drill hole grade mapping table. Each record in the mapping table contains five fields: drill hole number, x-coordinate, y-coordinate, deviation value, and defect grade. The location coordinates allow for precise positioning of each defective drill hole on the physical circuit board, while the grade identifier provides a quick understanding of the defect's severity. In the example, drill hole number 678, with a deviation of 1.23, is classified as a severe defect; drill hole number 1024, with a deviation of 0.76, is classified as a moderate defect; and drill hole number 234, with a deviation of 0.15, is classified as a minor defect. The distribution of the number of defects across the three grades is also simultaneously statistically analyzed. For example, out of 32 defective drill holes, there are 5 severe defects, 12 moderate defects, and 15 minor defects. This distribution data visually reflects the overall drilling quality level of the board, providing data support for process improvement.
[0124] The defect borehole sorting list and defect borehole level mapping table are integrated to generate detection records containing defect location coordinates, deviation values and defect levels. All detection records are then summarized into a structured dataset, and the final output is a detection result set containing defect location distribution and deviation severity.
[0125] The core of this step is to integrate and summarize the scattered data generated in the previous steps to form a unified, complete, and structured test result output, providing comprehensive data support for subsequent quality assessment, process improvement, and production traceability. The specific implementation method is as follows:
[0126] The integration operation takes a defective borehole sorting list and a defective borehole grade mapping table as input, and uses the borehole number as the association key to merge fields from the two data sources, generating inspection records in a unified format. Each inspection record contains six core fields: borehole number, x-coordinate, y-coordinate, deviation value, defect grade, and preliminary defect type determination. The preliminary defect type determination is based on the contribution analysis of each dimension in the multi-dimensional feature descriptor. The system calculates the main feature dimensions that cause the borehole to deviate from the normal distribution. For example, if the borehole wall verticality deviation is the main deviation factor, it is preliminarily determined to be a borehole wall tilting defect; if the interlayer delamination parameter is the main deviation factor, it is preliminarily determined to be an interlayer delamination defect; if the borehole opening contour parameter is the main deviation factor, it is preliminarily determined to be a borehole opening deformity defect. While this preliminary determination cannot replace precise manual re-inspection, it can provide directional guidance for quality inspectors, significantly improving re-inspection efficiency.
[0127] The structured dataset is organized using a unified data format. All inspection records are sorted in descending order of defect severity, with severe defects at the top, moderate defects in the middle, and minor defects at the bottom. The dataset also includes summary statistics for the entire board inspection, including key indicators such as the total number of drilled holes, the number of normal drilled holes, the total number of defective drilled holes, the number of defects at each level, defect rate, average deviation, and maximum deviation. In the example, a circuit board with 1280 drilled holes has 1248 normal drilled holes and 32 defective drilled holes, resulting in an overall defect rate of 2.5%, an average deviation of 0.42, a maximum deviation of 1.23, and severe defects accounting for 15.6% of the total defects. These statistical indicators can be directly used for quality monitoring and SPC statistical process control on the production line, helping process engineers to promptly identify process drift trends.
[0128] The output of the inspection results set supports multiple application scenarios. It can be displayed directly on the inspection equipment's screen in a visual manner, marking defect locations on a top-down view of the circuit board and using different colors to distinguish different levels of defects: red for severe defects, yellow for moderate defects, and green for minor defects, intuitively presenting the distribution and severity of defects across the entire board. Alternatively, it can be output as a structured data file, integrated into the factory's MES (Manufacturing Execution System) for automatic data upload and production traceability. Furthermore, it can generate rework orders for severe defects, automatically pushing them to the rework station to guide operators in precise rework. The integrity and consistency of the entire inspection results set are verified, ensuring that every defect record is traceable, verifiable, and reusable, providing a reliable data foundation for continuous improvement of drilling quality in multilayer circuit boards.
[0129] Another embodiment of the present invention provides an automatic detection system for drilling defects in multilayer circuit boards, see [link to relevant documentation]. Figure 3 The system may include:
[0130] The acquisition module 301 is used to acquire drilling images on the surface of a multilayer circuit board, and simultaneously acquire the depth direction of the drilling and the reflection signals of the interlayer interface to generate a multi-source image set for characterizing the morphological features of the drilling.
[0131] Processing module 302 is used to perform pixel-level fusion and edge enhancement processing on the multi-source image set, extract the borehole contour, borehole wall verticality and interlayer layering fracture geometric parameters of each borehole, and construct a multi-dimensional feature descriptor subset of the borehole.
[0132] The recording module 303 is used to map the features of normal borehole samples to a high-dimensional feature space through a kernel function during the offline training phase, based on a subset of known normal borehole samples as multidimensional feature descriptors. In this high-dimensional feature space, the module solves for the minimum hypersphere that encloses all feature points of normal borehole samples, records the center coordinates and radius of the hypersphere, and generates a normal borehole distribution boundary model.
[0133] The generation module 304 is used to input the multi-dimensional feature descriptor subset of the borehole to be tested into the normal borehole distribution boundary model, calculate the spatial distance from the feature vector of the borehole to be tested to the center of the hypersphere, and generate the deviation sequence of each borehole to be tested in combination with the radius length.
[0134] The determination module 305 is used to determine the defects of each borehole to be tested according to the deviation sequence. Boreholes with deviation less than or equal to the radius length are determined as normal boreholes, and boreholes with deviation greater than the radius length are determined as defective boreholes. The module outputs the location coordinates and deviation level of the defective boreholes according to the deviation values from large to small, and generates a detection result set containing the defect location distribution and deviation severity.
[0135] This invention also provides a storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above method embodiments when running.
[0136] This invention also provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.
[0137] Specifically, the aforementioned electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the aforementioned processor, and the input / output device is connected to the aforementioned processor.
[0138] The above description, based on the embodiments shown in the figures, details the structure, features, and effects of the present invention. The above description is only a preferred embodiment of the present invention, but the present invention is not limited to the scope of implementation shown in the figures. Any changes made in accordance with the concept of the present invention, or equivalent embodiments modified to have equivalent changes, that do not exceed the spirit covered by the specification and figures, should be within the protection scope of the present invention.
Claims
1. An automatic detection method for drilling defects in multilayer circuit boards, characterized in that, The method includes: The system acquires drilling images of the surface of multilayer circuit boards, and simultaneously obtains the depth direction of the drilling and the reflection signals of the interlayer interfaces to generate a multi-source image set for characterizing the morphological features of the drilling. The multi-source image set is subjected to pixel-level fusion and edge enhancement processing to extract the borehole contour, borehole wall verticality and interlayer delamination geometric parameters of each borehole, and to construct a multi-dimensional feature descriptor subset of the borehole. Based on the known multidimensional feature descriptor subset of normal borehole samples, the features of normal borehole samples are mapped to a high-dimensional feature space through a kernel function during the offline training phase. The minimum hypersphere that encloses all feature points of normal borehole samples is solved in the high-dimensional feature space. The center coordinates and radius length of the hypersphere are recorded to generate a normal borehole distribution boundary model. The multidimensional feature descriptor subset of the borehole to be tested is input into the normal borehole distribution boundary model, the spatial distance from the feature vector of the borehole to be tested to the center of the hypersphere is calculated, and the deviation sequence of each borehole to be tested is generated by combining the radius length. Based on the deviation sequence, defects are determined for each borehole to be tested. Boreholes with a deviation less than or equal to the radius length are determined as normal boreholes, and boreholes with a deviation greater than the radius length are determined as defective boreholes. The location coordinates and deviation level of the defective boreholes are output according to the deviation values from largest to smallest, generating a detection result set that includes the distribution of defect locations and the severity of deviation.
2. The method according to claim 1, characterized in that, The process involves acquiring drill hole images of the multilayer circuit board surface, simultaneously obtaining the depth direction of the drill holes and the reflection signals from the interlayer interfaces, and generating a multi-source image set to characterize the drill hole morphology features, including: Microscopic images of the surface of multilayer circuit boards are acquired using an industrial camera, and top-view two-dimensional grayscale images of each drill hole opening are obtained to generate a drill hole surface image dataset. By scanning layer by layer along the borehole depth direction using a laser triangulation sensor, radial distance data at each depth of the borehole inner wall is obtained, generating a borehole depth direction contour dataset. By transmitting a preset high-frequency ultrasonic wave toward the borehole sidewall using an ultrasonic scanning microscope, the reflected echo signals from different interlayer interfaces are received, and the amplitude and arrival time of each reflected waveform are recorded to generate an interlayer interface reflection signal dataset. The borehole surface image dataset, borehole depth direction profile dataset, and interlayer interface reflection signal dataset are associated by borehole number, and an image index relationship between the surface layer and each inner layer is established for each borehole, ultimately generating a multi-source image set.
3. The method according to claim 2, characterized in that, The process involves pixel-level fusion and edge enhancement of the multi-source image set, extracting the borehole opening contour, borehole wall verticality, and geometric parameters of interlayer delamination fractures for each borehole, and constructing a multi-dimensional feature descriptor subset for the boreholes, including: Pixel-level spatial registration is performed on the surface image and depth contour image of the same borehole in a multi-source image set. The mutual information maximization method is used to align images of different resolutions to a unified pixel coordinate system to generate a registered fused image. Anisotropic diffusion filtering is applied to the registered fused image to enhance the edges, preserving the sharp features of the aperture edges while suppressing background noise. Then, the Canny edge detection operator is used to extract the sub-pixel level contour point sequence of the aperture boundary to generate the aperture contour geometric parameter set. Extract the depth-radial distance curves of the left and right sides of the borehole inner wall from the borehole depth direction profile dataset, fit the straight line equations of the two side walls respectively and calculate the angle between them and the borehole central axis. The difference between the angle and 90 degrees is used as the borehole wall verticality at that depth, and generate a borehole wall verticality parameter sequence. The arrival time and amplitude of reflected waves from each interlayer interface are extracted from the interlayer interface reflection signal dataset. When the arrival time of the reflected wave is abnormally advanced and the amplitude is significantly attenuated, it is determined that there is a layering fracture at the interlayer interface. The depth and location of the fracture and the range of the extension angle along the borehole circumference are recorded as interlayer layering fracture parameters. Finally, the borehole profile geometric parameter set, borehole wall verticality parameter sequence and interlayer layering fracture parameters are merged into a multidimensional feature descriptor subset for each borehole.
4. The method according to claim 3, characterized in that, The multidimensional feature descriptor subset of boreholes based on known normal borehole samples maps the features of the normal borehole samples to a high-dimensional feature space through a kernel function during the offline training phase. Then, in this high-dimensional feature space, the minimum hypersphere enclosing all feature points of the normal borehole samples is solved, and the coordinates of the hypersphere's center and radius are recorded to generate a normal borehole distribution boundary model, including: Extract the multidimensional feature descriptor subset of each sample from the known normal borehole sample database, concatenate all feature values of each sample into a one-dimensional feature vector in a fixed order, and standardize all feature vectors to a mean of zero and a variance of one to generate a standardized normal sample feature vector set. The Gaussian radial basis kernel function is selected as the mapping kernel. The kernel function value between each pair of samples in the standardized normal sample feature vector set is calculated, the kernel matrix is constructed and centered to generate a centered kernel matrix. Using the centered kernel matrix as input, the dual optimization problem of the minimum hypersphere is solved iteratively by the sequence minimum optimization algorithm to obtain the Lagrange multipliers corresponding to each normal sample, and samples with multipliers greater than zero are selected as support vectors to generate a set of support vectors and their corresponding multiplier values. Based on the set of support vectors and their multiplier values, the expression of the hypersphere's center coordinates in the high-dimensional feature space is calculated, and the kernel space distance from any support vector to the center of the sphere is calculated as the hypersphere radius, ultimately generating a normal borehole distribution boundary model.
5. The method according to claim 4, characterized in that, The process involves inputting a subset of multidimensional feature descriptors of the boreholes to be tested into the normal borehole distribution boundary model, calculating the spatial distance from the feature vector of the borehole to be tested to the center of the hypersphere, and generating a deviation sequence for each borehole to be tested by combining the radius length. The same standardization process as in the offline training phase is applied to the multidimensional feature descriptor subset of each borehole to be tested. The standardized feature vector is then used as the input feature vector of the sample to be tested to generate the standardized feature vector of the sample to be tested. Using the set of support vectors and kernel function in the normal borehole distribution boundary model, the kernel function value between the standardized feature vector of the test sample and each support vector is calculated to generate the kernel function value vector of the test sample. Based on the kernel function value vector of the sample to be tested and the kernel space expression of the center of the hypersphere, calculate the squared distance value from the feature vector of the sample to be tested to the center of the hypersphere, and output the distance value as the original spatial distance value of the sample to be tested, thus generating a sequence of original distance values for each sample to be tested. The original distance value sequence of each test sample is compared with the radius length of the hypersphere one by one. The difference between each distance value and the radius length is calculated, and the difference is divided by the radius length to make it dimensionless, finally generating the deviation sequence of each test borehole.
6. The method according to claim 5, characterized in that, The process involves determining defects in each borehole based on the deviation sequence, classifying boreholes with deviations less than or equal to the radius as normal boreholes, and classifying boreholes with deviations greater than the radius as defective boreholes. The location coordinates and deviation levels of the defective boreholes are then sorted from largest to smallest, generating a detection result set containing the distribution of defect locations and the severity of deviations. Traverse each borehole identifier and its corresponding deviation value in the deviation sequence, mark boreholes with a deviation less than or equal to zero as normal boreholes, and mark boreholes with a deviation greater than zero as defective boreholes, generating a defect judgment label sequence for each borehole. Filter out entries marked as defective boreholes from the defect judgment label sequence, extract the position coordinates and deviation values of each defective borehole, and sort them in descending order of deviation values to generate a defective borehole sorting list. Based on the deviation values of each defective borehole in the defective borehole sorting list, they are divided into three levels: minor defects, moderate defects, and severe defects. The level identifiers are then mapped to the corresponding location coordinates to generate a defective borehole level mapping table. The defect borehole sorting list and defect borehole level mapping table are integrated to generate detection records containing defect location coordinates, deviation values and defect levels. All detection records are then summarized into a structured dataset, and the final output is a detection result set containing defect location distribution and deviation severity.
7. An automatic detection system for drilling defects in multilayer circuit boards, characterized in that, The system includes: The acquisition module is used to acquire drilling images of the surface of multilayer circuit boards, and simultaneously obtain the depth direction of the drilling and the reflection signals of the interlayer interface to generate a multi-source image set to characterize the morphological features of the drilling. The processing module is used to perform pixel-level fusion and edge enhancement processing on the multi-source image set, extract the borehole contour, borehole wall verticality and interlayer layering fracture geometric parameters of each borehole, and construct a multi-dimensional feature descriptor subset of the borehole. The recording module is used to map the features of normal borehole samples to a high-dimensional feature space through a kernel function during the offline training phase, based on a subset of multidimensional feature descriptions of known normal borehole samples. In this high-dimensional feature space, the module solves for the minimum hypersphere that encloses all feature points of normal borehole samples, records the center coordinates and radius of the hypersphere, and generates a normal borehole distribution boundary model. The generation module is used to input the multi-dimensional feature descriptor subset of the borehole to be tested into the normal borehole distribution boundary model, calculate the spatial distance from the feature vector of the borehole to be tested to the center of the hypersphere, and generate the deviation sequence of each borehole to be tested in combination with the radius length. The determination module is used to determine the defects of each borehole to be tested according to the deviation sequence. Boreholes with a deviation less than or equal to the radius length are determined as normal boreholes, and boreholes with a deviation greater than the radius length are determined as defective boreholes. The module outputs the location coordinates and deviation level of the defective boreholes according to the deviation values from large to small, and generates a detection result set containing the defect location distribution and deviation severity.
8. The system according to claim 7, characterized in that, The acquisition module is specifically used for: Microscopic images of the surface of multilayer circuit boards are acquired using an industrial camera, and top-view two-dimensional grayscale images of each drill hole opening are obtained to generate a drill hole surface image dataset. By scanning layer by layer along the borehole depth direction using a laser triangulation sensor, radial distance data at each depth of the borehole inner wall is obtained, generating a borehole depth direction contour dataset. By transmitting a preset high-frequency ultrasonic wave toward the borehole sidewall using an ultrasonic scanning microscope, the reflected echo signals from different interlayer interfaces are received, and the amplitude and arrival time of each reflected waveform are recorded to generate an interlayer interface reflection signal dataset. The borehole surface image dataset, borehole depth direction profile dataset, and interlayer interface reflection signal dataset are associated by borehole number, and an image index relationship between the surface layer and each inner layer is established for each borehole, ultimately generating a multi-source image set.
9. A storage medium, characterized in that, The storage medium stores a computer program, wherein the computer program is configured to execute the method of any one of claims 1-6 when it is run.
10. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to run the computer program to perform the method of any one of claims 1-6.
