Circuit diagram standardization method, device, equipment and medium
Through the automated circuit diagram standardization method, the circuit diagram unit is dismantled and replaced by the object detection and feature extraction algorithm, the problem of low efficiency in existing circuit diagram standardization is solved, and efficient and accurate circuit diagram standardization is achieved.
Patent Information
- Application Number
- CN202411576491.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-06
- Publication Date
- 2024-12-03
AI Technical Summary
The existing circuit diagram standardization methods are inefficient, time-consuming and labor-intensive, and are prone to human errors, resulting in inconsistent standardization quality.
By obtaining the original circuit diagram of the preset format, using the preset object detection algorithm to disassemble the circuit diagram, perform grayscale conversion, pseudo-color mode format conversion, tensor conversion and normalization processing, extract features, perform feature comparison, and automatically replace the circuit unit, generate standard circuit diagram.
It significantly improves the efficiency of circuit diagram standardization, reduces human resources and time, prevents human errors, improves the accuracy and reliability of standardization, adapts to various complex circuit drawings, and improves the standardization level of electrical design.
Smart Images

Figure CN119067068A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of electrical design, and in particular to a circuit diagram standardization method, device, equipment and medium. Background Art
[0002] In electrical design companies, circuit design engineers often need to standardize the complex and diverse circuit diagrams provided by customers in order to obtain circuit diagrams that meet the company's unified internal standards. The standardized circuit diagrams are then sent down to downstream departments such as procurement, production, and accessory design to ultimately produce the circuit products that customers need.
[0003] In the process of circuit diagram standardization, the existing method usually requires circuit design engineers to import drawings into drawing software, and manually decompose the circuits in the drawings into circuit units in the drawing software based on the annotation information in the drawings and the professional knowledge of the engineers themselves, and then search for the corresponding standard circuit units one by one from the large amount of standard circuit unit data in the PDM system (Product Data Management) for each circuit unit, and replace them, and finally combine them into a standard circuit diagram. This process is not only time-consuming and labor-intensive, but also extremely inefficient, and prone to human errors, resulting in uneven standardization quality of circuit diagrams. Summary of the invention
[0004] The main purpose of the present invention is to provide a circuit diagram standardization method, device, equipment and medium, aiming to solve the technical problem of low efficiency of existing circuit diagram standardization methods.
[0005] A first aspect of the present invention provides a circuit diagram standardization method, the circuit diagram standardization method comprising: Get the original circuit diagram in a preset format; Disassembling a plurality of original circuit units constituting the original circuit diagram from the original circuit diagram based on a preset target detection algorithm; Performing grayscale conversion, pseudo color mode format conversion, tensor conversion and normalization processing on the original circuit unit to obtain data to be extracted; Performing feature extraction on the data to be extracted based on a preset feature extraction algorithm to obtain original unit features corresponding to the original circuit unit; Comparing the original cell feature with the standard cell features of each pre-stored standard circuit cell in the standard cell library to determine the standard circuit cell corresponding to the original circuit cell; The standard circuit unit is used to replace the corresponding original circuit unit in the original circuit diagram to obtain a standard circuit diagram.
[0006] Optionally, in a first implementation of the first aspect of the present invention, the step of disassembling a plurality of original circuit units constituting the original circuit diagram from the original circuit diagram based on a preset target detection algorithm includes: Performing grayscale conversion, pseudo color mode format conversion, tensor conversion and normalization processing on the original circuit diagram to obtain data to be detected; Performing circuit unit detection on the data to be detected based on the preset target detection algorithm to obtain unit detection frame coordinates; A number of the original circuit units constituting the original circuit diagram are determined based on the unit detection frame coordinates.
[0007] Optionally, in a second implementation of the first aspect of the present invention, the preset target detection algorithm is implemented based on a YOLO algorithm.
[0008] Optionally, in a third implementation of the first aspect of the present invention, the preset feature extraction algorithm is implemented based on a preset residual network model, and the preset residual network model is obtained by training a residual network framework model based on data of a sample circuit unit; The extracting features of the data to be extracted based on a preset feature extraction algorithm to obtain original unit features corresponding to the original circuit unit includes: Obtaining the pre-trained residual network model; Adjusting the first layer of the preset residual network model to a grayscale image processing layer, and removing the fully connected layer of the preset residual network model to obtain a feature extraction model; Based on the feature extraction model, feature extraction is performed on the data to be extracted to obtain the original unit feature corresponding to the original circuit unit.
[0009] Optionally, in a fourth implementation of the first aspect of the present invention, the comparing the original cell feature with the standard cell features of each pre-stored standard circuit cell in the standard cell library to determine the standard circuit cell corresponding to the original circuit cell includes: Traversing each of the pre-stored standard circuit cells in the standard cell library, and querying the standard cell features corresponding to each of the pre-stored standard circuit cells; Calculating the cosine similarity between the original unit feature and each of the standard unit features; The standard cell feature corresponding to the original cell feature is determined from at least one of the standard cell features having the highest cosine similarity with the original cell feature, so as to determine a standard circuit cell corresponding to the original circuit cell.
[0010] Optionally, in a fifth implementation of the first aspect of the present invention, the circuit diagram standardization method further includes: In response to obtaining the circuit diagram to be recorded, performing circuit unit detection on the circuit diagram to be recorded to determine whether the circuit diagram to be recorded is a single circuit unit; In response to confirming that the circuit diagram to be recorded is a single circuit unit, extracting features of the circuit diagram to be recorded to obtain features of the unit to be recorded corresponding to the circuit diagram to be recorded; The characteristics of the cells to be recorded and the corresponding circuit diagrams to be recorded are stored in the standard cell library to update the standard cell library.
[0011] Optionally, in a sixth implementation of the first aspect of the present invention, the circuit diagram standardization method further includes: In response to the received cell modification instruction, modifying the pre-stored standard circuit cell specified in the standard cell library; And / or, in response to a received cell deletion instruction, deleting the pre-stored standard circuit cell specified in the standard cell library.
[0012] A second aspect of the present invention further provides a circuit diagram standardization device, the circuit diagram standardization device comprising: An acquisition module, used for acquiring an original circuit diagram in a preset format; A diagram disassembling module, used for disassembling a plurality of original circuit units constituting the original circuit diagram from the original circuit diagram based on a preset target detection algorithm; A picture search module, used for performing grayscale conversion, pseudo color mode format conversion, tensor conversion and normalization processing on the original circuit unit to obtain data to be extracted, and performing feature extraction on the data to be extracted based on a preset feature extraction algorithm to obtain original unit features corresponding to the original circuit unit, and performing feature comparison between the original unit features and standard unit features of each pre-stored standard circuit unit in a standard unit library to determine the standard circuit unit corresponding to the original circuit unit; The replacement module is used to replace the corresponding original circuit unit in the original circuit diagram with the standard circuit unit to obtain a standard circuit diagram.
[0013] The third aspect of the present invention also provides a computer device, which includes: a memory and at least one processor, wherein the memory stores instructions; the at least one processor calls the instructions in the memory so that the computer device executes the circuit diagram standardization method as described above.
[0014] A fourth aspect of the present invention further provides a computer-readable storage medium, on which instructions are stored, and when the instructions are executed by a processor, the circuit diagram standardization method as described above is implemented.
[0015] The embodiments of the present invention provide a circuit diagram standardization method, device, equipment and storage medium, which first obtains an original circuit diagram in a preset format, and then replaces each unit in the original circuit diagram with a standard circuit unit by disassembling and replacing, thereby generating a standard circuit diagram. The present invention can automatically execute the steps of the circuit diagram standardization method, significantly improve the efficiency of circuit diagram standardization, save human resources and time resources, prevent the occurrence of human errors, improve the accuracy and reliability of circuit diagram standardization, can cope with various complex circuit drawings, have strong adaptability and compatibility, and are conducive to improving the standardization level of electrical design and improving the work efficiency of downstream departments such as procurement, production and accessory design. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 A schematic flow chart of a first embodiment of a circuit diagram standardization method according to an embodiment of the present invention; Figure 2 It is a schematic flow chart of a second embodiment of the circuit diagram standardization method in an embodiment of the present invention; Figure 3 It is a functional module diagram of an embodiment of a circuit diagram standardization device according to an embodiment of the present invention; Figure 4 The figure is a functional module diagram of an embodiment of a computer device in an embodiment of the present invention. DETAILED DESCRIPTION
[0017] The terms "first", "second", "third", "fourth", etc. (if any) in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" or "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0018] For ease of understanding, the specific process of the circuit diagram standardization method in the embodiment of the present invention is described below. Figure 1 , Figure 1 1 is a schematic flow chart of a first embodiment of a circuit diagram standardization method in an embodiment of the present invention. In this embodiment, the circuit diagram standardization method includes: 101. Obtain an original circuit diagram in a preset format; In this embodiment, the original circuit diagram, i.e., the circuit drawing file that has not been standardized, is actively uploaded by the user or automatically received through a specific interface. The preset format of the original circuit diagram can be the drawing file format of the commonly used drawing software, or it can be a commonly used drawing file format, or it can be a format supported by software specifically developed for subsequent tasks. For example, the preset format is a dwg format file or a dxf format file that can be opened by AutoCAD software, or it can be a commonly used pdf format, png format, and jpg format. The preset format of the original circuit diagram of this scheme can include one or more specific formats, as long as it can be used for the processing of subsequent steps. At the same time, in the process of obtaining the original circuit diagram, the requirements for indicators such as clarity, resolution, and size of the original circuit diagram can also be optionally set to avoid image quality problems and ensure that the standardized processing of the subsequent circuit diagram can proceed smoothly.
[0019] 102. Disassemble a plurality of original circuit units constituting the original circuit diagram from the original circuit diagram based on a preset target detection algorithm; In this embodiment, the original circuit diagram is usually composed of a plurality of original circuit units, each of which is used to realize a different function, and each of the original circuit units cooperates with each other to realize the overall function to be realized by the circuit in the original circuit diagram. Therefore, by disassembling the plurality of original circuit units constituting the original circuit diagram from the original circuit diagram, the original circuit units in the original circuit diagram can be standardized one by one later, thereby realizing the standardization of the entire original circuit diagram.
[0020] In this embodiment, the disassembly process involves the analysis and deconstruction of the original circuit diagram, and each independent circuit unit is identified by a preset target detection algorithm to mark and cut the single circuit unit out of the original circuit diagram. The preset target detection algorithm can be a processing algorithm based on computer vision, such as edge detection, region generation, template matching-based methods, etc., or it can be an artificial intelligence-based recognition technology algorithm. Each disassembled original circuit unit can include basic electronic components such as resistors, capacitors, transistors and diodes, and can also include specific devices such as power supplies, single-chip microcomputers and sensors, as well as the connection relationship between each component and device.
[0021] In this embodiment, the original circuit diagram can be accurately identified and processed by disassembling the original circuit units. Compared with the overall identification and replacement, the computing power required is also smaller, making the subsequent replacement more comprehensive and accurate, and it is also easier to troubleshoot defects in the original circuit diagram. For example, it is easier to find out which original circuit units cannot determine the corresponding standard circuit units, and it is easier to find the unreasonableness of the circuit implementation logic in the original circuit units, thereby improving the accuracy and reliability of subsequent standardized circuit diagrams.
[0022] In one embodiment, see Figure 2 , the above step 102 includes: 1021. Perform grayscale conversion, pseudo color mode format conversion, tensor conversion and normalization processing on the original circuit diagram to obtain data to be detected; 1022. Perform circuit unit detection on the data to be detected based on a preset target detection algorithm to obtain unit detection frame coordinates; 1023. Determine a number of original circuit units constituting the original circuit diagram based on the unit detection frame coordinates.
[0023] In this embodiment, grayscale conversion is a method of converting an image into a grayscale value, and the converted grayscale value can be a binary representation image or a multiple grayscale image. Since the original circuit diagram is usually a monochrome image or an image with a few color combinations, the grayscale conversion preferably uses a binary image conversion. When converting to a binary image, the foreground and background can be distinguished by two different colors, and the main parts such as components, circuit connection lines, text and symbol annotations in the image are used as the foreground, and the other parts are used as the background to obtain a unified binary image. Under the representation method of multiple grayscale images, the details can be more prominent, for example, one grayscale is used to represent components, another grayscale is used to represent circuit connection lines, and another grayscale is used to represent text and symbol annotations, etc., which can effectively reduce the data dimension, while reducing the amount of calculation for subsequent processing, retaining the main features of the image, which is conducive to obtaining more accurate data to be detected later.
[0024] In this embodiment, the pseudo color mode format conversion is to map the grayscale image to multiple channels corresponding to different color modes to meet the data needs of the subsequent circuit unit detection for the data to be detected. Among them, the color mode can be RGB (Red / Green / Blue, red, green, blue) color mode, CMYK (Cyan / Magenta / Yellow / Black, cyan, magenta, yellow, black) color mode, HSL (Hue / Saturation / Lightness, hue, saturation, brightness) color mode or LAB (Luminosity AB, brightness, range from magenta to green, range from yellow to blue) color mode, etc., and channels under different color modes can be used for subsequent model requirements. For example, under the condition of using the RGB color mode, the pseudo color mode format conversion is to map the grayscale image obtained above to the three color value channels of red, green and blue respectively, and obtain the data on the three RGB channels respectively. After this processing, the image is still grayscale visually, but the data form can meet the requirements of the RGB image.
[0025] In this embodiment, tensor is a basic data structure in deep learning and can be regarded as a multidimensional array. In image processing, it is used to represent image data. Tensor conversion refers to the process of converting an image into a tensor data structure. Converting an image into a tensor through this step can more conveniently perform data processing and input into a deep learning model. Normalization is to scale the elements in the tensor to a specific range for better model training and reasoning. The normalization method usually scales the pixel value from the original 0 to 255 range to a 0 to 1 range or other numerical range to eliminate the scale differences between different input data and improve the convergence speed and performance of the model.
[0026] In this embodiment, the grayscale conversion, pseudo color mode format conversion, tensor conversion and normalization processing can be implemented as an automatically executed preprocessing process through a dedicated computer program or dedicated hardware device to improve the accuracy and efficiency of circuit unit detection and ensure that subsequent processing steps can proceed smoothly. For example, the preprocessing process can be implemented by training a preset preprocessing model and processing the input original circuit diagram through the preset preprocessing model. Through this preprocessing process, the original image data can be converted into a form that is more suitable for subsequent processing.
[0027] In this embodiment, after the above-mentioned preprocessing process, circuit unit detection can be performed based on the preset target detection algorithm to obtain the data to be detected. The circuit unit detection is a process of analyzing the preprocessed image through the preset target detection algorithm to identify each independent circuit unit in the original circuit diagram. This process can be implemented using a variety of algorithms and techniques, such as edge detection, region generation, a template matching-based method, or an image recognition technology based on artificial intelligence. Among them, the edge detection technology determines the boundary of the circuit unit by identifying the edge information in the image, the region generation technology identifies the circuit unit by dividing the image into multiple regions, the template matching-based method identifies the circuit unit by matching the predefined circuit unit template with the image, and the image recognition technology based on artificial intelligence automatically identifies the circuit unit by training a deep learning model.
[0028] In this embodiment, the preset target detection algorithm is preferably implemented based on the YOLO (You Only Look Once) algorithm. The core idea of the YOLO algorithm is to use the information of the entire image for target detection, rather than generating candidate areas and then classifying them like traditional target detection methods. The YOLO algorithm achieves end-to-end target detection by dividing the image into grids, and predicting multiple bounding boxes and corresponding category probabilities for each grid. For example, when using the YOLOv5 model for target detection, the YOLOv5 model achieves efficient detection of circuit units by dividing the image into multiple grids and predicting bounding boxes and category probabilities in each grid. It has high detection speed and accuracy, and can quickly and accurately locate the position of the circuit unit and generate the corresponding detection box coordinates. In the process of using the YOLOv5 model for target detection, it is usually necessary to import necessary libraries first, such as the PyTorch library for deep learning, the OpenCV library for image processing, the NumPy library for numerical calculation, and the Matplotlib library for displaying images. Then, the original circuit diagram is preprocessed and the pre-trained YOLOv5 target detection model is loaded. After using the YOLOv5 model for target detection, the unit detection frame coordinates can be returned, and the corresponding original circuit unit can be determined based on the unit detection frame.
[0029] In this embodiment, during the circuit unit detection process, it is first necessary to perform feature extraction on the preprocessed image to extract key features of the circuit unit, such as component models, connection relationships, and associated units. Then, the extracted features are analyzed by a classifier or a deep learning model to identify each independent circuit unit in the circuit diagram, obtain a detection frame for each independent circuit unit, and feed back the coordinates of the unit detection frame. After obtaining the coordinates of the unit detection frame, the several original circuit units constituting the original circuit diagram and the position of each original circuit unit in the original circuit diagram can be determined based on these coordinates, so as to perform subsequent standardization processing.
[0030] This embodiment is an automatic "disassembly" process, which can quickly and accurately identify and locate each independent circuit unit in the circuit diagram through an automated preprocessing process and a target detection model based on deep learning, thereby reducing the errors and time consumption of manual disassembly, and can achieve rapid and accurate disassembly of the original circuit diagram, thereby providing a basis for subsequent standardized processing of circuit diagrams. This method also enables non-professionals to perform circuit diagram disassembly, reducing dependence on professionals. Through the preprocessing process and circuit unit detection, standardized circuit unit data can be obtained, which is convenient for subsequent circuit analysis, design and manufacturing, and improves the efficiency of the entire circuit design and manufacturing process.
[0031] 103. Perform grayscale conversion, pseudo color mode format conversion, tensor conversion and normalization processing on the original circuit unit to obtain data to be extracted; 104. Perform feature extraction on the data to be extracted based on a preset feature extraction algorithm to obtain original unit features corresponding to the original circuit unit; 105. Perform feature comparison between the original cell feature and the standard cell features of each pre-stored standard circuit cell in the standard cell library to determine the standard circuit cell corresponding to the original circuit cell.
[0032] In this embodiment, the standard circuit unit is a predefined circuit unit with different functions and structural implementation principles, which is usually designed based on industry standards or electrical design standards stipulated within the relevant company organization. The standard circuit unit corresponding to the original circuit unit can usually be obtained by matching and searching in a preset database storing standard circuit units, or by using an image recognition technology based on artificial intelligence, using a deep learning model to analyze and identify the original circuit unit, so as to find the corresponding standardized circuit unit, or by searching through a networked search method, through a specific interface or search engine.
[0033] In this embodiment, the original unit features are first determined by a preset feature extraction algorithm, and then the matching standard circuit unit is determined using the original unit features, wherein the preset feature extraction algorithm is an algorithm used to extract key feature information of the circuit unit, such as shape, size, connection point, etc. The preset feature extraction algorithm can use a variety of technologies, such as edge detection, region generation and template matching, to ensure that the most representative features are extracted from the original circuit unit. The obtained original unit features can reflect circuit information such as component selection, structural principle and working principle of the circuit. Combined with information of different feature dimensions, the standard circuit unit with the same function and structure can be determined by the original unit features in the future, so that a more comprehensive matching result can be obtained, effectively improving the accuracy and effectiveness of the matching, so that the standard circuit unit can be more accurately identified and matched.
[0034] In this embodiment, since the original circuit unit is a part separated from the original circuit diagram, a separation step similar to the aforementioned step 1021 can be used for processing, namely grayscale conversion, pseudo color mode format conversion, tensor conversion and normalization processing, which will not be described in detail in this application. The data to be extracted, i.e., the data obtained after preprocessing each original circuit unit separately, can also be regarded as the data corresponding to the original circuit unit in the aforementioned data to be detected.
[0035] In this embodiment, the preset feature extraction algorithm is preferably implemented using a preset residual network model (Residual Network, ResNet), and the preset residual network model is obtained by training a residual network framework model based on data of sample circuit units.
[0036] In this embodiment, the residual network model is a convolutional neural network through residual connection (Residual Connection), which can solve the problems of gradient disappearance and model degradation in deep neural network training, and has been widely used in computer vision tasks such as image classification, target detection and semantic segmentation. The preset residual network model is obtained by training the residual network framework model using data from a large number of sample circuit units. These sample circuit units cover a variety of different circuit functions and structures, ensuring that the model can learn the common features of circuit units. During the training process, the model continuously adjusts its internal parameters to minimize the difference between the predicted results and the true labels, thereby improving the generalization ability of the model. The obtained preset residual network can subsequently effectively extract the original unit features.
[0037] In this embodiment, the residual network preferably uses a ResNet18 model to perform the corresponding feature extraction task. The ResNet18 model is a deep residual network model with a shallow network structure and a high feature extraction capability. By using the ResNet18 model, it is possible to effectively extract discriminative features from the data to be extracted, thereby improving the accuracy of feature comparison.
[0038] In an optional embodiment, feature extraction is performed on the data to be extracted based on the residual network model to obtain original unit features corresponding to the original circuit unit, including: (1) Obtain a preset residual network model; (2) The first layer of the preset residual network model is adjusted to a processing layer for grayscale images, and the fully connected layer of the preset residual network model is removed to obtain a feature extraction model; (3) Based on the feature extraction model, feature extraction is performed on the data to be extracted to obtain the original unit features corresponding to the original circuit unit.
[0039] In this embodiment, since the circuit diagram usually exists in the form of a grayscale image, the first layer of the preset residual network model is adjusted to a layer that specifically processes grayscale images, which helps the model to better process circuit diagram data. In addition, the fully connected layer of the preset residual network model is removed to reduce the complexity of the model while retaining sufficient feature extraction capabilities, so that the model can focus on extracting key features of circuit units rather than performing the final classification or regression task.
[0040] In this embodiment, in the process of using the ResNet18 model for feature extraction, it is necessary to first import necessary libraries, such as the PyTorch library for deep learning, the neural network module in PyTorch, the image preprocessing module, the pretrained model library, the numerical calculation library, the image processing library, the cosine similarity calculation, etc., and then perform image preprocessing, and extract the original unit features based on the image features of the ResNet model, so that subsequent feature comparison can be performed. On this basis, feature extraction is performed on the data to be extracted based on the adjusted feature extraction model, and a feature vector that can accurately reflect the characteristics of the original circuit unit, that is, the original unit feature, can be obtained.
[0041] In this embodiment, the standard cell library is a pre-built database that stores a large number of standardized circuit units and their characteristic information. These standard circuit units cover a variety of common circuit functions and structures, providing a rich reference resource for circuit design and analysis. The construction of the standard cell library is usually based on industry standards and internal company regulations to ensure the versatility and compatibility of circuit design. In the standard cell library, each standard circuit unit has detailed description information, including but not limited to component type, connection relationship, working principle, size parameters, etc. This information helps designers quickly locate and select suitable circuit units, thereby improving design efficiency and accuracy.
[0042] In the present embodiment, feature comparison is realized by calculating the similarity between the original cell feature and the standard cell feature of each pre-stored standard circuit cell in the standard cell library. The calculation of the similarity of this process can be evaluated based on Euclidean distance, Manhattan distance or cosine similarity, etc. By comparing the similarity between the original cell feature and the standard cell feature, the standard circuit unit that best matches the original circuit unit can be determined. At the same time, optionally, in order to improve the accuracy and efficiency of the comparison, some optimization strategies can be adopted. For example, a clustering algorithm can be used to group the standard circuit units in the standard cell library, and the standard circuit units with similar features can be classified into the same category. In this way, when performing feature comparison, the original cell feature can be preliminarily compared with the representative features of each category, thereby narrowing the search range and reducing the amount of calculation. In addition, machine learning methods, such as classifiers such as support vector machines or random forests, can also be used to further optimize the feature comparison results. By training the classifier, the complex relationship between different features can be learned, thereby improving the accuracy of matching.
[0043] In an optional embodiment, comparing the original cell feature with the standard cell features of each pre-stored standard circuit cell in the standard cell library to determine the standard circuit cell corresponding to the original circuit cell includes: (1) Traverse each pre-stored standard circuit cell in the standard cell library and query the standard cell features corresponding to each pre-stored standard circuit cell.
[0044] (2) Calculate the cosine similarity between the original unit features and each standard unit feature; (3) Determine a standard cell feature corresponding to the original cell feature from at least one standard cell feature having the highest cosine similarity with the original cell feature, so as to determine a standard circuit cell corresponding to the original circuit cell.
[0045] In this optional embodiment, the process of traversing each pre-stored standard circuit unit in the standard cell library and querying the standard cell characteristics corresponding to each pre-stored standard circuit unit involves an efficient retrieval mechanism for the standard cell library. In order to ensure that the characteristic data of each standard circuit unit can be quickly accessed and retrieved, the standard cell library can be managed by a database management system, such as a relational database or a dedicated database, and the data structure stored in the database should be optimized to support fast query and retrieval, such as by establishing an index and using a data structure such as a hash table.
[0046] In this optional embodiment, cosine similarity is a measurement method for measuring the cosine value of the angle between two non-zero vectors, and is used to evaluate the similarity of the two vectors in direction. In this embodiment, by calculating the cosine similarity between the original unit feature vector and the standard unit feature vector, it can be determined whether the original circuit unit and the standard circuit unit time match. For example, calculating the pre-selected similarity can obtain a value between -1 and 1, where 1 indicates complete similarity and -1 indicates complete dissimilarity.
[0047] In this optional embodiment, after the aforementioned calculation, the standard unit feature with the highest similarity can be selected as the matching result according to the calculated cosine similarity value. In order to improve the reliability of the matching, a threshold determination mechanism can be adopted, that is, only when the similarity exceeds the preset threshold, it is considered that the matching standard circuit unit is found. In addition, in order to handle the many-to-one matching situation, a voting mechanism or a weighted average method can be adopted to comprehensively consider multiple standard unit features with high similarity to determine the final matching result. It is also possible to provide multiple standard circuit units that are considered to have the highest similarity for display based on the above calculation results, and the relevant personnel can identify and select one.
[0048] Through the above steps, this optional embodiment can effectively match the circuit unit to be tested with the standard unit in the standard circuit unit library, thereby realizing the automation and intelligence of circuit design. It is an efficient and accurate circuit unit matching method, which can significantly improve the efficiency of circuit design and maintenance. This method is not only applicable to the analysis and optimization of existing circuits, but also to the verification process of new circuit designs, thereby providing strong technical support at all stages of circuit design.
[0049] This embodiment is an automatic "image search" process, which effectively improves the accuracy and efficiency of circuit unit matching by obtaining the standard circuit unit corresponding to the original circuit unit and using deep learning technology, especially the residual network model for feature extraction. By extracting the features of the circuit unit, the working principle and structure of the circuit can be better understood, the circuit design and manufacturing process can be optimized, and the circuit analysis and diagnosis capabilities can be improved. The subsequent feature comparison based on the standard unit library can also effectively determine the standard circuit unit for replacement, which helps to improve the efficiency and quality of circuit design and manufacturing. At the same time, different models and algorithms are used in this step, which can effectively promote the application of artificial intelligence technology in electrical design. In the future, the level of intelligence in circuit design and manufacturing can be further improved by continuously optimizing and improving the deep learning model.
[0050] 106. Use standard circuit units to replace corresponding original circuit units in the original circuit diagram to obtain a standard circuit diagram.
[0051] In this embodiment, after the matching of the original circuit unit and the standard circuit unit is completed, the original circuit unit to be replaced and the standard circuit unit that can be used for replacement can be determined according to the matching result. In the replacement process, automated tools can be used to assist in completing the replacement work to ensure that the replaced standard circuit unit maintains compatibility and consistency with other parts in the original circuit diagram. These tools can read the original circuit diagram file, identify the original circuit unit to be replaced, and automatically insert the selected standard circuit unit into the corresponding position. In addition, the automated tool can also verify the circuit diagram to ensure that the replaced circuit diagram is consistent with the original circuit diagram in terms of electrical performance and logical functions.
[0052] In this embodiment, the use of standard circuit units to replace the original circuit units in the original circuit diagram can improve the efficiency and quality of circuit design, and the use of the obtained standard circuit units can ensure the reliability and consistency of the circuit, which is conducive to effectively improving the work efficiency of subsequent procurement and production departments, and reducing the cost and complexity of procurement and production. At the same time, the replacement process also realizes the automation and intelligence of circuit design, which is conducive to promoting the development of the electrical design field and providing strong support for cost reduction and efficiency improvement of circuit manufacturing and production.
[0053] In an optional embodiment, the standard cell library used in the circuit diagram standardization method can accept active upload and storage of standard circuit cells. The circuit diagram standardization method also includes: (1) in response to obtaining the circuit diagram to be recorded, performing circuit unit detection on the circuit diagram to be recorded to determine whether the circuit diagram to be recorded is a single circuit unit; (2) in response to confirming that the circuit diagram to be recorded is a single circuit unit, extracting features of the circuit diagram to be recorded to obtain features of the unit to be recorded corresponding to the circuit diagram to be recorded; (3) The characteristics of the cells to be recorded and the corresponding circuit diagrams to be recorded are stored in the standard cell library to update the standard cell library.
[0054] In this embodiment, the circuit diagram to be recorded is a circuit design that has not yet been included in the standard unit library. Circuit unit detection is required to determine whether the circuit diagram to be recorded meets the definition of a single circuit unit, that is, whether it has clear input, output and single function realization. If the unit to be recorded is a single circuit unit, corresponding feature extraction can be performed to obtain the characteristics of the unit to be recorded. The circuit unit detection and feature extraction can refer to the aforementioned steps 102, 103 and their optional solutions. This embodiment will not be repeated here. The extracted characteristics of the unit to be recorded and the corresponding circuit to be recorded are extracted. Figure 1 At the same time, the circuit diagram to be recorded is stored in the standard cell library, so that the dynamic update and expansion of the standard cell library can be realized. At the same time, in this process, the situation of storage failure must also be considered. This situation is usually due to the fact that the similarity between the original cell feature and the standard cell feature is too low, the circuit diagram to be recorded is not a single circuit unit, or the image quality of the circuit diagram to be recorded is not up to standard. In this case, the storage of the circuit diagram to be recorded and related features can be rejected. In addition, in this embodiment, when the circuit diagram to be recorded is recorded, the binary code of the corresponding picture, the identifier of the picture library where it is located, and the unique identifier of the circuit diagram can be provided or automatically generated. When it can be stored in the standard cell library, it can include the corresponding structured data, the unique identifier of the corresponding circuit diagram, the identifier of the picture library where the circuit diagram is located, and the relationship between the unique identifier of the circuit diagram and the identifier of the picture library where the circuit diagram is located.
[0055] In this embodiment, optionally, during the update process of the standard cell library, a version control mechanism can be used to ensure that the version history of each standard circuit unit is retained. In addition, in order to ensure the accuracy and consistency of the data in the standard cell library, a manual review mechanism can be introduced, and professionals can verify and confirm the newly uploaded standard circuit units. This embodiment enables the standard cell library to continuously absorb new circuit designs and maintain its advancement and practicality. At the same time, this also provides circuit designers with abundant resources, enabling them to quickly find the required circuit units, thereby improving design efficiency and quality.
[0056] In an optional embodiment, the standard cell library used in the circuit diagram standardization method can accept active modification and deletion of standard circuit cells. The circuit diagram standardization method also includes: (1) in response to a received cell modification instruction, modifying a pre-stored standard circuit cell specified in a standard cell library; and / or (2) In response to the received cell deletion instruction, a specified pre-stored standard circuit cell in the standard cell library is deleted.
[0057] In this embodiment, the unit modification instruction and the unit deletion instruction can be issued by the circuit designer or the management personnel to ensure that the data in the standard cell library is always the latest and most accurate. When a standard circuit unit needs to be modified, the designer can submit a modification instruction, detailing the changes to be made, so that the specified standard circuit unit is updated in the standard cell library according to the instruction to reflect the latest design requirements or technical improvements. Similarly, if a standard circuit unit is no longer applicable or needs to be replaced, the unit can be removed from the standard cell library by issuing a deletion instruction.
[0058] In this embodiment, optionally, in order to ensure the correctness and security of the modification and deletion operations, a permission control mechanism can be implemented. Different users can have different operation permissions according to their roles and permissions. For example, a senior engineer or administrator may have the permission to modify and delete circuit units in the standard cell library, while ordinary users may be limited to viewing and using the data in the standard cell library. In addition, the system can also record detailed logs of each modification and deletion operation for tracking and auditing. When implementing the modification operation, the system can provide a user-friendly interface, allowing designers to intuitively view and edit the various parameters and characteristics of the standard circuit unit. The system can also provide a version control function to ensure that the previous version can be rolled back at any time during the modification process to prevent unexpected errors or data loss.
[0059] In order to execute the corresponding steps in the above method embodiment and each possible implementation method, the following provides an implementation method of a circuit diagram standardization device. Figure 3 , Figure 3 This is a functional module diagram of an embodiment of a circuit diagram standardization device in an embodiment of the present invention. In this embodiment, the circuit diagram standardization device is applied to electronic equipment, and the circuit diagram standardization device includes: An acquisition module 201 is used to acquire an original circuit diagram in a preset format; A diagram disassembling module 202, configured to disassemble a plurality of original circuit units constituting the original circuit diagram from the original circuit diagram based on a preset target detection algorithm; The image search module 203 is used to perform grayscale conversion, pseudo color mode format conversion, tensor conversion and normalization processing on the original circuit unit to obtain data to be extracted, and perform feature extraction on the data to be extracted based on a preset feature extraction algorithm to obtain original unit features corresponding to the original circuit unit, and perform feature comparison between the original unit features and the standard unit features of each pre-stored standard circuit unit in the standard unit library to determine the standard circuit unit corresponding to the original circuit unit; The replacement module 204 is used to replace the corresponding original circuit unit in the original circuit diagram with the standard circuit unit to obtain the standard circuit diagram.
[0060] Optionally, in one embodiment, the image disassembly module 202 is specifically used to: perform grayscale conversion, pseudo-color mode format conversion, tensor conversion and normalization processing on the original circuit diagram to obtain data to be detected; perform circuit unit detection on the data to be detected based on a preset target detection algorithm to obtain unit detection frame coordinates; determine a number of original circuit units that constitute the original circuit diagram based on the unit detection frame coordinates.
[0061] Optionally, in one embodiment, the image search module 203 is specifically used to: perform grayscale conversion, pseudo-color mode format conversion, tensor conversion and normalization processing on the original circuit unit to obtain data to be extracted; perform feature extraction on the data to be extracted based on a preset feature extraction algorithm to obtain original unit features corresponding to the original circuit unit; perform feature comparison between the original unit features and the standard unit features of each pre-stored standard circuit unit in the standard unit library to determine the standard circuit unit corresponding to the original circuit unit.
[0062] Optionally, in one embodiment, the preset target detection algorithm is implemented based on the YOLO algorithm.
[0063] Optionally, in one embodiment, the preset feature extraction algorithm is implemented based on a preset residual network model, and the preset residual network model is obtained by training the residual network framework model based on the data of the sample circuit unit; the image search module 203 is also specifically used to: obtain the preset residual network model; adjust the first layer of the preset residual network model to a processing layer for the grayscale image, and remove the fully connected layer of the preset residual network model to obtain a feature extraction model; perform feature extraction on the data to be extracted based on the feature extraction model to obtain the original unit features corresponding to the original circuit unit.
[0064] Optionally, in one embodiment, the image search module 203 is specifically used to: traverse each pre-stored standard circuit unit in the standard unit library, and query the standard unit feature corresponding to each pre-stored standard circuit unit; calculate the cosine similarity between the original unit feature and each standard unit feature; determine the standard unit feature corresponding to the original unit feature from at least one standard unit feature with the highest cosine similarity to the original unit feature, so as to determine the standard circuit unit corresponding to the original circuit unit.
[0065] In this embodiment, it should be understood that the above-mentioned acquisition module, image disassembly module, image search module and replacement module can be deployed between different components of the same device, or can be deployed in the same component of the same device. Some modules can also be used as sub-modules of a module, or the same module can be deployed in different components through communication. For example, the acquisition module and the replacement module can be implemented through a CAD (Computer Aided Design) tool, and the disassembly module and the image search module can be built-in plug-ins of the CAD tool, which can be triggered in the CAD tool to perform corresponding disassembly and image search functions; for another example, the disassembly module and the image search module exist independently of the CAD tool, and the disassembly module and the image search module realize the corresponding disassembly and image search functions by reading and analyzing the data in the CAD tool, or the CAD tool uses the disassembly module and the image search module through interface communication or jump; for another example, part of the disassembly module and the image search module are used as plug-ins in the CAD tool, and the other part obtains the corresponding service interface on the server side and performs data processing. The two parts communicate through interface calls, and the module realizes the corresponding disassembly and image search functions based on the unit circuit detection interface, unit diagram circuit feature value interface, unit circuit feature value storage, unit circuit feature value comparison and other interfaces provided by the server. In addition, the standard cell library used in this embodiment can be a built-in database system of a CAD tool, a picture search tool or a server, or it can be provided by a cloud platform server system stored in the cloud. The standard cell library can also be set up independently of the CAD tool and the server to achieve corresponding functions such as addition, deletion, modification and query.
[0066] Optionally, in some embodiments, the standard cell library used can accept active upload and storage of standard circuit cells. The standard cell library is also used to: in response to obtaining the circuit diagram to be recorded, perform circuit unit detection on the circuit diagram to be recorded to determine whether the circuit diagram to be recorded is a single circuit unit; in response to confirming that the circuit diagram to be recorded is a single circuit unit, perform feature extraction on the circuit diagram to be recorded to obtain the feature of the unit to be recorded corresponding to the circuit diagram to be recorded; store the feature of the unit to be recorded and the corresponding circuit diagram to be recorded in the standard cell library to update the standard cell library.
[0067] Optionally, in some embodiments, the standard cell library used can accept active modification and deletion of standard circuit cells. The standard cell library is also used to: modify the pre-stored standard circuit cells specified in the standard cell library in response to a received cell modification instruction; and / or delete the pre-stored standard circuit cells specified in the standard cell library in response to a received cell deletion instruction.
[0068] Since the embodiments of the device part correspond to the embodiments of the above-mentioned method, please refer to the above-mentioned method embodiments for the introduction of the circuit diagram standardization device provided by the embodiments of the present invention. The embodiments of the present invention will not be repeated here, and it has the same beneficial effects as the above-mentioned circuit diagram standardization method.
[0069] The present invention also provides a computer device, which includes a memory and a processor. The memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, the processor executes the circuit diagram standardization method as described above. Figure 4 3 is a functional module diagram of a computer device provided by an embodiment of the present invention. The computer device 300 may have relatively large differences due to different configurations or performances, and may include one or more processors (central processing units, CPU) 310 (for example, one or more processors) and a memory 320, and one or more storage media 330 (for example, one or more mass storage devices) storing application programs 333 or data 332. Among them, the memory 320 and the storage medium 330 may be temporary storage or permanent storage. The program stored in the storage medium 330 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the computer device 300. Furthermore, the processor 310 may be configured to communicate with the storage medium 330 to execute a series of instruction operations in the storage medium 330 on the computer device 300.
[0070] The computer device 300 may also include one or more power supplies 340, one or more wired or wireless network interfaces 350, one or more input and output interfaces 360, and / or one or more operating systems 331, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc. It will be appreciated by those skilled in the art that Figure 4 The illustrated computer device structure does not constitute a limitation on the computer device, and may include more or fewer components than illustrated, or combine certain components, or arrange the components differently.
[0071] The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. Instructions are stored in the computer-readable storage medium. When the instructions are executed on a computer, the computer executes the circuit diagram standardization method as described above.
[0072] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. If the integrated module or unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.
[0073] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A circuit diagram standardization method, characterized in that: The circuit diagram standardization method comprises: Get the original circuit diagram in a preset format; Disassembling a plurality of original circuit units constituting the original circuit diagram from the original circuit diagram based on a preset target detection algorithm; Performing grayscale conversion, pseudo color mode format conversion, tensor conversion and normalization processing on the original circuit unit to obtain data to be extracted; Performing feature extraction on the data to be extracted based on a preset feature extraction algorithm to obtain original unit features corresponding to the original circuit unit; Comparing the original cell feature with the standard cell features of each pre-stored standard circuit cell in the standard cell library to determine the standard circuit cell corresponding to the original circuit cell; The standard circuit unit is used to replace the corresponding original circuit unit in the original circuit diagram to obtain a standard circuit diagram.
2. The circuit diagram standardization method according to claim 1, characterized in that: The method of disassembling a plurality of original circuit units constituting the original circuit diagram from the original circuit diagram based on a preset target detection algorithm includes: Performing grayscale conversion, pseudo color mode format conversion, tensor conversion and normalization processing on the original circuit diagram to obtain data to be detected; Performing circuit unit detection on the data to be detected based on the preset target detection algorithm to obtain unit detection frame coordinates; A number of the original circuit units constituting the original circuit diagram are determined based on the unit detection frame coordinates.
3. The circuit diagram standardization method according to claim 1 or 2, characterized in that: The preset target detection algorithm is implemented based on the YOLO algorithm.
4. The circuit diagram standardization method according to claim 1, characterized in that: The preset feature extraction algorithm is implemented based on a preset residual network model, and the preset residual network model is obtained by training a residual network framework model based on data of a sample circuit unit; The extracting features of the data to be extracted based on a preset feature extraction algorithm to obtain original unit features corresponding to the original circuit unit includes: Obtaining the preset residual network model; The first layer of the preset residual network model is adjusted to be a processing layer for grayscale images, and the fully connected layer of the preset residual network model is removed to obtain a feature extraction model; Feature extraction is performed on the data to be extracted based on the feature extraction model to obtain the original unit feature corresponding to the original circuit unit.
5. The circuit diagram standardization method according to claim 1, characterized in that: The comparing the original cell feature with the standard cell features of each pre-stored standard circuit cell in the standard cell library to determine the standard circuit cell corresponding to the original circuit cell includes: Traversing each of the pre-stored standard circuit cells in the standard cell library, and querying the standard cell features corresponding to each of the pre-stored standard circuit cells; Calculating the cosine similarity between the original unit feature and each of the standard unit features; The standard cell feature corresponding to the original cell feature is determined from at least one of the standard cell features having the highest cosine similarity with the original cell feature, so as to determine a standard circuit cell corresponding to the original circuit cell.
6. The circuit diagram standardization method according to claim 1, characterized in that: The circuit diagram standardization method further comprises: In response to obtaining the circuit diagram to be recorded, performing circuit unit detection on the circuit diagram to be recorded to determine whether the circuit diagram to be recorded is a single circuit unit; In response to confirming that the circuit diagram to be recorded is a single circuit unit, extracting features of the circuit diagram to be recorded to obtain features of the unit to be recorded corresponding to the circuit diagram to be recorded; The characteristics of the cells to be recorded and the corresponding circuit diagrams to be recorded are stored in the standard cell library to update the standard cell library.
7. The circuit diagram standardization method according to claim 1, characterized in that: The circuit diagram standardization method further comprises: In response to the received cell modification instruction, modifying the pre-stored standard circuit cell specified in the standard cell library; And / or, in response to a received cell deletion instruction, deleting the pre-stored standard circuit cell specified in the standard cell library.
8. A circuit diagram standardization device, characterized in that: The circuit diagram standardization device comprises: An acquisition module, used for acquiring an original circuit diagram in a preset format; A diagram disassembling module, used for disassembling a plurality of original circuit units constituting the original circuit diagram from the original circuit diagram based on a preset target detection algorithm; A picture search module, used for performing grayscale conversion, pseudo color mode format conversion, tensor conversion and normalization processing on the original circuit unit to obtain data to be extracted, and performing feature extraction on the data to be extracted based on a preset feature extraction algorithm to obtain original unit features corresponding to the original circuit unit, and performing feature comparison between the original unit features and standard unit features of each pre-stored standard circuit unit in a standard unit library to determine the standard circuit unit corresponding to the original circuit unit; A replacement module is used to replace the corresponding original circuit unit in the original circuit diagram with the standard circuit unit to obtain a standard circuit diagram.
9. A computer device, characterized in that: The computer device comprises: a memory and at least one processor, wherein instructions are stored in the memory; The at least one processor calls the instructions in the memory to enable the computer device to perform the circuit diagram standardization method according to any one of claims 1 to 7.
10. A computer-readable storage medium having instructions stored thereon, characterized in that: When the instructions are executed by a processor, a circuit diagram standardization method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Method and device for automatically extracting standard unit for chip layout level
CN118071785A
Tablet surface defect detection method based on width learning model
CN118351066A
Method for adapting schematics for different manufacturing processes and different operating specifications
TW200907727A
Pattern inspection apparatus and method with local critical dimension error detectability
US20070292014A1
Cited By
Integrated circuit simulation method, system, equipment and medium
CN120911373A
