CN-122024272-A - Analog circuit system block diagram component connection detection method
Abstract
The invention discloses a method for detecting connection of components of an analog circuit system block diagram, which comprises the steps of obtaining an analog circuit system block diagram to be detected and preprocessing, inputting the preprocessed analog circuit system block diagram into a pre-trained component block detection model to obtain the types and positions of circuit components in the analog circuit system block diagram and the position information of wires, wire arrows, wire crossing points and text interference areas, obtaining a wire candidate binary diagram by utilizing the position information of the wire arrows, the wire crossing points and the text interference areas, purifying, then executing a skeletonization algorithm, communicating at gaps to obtain a final wire skeleton diagram, and then obtaining a connection relation table of the circuit components by path tracking. The method can greatly reduce the manual labeling cost, improve the automation degree and the accuracy of component detection and connection analysis, and provide a high-efficiency and reliable technical scheme for intelligent analysis of the analog circuit system block diagram.
Inventors
- MA JUNXI
- WU YUE
- YANG XIAOYAN
- ZHOU YILONG
- ZHOU LINGFENG
Assignees
- 杭州电子科技大学
- 绍兴杭电集成电路研发有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260408
Claims (9)
- 1. A method for detecting connection of components in a block diagram of an analog circuit system, comprising the steps of: Acquiring an analog circuit system block diagram to be detected and preprocessing; The method comprises the steps of inputting a preprocessed analog circuit system block diagram into a pre-trained component frame detection model to obtain an output result, wherein the component frame detection model comprises a component detection module and a connection element detection module, the component detection module is used for detecting and outputting the types and positions of circuit components in the analog circuit system block diagram, and the connection element detection module is used for detecting and outputting the position information of wires, wire arrows, wire crossing points and text interference areas in the analog circuit system block diagram; Selecting a thick line or thin line enhancement strategy according to a width result of the wire, dividing to obtain a wire candidate binary image, and purifying by using the interference mask; Performing skeletonization algorithm on the purified wire candidate binary image, and performing notch communication on the covered skeleton near the text interference area by utilizing interpolation and shortest path searching strategy to obtain a final wire skeleton image; carrying out path tracking on the final skeleton diagram to obtain a connection relation table of the circuit assembly; And outputting a table of categories, positions and connection relations of the circuit components.
- 2. The analog circuitry block diagram component connection detection method of claim 1, wherein the training step of the pre-trained component block detection model comprises: Acquiring an original sample image, extracting a document structure by adopting a mode of combining text candidate region extraction, edge detection and morphological expansion, segmenting and extracting a contour by combining an Otsu threshold value, calculating geometric characteristics, and screening out an initial candidate component frame; Automatically scoring and manually correcting the initial candidate component frames to construct an initial golden label set; And after each batch of training is finished, extracting part of unlabeled images to perform reasoning by using the current model, manually correcting the reasoning result, feeding back to the training set for iterative fine adjustment until the model converges.
- 3. The method for detecting connection of components in a block diagram of an analog circuit system according to claim 1, wherein the selecting a coarse line or a fine line enhancement strategy according to the width result of the wire comprises: Generating a component mask by utilizing the component position information output by the component detection module, and eliminating a component area in the image; And carrying out pixel level width statistics on the image from which the component area is removed, calculating the average width of the connected pixels, judging that the image is a thick line image when the average width is larger than a preset threshold value, adopting an enhancement strategy combining gray stretching and morphological corrosion, and judging that the image is a thin line image when the average width is smaller than or equal to the preset threshold value, adopting an enhancement strategy combining guide filtering and morphological expansion.
- 4. The method for detecting connection between components in a block diagram of an analog circuit system according to claim 1, wherein the step of performing gap bridging on the covered skeleton near the text interference area by using interpolation and a shortest path search strategy specifically comprises: when the skeletonization algorithm is executed to the mask edge of the text interference area and the skeleton is interrupted, recording tangential direction vectors at the interruption position; Searching potential skeleton connection points along the extending area of the tangential direction vector at the opposite side edges of the text interference area mask, and if connection points meeting the direction consistency constraint are found, establishing a virtual connection path between the connection points and the break points to complete gap bridging.
- 5. The method for detecting connection of components in a block diagram of an analog circuit system according to claim 1, wherein the path tracking uses breadth-first search, specifically: Establishing an index grid at the outer edge of the boundary of the component, traversing pixel points in the skeleton diagram, and marking the points as connecting line inlets and outlets of the component if skeleton pixels are adjacent to the boundary of the component frame and are not in a text interference area; taking the connecting line entrance as a starting point, and executing breadth-first search; Terminating the current path when the breadth-first search encounters any of the following: 1) The path reaches the boundary of another component box; 2) The path enters a wire arrow candidate frame area; 3) The path length exceeds a preset upper limit; and for the paths taking the component frames as endpoints, determining the input or output directions of the start-stop components according to the pointing directions of the arrows if the wire arrows exist on the paths, and performing direction judgment according to the positions of the paths in the surrounding relation of the component frames and the number of the same-direction paths if the arrows do not exist on the paths.
- 6. The analog circuitry block diagram component connection detection method of claim 1, wherein the connection relation table is obtained by: And counting the number of the directional accumulated contacts between the component pairs, judging whether effective connection exists between the circuit components based on a preset contact number threshold value, and finally generating and outputting a list containing the effective connection circuit component pairs and the connection directions thereof.
- 7. An analog circuitry block diagram component connection detection system implementing the method of any of claims 1-6, comprising: The image acquisition module is used for acquiring a block diagram image of the analog circuit system and preprocessing the block diagram image; The component frame detection model is used for carrying out target detection on the preprocessed image through the component detection module and the connecting element detection module and outputting the category and the position of the circuit component and the position information of the lead, the lead arrow, the lead intersection point and the text interference area; the skeletonizing processing module is used for generating a communicated wire skeleton diagram; the connection analysis module is used for carrying out path search on the skeleton diagram to obtain a connection relation table of the circuit assembly; And the result output module is used for outputting the category and the position of the circuit component and the connection relation table.
- 8. A computer readable storage medium, having stored thereon a computer program which, when executed in a computer, causes the computer to perform the method according to any of claims 1-6.
- 9. A computing device comprising a memory having executable code stored therein and a processor that, when executing the executable code, performs the method of any of claims 1-6.
Description
Analog circuit system block diagram component connection detection method Technical Field The invention belongs to the technical field of electronic design automation, and particularly relates to a method for detecting connection of block diagram components of an analog circuit system. Background In the field of Electronic Design Automation (EDA) technology, analog circuit system diagrams are important carriers for describing circuit structures and signal flow. Along with the comprehensive digitization of the technical document, how to automatically and accurately identify the components and the connection relation thereof from the block diagrams of the massive image formats, so that the automatic analysis, simulation and retrieval of the supporting circuit become a key technical problem for restricting the further improvement of the EDA level. At present, the analysis of the block diagram is still highly dependent on manual interpretation, so that the efficiency is low, errors are easily generated due to the influence of subjective factors, and the large-scale application requirements in complex engineering scenes are difficult to adapt. In existing research, one class of mainstream solutions relies on rule-driven geometric feature analysis, such as locating component boxes and links based on edge detection, contour extraction, and morphological operations. However, such methods are extremely fragile in complex situations such as non-uniform drawing specifications, text adhesion, line intersection and overlapping. The core rule is set by manual experience, so that the diversification deformation in the real engineering drawing is difficult to cover, and the detection precision is obviously reduced when the components are highly dense or special connection symbols such as broken lines, arrows and the like exist. Another type of solution attempts to introduce a traditional machine learning model, but still generally relies on manual feature design, and has limited expressive power and generalization performance, so that it is difficult to grasp the topological structure and semantic relation of the block diagram on the whole. To sum up, the prior art mainly faces the following three bottlenecks in processing the analog circuit system block diagram, namely, first, insufficient perceptibility. The traditional computer vision algorithm is difficult to stably distinguish the functional component frame from the text label, the legend, the shadow and other interference elements in the complex background, and is easy to miss detection and misdetection, and secondly, the connection relation analysis is fragile. The wiring tracking method based on the low-layer pixel characteristics is extremely easy to break due to character shielding, line crossing and noise interference, and is difficult to reliably reconstruct logical connection among components, and third, the integrity is insufficient. In the existing method, component detection and connection analysis are commonly performed to perform fracturing treatment, and an end-to-end cooperative modeling mechanism is lacked, so that errors are accumulated step by step in a multi-stage flow, and the overall analysis effect is obviously weakened. Therefore, an automatic detection method capable of deeply fusing image features and semantic information and having both generalization and robustness is urgently needed. Disclosure of Invention The invention aims to solve the problems that in the prior art, an analog circuit system block diagram component frame is difficult to automatically detect, the recognition precision of connection elements such as wires and arrows is low, the connection relation between components depends on manual interpretation and the like, and provides a novel analog circuit system block diagram component connection detection method and a related system, which realize the automatic and high-precision analysis of the components and the connection relation thereof in the block diagram, obviously reduce the manual marking and checking workload, and improve the intelligent processing capacity of circuit documents. In order to achieve the above purpose, the invention adopts the following technical scheme: In a first aspect, the present invention provides a method for detecting connection of components in a block diagram of an analog circuit system, comprising the steps of: Acquiring an analog circuit system block diagram to be detected and preprocessing; The method comprises the steps of inputting a preprocessed analog circuit system block diagram into a pre-trained component frame detection model to obtain an output result, wherein the component frame detection model comprises a component detection module and a connection element detection module, the component detection module is used for detecting and outputting the types and positions of circuit components in the analog circuit system block diagram, and the connection element detection module is used