Circuit design optimization method based on knowledge rule induction and implicit knowledge mining
By using knowledge rule induction and tacit knowledge mining methods, the problems of low efficiency and difficulty in sharing tacit rules in traditional circuit design are solved, realizing automated optimization and intelligent improvement of circuit design.
Patent Information
- Application Number
- CN202511119573.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-11
- Publication Date
- 2025-11-25
AI Technical Summary
Traditional circuit design relies on human experience, which is inefficient and prone to errors. It is difficult to handle the accuracy and safety standards of cable routing in complex circuit systems, especially in shipbuilding, aviation, and power systems. Explicit rules are difficult to share, implicit rules are difficult to express in a structured way, and cross-modal data association and knowledge extraction are difficult.
We employ a method based on knowledge rule induction and tacit knowledge mining, which achieves automated optimization of circuit design through semantic data preprocessing, feature extraction and semantic parsing, rule modeling and structuring, multimodal tacit knowledge extraction, knowledge graph construction and rule reasoning.
It has improved the intelligence level of circuit design, enhanced the safety and consistency of cable wiring design, optimized design efficiency, and improved the reliability of design results and specifications.
Smart Images

Figure CN121009838A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electrical design automation technology, and in particular to a circuit design optimization method based on knowledge rule induction and implicit knowledge mining, which is applied to the design of complex circuit systems and is especially suitable for intelligent circuit diagram generation systems that require the integration of explicit and implicit design rules. Background Technology
[0002] As the complexity of electrical system designs continues to increase, the wiring design of circuit schematics faces ever-growing challenges. Traditional circuit design relies primarily on manual experience and limited design specifications. While this approach is adequate for simple systems, it becomes inefficient and error-prone in large-scale, highly complex electrical systems. Particularly in fields such as marine, aerospace, and power systems, cable wiring not only needs to consider the accuracy of electrical connections but also must meet stringent safety regulations (such as fire protection, isolation, and electromagnetic compatibility), further complicating the design process.
[0003] Circuit wiring design is typically done manually by engineers, requiring comprehensive consideration of factors such as electrical connections, safety regulations, electromagnetic compatibility, and thermal management. Design quality heavily relies on the engineer's personal experience, resulting in long design cycles, high costs, and difficulty in ensuring consistency. While explicit rules can be documented, they are numerous and scattered, making manual review and referencing time-consuming and labor-intensive. Implicit rules are often difficult to express in a structured way, hindering knowledge transfer and reuse.
[0004] Furthermore, circuit design requires the integration of multiple data sources, including text and graphical data, which traditional methods struggle to achieve automatic correlation and knowledge extraction across modal data. Existing electronic design automation (EDA) tools primarily provide drawing assistance functions, lacking intelligent reasoning capabilities and the ability to automatically optimize routing or detect potential conflicts. Summary of the Invention
[0005] This invention provides a circuit design optimization method based on knowledge rule induction and implicit knowledge mining, which addresses the shortcomings of existing circuit principle design methods in terms of insufficient design efficiency as complexity and scale increase, especially the limitation that implicit design rules are difficult to directly obtain and share, and realizes circuit design optimization based on knowledge rule induction and implicit knowledge mining.
[0006] To solve the above technical problems, the present invention adopts the following technical solution:
[0007] 1. Semantic data preprocessing
[0008] First, standard documents and design guidelines are converted into structured text data. Natural language processing techniques (such as word segmentation, part-of-speech tagging, and named entity recognition) are used to preprocess the text. Feature extraction techniques are then applied to identify keywords (such as "emergency cable," "high fire risk area," and "fire-resistant cable") and core sentence structures in the documents, so that the subsequent large-scale model can understand the semantic context.
[0009] 2. Feature extraction and semantic parsing
[0010] Based on preprocessed text, the BERT (Broadcaster for Imaging and Reduction) large-scale AI model is used for semantic parsing and feature extraction to accurately identify context in technical documents. Through BERT's NER (Neural Response) module, key entities in cabling design are identified, including cable types (e.g., emergency cables, power cables), area types (e.g., high fire risk areas, cold storage), and cabling materials (e.g., fire-resistant materials, polyethylene insulation). A custom NER dataset for the cable cabling domain is used, containing labeled cable types, isolation requirements, etc., and supervised learning is employed to improve the model's recognition accuracy. A relation extraction model (BERT + bidirectional long short-term memory network) is used to identify relationships between entities, such as "emergency cable -> requires fire resistance -> high fire risk area." Structured representations of cabling rules are automatically generated through relation extraction. When parsing complex statements (e.g., "When cables pass through fire risk areas, fire-resistant materials should be used"), the large model can decompose and structure the contextual meaning.
[0011] 3. Rule Modeling and Structuring
[0012] Based on the extracted entities and relationships, a rule table and structured wiring requirements are constructed. The extracted semantic information is mapped to a rule table, and a specification library for circuit wiring design is established through relationship matching and other methods. Templates are generated based on the extracted semantic relationships; for example, the template "When [cable type] passes through [area type], [wiring requirements] are required." After automatically filling the template by matching entities, the result is "When emergency cables pass through high fire risk areas, fire-resistant materials must be used." A rule library is built using Neo4j knowledge graph technology. Relationships and attributes in the rule library can be quickly retrieved and accessed through the graph database. Rule consistency checks and verifications are performed to ensure no conflicts between different wiring specifications, improving the reliability of design specifications. Finally, the structured wiring specification information is stored in the knowledge base, providing fundamental support for wiring design and retrieval. A cable wiring knowledge graph is constructed, with the "cable type-area type-wiring requirements" triple as the main node. After the knowledge base is built, a query interface based on rule reasoning is designed, allowing designers to input wiring requirements (such as "cable wiring in high fire risk areas") to obtain corresponding rules and design solutions.
[0013] 4. Extraction of multimodal implicit knowledge
[0014] The Transformer architecture is used to analyze electrical schematics and cable routing diagrams, extracting equipment layout, wiring routes, and cabling paths. 3D environmental models and physical layouts are collected and analyzed to determine laying requirements. Then, based on the multimodal Transformer architecture, a cross-modal representation model is constructed, converting various modal data such as text, images, and 3D model data into a unified representation format. During the data input phase, features of each modality are mapped to the same feature space, forming a unified multimodal knowledge graph. Each feature data is aligned to correspond to different cabling path nodes. An electrical cabling knowledge graph is built from the aligned multimodal data, including cabling requirements, regional environment, and equipment risk levels.
[0015] 5. Knowledge graphs are used for knowledge extraction and reasoning.
[0016] Knowledge extraction and reasoning based on the knowledge graph using graph neural networks further reveal implicit wiring specifications. High-risk areas and demanding environments are marked and identified in the electrical schematic diagram, and compared with the knowledge graph to determine the rationality of cable laying. The constructed wiring diagram is optimized and generated using a large AI model. Based on the reasoning results, wiring suggestions are generated, such as automatically adding isolation distances between cables in different systems, or selecting cable materials with higher protection levels for different environments.
[0017] 6. Circuit diagram design based on rule-based reasoning
[0018] By constructing a dynamic rule base and a hybrid inference engine, automated and intelligent circuit routing optimization is achieved. Structured rules are extracted from multi-source data such as electrical standard documents and design manuals, and explicit and implicit design constraints are integrated using knowledge graphs. Subsequently, a three-level engine of logical reasoning, fuzzy reasoning, and case reasoning is used to perform rule verification and conflict detection. Finally, the optimal routing path is generated by combining the A* algorithm and reinforcement learning, and hierarchical circuit diagrams and compliance reports are automatically output.
[0019] This invention provides a circuit design optimization method based on knowledge rule induction and tacit knowledge mining. By constructing a dual knowledge system of explicit and implicit design rules, it structurally integrates diverse knowledge sources such as design specifications and expert experience to form a computable design knowledge base. Compared to traditional methods, this invention solves the problem of the difficulty in sharing and applying tacit knowledge through explicit expression, and achieves automated acquisition and verification of design rules using large-model knowledge reasoning technology. This significantly enhances the intelligence level of cable wiring design while improving design efficiency, demonstrating significant engineering application value and technological innovation. Attached Figure Description
[0020] To more clearly illustrate the technical solutions in this invention or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without any creative effort.
[0021] Figure 1 This is a flowchart illustrating the circuit design optimization method based on knowledge rule induction and implicit knowledge mining provided by this invention.
[0022] Figure 2 This is a schematic diagram of the overall process of the circuit design optimization method based on knowledge rule induction and implicit knowledge mining provided by the present invention.
[0023] Figure 3 This is a schematic diagram of the feature extraction and semantic parsing process in the circuit design optimization method based on knowledge rule induction and implicit knowledge mining provided by this invention.
[0024] Figure 4 This is a schematic diagram of the rule modeling and structuring process in the circuit design optimization method based on knowledge rule induction and implicit knowledge mining provided by this invention.
[0025] Figure 5 This is a schematic diagram of the multimodal implicit knowledge extraction process in the circuit design optimization method based on knowledge rule induction and implicit knowledge mining provided by the present invention.
[0026] Figure 6 This is a schematic diagram of the knowledge extraction and reasoning process of the knowledge graph in the circuit design optimization method based on knowledge rule induction and implicit knowledge mining provided by the present invention.
[0027] Figure 7 This is a schematic diagram of the circuit diagram design process based on rule reasoning in the circuit design optimization method based on knowledge rule induction and implicit knowledge mining provided by this invention. Detailed Implementation
[0028] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0029] Advances in artificial intelligence and knowledge engineering have provided new solutions to the above problems. By leveraging the semantic parsing capabilities of large language models, the multimodal Transformer architecture embeds text, images, and 3D models into a unified feature space to construct an electrical wiring knowledge graph.
[0030] Advantages: Adaptable to complex constraints (such as avoiding risky areas and minimizing electromagnetic interference).
[0031] Semantic Information Extraction from Large-Scale Text: In power cabling design, designing cable routing paths and selecting materials based on standardization and reliability requirements is a crucial and complex task. Numerous power and electrical standards and design documents contain a wealth of cabling principles and rules, such as fire protection requirements, cable isolation distances, and cable material selection. Therefore, it is necessary to extract semantic information from this massive amount of text to form a systematic cable cabling specification knowledge base to assist in automated cabling design. By combining natural language processing and large-scale models, semantic information related to circuit cabling is automatically extracted from power cabling design specifications and standard documents and structured into a knowledge base or rule table, providing data support for cabling design.
[0032] Multimodal tacit knowledge extraction: The core of multimodal tacit knowledge extraction lies in integrating different data sources, deeply fusing multimodal information, and extracting knowledge to support the automated design and optimization of cable routing. The main objective is to acquire tacit knowledge about cabling requirements and equipment installation environments from different data sources to support cable routing design decisions.
[0033] Rule-based circuit diagram design: Based on electrical engineering industry standards, common wiring rules are extracted into specific rule items. These include: wiring separation (main trunk and emergency cables must be laid separately); fire isolation (cables crossing high fire risk areas must use fire-resistant materials); and system isolation (cables for high-voltage, low-voltage, and control signal systems must maintain a safe distance). Based on cable usage, location, equipment type, and operating voltage, rules are categorized into high-voltage wiring rules, low-voltage wiring rules, and low-voltage wiring rules, allowing the reasoning system to quickly invoke them when applicable.
[0034] While the above methods improve performance to some extent, key issues remain:
[0035] Contextual relevance issues: In complex semantic structures, rules often appear across sentences, requiring large models to understand the context in order to extract the complete rules.
[0036] Accurate identification of entities and relationships: Design rules can be divided into explicit design rules and implicit design rules. Explicit design rules can be directly expressed and shared through symbols and images, such as operation manuals and design specifications, and can be directly obtained through interactive and automated methods. Implicit design rules are indirectly acquired knowledge, which is subjective and personal in nature, and is difficult to disseminate directly.
[0037] The following is combined Figure 1 This invention describes a circuit design optimization method based on knowledge rule induction and tacit knowledge mining, comprising:
[0038] S1. Convert circuit design-related texts in different formats into standardized texts that are easy for AI large models to process, and filter out irrelevant content;
[0039] S2. Key entities in the processed text are identified through AI large-scale models, and structured representations of wiring rules are automatically generated through relation extraction;
[0040] S3. Map the extracted semantic information of the structured representation to a rule table, and establish a specification library for circuit wiring design based on the rule table;
[0041] S4. Using the Transformer structure to construct a cross-modal representation model, the circuit design-related multimodal data is converted into a unified representation format, and a knowledge graph of electrical wiring is established from the aligned multimodal data. The multimodal data includes text, images and 3D model data.
[0042] S5. Based on the graph neural network, perform knowledge extraction and reasoning on the knowledge graph to obtain the implicit wiring specifications;
[0043] S6. Based on the specification library and implicit routing specifications, optimize the constructed routing diagram using an AI large model to generate inference results, and use the inference results to generate routing suggestions.
[0044] like Figure 2 The overall flowchart is as follows: Step S1 involves feature extraction and semantic parsing; Step S2 involves rule modeling and structuring; Step S3 involves modal implicit knowledge extraction; Step S4 involves knowledge extraction and reasoning based on knowledge graphs; and Step S5 involves circuit diagram design based on rule reasoning.
[0045] In this embodiment, by systematically summarizing explicit knowledge such as electrical design specifications and journal papers, and at the same time combining data mining and knowledge reasoning technologies to extract implicit knowledge such as design experience and skills, the systematic management of key knowledge information in the electrical design process is realized; by constructing a complete knowledge document system, the intelligent level of the electrical design software platform can be effectively improved, the knowledge sharing and reuse capabilities in the design process can be enhanced, so as to optimize the cable routing scheme and improve the reliability of the design results in terms of safety, economy and scheme consistency.
[0046] Based on the above embodiment, as Figure 3 shown, step S1 in this embodiment includes:
[0047] Step S1A-1: Data preprocessing
[0048] Perform format standardization processing on the input electrical standard document. First, convert PDF and scanned documents into editable text through OCR (Optical Character Recognition) technology, filter out irrelevant information such as headers and footers, match the chapter structure of the technical document through regular expression matching technology, and locate key specification paragraphs. After identifying the specification paragraphs, split the sentences by full stops and mark technical terms to ensure text structuring. Calculate the TF-IDF (Term Frequency-Inverse Document Frequency) value for each paragraph of text, and screen out high-frequency professional terms as feature words for preservation. Then, divide the text paragraphs by chapter and add standardized labels (such as "fire protection requirements", "cable selection") to each paragraph to form a hierarchical text structure.
[0049] Step S1A-2: Basic semantic preprocessing
[0050] Perform multi-level language analysis on the structured text data. Adopt domain-adaptive word segmentation technology to accurately segment electrical engineering professional terms (such as compound words like "fire-resistant cable", "watertight compartment", etc.) to avoid semantic fragmentation caused by general word segmentation tools; perform word tagging and grammatical role analysis, and focus on identifying core noun phrases and mandatory operation verbs in technical specifications; at the same time, through the combination of rule-based regular matching and statistical models, preliminarily mark the boundaries of key entities in the text (including cable types, area attributes, material specifications, etc.) to provide standardized input for subsequent in-depth semantic parsing. During this process, synchronously construct a stop word list to filter out irrelevant function words (such as "of", "for"), and retain all negative expressions (such as "shall not", "strictly prohibited") to ensure the integrity of constraint conditions. The preprocessed text retains the original paragraph structure, but has additional multi-dimensional labels such as word segmentation, word nature, and entity boundaries, forming a semi-structured intermediate representation.
[0051] Step S1A-3: Extraction of domain keywords
[0052] An initial lexicon was constructed based on a professional dictionary in the field of power cabling. The importance of terms in the document set was quantified using the TF-IDF algorithm, and high-frequency core words were selected (e.g., "emergency cable" has a significant weight in safety specification texts). Simultaneously, mandatory descriptive phrases (e.g., "must use material X" and "prohibited from being laid in area Y") were identified through rule template matching technology and combined with contextual co-occurrence analysis to further expand the domain keyword library. For example, when the related descriptions of "fire protection isolation" and "cable spacing" appear repeatedly in the text, the system will mark them as key constraint pairs. Finally, the extracted keywords are categorized and stored according to technical attributes (including cable type, regional classification, and material requirements), forming a structured keyword-rule mapping table, providing standardized input for subsequent semantic parsing.
[0053] Step S1A-4: BERT semantic parsing
[0054] Based on a pre-trained BERT model, token embedding is performed on the pre-processed electrical standard text, converting each character into a 768-dimensional context-related vector. Through the self-attention mechanism of a 12-layer Transformer encoder, the model dynamically captures long-distance semantic dependencies in technical documents, such as "emergency cables must be fire-resistant." During the fine-tuning phase, domain-labeled data (e.g., labeling "high fire risk area" as a LOCATION entity) is used to optimize model parameters, enabling it to accurately identify seven types of entities, including cable type and area attributes, in the NER task (with an F1 score of 0.92). For complex sentence structures such as the conditional rule "when cables cross fire compartments, metal conduits should be used," the model parses the rule logic of "fire compartment → triggering condition → metal conduit requirement" through aggregated representations of [CLS] tags and entity location encoding, ultimately outputting structured <subject, predicate, object> triples.
[0055] Based on the above embodiments, such as Figure 4 As shown, step S2 in this embodiment includes:
[0056] Step S2A-1: Entity-Relationship Triple Extraction
[0057] In this step, based on the entities (such as cable type and area attributes) and relationships (such as laying requirements and isolation constraints) output by semantic parsing, structured rule entries are generated through a predefined template engine. For example, when matching entities such as "emergency cable", "high fire risk area", and "fire-resistant material", the template "When [cable type] passes through [area type], [wiring requirements] are required" is automatically filled in, generating a complete rule statement and annotating the entity type and relationship weight.
[0058] Step S2A-2: Rule table mapping and conflict detection
[0059] The triple rules are converted into a two-dimensional rule table, with columns including cable type, area type, constraint conditions, and applicable standard number. A temporary rule base is established using SQLite, and a JOIN query is executed to detect conflicting items (such as redundant constraints between "fire-resistant cable" and "non-fireproof area"), marking conflicting rules and triggering a manual review process.
[0060] Step S2A-3: Persistent Storage of Knowledge Graph
[0061] A knowledge graph for cable cabling is constructed using the Neo4j graph database. Node types are categorized as cable, region, and rule, and edge relationships are defined as "must satisfy," "prohibited coexistence," and "recommended alternative." Data is imported in batches using Cypher statements, and a full-text index is built to support fuzzy searches based on "cable type + region type."
[0062] Step S2A-4: Rule Consistency Verification and Incremental Update of Knowledge Base
[0063] The APOC plugin for the graph database is invoked to perform rule loop detection and logical coverage analysis. Verified rules are upgraded to version V1.0, and a JSON-formatted rule snapshot archive is generated. A RESTful API is developed based on the Flask framework, providing the " / query_rules" endpoint, supporting POST request parameters (e.g., {"cable_type":"emergency cable","zone_risk":"high"}). The backend executes Cypher queries via Neo4j Driver, returning a list of matching rules and related cases (format: {rule_id:"R0023",content:"fire-resistant cables crossing fire zones require metal conduits",citation:"IEC60364-5-52"}), while query logs are recorded in Elasticsearch for analysis and optimization. A CRON scheduled task is designed to scan for updates to standard documents (PDF or Word) weekly, comparing version differences using the Diff-Match-Patch algorithm, automatically extracting new rules and triggering incremental processing to ensure the knowledge base is synchronized with the latest specifications.
[0064] Based on the above embodiments, such as Figure 5 As shown, step S3 in this embodiment includes:
[0065] S3A-1: Electrical Drawing Analysis
[0066] The Transformer architecture is used to analyze electrical schematics and cable routing diagrams, extracting equipment layout and path topology. The input image is segmented and embedded to generate a pixel-level feature matrix F.img ∈R N×d Where N is the number of image patches and d is the feature dimension. Device correlation weights are calculated using a self-attention layer. Output device coordinate set and line connection diagram
[0067] S3A-2: 3D Environment Modeling
[0068] This step primarily involves parsing 3D environmental data, extracting key spatial features, and combining them with risk level information to generate an environmental model that can be used for cabling constraints. Input is 3D point cloud data or a building information model, including information such as equipment location, wall structure, and pipe distribution. Redundant points are removed, retaining areas relevant to cable laying. PointNet++ or VoxelCNN is used to extract features from the point cloud, obtaining local and global geometric information (such as curvature, normal vector density). The output is a structured feature matrix containing the coordinates (x, y, z) of each 3D point and its semantic label (such as "cable channel," "high-risk area"). Based on engineering specifications, the 3D model is labeled with risk levels (e.g., fire risk level 0-10, humidity sensitive area 0 or 1). The risk labels are fused with spatial features to generate an environmental constraint vector for subsequent cabling rule reasoning.
[0069] S3A-4: Cross-modal feature fusion
[0070] In this step, three heterogeneous data types—electrical drawings (images), 3D environment models (spatial data), and design specification text (natural language)—are unified into a machine-understandable joint representation. The image modality extracts local features (cable routing) and global topology from the electrical drawings using a CNN (Convolutional Neural Network)-Transformer hybrid network, outputting a 256-dimensional feature vector F. img 3D modality extraction of regional risk features is based on point cloud segmentation network, generating 128-dimensional environmental features F. 3D The text modality utilizes BERT to extract key rules from the design specifications ("fire-resistant cables must be isolated"), outputting a 512-dimensional semantic vector F. text Then, a three-channel fully connected layer is used to project the modal features onto a unified dimension (F). img ,F 3D ,F text ∈R 128 A three-modal cross-attention mechanism is designed to calculate the correlation weights between modalities. Image and text alignment enhances the correlation between cable paths and specification clauses. 3D and image alignment maps spatial risk areas to corresponding locations on drawings, and outputs the fused feature matrix F. fusionEach row represents the multimodal joint feature of a wiring node. Finally, the modal contribution is automatically adjusted according to task requirements to generate a unified feature containing semantic, spatial, and visual information for use in downstream knowledge graph construction.
[0071] Based on the above embodiments, such as Figure 6 As shown, step S4 in this embodiment includes:
[0072] S4A-1: Knowledge Graph Construction and Reasoning Based on Graph Neural Networks
[0073] A structured knowledge graph reflecting electrical wiring specifications is constructed. Nodes include key entities (cable type, equipment connection point, environmental conditions, specification clauses, etc.), and edges represent relationships between entities ("applies to," "connected to," "exists in," etc.). A graph neural network (GNN) is used to learn and reason about the knowledge graph to obtain implicit wiring constraint patterns. Specifically, a graph convolutional network is used, and its core calculation formula is as follows:
[0074]
[0075] in, To add a self-loop adjacency matrix, H is the corresponding degree matrix. l W represents the node features of the l-th layer. l Here, σ is the trainable weight matrix, and σ is the activation function (ReLU). This process allows us to derive implicit wiring logic and cable laying constraints, such as the implicit limitations imposed by specific environments on cable materials and laying methods.
[0076] S4A-2: Identification of High-Risk Areas and High-Requirement Environments
[0077] In electrical schematic diagrams, structural analysis and spatial annotation of the content are performed based on image recognition and semantic segmentation methods. Key areas are identified as follows: high-risk areas (such as high-voltage, strong electromagnetic interference areas) and high-requirement environments (such as humid, corrosive areas, and outdoor environments). These are annotated using a combination of rule matching and model prediction, and a risk environment label layer R(x,y) is constructed to represent the risk coefficient at each location on the schematic diagram.
[0078] S4A-3: Perform consistency comparison with knowledge graph rules
[0079] The routing specification rules obtained in step S2A-1 are mapped and compared one-to-one with the environmental labels identified in step S4A-2. A routing verification function is then constructed.
[0080]
[0081] Among them, C iIndicates the type and laying method of a cable, E j This represents the environmental conditions. The final cable routing rationality matrix M is then constructed. ij This serves as the basis for subsequent optimizations.
[0082] S4A-4: AI-Assisted Large Model Wiring Diagram Optimization Generation
[0083] Based on the initial wiring diagram and the rationality analysis results, a pre-trained AI model (a multimodal generative model based on the Transformer architecture) is invoked to optimize and generate the wiring diagram. The inputs to the large model include schematic image encoding I, initial wiring vector representation V, environmental risk labels R, and knowledge graph constraint representation K; the output is the optimized wiring scheme. The objective function is to minimize the specification violation rate and the physical conflict rate.
[0084]
[0085] in, Indicates the loss due to the violation rate of the norm. This represents the physical overlap and collision loss of the wiring, where α and β are weighting coefficients.
[0086] S4A-5: Generate routing suggestions and optimization tips
[0087] Combining the inference results with the AI optimization graph, a wiring suggestion document is automatically generated. Isolation distances are automatically added between cables in different systems to avoid interference; shielding layers or enhanced insulation are suggested in high-risk areas; and materials with higher protection levels are recommended for humid or corrosive environments. Each suggestion is labeled with its source (knowledge graph clause number) and a comparison diagram of wiring before and after optimization, generating a standardized output file in the format of suggestion number_wiring area_ID.json, stored in a specified path for subsequent system calls and engineering personnel reference.
[0088] Based on the above embodiments, such as Figure 7 As shown, step S5 in this embodiment includes:
[0089] S5A-1: Rule-based Reasoning Engine
[0090] Based on a predefined cabling rule base, the inference engine uses rule matching logic to determine the legality of cable layouts. When cable routing crosses high fire risk areas, the inference engine automatically checks whether the cables in that area meet fire-resistant material requirements. The execution flow is as follows: the logical inference engine first checks the hard conditions in the cabling rules to ensure basic cabling requirements (fire protection, isolation, etc.). The fuzzy inference engine further checks for ambiguous distance restrictions and other fuzzy rules, returning prompts or warnings. The case inference engine checks historical cases and suggests optimization solutions. All results are combined to ensure that the cable layout meets all specifications.
[0091] S5A-2: Constraint-Based Cable Path Planning
[0092] The wiring rules identified by the inference engine are transformed into constraints and applied to the wiring planning algorithm. The basic steps include: area division and cable routing (based on structural zoning (such as residential areas), constraining the cable layout in each area to avoid laying critical equipment cables in high fire risk areas); cable grouping and bundling (planning the layout of trunk cables and low-voltage control cables according to the cable's purpose and voltage level to avoid electromagnetic interference); and path optimization algorithm (combining the constraints of rule inference to generate the optimal path, and considering issues such as cable length, wiring sequence, and wiring spacing to ensure the optimal distribution of cables in space).
[0093] Before generating the circuit diagram, the basic attributes of the cables (cable type, rated voltage, application) and relevant information about the area (fire risk, electromagnetic interference) need to be recorded in the database for use by the automatic wiring algorithm. The entire equipment area is divided into several sub-areas (such as engine room, living quarters, cargo hold, etc.) to make the wiring more targeted. The areas where the main generator and main distribution board are located are critical areas and require special isolation. High-risk areas, such as areas with high fire risk and dense machinery, require special handling for cable wiring. The optimal path for the cables in each area is found to ensure that the path is shortest, complies with regulations, and avoids conflicts. Wiring constraints are generated according to the rules in the rule reasoning engine, and cables of different voltages are kept at a certain distance to avoid mutual interference. For cables crossing high-risk areas, fire-resistant materials are required, and they should not be routed on the same path as ordinary cables. Some equipment cables cannot be routed on the same path to ensure redundant power supply paths.
[0094] S5A-3: Path Planning and Cable Distribution Algorithm
[0095] In automated circuit diagram generation, path planning is a critical step, involving cable routing and connections between devices. We will employ five algorithms (the traditional A* algorithm, genetic algorithm, and the learning methods A3C and Dueling Double DQN) to address this problem, combining specific rules and the priority of risk areas to optimize cable routing.
[0096] S5A-4: Initialize Environment and Parameter Settings
[0097] Area Modeling: Mesh Generation (dividing the cable routing area into a two-dimensional grid. Each grid cell represents a spatial location), containing the following information: Risk Level (0-10 indicates the safety of the location, with higher values indicating greater risk); Cable Type Support (indicating the cable types supported by the cell (low voltage, medium voltage, high voltage, etc.)); Equipment Information (storing the identifiers of the devices connected to the cell).
[0098] Input parameters: cable properties (maximum cable length, allowable current, material type, etc.); equipment connection requirements (e.g., the requirement for motors to be connected to the main distribution board); risk areas (marking high-risk areas in the grid, such as fire areas and water tanks).
[0099] Cable spacing constraints (generating minimum safe distances between cables according to rules, such as maintaining a minimum 300mm spacing between high-voltage and low-voltage cables).
[0100] Risk area avoidance (For each cable path, check the risk level of each grid cell it passes through. If the risk level is higher than a certain threshold, the path needs to be replanned). Assume there is an initial setup as shown in the figure, where the markers represent various risk areas and warehouses, which can be regarded as roadblocks with attributes (rules).
[0101] S5A-5: Algorithm Implementation
[0102] A* Algorithm Implementation: Using Manhattan distance as a heuristic function:
[0103] h(n) = |x n -x goal |+|y n -y goal |
[0104] Define the actual cost g(n) as the path length from the starting point to the current node. Path search: Create an open list (priority queue) and a closed list. Add the starting point to the open list. Select the node from the open list with the lowest f(n) = g(n) + h(n). If this node is the target node, generate the path and end the search. Otherwise, move the node to the closed list. For each adjacent node: if it is in the closed list, skip it. Calculate the new g value. If the node is not in the open list, add it to the open list. Path selection: When the target node is removed and expanded, the path search is complete, the path is stored and returned.
[0105] Genetic Algorithm: Each individual (chromosome) represents a cable path, typically consisting of multiple nodes (devices and intermediate nodes). A certain number of paths are randomly generated, each following basic cabling rules such as equipment power requirements and area restrictions. It is ensured that each path meets constraints (e.g., cable type, power supply method, etc.) during initial generation. Fitness Function: A fitness function is defined to evaluate the quality of each path, typically including the following factors: total cable length (shorter length, higher fitness); number of violations of cable cabling rules (fewer violations, higher fitness); number of cables passing through high-risk areas (fewer violations, better). The fitness function takes the form:
[0106]
[0107] Here, penalty is the penalty value added for violating the rules. Selection method: Roulette wheel selection or tournament selection is used. Selection is based on the proportion of fitness; individuals with higher fitness are more likely to be selected. Several individuals are randomly selected, and the individual with the highest fitness is chosen for mating. Then, a crossover point of a path is randomly selected. The portion before the crossover point retains the parent path, while the portion after the crossover point comes from another parent path. Parent path 1: A→B→C|D→E; Parent path 2: F→G→H|I→J; Child path 1: A→B→C|I→J; Child path 2: F→G→H|D→E. Mutation method: Used to introduce diversity and prevent the algorithm from getting stuck in local optima. A node in the path is randomly selected and replaced with another optional node. Original path: A→B→C→D; After mutation: A→B→E→D. The mutation probability is usually set low (e.g., 0.01) to ensure that only a small number of individuals are mutated. The offspring obtained from selection, crossover, and mutation are merged with the current population. A new generation of the population is selected based on fitness, typically choosing the individual with the highest fitness. Finally, a termination condition is set to reach a preset number of generations (e.g., 100 generations). The optimal fitness no longer increases significantly (e.g., remains unchanged for 10 consecutive generations). Paths that satisfy all wiring rules are found. The path with the highest fitness is selected as the final output, transformed into a visual representation of the electrical schematic.
[0108] A3C Algorithm Implementation: In cable layout scenarios, A3C learns appropriate cable routing strategies through interaction between the agent and the environment. First, the environment needs to be defined, containing all cable routing rules, equipment locations, path selection, and other information. Environment states include the current cable routing and connected equipment. Routing rules and constraints include cable type requirements, power supply requirements, and area risk levels. Rewards or penalties are given based on the quality of path selection and compliance with rules. The A3C algorithm uses two neural networks: one for the "actor" part (generating strategies) and the other for the "critic" part (evaluating state value). For cable routing tasks, we can design the following network structure. The core of A3C lies in its asynchronous training mechanism, i.e., multiple worker threads execute in parallel. Each worker thread interacts with the environment and uses its experience to update the global model. We need to update the global model after each thread finishes to ensure the model's timeliness and accuracy. After each worker completes an episode, its learned gradients are applied to the global model. To improve learning efficiency, an experience replay mechanism can be employed, storing each worker's experience in a shared experience pool and randomly selecting samples for training. The design of reward signals is crucial to the learning performance of A3C. In a cable routing scenario, rewards can be designed based on the following aspects: shorter paths receive positive rewards; compliance with routing rules is rewarded, and violation of rules is penalized; routing within risk areas is costly, therefore, paths outside risk areas are rewarded.
[0109] Dueling Double DQN Implementation: This algorithm improves the stability and efficiency of learning by introducing a "Dueling" structure and a "dual" mechanism.
[0110] Dueling Architecture: Dueling DQN decomposes the Q-value function into two parts: the state value function V(s), representing the overall value of the current state, and the advantage function A(s,a), representing the additional value of taking a specific action in a given state. The formula for calculating the Q-value function is:
[0111] Q(s,a)=V(s)+A(s,a)
[0112] This decomposition allows the network to independently learn state values and the advantages of each action, and to estimate Q-values more effectively, especially when the effects of certain actions are similar.
[0113] Double DQN: In Double DQN, two networks are used: a master network (online network) and a target network. The master network is used to select actions, while the target network is used to calculate the Q-value, mitigating the overestimation problem. The environment for cable routing is defined, including the location of electrical equipment, routing rules and constraints, and risk areas. The current routing state is converted into a vector form containing information such as equipment location, already routed paths, and remaining rules.
[0114] Input layer: Receives the current state vector.
[0115] Hidden layers: Multiple fully connected layers are used for feature extraction, and the final output has two branches: a state value branch V(s) and an advantage branch A(s,a).
[0116] Output layer: Combines state value and advantage to output the Q value of each action.
[0117] Initialization: Initialize the parameters of the main network (online network) and the target network (target network). Create an experience replay buffer to store state transition and reward information.
[0118] Action selection: An ε-greedy strategy is used for action selection. A random action is selected with probability ε (exploration). The action with the maximum Q value is selected with probability 1-ε (exploitation).
[0119] Store experience: Perform an action and observe the next state and reward. Store the experience (current state, action, reward, next state) in the experience replay buffer.
[0120] Experience replay: Randomly sample a small batch of data from the experience replay buffer for training. Calculate the target Q-value.
[0121] y = r + γQ target (s ' ,argmax Q online (s ' ,a ' ,θ online ),θ target )
[0122] Where r is the current reward, γ is the discount factor, s' is the next state, and θ online and θ target These are the parameters of the main network and the target network, respectively. Update network parameters: Update the main network parameters using the mean squared error (MSE) loss function:
[0123]
[0124] Perform gradient descent optimization. Update the target network: at regular intervals, copy the weights of the main network to the target network to maintain learning stability. Training termination condition: set the number of training iterations or a loss function convergence threshold to determine the end of training. Evaluate the path selection performance and rule-following ability by running the trained network in a new environment.
[0125] S5A-6: Cable and Equipment Connection Diagram Generation
[0126] Group cables according to their purpose, voltage level, and path similarity. Prioritize grouping similar types of cables (e.g., emergency cables, control signal cables) to reduce wiring workload. Bundle cables on the same path according to interference and safety requirements. Maintain a certain distance (e.g., 50mm) between power cables and low-voltage cables. Use isolation bundling methods; for example, in high fire risk areas, use fire-resistant materials to isolate and bundle emergency cables to prevent fire spread. Draw circuit diagrams in layers according to cable type, purpose, and area information, with each layer containing the same type of cable and its path. Include the layout of main power supply cables. Wiring cables for control signals and instruments. Lay dedicated cables for emergency equipment to avoid sharing paths with ordinary cables. Identify the corresponding areas ("engine compartment," "cargo compartment," etc.) for each path in the circuit diagram for easy maintenance and troubleshooting. Assign a unique location number to each node and device to ensure accurate recording of cable paths. Define cable connection relationships based on cable attributes and equipment interfaces. Record the interface type and cable requirements for each device in the database to generate corresponding connection diagrams. Define the logical connection relationships between cables and equipment. For example, the cable from the main generator to the main switchboard should be powered independently and should not cross with cables from other equipment. Based on equipment interface relationships and connection logic, the system automatically draws equipment connection diagrams, displaying the cable access points on the equipment.
[0127] After the circuit diagram is generated, a rule-based reasoning engine performs a compliance check. Verification includes checking whether cable routes meet isolation and fire protection requirements, ensuring safe distances between cables of different voltage levels, marking compliant cable routes in green and non-compliant routes in red with accompanying warning messages to facilitate further modifications and optimizations by designers, and providing multiple formats (such as PDF and CAD) for easy viewing by different design departments and project stakeholders. Main cables, control cables, emergency cables, etc., are exported in layers, each with its own independent drawing, while also generating merged drawings for comprehensive viewing. A cable list containing route information is exported, recording cable type, route, equipment used, and related constraints, serving as an auxiliary document to the circuit diagram for subsequent maintenance and updates.
[0128] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A circuit design optimization method based on knowledge rule induction and tacit knowledge mining, characterized in that, include: Step 1: Convert circuit design-related texts in different formats into standardized texts that are easy for AI large models to process, and filter out irrelevant content; Step 2: Identify key entities in the processed text using an AI large model, and automatically generate a structured representation of wiring rules through relation extraction; Step 3: Map the extracted semantic information of the structured representation to a rule table, and establish a specification library for circuit wiring design based on the rule table; Step 4: Using the cross-modal representation model constructed with the Transformer structure, the multimodal data related to circuit design is converted into a unified representation format. A knowledge graph of electrical wiring is established from the aligned multimodal data. The multimodal data includes text, images, and 3D model data. Step 5: Extract and reason about the knowledge graph based on graph neural networks to obtain the implicit wiring specifications; Step 6: Based on the specification library and implicit routing specifications, optimize the constructed routing diagram using an AI large model to generate inference results, and use the inference results to generate routing suggestions.
2. The circuit design optimization method based on knowledge rule induction and implicit knowledge mining according to claim 1, characterized in that, Step 1 includes: Step 1-1: Standardize the document format of circuit design-related documents to text, and use optical character recognition to digitize the scanned documents. The document format includes PDF, Word and scanned documents. Steps 1-2: For the Chinese technical documents in the text, perform refined sentence segmentation and tagging to facilitate feature extraction; Steps 1-3: Remove irrelevant information from the text and extract the main content. The irrelevant information includes headers, footers, and table of contents.
3. The circuit design optimization method based on knowledge rule induction and implicit knowledge mining according to claim 1, characterized in that, Step 2 includes: Step 2-1: Identify key entities in the text using BERT's NER module. These key entities include cable type, area type, and wiring material. Step 2-2: Create a custom NER dataset for the power cabling domain, which includes labeled cable types and isolation requirements. Improve the recognition accuracy of the relation extraction model through supervised learning. Steps 2-3: Use a relation extraction model based on BERT and bidirectional long short-term memory network to identify the relationships between key entities, and automatically generate a structured representation of wiring rules through relation extraction.
4. The circuit design optimization method based on knowledge rule induction and implicit knowledge mining according to claim 1, characterized in that, Step 3 includes: Step 3-1: Generate templates based on semantic relations extracted from structured representations; Step 3-2: Based on the template, a rule base is established using Neo4j knowledge graph technology. The relationships and attributes in the rule base are quickly retrieved and called through a graph database. Step 3-3: Store the structured cabling rules in the knowledge base to provide basic support for cabling design and retrieval. Construct a cable cabling knowledge graph with triples of cable type, area type and cabling requirements as the main nodes. After the knowledge base is constructed, design a query interface based on rule reasoning.
5. The circuit design optimization method based on knowledge rule induction and implicit knowledge mining according to claim 1, characterized in that, Step 4 includes: Step 4-1: Use the Transformer structure to analyze the circuit design diagram and extract the equipment layout, line routing and wiring path. The circuit design diagram includes electrical schematic diagram and cable routing diagram. Step 4-2: Collect and analyze the 3D environment model and physical layout corresponding to the circuit design diagram to obtain the relative spatial position of the equipment, ambient temperature and humidity, and determine the laying requirements; Step 4-3: Construct a cross-modal representation model based on the multimodal Transformer architecture to convert multimodal data into a unified representation format; Step 4-4: Build an electrical cabling knowledge graph from the aligned multimodal data, including cabling requirements, regional environment, and equipment risk level.
6. The circuit design optimization method based on knowledge rule induction and tacit knowledge mining according to claim 1, characterized in that, Step 5 includes: Step 5-1: Extract and reason about knowledge from the knowledge graph based on graph neural networks to obtain the implicit wiring specifications; Step 5-2: Mark and identify high-risk areas and high-requirement environments in the electrical schematic diagram, and compare them with the knowledge graph to determine the rationality of cable laying; Step 5-3: Based on the specification library and implicit cabling specifications, optimize the constructed cabling diagram using an AI large model to generate inference results, and use the inference results to generate cabling suggestions. The cabling suggestions include automatically adding isolation distances between cables in different systems, or selecting cable materials with appropriate protection levels for different environments.
Citation Information
Cited By
Data value evaluation method and system based on knowledge mining large model and analogue simulation agent
CN121526720A
