Search

CN-121685917-B - Line segment attribute identification method, device and equipment for printed circuit board

CN121685917BCN 121685917 BCN121685917 BCN 121685917BCN-121685917-B

Abstract

The invention discloses a line segment attribute identification method, a device and equipment of a printed circuit board, and relates to the technical field of artificial intelligence, wherein the method comprises the steps of extracting a primitive set consisting of straight line primitives and arc line primitives based on an ODB++ file; combining the mutually communicated primitives based on the spatial adjacent relation among the primitives in the primitive set to form a plurality of line segment groups, forming a physically communicated electric path by each line segment group, generating corresponding line segment images based on the endpoint coordinates of all the primitives in each line segment group, inputting the line segment images into a pre-trained deep learning classification model to obtain attribute categories of the corresponding line segment groups, wherein the attribute categories are serpentine lines, rectangular lines or other types. The method learns the visual and structural characteristics of the categories such as the serpentine, the zigzag and the like through the deep learning classification model, can adapt to different design styles, novel topology and tiny geometric deformation, and improves the accuracy and generalization of line segment attribute identification.

Inventors

  • SONG ZIJIE
  • YU DIDI
  • WANG CHENGKAI
  • CHE YUNFEI
  • PU DONG

Assignees

  • 成都派兹互连电子技术有限公司

Dates

Publication Date
20260512
Application Date
20260210

Claims (8)

  1. 1. A method for identifying line segment attributes of a printed circuit board, comprising: Extracting a graphic element set formed by straight line graphic elements and arc graphic elements based on an ODB++ file, wherein the ODB++ file stores the complete design information of a printed circuit board; combining the mutually communicated primitives based on the spatial proximity relation among the primitives in the primitive set to form a plurality of line segment groups, wherein each line segment group forms a physically communicated electrical path; generating a corresponding line segment image based on the endpoint coordinates of all the primitives in each line segment group; Inputting the line segment images into a pre-trained deep learning classification model to obtain attribute categories of corresponding line segment groups, wherein the pre-trained deep learning classification model is obtained by pre-training based on a line segment image data set with marked attribute categories, and the attribute categories are serpentine lines, return lines or other types; The method comprises the steps of combining the mutually communicated primitives based on the spatial adjacent relation among the primitives in the primitive set to form a plurality of line segment groups, wherein each primitive in the primitive set is initialized to be an independent subset, traversing each primitive in the primitive set in sequence to serve as a current primitive, calculating the distance between the end coordinates of the current primitive and the start coordinates of other primitives, judging that the current primitive is mutually communicated with the other primitives, combining the subset of the current primitive and the other primitives, and judging that the current primitive is mutually communicated with the other primitives, correcting the start coordinates of the other primitives to be the end coordinates of the current primitive, and combining the current primitive and the subset of the other primitives until all the independent subset of the primitive set is traversed, and taking each independent subset as one line segment group if the distance is larger than 0 and smaller than a preset distance threshold.
  2. 2. The method for identifying line segment attributes of a printed circuit board according to claim 1, wherein generating the corresponding line segment image based on the endpoint coordinates of all the primitives in each line segment group comprises: determining the space connection sequence among the primitives based on the endpoint coordinates of all the primitives in each line segment group; Arranging all the primitives according to the space connection sequence to form a continuous path; Traversing each linear graphic primitive in the continuous path, and judging whether the lengths of all the linear graphic primitives are smaller than a preset length threshold value; And if the lengths of all the linear primitives are smaller than the preset length threshold value, generating a line segment image with a preset size based on the continuous path.
  3. 3. The method for identifying line segment attributes of a printed circuit board according to claim 2, wherein after determining whether the lengths of all the straight line primitives are less than a preset length threshold, the method further comprises: If the length of any straight line primitive is greater than or equal to the preset length threshold, shortening the length of any straight line primitive according to a first preset proportion, and synchronously updating the endpoint coordinates of the straight line primitive and the subsequent connection primitives to obtain an optimized continuous path; And generating line segment images with preset sizes based on the optimized continuous paths.
  4. 4. A line segment attribute recognition method of a printed circuit board according to claim 3, wherein the preset length threshold is obtained by: Calculating the total external size of the continuous path in an original coordinate space; and multiplying the length of the long side of the total external dimension by a second preset proportion to obtain the preset length threshold, wherein the second preset proportion is larger than or equal to the first preset proportion.
  5. 5. The method for identifying line segment attributes of a printed circuit board according to claim 1, wherein the training step of the pre-trained deep learning classification model is as follows: Generating a plurality of line segment images to be marked based on a plurality of ODB++ files; labeling the plurality of line segment images to be labeled to obtain a line segment image dataset of the labeled attribute type; performing data enhancement processing on the line segment image data set to obtain an enhanced data set; Training an initial deep learning classification model by the enhanced data set to obtain the pre-trained deep learning classification model.
  6. 6. The line segment attribute recognition method of a printed circuit board according to claim 1, wherein after inputting the line segment image to a pre-trained deep learning classification model to obtain an attribute category of a corresponding line segment group, the method further comprises: and the attribute category of each line segment group is written in the ODB++ file in an associated mode.
  7. 7. A line segment attribute recognition apparatus of a printed circuit board, comprising: the extracting module is used for extracting a graphic element set formed by straight line graphic elements and arc graphic elements based on an ODB++ file, wherein the ODB++ file stores the complete design information of the printed circuit board; The merging module is used for merging the mutually communicated primitives based on the spatial adjacent relation among the primitives in the primitive set to form a plurality of line segment groups, wherein each line segment group forms a physically communicated electrical path; The generating module is used for generating corresponding line segment images based on the endpoint coordinates of all the primitives in each line segment group; The classification module is used for inputting the line segment images into a pre-trained deep learning classification model to obtain attribute categories of corresponding line segment groups, wherein the pre-trained deep learning classification model is obtained by pre-training based on a line segment image dataset of marked attribute categories, and the attribute categories are serpentine lines, return lines or other types; The method comprises the steps of combining the mutually communicated primitives based on the spatial adjacent relation among the primitives in the primitive set to form a plurality of line segment groups, wherein each primitive in the primitive set is initialized to be an independent subset, traversing each primitive in the primitive set in sequence to serve as a current primitive, calculating the distance between the end coordinates of the current primitive and the start coordinates of other primitives, judging that the current primitive is mutually communicated with the other primitives, combining the subset of the current primitive and the other primitives, and judging that the current primitive is mutually communicated with the other primitives, correcting the start coordinates of the other primitives to be the end coordinates of the current primitive, and combining the current primitive and the subset of the other primitives until all the independent subset of the primitive set is traversed, and taking each independent subset as one line segment group if the distance is larger than 0 and smaller than a preset distance threshold.
  8. 8. A computer device, characterized in that it comprises a memory and a processor, the memory having stored therein a computer program, the processor executing the computer program to implement the line segment attribute recognition method of a printed circuit board according to any one of claims 1-6.

Description

Line segment attribute identification method, device and equipment for printed circuit board Technical Field The invention relates to the technical field of artificial intelligence, in particular to a line segment attribute identification method, device and equipment of a printed circuit board. Background In the design and manufacturing process of printed circuit boards (Printed Circuit Board, PCBs), design engineers often use special winding structures such as serpentine or serpentine wires to meet specific electrical performance requirements. The serpentine wire realizes the time sequence equal length matching among signals by intentionally increasing the wiring length so as to ensure the data synchronization, and the loop wire is commonly used for antenna design, impedance control or electromagnetic interference suppression. The line segments with specific functions are accurately and efficiently identified, and the method has important significance for subsequent design rule inspection, signal integrity analysis, manufacturing cost evaluation and the like. Currently, the mainstream automatic identification method in the industry relies on rule matching geometric feature analysis. Firstly, based on the coordinate position relation of all elements in a PCB design file, searching all line segment pair combinations capable of forming line segments, then, based on the geometric relation of each line segment, calculating geometric characteristics such as curvature, inflection point number, line segment length, parameter line segment included angle, turn-back times, parallel segment spacing and the like of the line, and finally, classifying the line segment attributes through a set of hard threshold values and logic rules (for example, the S-shaped line is judged as being the line segment after 90 turn-back times are continuously performed for more than 5 times and the parallel spacing error is less than 10 percent) set by manual experience. However, geometric feature analysis based on rule matching relies on empirical features too much and is poor in generalization. When the design style difference, the novel winding topology or the micro geometric deformation introduced by the manufacturing end are faced, the preset rule cannot be covered, so that the false alarm rate is high, and the method is difficult to adapt to changeable engineering practice. Disclosure of Invention The invention aims to provide a line segment attribute identification method, device and equipment for a printed circuit board, which solve the problems of improving the accuracy and generalization of the line segment attribute identification of the PCB. The invention is realized by the following technical scheme: In a first aspect, the present invention provides a method for identifying line segment attributes of a printed circuit board, including: Extracting a graphic element set formed by straight line graphic elements and arc graphic elements based on an ODB++ file, wherein the ODB++ file stores the complete design information of a printed circuit board; combining the mutually communicated primitives based on the spatial proximity relation among the primitives in the primitive set to form a plurality of line segment groups, wherein each line segment group forms a physically communicated electrical path; generating a corresponding line segment image based on the endpoint coordinates of all the primitives in each line segment group; And inputting the line segment images into a pre-trained deep learning classification model to obtain attribute categories of corresponding line segment groups, wherein the pre-trained deep learning classification model is obtained by pre-training based on a line segment image data set with marked attribute categories, and the attribute categories are serpentine lines, return lines or other types. Optionally, the merging, based on the spatial proximity relationship between the primitives in the primitive set, the primitives that are mutually communicated to form a plurality of line segment groups includes: initializing each primitive in the set of primitives to a separate subset; Traversing each primitive in the primitive set in turn to serve as a current primitive, and calculating the distance between the end point coordinates of the current primitive and the start point coordinates of the rest primitives; If the distance is smaller than a preset distance threshold, judging that the current primitive is communicated with the other primitives, and merging subsets of the current primitive and the other primitives, wherein the preset distance threshold is larger than 0; And taking each independent subset as a line segment group until all the primitives in the primitive set are traversed. Optionally, if the distance is smaller than a preset distance threshold, determining that the current primitive and the other primitives are mutually communicated, and merging the subset to which the current primitive and the ot