A PCB patch control method and system based on artificial intelligence

Through the PCB patch control method based on artificial intelligence, the preset bit pattern group and feature sorting in the design file are used to achieve efficient and precise control of PCB patches, solving the complexity and positioning error problems introduced by marking points in traditional methods.

CN119835933BActive Publication Date: 2025-05-09GUANGZHOU HUITONG GUOXIN TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510300962.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-14
Publication Date
2025-05-09
Estimated Expiration
2045-03-14

AI Technical Summary

Technical Problem

The existing PCB patch control methods rely on marking points, resulting in complex production processes, inefficient efficiency, and susceptible to environmental factors, resulting in positioning errors.

Method used

Using the PCB patch control method based on artificial intelligence, we extract preset bit pattern groups, positioning pattern design coordinates and component design coordinates from the PCB board design file, combined with the stability sorting of geometric, texture and topological features, image matching and coordinate conversion are performed to achieve accurate patch control.

Benefits of technology

Improves the accuracy and reliability of patch control, reduces positioning errors, improves productivity and flexibility, especially in complex or high-density PCB designs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119835933B_ABST
    Figure CN119835933B_ABST
Patent Text Reader

Abstract

The present invention relates to a PCB patch control method and system based on artificial intelligence, and relates to the technical field of PCB board processing, including: extracting a preset positioning pattern group, positioning pattern design coordinates and component design coordinates from a PCB board design file; sorting the geometric features, texture features and topological features of the PCB board for stability, and obtaining a stability sorting result; extracting a mounting pattern set of the PCB board mounting surface image, and matching it with the preset positioning pattern group in sequence according to the stability sorting result to obtain a target mounting pattern group; performing coordinate conversion on the component design coordinates according to the target mounting pattern fixed coordinates and positioning pattern design coordinates of the target mounting pattern group, and obtaining component mounting coordinates to execute PCB patch control. The present invention solves the technical problem in the prior art that the patch process is cumbersome and prone to positioning errors due to the redundancy of patch marking points, and achieves the technical effect of improving the control accuracy of PCB patch.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of PCB board processing, and in particular to a PCB patch control method and system based on artificial intelligence. Background Art

[0002] In modern electronic manufacturing, PCB (printed circuit board) patching is a key process for realizing electronic component assembly. Traditional PCB patch control methods usually rely on pre-built marking points to achieve accurate positioning of components. These marking points are detected by an optical recognition system and then used to calculate the placement coordinates of the components, thereby guiding the placement machine to complete the placement operation. However, the introduction of marking points increases the complexity of the production process, which not only prolongs the production cycle, but also leads to reduced production efficiency. Secondly, the recognition process of marking points is easily affected by environmental factors (such as light and stains), thereby introducing positioning errors and affecting the patch accuracy. Summary of the invention

[0003] The present invention aims to solve the technical problem in the prior art that the patch process is cumbersome and prone to positioning errors due to redundant patch marking points, and provides a PCB patch control method and system based on artificial intelligence to solve the problem.

[0004] The technical solution of the present invention to solve the above technical problems is as follows:

[0005] In a first aspect, the present invention provides a PCB patch control method based on artificial intelligence, the method comprising: extracting a preset positioning pattern group including at least three mounting patterns, positioning pattern design coordinates and component design coordinates from a PCB board design file, wherein any two mounting patterns of the preset positioning pattern group do not belong to the same straight line, and the combined pattern of the preset positioning pattern group is unique on the PCB board, and the mounting pattern is a pad pattern or a hole pattern of a component mounted on the PCB board; performing stability sorting of geometric features, texture features and topological features on the PCB board to obtain a stability sorting result; when the PCB board is fixed, extracting a mounting pattern set of the PCB board mounting surface image, matching the geometric features, texture features and topological features with the preset positioning pattern group in turn according to the stability sorting result to obtain a target mounting pattern group, wherein the PCB board has fixed coordinates; performing coordinate conversion on the component design coordinates according to the target mounting pattern fixed coordinates of the target mounting pattern group and the positioning pattern design coordinates to obtain component mounting coordinates to perform PCB patch control.

[0006] In a second aspect, the present invention provides a PCB patch control system based on artificial intelligence, the system comprising: a design information extraction module, used to extract a preset positioning pattern group including at least three mounting patterns, positioning pattern design coordinates and component design coordinates from a PCB board design file, wherein any two mounting patterns of the preset positioning pattern group do not belong to the same straight line, and the combined pattern of the preset positioning pattern group is unique on the PCB board, and the mounting pattern is a pad pattern or a hole pattern of a component mounted on the PCB board; a stability sorting module, used to sort the stability of geometric features, texture features and topological features of the PCB board to obtain a stability sorting result; a mounting pattern matching module, used to extract a mounting pattern set of a mounting surface image of the PCB board after the PCB board is fixed, and match the geometric features, texture features and topological features with the preset positioning pattern group in sequence according to the stability sorting result to obtain a target mounting pattern group, wherein the PCB board has fixed coordinates; a mounting coordinate acquisition module, used to perform coordinate conversion on the component design coordinates according to the target mounting pattern fixed coordinates of the target mounting pattern group and the positioning pattern design coordinates, and obtain component mounting coordinates to perform PCB patch control.

[0007] The beneficial effects of the present invention are as follows: by extracting key information in the design file, including a preset positioning pattern group, positioning pattern design coordinates and component design coordinates, accurate reference data is provided for subsequent image matching and coordinate conversion. The design of the preset positioning pattern group (at least three mounting patterns and not on the same straight line) ensures its uniqueness on the PCB board, providing the possibility for subsequent accurate matching and positioning. By sorting the stability of the geometric features, texture features and topological features of the PCB board, the most stable and most satisfactory patterns are screened out, providing a priority reference for subsequent pattern matching. The stability sorting enables the pattern with higher reliability to be preferentially selected for matching when facing slight errors or deformations of the PCB. By extracting the image information of the mounting surface of the actual PCB board and matching it with the preset positioning pattern group, the target mounting pattern group can be determined quickly and accurately. The matching process uses an artificial intelligence algorithm, which can effectively deal with environmental interference (such as light, stains, etc.) in actual production and improve the accuracy and reliability of matching. By comparing the fixed coordinates of the target mounting pattern group with the design coordinates, the component design coordinates are converted to obtain accurate component mounting coordinates, eliminating the errors introduced by traditional marking points, and directly using the actual mounting pattern as a positioning reference, thereby improving the accuracy and reliability of patch control.

[0008] In summary, the present invention realizes efficient and accurate PCB patch control through the steps of extracting information from the design file, image matching after the PCB board is fixed, and coordinate conversion, thereby improving the accuracy of patch control, and enhancing production efficiency and flexibility, especially showing stronger adaptability when dealing with complex or high-density PCB designs. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] Figure 1 A schematic flow chart of a PCB patch control method based on artificial intelligence provided by the present invention.

[0010] Figure 2 A schematic diagram of a process for obtaining a mounting pattern set based on a design mounting pattern set and performing a local comparison with a mounting surface image of a PCB board in an artificial intelligence-based PCB mounting control method provided by the present invention.

[0011] Figure 3 A schematic structural diagram of a PCB patch control system based on artificial intelligence provided by the present invention.

[0012] The accompanying drawings are as follows:

[0013] Design information extraction module 10 , stability sorting module 20 , mounting pattern matching module 30 , mounting coordinate acquisition module 40 . DETAILED DESCRIPTION

[0014] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0015] In the description of the present invention, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0016] In the description of the present invention, the term "for example" is used to mean "used as an example, illustration or explanation". Any embodiment described as "for example" in the present invention is not necessarily to be construed as being more preferred or advantageous than other embodiments. The following description is given to enable any technician in the field to implement and use the present invention. In the following description, details are listed for the purpose of explanation. It should be understood that a person of ordinary skill in the art can recognize that the present invention can be implemented without using these specific details. In other examples, well-known structures and processes will not be elaborated in detail to avoid obscuring the description of the present invention with unnecessary details. Therefore, the present invention is not intended to be limited to the embodiments shown, but is consistent with the widest scope consistent with the principles and features disclosed in the present invention.

[0017] Embodiment 1:

[0018] like Figure 1 As shown, an embodiment of the present invention provides a PCB patch control method based on artificial intelligence, and the method includes:

[0019] Step S100: extracting a preset positioning pattern group including at least three mounting patterns, positioning pattern design coordinates and component design coordinates from a PCB design file, wherein any two mounting patterns of the preset positioning pattern group do not belong to the same straight line, and the combined pattern of the preset positioning pattern group is unique on the PCB, and the mounting pattern is a pad pattern or a hole pattern of components mounted on the PCB.

[0020] Specifically, PCB board design files are electronic files used to describe the layout of PCB (printed circuit board), usually including the location of components, circuit layout, board layer information, etc. Through the data extraction function in PCB design software (such as Altium Designer, CadenceAllegro) or data processing tools (such as Python scripts combined with Gerber parsing libraries), the preset positioning pattern group, positioning pattern design coordinates and component design coordinates are extracted from the PCB design file. Among them, the mounting pattern refers to the pad pattern or hole pattern of the component mounted on the PCB board. The pad is the metal area for the component pin to connect, and the hole is the hole used to install the component or connect the circuit. For example, on a PCB board of a power circuit, the metal welding area exposed by several capacitors and resistors on the PCB board is a mounting pattern, and the holes on the PCB board also belong to the mounting pattern. At least three mounting patterns are selected from all the mounting patterns to form a preset positioning pattern group. During the screening process, it is necessary to ensure that any two mounting patterns are not on the same straight line, and this pattern group is unique on the entire PCB board. After determining the preset positioning pattern group, extract the coordinate position corresponding to each pattern in the preset positioning pattern group (i.e., positioning pattern design coordinates) and the coordinate position of each component during design (i.e., component design coordinates) from the PCB board design file. These preset positioning pattern groups, positioning pattern design coordinates, and component design coordinates provide basic data for subsequent positioning and coordinate conversion. For example, the design file contains several pads and hole patterns, and three non-collinear patterns (such as a circular pad, a rectangular pad, and a hole pattern) are selected as positioning points, and their design coordinates are extracted. These patterns will be used as positioning pattern groups to provide references for precise matching in the subsequent patch process.

[0021] Step S200: Sorting the stability of geometric features, texture features and topological features of the PCB board to obtain a stability sorting result.

[0022] Specifically, geometric features refer to the basic information of the surface shape and size of the PCB board, such as the shape (circular, square), size, etc. of the pad. Texture features refer to the features of the detailed texture of the PCB board surface, including the roughness or detailed texture of the pad surface. These texture information can be used to assist pattern recognition. Topological features refer to the spatial relationship and connection mode between patterns on the PCB board, including structural information such as the relative position, distance, and connection of the patterns. Collect multiple images of PCB boards and extract geometric features, texture features, and topological features in each image. First, measure and quantify the geometric features of the PCB board, such as calculating the length and angle of the line; then, evaluate the texture features through image texture analysis technology, such as using grayscale co-occurrence matrix and other methods to analyze the roughness of the copper foil texture; finally, analyze the topological features to determine the connection relationship between components and lines. The feature extraction process can be implemented by image processing tools (such as OpenCV). For example, use the image processing toolbox in MATLAB to write code to implement the analysis of geometric features, texture features, and topological features. Then, the similarity between the features extracted from these PCB board images and the accurate features calibrated by the user is calculated, and the feature types are sorted according to the mean similarity of geometric features, texture features, and topological features of multiple images to determine the stability sequence. For example, through feature analysis, the mean similarity of geometric features is 0.95, the mean similarity of texture features is 0.85, and the mean similarity of topological features is 0.90. The sorting result according to the mean similarity is: geometric features>topological features>texture features.

[0023] By quantifying and sorting the stability of different features, a reference can be provided for subsequent matching operations, so that pattern matching can be performed in a more stable and reliable feature order, improving matching accuracy and efficiency, and reducing the risk of matching failure due to changes in the PCB board's own characteristics.

[0024] Step S300: After the PCB board is fixed, a mounting pattern set of the PCB board mounting surface image is extracted, and geometric features, texture features and topological features are matched with the preset positioning pattern group in turn according to the stability sorting results to obtain a target mounting pattern group, wherein the PCB board has fixed coordinates.

[0025] Specifically, the PCB mounting surface image refers to the actual mounting pattern information on the surface of the PCB board, which shows the actual circuit board surface, including the placement of components. When the PCB board is fixed, an image acquisition device (such as an industrial camera) is used to collect an image of the mounting surface of the PCB board, and then a mounting pattern set is extracted from the image. Then, through an image recognition algorithm (such as an image matching algorithm based on the OpenCV library), according to the stability sorting result obtained in step S200, starting from the most important feature, the pattern in the mounting pattern set actually collected is matched with the preset positioning pattern group in terms of geometric features, texture features and topological features. For example, the shape and size in the geometric features are compared first, and if the matching degree is high, the texture features are further compared. Through step-by-step matching, a group of mounting patterns with the highest matching degree with the preset positioning pattern group is found as the target mounting pattern group. Among them, the PCB board has fixed coordinates, and this coordinate does not change with changes in the environment or the PCB board. Therefore, the target mounting pattern group determined by pattern matching also contains actual coordinate information.

[0026] Through image matching technology, the preset pattern in the design file is accurately matched with the pattern on the actual PCB board, providing precise actual coordinate information and ensuring the accuracy of subsequent coordinate conversion.

[0027] Step S400: performing coordinate conversion on the component design coordinates according to the target mounting pattern fixed coordinates of the target mounting pattern group and the positioning pattern design coordinates to obtain component mounting coordinates and perform PCB mounting control.

[0028] Specifically, the target mounting pattern fixed coordinates are the actual coordinate positions of each pattern in the target mounting pattern group after the PCB board is fixed. Based on the target mounting pattern fixed coordinates of the target mounting pattern group obtained in step S200 and the positioning pattern design coordinates in step S100, a coordinate conversion algorithm (such as a matrix transformation algorithm) is used to convert the component design coordinates to obtain the component mounting coordinates. PCB mounting control is performed according to these coordinates, and components are accurately mounted on the PCB board according to the coordinates through automated mounting equipment (such as an automatic mounting machine). Exemplarily, first, the parameters of the coordinate conversion are determined according to the fixed coordinates of the target mounting pattern group and the positioning pattern design coordinates. These parameters include: translation, scaling and rotation angle, wherein the translation is the offset between the target coordinates and the design coordinates. The scaling is the proportional difference between the actual PCB board and the design file. The rotation angle is the rotation angle of the actual PCB board relative to the design file. According to the above parameters, the design coordinates of each component are converted to obtain the actual component placement coordinates, and then the converted actual component placement coordinates are output to the format required by the placement machine (such as CSV or Excel file) and sent to the placement machine control system to execute PCB placement control.

[0029] Through precise coordinate conversion, the design coordinates are converted into actual mounting coordinates, thereby achieving accurate PCB mounting control and improving the accuracy and efficiency of mounting.

[0030] Furthermore, the process of constructing the preset positioning pattern group in step S100 includes:

[0031] Step S110: extracting a design mounting pattern set of the design image of the mounting surface of the PCB board, wherein the design mounting pattern set is a user preset pattern corresponding to each component one by one.

[0032] Step S120: enumerating the pattern combinations of the designed mounting pattern set including at least three mounting patterns, and any two mounting patterns not belonging to the same straight line, to obtain a plurality of designed mounting pattern combinations.

[0033] Step S130: extracting any unique design pattern combination from the plurality of design pattern combinations and setting it as the preset positioning pattern group.

[0034] Specifically, the PCB mounting surface design image is an image representation planned for the PCB mounting surface during the PCB design stage. It contains information such as the component mounting positions envisioned during the design. It is an idealized mounting surface layout display that has not yet been actually manufactured. Through the image extraction function of the PCB design software, a set of design mounting patterns is obtained from the PCB mounting surface design image. This set is obtained based on the user's preset layout of components on the PCB board, and each pattern corresponds to a component.

[0035] For the obtained set of design mounting patterns, use algorithms (such as simple loops and conditional judgment algorithms) to enumerate pattern combinations. Combine the patterns in the set according to the requirement that there are at least three mounting patterns and any two mounting patterns do not belong to the same straight line. For example, if there are 5 design mounting patterns, the algorithm will first select a combination of 3 patterns, and then determine whether it meets the condition of not being in the same straight line. If it does, it will be recorded and other combinations will continue to be enumerated until all possible combinations are listed to obtain multiple design mounting pattern combinations. Through this enumeration method, all possible pattern combinations that meet specific conditions can be obtained, which provides multiple options for selecting a unique preset positioning pattern group, and increases the selectivity and rationality of the positioning pattern group.

[0036] From multiple design mounting pattern combinations, a recognition algorithm (such as a recognition algorithm based on image features) is used to find any unique design mounting pattern combination and set it as a preset positioning pattern group. This uniqueness can be judged by various features such as the shape and position relationship of the pattern. For example, among many combinations, a certain combination is unique in the entire PCB board mounting surface design image due to its special geometric layout or relative position relationship with other patterns, and it can be selected as a preset positioning pattern group. This preset positioning pattern group will serve as an important basis for subsequent positioning and coordinate conversion. Its uniqueness can ensure accurate positioning operations on the PCB board and improve the accuracy and reliability of the entire PCB mounting process.

[0037] For example, a PCB design file contains the following components and their mounting patterns: resistor R1: pad position is (10, 20); capacitor C1: pad position is (30, 40); chip U1: pad position is (50, 60); inductor L1: pad position is (70, 80). By parsing the design file, the mounting patterns and coordinates of these components are extracted to form a design mounting pattern set: {(10, 20), (30, 40), (50, 60), (70, 80)}. By using a programming algorithm (such as a combinatorial algorithm in Python), at least three patterns are selected from the design mounting pattern set, and pattern combination enumeration is performed to obtain the following pattern combinations: combination 1: (10, 20), (30, 40), (50, 60); combination 2: (10, 20), (30, 40), (70, 80); combination 4: (30, 40), (50, 60), (70, 80). Check whether these patterns meet the condition that "any two patterns are not on the same straight line". It is found that combination 1 and combination 4 are not on the same straight line, while combination 2 and combination 3 are on the same straight line. The final candidate pattern combinations are: combination 1: (10, 20), (30, 40), (50, 60); combination 4: (30, 40), (50, 60), (70, 80). Add these two combinations to the candidate pattern combination list.

[0038] Further, step S130 includes:

[0039] Step S131: performing pairwise similarity calculations on the plurality of designed mounting pattern combinations to obtain a combination pattern similarity set.

[0040] Step S132: Based on the combination pattern similarity set, respectively calculate the similarity mean between each design and mounting pattern combination of the plurality of design and mounting pattern combinations and other combination patterns to obtain a plurality of similarity mean values.

[0041] Step S133: extracting a design pattern combination with the smallest average similarity value from among a plurality of design pattern combinations that do not have the same combination pattern, and setting it as the preset positioning pattern group.

[0042] Specifically, for the obtained multiple design mounting pattern combinations, pairwise similarity calculations are performed. Image processing algorithms (such as feature matching in OpenCV) or geometric algorithms (such as calculating the Euclidean distance and angle difference between patterns) can be used to quantify the similarity. Taking each combination as a unit, it is compared with all other combinations in turn to obtain the similarity value between each pair of combinations, and these values ​​are summarized to form a combination pattern similarity set. For example, there are four design mounting pattern combinations A, B, C, and D. The similarities between A and B, A and C, A and D, B and C, B and D, and C and D are calculated respectively, and these calculated similarity values ​​are summarized to obtain a pattern similarity set.

[0043] Based on the obtained combination pattern similarity set, for each design mounting pattern combination, through simple mathematical calculation (sum and then average), the similarity values ​​with other combinations are summarized and the average is calculated to obtain the similarity mean of each combination. For example, for design mounting pattern combination A, the similarity values ​​of A and B, A and C, and A and D are found from the combination pattern similarity set, and these values ​​are added and divided by the number of combinations to obtain the similarity mean of A. This operation is performed for each design mounting pattern combination to obtain multiple similarity means. By calculating the similarity mean, the degree of similarity between each design mounting pattern combination and other combinations can be measured as a whole, providing a quantitative basis for finding the most unique combination.

[0044] Among multiple design placement pattern combinations, first select several design placement pattern combinations that do not have the same combination pattern (this is to avoid selecting a combination with repeated pattern elements and ensure the uniqueness of the preset positioning pattern group), and then find the design placement pattern combination with the smallest mean similarity from these combinations. Use a simple comparison algorithm (such as a traversal comparison algorithm) to find this combination and set it as the preset positioning pattern group. For example, in the combinations A, B, and C that do not have the same combination pattern, the similarity mean of A is 0.1, the similarity mean of B is 0.2, and the similarity mean of C is 0.3, then A will be selected as the preset positioning pattern group. Selecting the design placement pattern combination with the smallest mean similarity as the preset positioning pattern group can maximize the uniqueness of this combination among all combinations, so that in subsequent PCB placement operations, positioning and other operations can be accurately performed based on this unique preset positioning pattern group, thereby improving the accuracy and reliability of the entire placement process.

[0045] Further, in step S300, a mounting pattern set of the mounting surface image of the PCB board is extracted, including:

[0046] A design mounting pattern set is obtained, wherein the design mounting pattern set is a user preset pattern corresponding to components one by one; based on the design mounting pattern set, a local comparison is performed with the mounting surface image of the PCB board to obtain the mounting pattern set.

[0047] Specifically, the pattern data pre-set by the user is read from the database of the PCB design software (such as Altium Designer, etc.). These patterns are determined in the design stage and have a one-to-one correspondence with each component on the PCB board.

[0048] Using an image comparison algorithm (such as an image comparison algorithm based on feature points or an image comparison algorithm based on template matching), the PCB mounting surface image is partially compared based on the design mounting pattern set. For each pattern in the design mounting pattern set, a similar local area is searched in the PCB mounting surface image. For example, if there is a capacitor mounting pattern in the design mounting pattern set, the algorithm will search for local parts similar to this capacitor mounting pattern in the PCB mounting surface image, and the patterns corresponding to all these local parts found are combined to obtain the mounting pattern set.

[0049] Through this local comparison method, the mounting pattern set corresponding to the designed mounting pattern set can be obtained more accurately from the PCB board mounting surface image, thereby providing accurate actual mounting pattern information for subsequent matching operations with the preset positioning pattern group, which helps to improve the accuracy of the entire PCB mounting control process.

[0050] Further, such as Figure 2 As shown, based on the designed mounting pattern set, a local comparison is performed with the mounting surface image of the PCB board to obtain the mounting pattern set, including:

[0051] Step 1: Obtain a first design mounting pattern of the design mounting pattern set.

[0052] Step 2: Extracting the first edge feature, the first shape feature, and the first texture feature of the first designed mounting pattern through the first convolution channel.

[0053] Step three: extracting the second edge feature, the second shape feature, and the second texture feature of any local part of the PCB board mounting surface image through the second convolution channel, wherein the model parameters of the first convolution channel and the second convolution channel are the same and are connected in parallel.

[0054] Step 4: Calculate the edge similarity between the first edge feature and the second edge feature, the shape similarity between the first shape feature and the second shape feature, and the texture similarity between the first texture feature and the second texture feature through a feature comparison channel, wherein the feature comparison channel is connected to the output layers of the first convolution channel and the second convolution channel.

[0055] Step 5: When the edge similarity is greater than or equal to the edge similarity threshold, the shape similarity is greater than or equal to the shape similarity threshold, and the texture similarity is greater than or equal to the texture similarity threshold, the part is added to the mounting pattern set.

[0056] Specifically, a pattern is selected from the design mounting pattern set in a certain order (such as sequential index or random selection) as the first design mounting pattern. This first design mounting pattern is used as the initial comparison object, providing a specific pattern basis for subsequent feature extraction and comparison.

[0057] A convolutional neural network structure is constructed based on a deep learning framework such as TensorFlow or PyTorch. The convolutional neural network structure mainly consists of three parts: the first convolution channel, the second convolution channel and the feature comparison channel. The first convolution channel and the second convolution channel have the same model parameters and are connected in parallel, and are used to extract image features of different images respectively. The first convolution channel and the second convolution channel have the same model parameters, which ensures that the same feature extraction standard is used for different data (the first design mounting pattern and the local image of the PCB mounting surface) when extracting features, so that the extracted features are comparable. For example, for the same edge detection task, using the same convolution kernel weight can ensure that the edge feature extraction method is consistent in the first design mounting pattern and the local image of the PCB mounting surface. Parallel connection means that the first convolution channel and the second convolution channel operate at the same time without interfering with each other, thereby improving the processing speed and extracting features from different data (the first design mounting pattern and the local image of the PCB mounting surface) at the same time. The feature comparison channel is connected to the output layer of the first convolution channel and the second convolution channel, and is used to compare and calculate the features extracted from the two convolution channels. Among them, the first convolution channel is used to extract the image features of the design mounting pattern, and the second convolution channel is used to extract the image features of the PCB mounting surface image. These image features include edge features, shape features and texture features. Edge features are the features of the edge part of the object in the image, such as the direction of the edge, the strength of the edge, etc. The shape features reflect the relevant features of the shape of the object in the image, such as the aspect ratio and symmetry of the shape. For the PCB mounting pattern, different components have different shape features, such as square chips and circular capacitors have significantly different shape features; texture features describe the features of the texture structure of the image surface, such as the roughness and directionality of the texture. In the PCB mounting pattern, the wiring on the surface of the circuit board and the texture on the surface of the components can constitute texture features.

[0058] When building a convolutional neural network structure, first define the layer structure of the network in the deep learning framework, where the internal structure of the first convolution channel and the second convolution channel includes at least an input layer, a convolution layer, an activation function layer, and a pooling layer. At the same time, set hyperparameters to determine the size and number of convolution kernels, the size of the pooling window, the type of activation function, etc. For example, set the convolution kernel size to 3×3, the number to 16, the pooling window to 2×2, and the activation function to ReLU. After building the network structure, initialize the model's weights, biases and other parameters. In the deep learning framework, there are usually default initialization methods, such as random initialization.

[0059] Collect a large number of designed mounting patterns and the corresponding PCB mounting surface images as training samples. Divide the training samples into training set and validation set, for example, in a ratio of 8:2. Define the loss function: Mean square error (MSE) can be used as the loss function. Select an optimization algorithm, such as Adam, SGD, etc. For example, select the Adam optimization algorithm, which can adaptively adjust the learning rate to speed up the training. Perform multiple rounds of iterative training on the training set. In each round of iteration, the training sample is input into the network, the prediction result is obtained through forward propagation, and then the loss value is calculated according to the loss function, and then the parameters of the model are updated through the back propagation algorithm. After each round of training, the performance of the model is evaluated on the validation set, such as calculating the loss value or accuracy on the validation set. According to the performance indicators of the validation set, adjust the hyperparameters, such as the learning rate, the number of convolution kernels, etc., until the model achieves good performance on the validation set and obtains a trained convolutional neural network.

[0060] The first design mounting pattern is input into the first convolution channel for feature extraction. The first convolution channel slides the convolution kernel on the first design mounting pattern to perform convolution operation, thereby extracting the first edge feature, the first shape feature, and the first texture feature. The PCB mounting surface image is input into the second convolution channel, and the second convolution channel (with the same model parameters as the first convolution channel to ensure consistency when extracting features from different images) is used to perform feature extraction operations on any part of the PCB mounting surface image to obtain the second edge feature, the second shape feature, and the second texture feature, so as to accurately compare them with the features of the first design mounting pattern.

[0061] The feature comparison channel receives the output features from the first convolution channel and the second convolution channel, and respectively calculates the edge similarity between the first edge feature and the second edge feature, the shape similarity between the first shape feature and the second shape feature, and the texture similarity between the first texture feature and the second texture feature through a similarity calculation method (such as Euclidean distance calculation or cosine similarity calculation). For example, when calculating edge similarity, the Euclidean distance calculation method is used to calculate the distance between the two according to the edge feature vector. The smaller the distance, the higher the similarity. By performing quantitative similarity calculation on different features, an accurate numerical basis is provided for determining whether a local area is similar to the first design mounting pattern.

[0062] When the calculated edge similarity, shape similarity and texture similarity are respectively greater than or equal to the corresponding similarity thresholds, that is, the edge similarity is greater than or equal to the edge similarity threshold, and the shape similarity is greater than or equal to the shape similarity threshold, and the texture similarity is greater than or equal to the texture similarity threshold, this local area is added to the mounting pattern set. Among them, these similarity thresholds can be customized according to actual needs and experience. Through strict feature similarity judgment, the local area of ​​the PCB board mounting surface image similar to the designed mounting pattern is accurately screened out, thereby constructing an accurate mounting pattern set and providing reliable mounting pattern data for subsequent matching operations.

[0063] Furthermore, in step S300, geometric features, texture features and topological features are matched with the preset positioning pattern group in sequence according to the stability sorting results to obtain the target mounting pattern group, which also includes:

[0064] Step S310: Obtain the number of patterns in the preset positioning pattern group.

[0065] Step S320: enumerating and combining the mounting pattern set based on the number of patterns to obtain a plurality of mounting pattern groups.

[0066] Step S330: extracting a plurality of geometric features or a plurality of texture features or a plurality of topological features of a plurality of mounting pattern groups according to the first sequence number feature attribute of the stability sorting result.

[0067] Step S340: extracting reference geometric features or reference texture features or reference topological features of the preset positioning pattern group according to the first sequence feature attribute.

[0068] Step S350: Based on a plurality of geometric features or a plurality of texture features or a plurality of topological features and a reference geometric feature or a reference texture feature or a reference topological feature, a primary sequence number sorting placement pattern group having the greatest similarity to the first sequence number feature of a preset positioning pattern group is selected from a plurality of placement pattern groups.

[0069] Step S360: When the first-level serial number sorting and mounting pattern group is greater than 1, the second serial number feature attribute is screened to obtain the second-level serial number sorting and mounting pattern group.

[0070] Step S370: When the number of the second-level serial number sorting and mounting pattern groups is greater than 1, the third-level serial number feature attribute screening is performed to obtain the third-level serial number sorting and mounting pattern groups.

[0071] Step S380: When the three-level serial number sorting mounting pattern group is greater than 1, it is sent to the user end for sorting to obtain the target mounting pattern group.

[0072] Specifically, the data structure (such as an array or a list) of the preset positioning pattern group is queried, and the number of elements therein is obtained to obtain the number of patterns in the preset positioning pattern group.

[0073] Using a combination algorithm (such as a combination formula algorithm in mathematics or a loop nesting algorithm in programming), enumerate and combine the mounting pattern set according to the number of patterns obtained. For example, if the number of patterns is 3 and there are 4 patterns in the mounting pattern set, then the first pattern can be fixed first, and then the second pattern can be selected from the remaining patterns, and then the third pattern can be selected from the remaining patterns by loop nesting, so as to obtain all combinations and form several mounting pattern groups. Exemplarily, the mounting pattern set is {(10.1, 20.1), (30.1, 40.1), (50.1, 60.1), (70.1, 80.1)}, and the number of patterns in the preset positioning pattern group is 3. The possible combinations are: Combination 1: {(10.1, 20.1), (30.1, 40.1), (50.1, 60.1)}; Combination 2: {(10.1, 20.1), (30.1, 40.1), (70.1, 80.1)}; Combination 3: {(10.1, 20.1), (50.1, 60.1), (70.1, 80.1)}; Combination 4: {(30.1, 40.1), (50.1, 60.1), (70.1, 80.1)}. By enumerating the combinations, multiple possible mounting pattern groups are generated, providing a candidate set for the subsequent similarity comparison.

[0074] The combined pattern similarity calculation is performed for each mounting pattern group and the preset positioning pattern group (the calculation method can be similar to the feature comparison method in the previous step, comprehensively considering the similarity of the pattern's edge features, shape features, texture features, etc.). Then the combined pattern similarity of these mounting pattern groups and the preset positioning pattern group is compared, and the mounting pattern group with the maximum similarity is found, and it is determined as the target mounting pattern group. The specific similarity calculation process is as follows:

[0075] First, the feature attribute used for comparison first is determined according to the stability sorting result, that is, the first serial number feature attribute. This first serial number feature attribute can be a geometric feature, a texture feature, or a topological feature. According to the first serial number feature attribute, the corresponding feature is extracted from the data structure of several mounting pattern groups. For example, if the first serial number feature attribute is a geometric feature, a geometric feature extraction function (such as a function for calculating shape, a function for measuring size, etc.) is called to extract the corresponding geometric features such as shape and size from several mounting pattern groups to obtain several geometric features.

[0076] Similarly, according to the first serial number feature attribute, corresponding reference features are extracted from the data structure of the preset positioning pattern group, and these reference features can be reference geometric features, reference texture features, or reference topological features. For example, if the first serial number feature attribute in the aforementioned distance is a geometric feature, then the same or similar geometric feature extraction function is used to extract the corresponding reference geometric features for comparison from the preset positioning pattern group, which provides a reference for the subsequent feature comparison with the mounting pattern group, so that the similarity between the mounting pattern group and the preset positioning pattern group in the first serial number feature attribute can be accurately determined.

[0077] For each mounting pattern group, calculate its similarity with the preset positioning pattern group in the first serial number feature attribute, that is, the first serial number feature similarity. For example, if it is a geometric feature, the Euclidean distance formula can be used to calculate the distance in terms of shape and size, and then the distance is converted into similarity. Compare the first serial number feature similarities of all mounting pattern groups, and select the mounting pattern group with the greatest similarity as the first-level serial number sorting mounting pattern group. The first-level serial number sorting mounting pattern group is the mounting pattern group that is most similar to the preset positioning pattern group in the first serial number feature attribute selected from a number of mounting pattern groups.

[0078] When there are still multiple mounting pattern groups after the first serial number feature attribute is screened (i.e., the first-level serial number sorting mounting pattern group is greater than 1), the next feature attribute for comparison is determined according to the stability sorting result. For example, if the first serial number feature attribute is a geometric feature, the second serial number feature attribute may be a texture feature or a topological feature, with a serial number of 2. Similar to the first serial number feature attribute screening, according to the second serial number feature attribute, the corresponding features (geometric features or texture features or topological features) are extracted from the first-level serial number sorting mounting pattern group and the preset positioning pattern group, respectively, and the similarity is calculated with the corresponding reference features (reference geometric features or reference texture features or reference topological features) of the preset positioning pattern group, and the mounting pattern group with the largest second serial number feature similarity is selected as the second-level serial number sorting mounting pattern group. This process is to use the second serial number feature attribute for more detailed screening when the first serial number feature attribute screening is not accurate enough to improve the accuracy of finding the target mounting pattern group.

[0079] When there are still multiple mounting pattern groups after the second serial number feature attribute is screened (that is, the number of second-level serial number sorting pattern groups is greater than 1), the next feature attribute for comparison is determined according to the stability sorting result. For example, if the first serial number feature attribute is a geometric feature and the second serial number feature attribute is a texture feature, then the third serial number feature attribute is a topological feature with a serial number of 3. Similar to the previous screening steps, according to the third serial number feature attribute, the corresponding features are extracted from the second-level serial number sorting pattern group, and the similarity is calculated with the corresponding reference features of the preset positioning pattern group, and the mounting pattern group with the largest third serial number feature similarity is selected as the third-level serial number sorting pattern group. This process is based on the previous two screenings, using the third serial number feature attribute for a more in-depth screening to further improve the accuracy of finding the target mounting pattern group.

[0080] The data of the three-level serial number sorting mounting pattern group is sent to the user end, and the user end allows the user to make the final selection of these mounting pattern groups based on his or her own experience or other special requirements through a visual interface or interactive tool to determine the target mounting pattern group. For example, these mounting pattern groups are displayed graphically on the operating software interface, and the user can click to select the most suitable group as the target mounting pattern group. This process uses the user's subjective judgment to finally determine the target mounting pattern group when the automatic screening cannot determine the only target mounting pattern group, ensuring that the appropriate target mounting pattern group can be obtained in various complex situations, thereby improving the accuracy and reliability of the entire PCB mounting process.

[0081] The above steps gradually perform feature matching with the preset positioning pattern group according to the stability sorting results, and finally screen out the target mounting pattern group that best meets the requirements, ensuring that the best matching result can be efficiently selected in complex mounting pattern matching, providing an accurate positioning reference for subsequent coordinate transformation and mounting control, thereby improving the accuracy and reliability of PCB mounting.

[0082] Further, step S320 includes:

[0083] Step S321: obtaining the first preset positioning pattern to the Nth preset positioning pattern of the preset positioning pattern group.

[0084] Step S322: Delete the mounting patterns in the mounting pattern set that are different from the first preset positioning pattern to the Nth preset positioning pattern to obtain a retained mounting pattern set.

[0085] Step S323: enumerate and combine the retained mounting pattern set based on the number of patterns to obtain a plurality of mounting pattern groups.

[0086] Specifically, when enumerating the combination, each pattern is sequentially taken out from the data structure (such as an array or a list) of the previously determined preset positioning pattern group. If the preset positioning pattern group is stored as an array, each pattern can be obtained by indexing from 0 to N-1 (N is the length of the array, that is, the number of patterns), and marked as the first preset positioning pattern, the second preset positioning pattern, and finally the Nth preset positioning pattern.

[0087] Traverse each mounting pattern in the mounting pattern set, and compare it with the first preset positioning pattern to the Nth preset positioning pattern. If a mounting pattern is different from any of the preset positioning patterns, delete the mounting pattern from the mounting pattern set, and finally obtain a retained mounting pattern set. Exemplarily, the mounting pattern set is {(10.1, 20.1), (30.1, 40.1), (50.1, 60.1), (70.1, 80.1)}, and the preset positioning pattern group is {(10, 20), (30, 40), (50, 60)}. Through feature comparison: (10.1, 20.1) matches (10, 20); (30.1, 40.1) matches (30, 40); (50.1, 60.1) matches (50, 60); (70.1, 80.1) does not match the preset positioning pattern, so (70.1, 80.1) is deleted, and the remaining placement pattern set is {(10.1, 20.1), (30.1, 40.1), (50.1, 60.1)}. By deleting the unmatched patterns, the scope of subsequent enumeration is narrowed, the calculation efficiency is improved, and the generated combination is ensured to be consistent with the structure of the preset positioning pattern group.

[0088] According to the number of patterns in the preset positioning pattern group, the retained placement pattern set is enumerated and combined. For example, if the number of patterns is 3, and there are 3 placement patterns in the retained placement pattern set, then all possible combinations of 3 patterns are generated through combination algorithms such as loop nesting to form several placement pattern groups. By enumerating and combining the retained placement pattern set to generate multiple candidate placement pattern groups, more possibilities are provided for the subsequent selection of the best matching target pattern group, increasing the chance of ultimately selecting the correct matching pattern, and improving the matching accuracy and stability of the placement process.

[0089] Further, step S200 includes:

[0090] Step S210: receiving the calibrated geometric features, calibrated texture features and calibrated topological features of the PCB mounting pattern through the user terminal, wherein the calibrated geometric features, calibrated texture features and calibrated topological features are accurate features identified by the user.

[0091] Step S220: collecting a plurality of image geometric features, a plurality of image texture features, and a plurality of image topological features of a plurality of images of the PCB board mounting pattern.

[0092] Step S230: calculating a first mean similarity between a plurality of image geometric features and the calibration geometric features, a second mean similarity between a plurality of image texture features and the calibration texture features, and a third mean similarity between a plurality of image topological features and the calibration topological features.

[0093] Step S240: sorting the geometric features, texture features and topological features from large to small according to the first similarity mean, the second similarity mean and the third similarity mean to obtain the stability sorting result.

[0094] Specifically, the system interacts with the user through the user end (such as the PCB design software interface) to receive the calibrated geometric features, calibrated texture features, and calibrated topological features of the PCB mounting pattern provided by the user. For example, in the Altium Designer software, the user can use the measurement tool to determine the size of the geometric features, and use the annotation tool to describe the texture features and topological features. These calibrated geometric features, calibrated texture features, and calibrated topological features are accurate features preset by engineers according to the requirements of the PCB board during the design phase. They are used to represent the PCB pattern under ideal conditions and provide an accurate reference standard for subsequent feature similarity calculations.

[0095] Use image acquisition equipment (such as industrial cameras) to shoot the PCB mounting pattern and collect several images. Then, use image analysis algorithms (such as determining geometric shapes based on edge detection algorithms, analyzing texture features based on gray-level co-occurrence matrices, analyzing topological features based on graph theory algorithms, etc.) to extract image geometric features, image texture features, and image topological features from these images. For example, use the Canny edge detection algorithm in the OpenCV library to obtain image geometric features, use its texture analysis function to obtain image texture features, and use a custom graph algorithm to analyze image topological features. By collecting multiple sets of images and extracting multiple features, the actual features of the PCB mounting pattern can be obtained more comprehensively and accurately, providing a rich data basis for subsequent calculations and calibration feature similarities.

[0096] For each image geometric feature, calculate its similarity with the calibrated geometric feature (shape similarity algorithm, distance similarity algorithm, etc. can be used), then add the similarities of all image geometric features with the calibrated geometric features and divide by the number of images to obtain the first similarity mean. Similarly, for image texture features and calibrated texture features, image topological features and calibrated topological features, use the corresponding similarity calculation methods (such as grayscale similarity calculation of texture features, similarity calculation of connection relationships of topological structures, etc.) to obtain the second similarity mean and the third similarity mean. These similarity means can quantitatively represent the similarity between the collected features and the calibrated features, providing comparable data basis for subsequent stability ranking.

[0097] According to the obtained first similarity mean, second similarity mean and third similarity mean, the corresponding geometric features, texture features and topological features are sorted from large to small according to the similarity mean. For example, if the first similarity mean is the largest, the second similarity mean is the second, and the third similarity mean is the smallest, then the stability sorting result is that the geometric features are ranked first, followed by the texture features, and finally the topological features. This sorting process can be implemented in the program through simple comparison and sorting algorithms (such as bubble sort, quick sort, etc.). By gradually extracting and analyzing image features, calculating feature similarity, and performing stability sorting, the most accurate and stable feature information can be identified, so that in the subsequent feature matching process, more stable features (that is, more similar to the calibration features) are prioritized according to this sorting result to improve the accuracy and reliability of the entire PCB patch control process.

[0098] The embodiment of the present invention provides an artificial intelligence-based PCB patch control method, which has at least the following technical effects:

[0099] The embodiment of the present invention constructs a stable and unique preset positioning pattern group by extracting multiple patterns from the design file and positioning them, providing an accurate positioning reference for subsequent pattern matching and coordinate transformation, and further optimizing the priority of feature matching by ranking the geometric, texture and topological features of the PCB board for stability, ensuring that the features with high stability are preferentially used for matching in the actual image. In the image processing stage, a convolutional neural network is used to extract the features of the design pattern and the actual image, and the matching local area is screened out through feature comparison. The stability ranking result is used to guide the multi-level feature matching, and the target mounting pattern group that is most similar to the preset positioning pattern group is gradually screened out, ensuring efficient pattern selection and coordinate transformation. Finally, coordinate transformation is performed based on the matching results to guide the placement machine to complete high-precision placement, which not only improves the accuracy, efficiency and stability of the PCB patch, but also enhances the adaptability to complex PCB designs.

[0100] Embodiment 2:

[0101] like Figure 3 As shown, based on the same inventive concept as the artificial intelligence-based PCB patch control method provided in Embodiment 1, the embodiment of the present invention further provides an artificial intelligence-based PCB patch control system, the system comprising:

[0102] The design information extraction module 10 is used to extract a preset positioning pattern group including at least three mounting patterns, positioning pattern design coordinates and component design coordinates from a PCB board design file, wherein any two mounting patterns of the preset positioning pattern group do not belong to the same straight line, and the combined pattern of the preset positioning pattern group is unique on the PCB board, and the mounting pattern is a pad pattern or a hole pattern of components mounted on the PCB board.

[0103] The stability sorting module 20 is used to sort the stability of the PCB board based on its geometric features, texture features and topological features to obtain a stability sorting result.

[0104] The mounting pattern matching module 30 is used to extract the mounting pattern set of the mounting surface image of the PCB board after the PCB board is fixed, match it with the preset positioning pattern group, and obtain the target mounting pattern group, wherein the PCB board has fixed coordinates.

[0105] The mounting coordinate acquisition module 40 is used to perform coordinate conversion on the component design coordinates according to the target mounting pattern fixed coordinates of the target mounting pattern group and the positioning pattern design coordinates, and obtain component mounting coordinates to perform PCB mounting control.

[0106] Furthermore, the design information extraction module 10 of the embodiment of the present invention is also used to perform the following steps:

[0107] Extract a design mounting pattern set of the design image of the mounting surface of the PCB board, wherein the design mounting pattern set is a user preset pattern corresponding to the components one by one; enumerate the pattern combination of at least three mounting patterns in the design mounting pattern set, and any two mounting patterns do not belong to the same straight line, to obtain multiple design mounting pattern combinations; extract any unique design mounting pattern combination among the multiple design mounting pattern combinations and set it as the preset positioning pattern group.

[0108] Furthermore, the design information extraction module 10 of the embodiment of the present invention is also used to perform the following steps:

[0109] Perform pairwise similarity calculations on the multiple design and mounting pattern combinations to obtain a combination pattern similarity set; based on the combination pattern similarity set, respectively calculate the mean similarity between each design and mounting pattern combination of the multiple design and mounting pattern combinations and other combination patterns to obtain multiple similarity means; extract the design and mounting pattern combination with the smallest similarity mean from a number of design and mounting pattern combinations that do not have the same combination pattern among the multiple design and mounting pattern combinations, and set it as the preset positioning pattern group.

[0110] Furthermore, the mounting pattern matching module 30 of the embodiment of the present invention is also used to perform the following steps:

[0111] A design mounting pattern set is obtained, wherein the design mounting pattern set is a user preset pattern corresponding to components one by one; based on the design mounting pattern set, a local comparison is performed with the mounting surface image of the PCB board to obtain the mounting pattern set.

[0112] Furthermore, the mounting pattern matching module 30 of the embodiment of the present invention is also used to perform the following steps:

[0113] A first design mounting pattern of the design mounting pattern set is obtained; a first edge feature, a first shape feature, and a first texture feature of the first design mounting pattern are extracted through a first convolution channel; a second edge feature, a second shape feature, and a second texture feature of any local part of the mounting surface image of the PCB board are extracted through a second convolution channel, wherein the model parameters of the first convolution channel and the second convolution channel are the same and are connected in parallel; through a feature comparison channel, the edge similarity of the first edge feature and the second edge feature, the shape similarity of the first shape feature and the second shape feature, and the texture similarity of the first texture feature and the second texture feature are calculated respectively, wherein the feature comparison channel is connected to the output layer of the first convolution channel and the second convolution channel; when the edge similarity is greater than or equal to the edge similarity threshold, and the shape similarity is greater than or equal to the shape similarity threshold, and the texture similarity is greater than or equal to the texture similarity threshold, the local part is added to the mounting pattern set.

[0114] Furthermore, the mounting pattern matching module 30 of the embodiment of the present invention is also used to perform the following steps:

[0115] The number of patterns of the preset positioning pattern group is obtained; based on the number of patterns, the mounting pattern set is enumerated and combined to obtain a plurality of mounting pattern groups; according to the first serial number feature attribute of the stability sorting result, a plurality of geometric features or a plurality of texture features or a plurality of topological features of the mounting pattern groups are extracted; according to the first serial number feature attribute, a reference geometric feature or a reference texture feature or a reference topological feature of the preset positioning pattern group is extracted; based on the plurality of geometric features or a plurality of texture features or a plurality of topological features, and the reference geometric features or the reference texture features or the reference topological features, a first-level serial number sorting mounting pattern group having the greatest similarity to the first serial number feature of the preset positioning pattern group is screened from the plurality of mounting pattern groups; when the first-level serial number sorting mounting pattern group is greater than 1, the second serial number feature attribute is screened to obtain a second-level serial number sorting mounting pattern group; when the second-level serial number sorting mounting pattern group is greater than 1, the third serial number feature attribute is screened to obtain a third-level serial number sorting mounting pattern group; when the third-level serial number sorting mounting pattern group is greater than 1, it is sent to the user end for sorting to obtain the target mounting pattern group.

[0116] Furthermore, the mounting pattern matching module 30 of the embodiment of the present invention is also used to perform the following steps:

[0117] Obtain the first preset positioning pattern to the Nth preset positioning pattern of the preset positioning pattern group; delete the mounting patterns in the mounting pattern set that are different from the first preset positioning pattern to the Nth preset positioning pattern to obtain a retained mounting pattern set; enumerate and combine the retained mounting pattern set based on the number of patterns to obtain a plurality of mounting pattern groups.

[0118] Furthermore, the stability ranking module 20 of the embodiment of the present invention is also used to perform the following steps:

[0119] The method comprises the following steps: receiving calibrated geometric features, calibrated texture features and calibrated topological features of a PCB mounting pattern through a user terminal, wherein the calibrated geometric features, calibrated texture features and calibrated topological features are accurate features identified by a user; collecting a plurality of image geometric features, a plurality of image texture features and a plurality of image topological features of a plurality of images of the PCB mounting pattern; calculating a first similarity mean value between a plurality of image geometric features and the calibrated geometric features, a second similarity mean value between a plurality of image texture features and the calibrated texture features, and a third similarity mean value between the plurality of image topological features and the calibrated topological features; and sorting the geometric features, texture features and topological features from large to small according to the first similarity mean value, the second similarity mean value and the third similarity mean value to obtain the stability sorting result.

[0120] It should be noted that in the above embodiments, the description of each embodiment has its own emphasis, and for parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0121] Although preferred embodiments of the present invention have been described, additional changes and modifications may occur to these embodiments once those skilled in the art understand the basic inventive concepts.

[0122] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention belong to the scope of the present invention and its equivalent technologies, the present invention is also intended to include these changes and variations.

Claims

1. A PCB patch control method based on artificial intelligence, characterized in that: include: Extracting a preset positioning pattern group including at least three mounting patterns, positioning pattern design coordinates and component design coordinates from a PCB design file, wherein any two mounting patterns of the preset positioning pattern group do not belong to the same straight line, and a combined pattern of the preset positioning pattern group is unique on the PCB, and the mounting pattern is a pad pattern or a hole pattern of a component mounted on the PCB; Sorting the stability of geometric features, texture features and topological features of PCB boards to obtain stability sorting results; When the PCB board is fixed, a mounting pattern set of the mounting surface image of the PCB board is extracted, and geometric features, texture features and topological features are matched with the preset positioning pattern group in sequence according to the stability sorting results to obtain a target mounting pattern group, wherein the PCB board has fixed coordinates; According to the target mounting pattern fixed coordinates of the target mounting pattern group and the positioning pattern design coordinates, the component design coordinates are converted to obtain the component mounting coordinates to execute PCB mounting control.

2. A PCB patch control method based on artificial intelligence as claimed in claim 1, characterized in that: The construction process of the preset positioning pattern group includes: Extracting a design mounting pattern set of the design image of the mounting surface of the PCB board, wherein the design mounting pattern set is a user preset pattern corresponding to the components one by one; Enumerating the pattern combinations of at least three mounting patterns and any two mounting patterns not belonging to the same straight line for the design mounting pattern set, to obtain a plurality of design mounting pattern combinations; Any unique design and placement pattern combination among the plurality of design and placement pattern combinations is extracted and set as the preset positioning pattern group.

3. A PCB patch control method based on artificial intelligence as claimed in claim 2, characterized in that: Extracting any unique design pattern combination from the plurality of design pattern combinations and setting it as the preset positioning pattern group comprises: Performing pairwise similarity calculations on the plurality of design mounting pattern combinations to obtain a combination pattern similarity set; Based on the combination pattern similarity set, respectively calculating the similarity mean between each design and mounting pattern combination of the plurality of design and mounting pattern combinations and other combination patterns to obtain a plurality of similarity mean values; A design pattern combination with the smallest mean similarity value among a plurality of design pattern combinations that do not have the same combination pattern is extracted and set as the preset positioning pattern group.

4. A PCB patch control method based on artificial intelligence as claimed in claim 1, characterized in that: Extract the mounting pattern set of the PCB mounting surface image, including: Obtaining a design mounting pattern set, wherein the design mounting pattern set is a user preset pattern corresponding to a component one by one; Based on the designed mounting pattern set, a local comparison is performed with the mounting surface image of the PCB board to obtain the mounting pattern set.

5. A PCB patch control method based on artificial intelligence as claimed in claim 4, characterized in that: Based on the designed mounting pattern set, a local comparison is performed with the mounting surface image of the PCB board to obtain the mounting pattern set, including: Obtaining a first design placement pattern of the design placement pattern set; Extracting a first edge feature, a first shape feature, and a first texture feature of the first designed mounting pattern through a first convolution channel; Extracting the second edge feature, the second shape feature, and the second texture feature of any local part of the PCB mounting surface image through the second convolution channel, wherein the model parameters of the first convolution channel and the second convolution channel are the same and are connected in parallel; Through a feature comparison channel, respectively calculating edge similarity between the first edge feature and the second edge feature, shape similarity between the first shape feature and the second shape feature, and texture similarity between the first texture feature and the second texture feature, wherein the feature comparison channel is connected to output layers of the first convolution channel and the second convolution channel; When the edge similarity is greater than or equal to an edge similarity threshold, the shape similarity is greater than or equal to a shape similarity threshold, and the texture similarity is greater than or equal to a texture similarity threshold, the part is added to the mounting pattern set.

6. A PCB patch control method based on artificial intelligence as claimed in claim 1, characterized in that: According to the stability sorting results, the geometric features, texture features and topological features are matched with the preset positioning pattern group in turn to obtain the target placement pattern group, including: Obtaining the number of patterns in the preset positioning pattern group; Enumerating and combining the mounting pattern set based on the number of patterns to obtain a plurality of mounting pattern groups; Extracting a plurality of geometric features or a plurality of texture features or a plurality of topological features of a plurality of mounting pattern groups according to the first sequence number feature attribute of the stability sorting result; Extracting a reference geometric feature, a reference texture feature, or a reference topological feature of a preset positioning pattern group according to the first sequence number feature attribute; Based on a plurality of geometric features, a plurality of texture features, or a plurality of topological features, and a reference geometric feature, a reference texture feature, or a reference topological feature, a primary sequence number sorting placement pattern group having the greatest similarity to a first sequence number feature of a preset positioning pattern group is selected from a plurality of placement pattern groups; When the first-level serial number sorting and mounting pattern group is greater than 1, the second-level serial number feature attribute screening is performed to obtain the second-level serial number sorting and mounting pattern group; When the number of the second-level serial number sorting and mounting pattern group is greater than 1, the third-level serial number feature attribute screening is performed to obtain the third-level serial number sorting and mounting pattern group; When the three-level serial number sorting mounting pattern group is greater than 1, it is sent to the user end for sorting to obtain the target mounting pattern group.

7. A PCB patch control method based on artificial intelligence as claimed in claim 6, characterized in that: The mounting pattern set is enumerated and combined based on the number of patterns to obtain a plurality of mounting pattern groups, including: Obtaining a first preset positioning pattern to an Nth preset positioning pattern of the preset positioning pattern group; Deleting the mounting patterns in the mounting pattern set that are different from the first preset positioning pattern to the Nth preset positioning pattern to obtain a retained mounting pattern set; The retained mounting pattern set is enumerated and combined based on the number of patterns to obtain a plurality of mounting pattern groups.

8. A PCB patch control method based on artificial intelligence as claimed in claim 1, characterized in that: The stability ranking of the geometric features, texture features and topological features of the PCB board is performed to obtain the stability ranking results, including: Receiving, through the user end, the calibrated geometric features, calibrated texture features and calibrated topological features of the PCB board mounting pattern, wherein the calibrated geometric features, calibrated texture features and calibrated topological features are accurate features identified by the user; Collect several image geometric features, several image texture features, and several image topological features of several images of PCB board mounting patterns; Calculating a first mean similarity between a plurality of image geometric features and the calibration geometric features, a second mean similarity between a plurality of image texture features and the calibration texture features, and a third mean similarity between a plurality of image topological features and the calibration topological features; According to the first similarity mean, the second similarity mean and the third similarity mean, the geometric features, the texture features and the topological features are sorted from large to small to obtain the stability sorting result.

9. A PCB patch control system based on artificial intelligence, characterized in that: The system is used to execute the artificial intelligence-based PCB patch control method according to any one of claims 1 to 8, comprising: A design information extraction module is used to extract a preset positioning pattern group including at least three mounting patterns, positioning pattern design coordinates and component design coordinates from a PCB design file, wherein any two mounting patterns of the preset positioning pattern group do not belong to the same straight line, and the combined pattern of the preset positioning pattern group is unique on the PCB, and the mounting pattern is a pad pattern or a hole pattern of components mounted on the PCB; The stability sorting module is used to sort the stability of the geometric features, texture features and topological features of the PCB board to obtain the stability sorting results; A mounting pattern matching module is used to extract a mounting pattern set of the mounting surface image of the PCB board after the PCB board is fixed, and match the geometric features, texture features and topological features with the preset positioning pattern group in sequence according to the stability sorting results to obtain a target mounting pattern group, wherein the PCB board has fixed coordinates; The mounting coordinate acquisition module is used to perform coordinate conversion on the component design coordinates according to the target mounting pattern fixed coordinates of the target mounting pattern group and the positioning pattern design coordinates, and obtain the component mounting coordinates to execute PCB mounting control.

Citation Information

Patent Citations

  • A placement method, placement system and placement machine

    CN102281749A

  • Automatic chip mounter and automatic chip mounting method

    CN111278235A