Part process generation method based on ontology reasoning model
By constructing a combination of component processing ontology model and large language model, the problem of poor adaptability of process solutions in existing technologies is solved, realizing intelligent and efficient component process generation, and improving the adaptability and reliability of process solutions.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NORTHWESTERN POLYTECHNICAL UNIV
- Filing Date
- 2026-02-12
- Publication Date
- 2026-06-19
AI Technical Summary
Existing methods for generating parts processes suffer from poor adaptability of the generated process solutions, difficulty in handling complex or non-standard parts, and a lack of semantic understanding and dynamic reasoning capabilities, resulting in fragmented knowledge and difficulty in passing on implicit experience.
Based on the ontology reasoning model, this paper constructs an ontology model of component processing technology, extracts knowledge by combining it with a large language model, builds a knowledge graph, and designs a hybrid reasoning framework that combines case reasoning, model reasoning and rule reasoning to realize the semantic expression and structured storage of process knowledge, thereby improving the adaptability and reliability of process solutions.
It enables intelligent and efficient parts manufacturing processes, improves the reliability and adaptability of process solutions, reduces rework and quality risks, and has dynamic reasoning capabilities to handle complex parts processes.
Smart Images

Figure CN122242793A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a method for manufacturing parts. Background Technology
[0002] With the rapid development of intelligent manufacturing and industry, the process planning for parts (such as gears) is evolving towards digitalization, networking, and intelligence. Traditional process planning methods rely heavily on human experience, resulting in long design cycles, low efficiency, and limited knowledge reuse. In manufacturing enterprises, process knowledge often exists in the form of unstructured documents, process cards, or isolated systems, lacking a unified semantic representation and computational mechanism, leading to severe knowledge fragmentation and difficulty in inheriting tacit experience. How to achieve explicit expression, structured storage, and intelligent reasoning of process knowledge has become a key technical challenge in promoting the intelligent upgrading of the manufacturing industry.
[0003] To overcome the problems of low utilization rate of process knowledge, insufficient computability of knowledge, and implicit reliance on experience in process planning, recent research in this field on component process generation methods mainly includes:
[0004] Patent application number 202510051273.7 discloses a knowledge-based process solution generation method. This method constructs a process knowledge base containing part features, procedures, and equipment information. Based on input part parameters, it retrieves similar cases or procedure templates from the knowledge base and generates a complete process flow using preset rules or algorithms. While this technical solution improves the automation level of process planning to some extent, its knowledge base relies on manually defined features and rules, lacking semantic understanding and dynamic reasoning capabilities. It struggles to handle the multi-dimensional correlation problems of complex part processes, resulting in poor adaptability of the generated process solutions, and it is ineffective in dealing with unconventional and non-standard parts.
[0005] Patent application number 202410726885.7 discloses a method for constructing a dynamic process knowledge base and generating process solutions for discrete manufacturing production lines. Based on knowledge engineering, it uses rule extraction and the BERT model to extract information from multi-source heterogeneous data to construct a process case library and a rule library. It then uses a hybrid decision-making mechanism combining case reasoning and rule reasoning to generate process solutions. However, this technical solution's reasoning framework integrates case reasoning and rule reasoning. It lacks the ability to learn the implicit and complex dynamic dependencies in the process sequence and still suffers from the limitations of traditional symbolic logic-based rule and static case matching. When applied to the processing of non-standard parts with special structures, it struggles to generate effective solutions. Summary of the Invention
[0006] To address the problem of poor adaptability of generated process schemes in existing component process generation methods, this invention proposes a component process generation method based on ontology reasoning model.
[0007] The inventive concept of this invention is:
[0008] First, a component machining process ontology model is established. This model defines the core concepts, attributes, relationships, and constraints in component machining, including part features, processes, equipment, cutting tools, and fixtures. Using this ontology model as the semantic foundation, process knowledge is uniformly described, thereby achieving semantic alignment of multi-source heterogeneous data.
[0009] Then, knowledge extraction is performed based on the collaborative mechanism of the component processing technology ontology model and the Large Language Model (LLM). Through semantically constrained prompt word templates, each element is extracted as a structured 5-tuple JSON array from the enterprise component process card and the general knowledge base of machining. This realizes the transformation of multi-source heterogeneous data into machine-understandable knowledge and forms a knowledge element set that can be quickly retrieved and reused.
[0010] Subsequently, the extracted knowledge is mapped into a knowledge graph of parts processing. Based on the Neo4j graph database, a multi-dimensional semantic network containing processing features, process timing, and quality constraints is constructed to realize the structured storage and visualization of knowledge, providing logical support for subsequent reasoning.
[0011] Finally, a hybrid reasoning framework combining case-based reasoning (CBR), model-based reasoning (MBR), and rule-based reasoning (RBR) is designed to make tacit knowledge explicit. When a user inputs a set of processing features for a component, the case-based reasoning module obtains the best historical process as a similar case through similarity retrieval and uses the component processing knowledge graph to complete missing processes as a candidate process set. The model-based reasoning module uses a temporal convolutional network (TCN) to rank all processes in the similar cases and candidate process sets. The rule-based reasoning module performs logical and constraint verification on the process scheme generated by the model-based reasoning module, and finally outputs the optimal process sequence that meets the manufacturing constraints.
[0012] The technical solution adopted in this invention is:
[0013] The component manufacturing process generation method based on ontology reasoning model is unique in that it includes the following steps:
[0014] Step 1: Construct the component processing technology ontology model;
[0015] Step 2: Under the constraints of the component processing technology ontology model, knowledge is extracted from the preprocessed general knowledge base of machining and enterprise component process cards using a large language model, and the extracted knowledge is used to construct a component processing knowledge graph.
[0016] Step 3: For the current part to be processed, search for similar cases in the part processing knowledge graph;
[0017] Step 4: Verify whether similar cases cover all processing features of the parts to be processed. If yes, proceed to step 7; otherwise, proceed to step 5.
[0018] Step 5: Use the uncovered processing features as query keywords to search for matching process methods in the parts processing knowledge graph. Then, filter the queried process methods based on quality constraints and real-time workshop resource status to obtain a candidate process set.
[0019] Step 6: Input the vectorized processing features, similar cases, and candidate process set of the parts to be processed into the trained TCN model. The TCN model outputs the predicted process of the parts to be processed, and proceed to step 8.
[0020] Step 7: Input the vectorized processing features and similar cases of the parts to be processed into the trained TCN model. The TCN model outputs the predicted process of the parts to be processed, and proceed to step 8.
[0021] Step 8: Use the pre-built rule base to check the predicted process. If a rule conflict is detected, construct and output correction suggestions based on the violation process and cause; if no conflict is detected, output the predicted process plan.
[0022] Furthermore, step 1 specifically includes:
[0023] Step 1.1: Construct the component processing technology body;
[0024] Step 1.2, Part processing technology ontology: Create a part processing technology ontology model in the modeling tool.
[0025] Furthermore, the method for preprocessing the general knowledge base for machining and the enterprise's component process cards in step 2 is as follows:
[0026] For unstructured text in the general knowledge base of machining: long documents are split into semantically complete segments through text segmentation; heterogeneity of terminology is eliminated by constructing a thesaurus, so that the same feature is expressed by the same terminology;
[0027] For structured data in the general knowledge base of machining: no preprocessing is performed;
[0028] For enterprise component process cards: standardize the expression of the data; add text tags to the standardized enterprise component process cards to convert the data in the enterprise component process cards into a data format with clear semantic definitions that can be directly read and parsed by machines.
[0029] Furthermore, the specific method for knowledge extraction in step 2 is as follows:
[0030] First, a prompt word template constrained by the component processing technology ontology model is designed. This prompt word template adopts a hierarchical instruction architecture, transforming ontology constraints into multi-dimensional prompt elements. The first layer of the prompt word template is a domain-localization prompt layer, used to define the core conceptual categories related to the component processing technology generation task. The second layer is a structured extraction result output template layer, converting the class-subclass relationships in the component processing technology ontology model into JSON format, requiring the large language model to classify and output entities according to a predetermined category of the five-tuple { "s": subject name, "st": subject type path, "r": relation type, "o": object name, "ot": object type path}. The third layer is a relation generation rule layer, guiding the large language model to establish entity associations that conform to the logic of the component processing domain, encoding the class hierarchy and relation logic in the component processing technology ontology model into LLM-parsable semantic rules.
[0031] Then, the preprocessed general knowledge base for machining and enterprise component process cards are combined with prompt word templates, and knowledge is extracted from the general knowledge base for machining and enterprise component process cards using a large language model.
[0032] Further, step 3 involves retrieving similar cases by solving the comprehensive similarity between the part to be processed and each historical part processing case in the part processing knowledge graph; the comprehensive similarity is a weighted fusion result of the structural similarity between the part to be processed and the historical part processing cases and the semantic similarity between the part to be processed and the historical part processing cases.
[0033] Furthermore, the method for calculating the structural similarity between the part to be processed and any historical part processing case A in step 3 is as follows:
[0034]
[0035] in, For processing features The weight function, all processing features The sum of their weights equals 1; The weight of a processing feature is dynamically adjusted based on its importance. The greater the impact of a processing feature on the function of the part itself, the higher its importance, and the higher its weight. It is a vectorized feature set of the parts to be processed; This is a vectorized set of processing features from historical parts processing cases;
[0036] The method for calculating semantic similarity in step 3 is as follows:
[0037] First, calculate a certain machining feature of the part to be processed. Compare with any historical component processing case A for a certain processing feature Semantic similarity:
[0038]
[0039] In the formula, For processing features Vectorized string; For processing features Vectorized string;
[0040] Then, a certain machining feature in the part to be machined Semantic similarity is calculated between the part to be processed and the other processing features in historical part processing case A. The maximum value among all semantic similarities is taken as the processing feature of the part to be processed. The best semantic similarity with historical parts processing case A;
[0041] Next, repeat the above process for the remaining processing features of the parts to be processed. Finally, obtain the best semantic similarity between each processing feature of the parts to be processed and the historical parts processing case A. Take the average of all the best semantic similarities as the overall semantic similarity between the parts to be processed and the historical parts processing case A.
[0042] The method for calculating the overall similarity in step 3 is as follows:
[0043]
[0044] in, These are the weighting coefficients. The semantic similarity between the parts to be processed and historical parts processing case A.
[0045] Furthermore, the quality constraints mentioned in step 5 include accuracy level and surface roughness; the real-time resource status of the workshop includes equipment availability and tool inventory.
[0046] Furthermore, the TCN model in step 6 also incorporates a constraint handling mechanism to dynamically adjust the prediction results of the TCN model based on currently available process options; the implementation method of the constraint handling mechanism is as follows:
[0047] First, based on the constraints of the actual conditions, the currently available subset of processes is determined from the candidate process set and similar cases. ,Will Let it be the first The effective candidate process index set at each step retains only the probability values of the selectable processes. The probability of any process other than the one in question is forcibly set to zero, thus mathematically eliminating all infeasible options.
[0048] Then, the probability values of the optional processes are renormalized, and the TCN model predicts the next process step based on the renormalized probability values.
[0049] Furthermore, the rule base pre-built in step 8 includes multiple rules, each of which specifies the relationships that must be satisfied between processes.
[0050] Compared with the prior art, the advantages of the present invention are:
[0051] 1. This invention combines general knowledge of parts processing with similar parts processing cases from enterprise parts process cards. Based on knowledge graph mapping rules, it maps general knowledge and processing cases of parts processing to knowledge graphs respectively, and then stores the knowledge graphs in a graph database. This completes the construction of the parts processing knowledge graph and realizes the organic integration of the two types of knowledge sources. It solves the problem that industrial knowledge graphs rely solely on general knowledge bases or processing cases, making it difficult to balance universality and specialization. This improves the reliability and feasibility of the generated process solutions and reduces rework, scrap, or quality risks caused by improper processes during the actual trial production stage.
[0052] 2. This invention addresses the limitations of traditional case-based reasoning (CBR) and model-based reasoning (MBR). After the user inputs the processing characteristics of the parts, it uses case-based reasoning (CBR) to analyze the possibility of reusing historical cases, combines the TCN time series model in model-based reasoning (MBR) to improve the adaptability of the process scheme, and finally uses rule-based reasoning (RBR) to perform rule verification on the process scheme generated by the TCN model. This realizes a three-in-one reasoning system of case-model-rule and efficient generation of parts processes, making the process generation process both consistent with empirical logic and possessing intelligent optimization capabilities.
[0053] 3. This invention achieves semantic expression and hierarchical organization of knowledge through component processing technology ontology modeling, and realizes multi-dimensional semantic association and interpretable reasoning based on knowledge graphs. Semantic expression of knowledge fundamentally improves the computability and machine understandability of knowledge; hierarchical organization facilitates the systematic expansion and maintenance of knowledge: when new process concepts or resource types need to be added, they can be classified into appropriate levels to ensure the continuous evolution of the knowledge base without chaos; knowledge graphs realize multi-dimensional semantic association and interpretable reasoning, revealing implicit knowledge that is not directly recorded but can be deduced through relational paths, and enhancing the transparency and interpretability of the decision-making process.
[0054] 4. This invention defines clear semantic boundaries for knowledge extraction through a pre-constructed component processing technology ontology model, forming a semantic network containing core concepts such as product information, processing objects, process procedures, and process methods. Based on this, the invention utilizes a large language model to extract knowledge from component process cards and a general machining knowledge base. This involves transforming the class hierarchy, attribute constraints, and relational axioms in the component processing technology ontology model into natural language templates. A specifically designed Prompt instruction guides the large language model to focus on target entities and relationships. This component processing technology ontology model-driven Prompt engineering strategy essentially establishes a domain semantic attention-focusing mechanism within the parameter space of the large language model. This allows the large language model to autonomously suppress irrelevant semantic interference when processing process text, enhancing its sensitivity to core elements. It minimizes noisy data and erroneous associations at the source, ensuring that all subsequent reasoning steps are based on reliable knowledge, significantly improving the accuracy and credibility of the final generated process solution.
[0055] 5. This invention fundamentally solves the core problem of the lack of semantic hierarchy in the knowledge base constructed in existing technical solutions by constructing a component processing ontology model. The component processing ontology model constructed in this invention standardizes all concepts and relationships in the entire component processing field in a way that can be understood and processed by a computer, enabling a true understanding of the deep semantics of process knowledge according to the concepts and relationships within the component processing field. This ontology-based approach not only provides a unified semantic standard and eliminates terminological ambiguity, but more importantly, it establishes a rich semantic association network among process elements, providing a semantic foundation for handling the multidimensional association problems of complex part processes, thereby significantly improving the adaptability and reliability of process solutions.
[0056] 6. This invention introduces model reasoning based on Temporal Convolutional Networks (TCN) on the basis of case reasoning and rule reasoning. This makes process generation no longer highly dependent on manually defined rules and limited historical cases. Instead, it has the ability to learn the internal logic of the process from data and to dynamically reason and optimize the process of new parts. This fundamentally solves the core pain point of existing technologies being powerless to deal with non-standard parts and provides key technical support for achieving truly intelligent process creation. Attached Figure Description
[0057] Figure 1 This is a flowchart of a method according to an embodiment of the present invention.
[0058] Figure 2 This is an example of a conceptual model in the field of gear processing constructed according to an embodiment of the present invention. Detailed Implementation
[0059] The present invention will be further described below with reference to the accompanying drawings and embodiments.
[0060] Example:
[0061] This embodiment illustrates the present invention using a gear manufacturing process as an example.
[0062] Reference Figure 1 The gear manufacturing process based on an ontology reasoning model proposed in this embodiment includes the following steps:
[0063] Step 1: Modeling the gear machining process body;
[0064] Step 1.1: Construct the gear machining process body;
[0065] The gear machining process ontology is a semantic model used to unify and standardize the description of knowledge in the gear manufacturing field. By defining core concepts, attributes, relationships, and constraint rules, it transforms fragmented process knowledge into structured information that can be understood and computed by machines.
[0066] The method for constructing the gear machining process body is as follows:
[0067] List the important terms in the gear machining process, including gear machining features, processes, cutting tools, equipment, steps, and fixtures;
[0068] Define classes and class hierarchies. For example, a process can be used as a parent class, and its subclasses include operations, steps, and process equipment; a process equipment can be used as a parent class, and its subclasses include cutting tools, fixtures, and machining equipment.
[0069] Define the semantic relationships between different types. For example, define the relationship between "process → processing equipment" as "process equipment dependency", which represents the equipment that the process depends on during execution. Define the relationship between "process equipment → process method" as "supporting process", which represents the matching relationship between equipment capabilities and process methods, such as turning on a lathe.
[0070] To facilitate the definition of classes and class hierarchies, we can first construct a conceptual model of the gear machining domain based on the listed key terms, for example, such as... Figure 1 As shown, the conceptual model of this domain can clearly represent various entities (such as "gears" and "processes"), their attributes (such as the "module" and "number of teeth" of a "gear"), and the complex relationships between entities in the gear machining process domain. Therefore, based on this conceptual model, it is easier to define classes and class hierarchies, and less likely to omit anything.
[0071] Step 1.2: Based on the gear machining process in Step 1.1, create the ontology model in the modeling tool;
[0072] In this embodiment, Protégé 5.5.0 is used as the modeling tool. Based on the gear machining process ontology constructed in step 1.1, a gear machining process ontology model is formed in the modeling tool. The gear machining process ontology model is a computer-readable OWL format file.
[0073] Step 2: Guided by the gear machining process ontology model constructed in Step 1, use the Large Language Model (LLM) to extract knowledge from the general knowledge base of machining and the enterprise gear process card, and use the extracted knowledge to construct a gear machining knowledge graph;
[0074] Step 2.1: Data preprocessing;
[0075] Considering that the process knowledge in the general machining knowledge base is mainly stored in the form of structured data and unstructured text, this invention only extracts structured data and unstructured text from the general machining knowledge base. Structured data can be used directly without preprocessing. Only the unstructured text needs preprocessing.
[0076] For unstructured text in the general knowledge base of machining, the following preprocessing method is used:
[0077] Text segmentation breaks down extremely long documents into semantically complete segments. This can be done manually or by using rule-based or algorithm-based automated methods, such as segmenting based on punctuation marks or paragraphs.
[0078] By constructing a thesaurus, the heterogeneity of terminology can be eliminated, so that the same feature can be expressed by the same term. For example, "annealing" and "dipping" can be unified into the term "quenching".
[0079] The two preprocessing steps mentioned above have no specific order.
[0080] Data preprocessing can improve the efficiency of LLM in parsing complex process knowledge in unstructured text, and provide a standardized and semantically consistent data foundation for subsequent structured output and knowledge graph construction.
[0081] For enterprise gear process cards, the following pretreatment method is adopted:
[0082] Standardizing the expression of data in the enterprise gear process card enables the knowledge in the gear processing field to be unified and aligned at the semantic level. For example, "tooth profile" may be described as "tooth profile" or "gear tooth surface", while "surface roughness" may be expressed as "surface finish". Standardizing the expression process maps these different synonyms to a single standardized term.
[0083] Text tags are added to the standardized expression of the enterprise gear process card, so that the data in the enterprise gear process card is converted into a data format with clear semantic definition that can be directly read and parsed by machines; for example, the text tag "process / operation / equipment information / equipment model" is added to "horizontal lathe CA6140" in the enterprise gear process card, and the text tag "process / step / process equipment / fixture type" is added to "three-jaw chuck".
[0084] The preprocessed enterprise gear process card retains the original business logic and conforms to the cognitive model of LLM, significantly improving the accuracy and completeness of knowledge extraction and laying the foundation for building a high-quality knowledge graph.
[0085] Step 2.2: Design a prompt template constrained by the gear machining process body model;
[0086] The Prompt template uses a layered, guided instruction architecture that transforms ontology constraints into multi-dimensional prompt elements.
[0087] The first layer of the Prompt template is the domain positioning prompt layer. By explicitly stating "You are a gear machining process knowledge engineer" and "You need to extract entities and relationships that conform to the gear machining process ontology model from the pre-processed general machining knowledge base and enterprise gear process card", the core concept scope related to the gear process generation task is defined, and the large language model is established as the cognitive foundation for the current gear process generation task.
[0088] The second layer of the Prompt template is the structured extraction result output template layer, which converts the class-subclass relationships in the gear machining process ontology model into JSON format. It requires the large language model to classify and output entities according to the predetermined categories of the five-tuple { "s": subject name, "st": subject type path, "r": relation type, "o": object name, "ot": object type path}. This explicit output format constraint actually limits the generation space of the large language model in the decoding stage.
[0089] The third layer of the Prompt template is the relation generation rule layer, which guides the large language model to establish entity associations that conform to the logic of the gear processing domain. It encodes the class hierarchy and relation logic in the gear processing technology ontology model into LLM parsable semantic rules, thereby guiding the large language model to identify entities, entity types, objects, object types, infer relations, and generate standardized JSON array outputs in free text.
[0090] To facilitate understanding, taking a preprocessed unstructured text from the general knowledge base of machining as input text T, the following is an example of a designed Prompt template:
[0091]
[0092] When using a Prompt template to extract knowledge from a large language model, you only need to replace the input text T in the Prompt template with the object to be extracted.
[0093] Step 2.3: Extract gear machining knowledge using a large language model;
[0094] This embodiment utilizes OpenAI's GPT-4o mini to perform knowledge extraction (other large language models, such as Deepseek, can also be used in other embodiments). The specific method is as follows:
[0095] The preprocessed general knowledge base for machining and the enterprise gear process card from step 2.1 are used as knowledge extraction objects and combined with the Prompt template designed in step 2.2. Specifically, the input text T in the Prompt template is replaced with the knowledge extraction objects. The Prompt template filled with knowledge extraction objects is used as the input of the large language model. The large language model outputs a standardized JSON array, where each element is a structured quintuple [s, st, r, o, ot]. Where: s represents subject; st represents subject-type, which is the specific class or class path to which the subject belongs in the class hierarchy of the gear machining process ontology model; r represents relation; o represents object; and ot represents object-type, which is the specific class or class path to which the object belongs in the class hierarchy of the gear machining process ontology model.
[0096] By extracting knowledge through a large language model, the multi-source heterogeneous data in the general knowledge base for machining and the enterprise gear process card were transformed from raw data elements into knowledge elements, providing data support for subsequent knowledge graph construction and visualization.
[0097] The following is an example of the knowledge extraction results:
[0098]
[0099] Step 2.4: Construction of a knowledge graph for gear machining;
[0100] Based on the gear machining process ontology model constructed in step 1 and the JSON array of structured quintuples obtained from knowledge extraction in step 2.3, a gear machining knowledge graph is constructed in the Neo4j graph database according to the one-to-one correspondence between classes in the gear machining process ontology model and entity types in the structured quintuples. This completes the storage and visualization of gear machining knowledge, transforming the machining rules described in natural language into executable semantic paths.
[0101] Step 3: For the gear to be processed, search for similar cases in the gear processing knowledge graph;
[0102] Step 3.1: Similarity calculation;
[0103] Step 3.1.1: Construct the set of machining features for the gear to be machined;
[0104] A composite feature encoding method (a known method) is used to combine the various machining feature types and their attribute values on the gear to be machined into a string identifier with clear semantics, thus obtaining the machining feature set of the gear to be machined. For example, if the machining features on a gear to be machined include a center hole feature with a diameter of H7 and a keyway feature with a width tolerance of ±0.02mm and a surface roughness of Ra3.2, then the string "center hole_H7" represents the center hole feature with a diameter of H7, and the string "keyway_±0.02mm_Ra3.2" represents the keyway feature with a width tolerance of ±0.02mm and a surface roughness of Ra3.2. In this case, the constructed machining feature set of the gear to be machined is {"center hole_H7" "keyway_±0.02mm_Ra3.2"}. This representation method not only preserves the complete information of the original machining features, but also facilitates automated computer processing, creating favorable conditions for subsequent similarity measurement.
[0105] Step 3.1.2: Convert the machining feature set of the gear to be processed and the machining feature set corresponding to historical gear processing cases in the gear processing knowledge graph into standardized semantic vector form. The method is as follows:
[0106] Utilizing a pre-trained model trained on massive amounts of text data on the internet, this model can output a fixed-length, high-dimensional floating-point array after receiving the processing feature set of the gear to be processed constructed in step 3.1.1 as input. This embodiment directly calls OpenAI's text-embedding-3 model, taking the processing feature set of the gear to be processed obtained in natural language from step 3.1.1 as input, and outputting a vectorized feature set of the gear to be processed.
[0107] Using the same method, the processing feature sets corresponding to historical gear processing cases in the gear processing knowledge graph are converted into standardized semantic vector forms, resulting in vectorized historical case feature sets.
[0108] Step 3.1.3: Calculate the structural similarity and semantic similarity (embedding cosine) between the gear to be processed and any historical gear processing case A in the gear processing knowledge graph.
[0109] Structural similarity calculation:
[0110] Structural similarity (which characterizes the degree of feature coverage) is calculated using a weighted Jaccard similarity coefficient. The vectorized feature set of the gear to be processed is denoted as the feature set. Let the vectorized set of historical case features corresponding to a historical gear machining case A with m machining features be denoted as the feature set. For the feature set and feature set The weighted Jaccard similarity coefficient is defined as follows:
[0111]
[0112] in, For processing features The weight function, all processing features The sum of their weights equals 1; The weight of a machining feature is dynamically adjusted based on its importance. The greater the impact of a machining feature on the gear's function, the higher its importance, and thus the higher its weight. For example, for the machining features tooth profile parameters and chamfering, tooth profile parameters should be assigned a higher weight, while chamfering should be assigned a lower weight. This weighted approach makes the similarity calculation more consistent with engineering practice, avoiding the problem of important machining features being overlooked when simply comparing the set of machining features. If the feature set... With feature set Consistent, then .
[0113] Semantic similarity calculation:
[0114] Semantic similarity focuses on the degree of similarity among the specific attributes, parameters, and contextual descriptions of each processed feature. Semantic similarity is calculated based on vector space.
[0115] The vectorized feature set of the gear to be processed is denoted as the feature set. Let the vectorized set of historical case features corresponding to a historical gear machining case A with m machining features be denoted as the feature set. Then, for a certain machining feature of the gear to be machined... In the feature set The vectorized string is , and feature set A certain processing feature Vectorized string The semantic similarity is calculated as follows:
[0116]
[0117] For feature set Processing features With feature set For each processing feature, the semantic similarity is calculated as described above, resulting in m semantic similarity values. The maximum value among all semantic similarity values is taken as the processing feature of the gear to be processed. The best semantic similarity with historical gear machining case A.
[0118] The above process is repeated for the remaining machining features of the gear to be machined. Ultimately, an "optimal semantic similarity" will be obtained for each machining feature of the gear to be machined compared to historical gear machining case A. The average of these optimal semantic similarities is taken as the overall semantic similarity between the gear to be machined and historical gear machining case A. As shown in the following formula:
[0119]
[0120] In the formula, n is the total number of machining features in the gear to be machined.
[0121] Step 3.1.4: Calculate the comprehensive similarity between the gear to be processed and any historical gear processing case A in the gear processing knowledge graph;
[0122] First, the structural similarity and overall semantic similarity calculated in step 3.1.3 are normalized to eliminate the influence of dimensional differences;
[0123] Then, the two similarities after normalization are weighted and fused according to the set weight coefficients to generate a comprehensive similarity score for historical gear processing case A:
[0124]
[0125] in, The weighting coefficients were determined experimentally. The historical cases retrieved in real time have a higher degree of compatibility with the gears to be processed.
[0126] Step 3.1.5: Using the same method as in steps 3.1.3-3.1.4, calculate the overall similarity between the gear to be processed and the other historical gear processing cases in the gear processing knowledge graph.
[0127] Step 3.1.6: Based on the overall similarity ranking, retrieve the historical gear processing case with the highest overall similarity to the gear to be processed from the gear processing knowledge graph as the similar case of the current gear to be processed.
[0128] Step 4: Determine the comprehensive coverage of processing features;
[0129] Verify whether the similar cases retrieved in step 3 fully cover the processing features of the gear to be processed. If yes, proceed to step 6; otherwise, proceed to step 5.
[0130] Step 5: Query and complete the missing processes, and obtain the candidate process set after filtering;
[0131] For processing features that are not satisfied (not covered) in similar cases, use them as features to be completed and execute queries in the gear processing knowledge graph: Based on the predefined Cypher query statement template for querying the Neo4j graph database, use the unsatisfied (not covered) processing features as query keywords to fill in the Cypher query statement template, and the Neo4j graph database outputs the matching process methods.
[0132] The process methods output from the Neo4j graph database are filtered using quality constraints (such as accuracy grade and surface roughness) and real-time workshop resource status (such as equipment availability and tool inventory) as screening criteria to obtain the process methods that best match the features to be completed. These screening criteria can be implemented using graph pattern matching and attribute filtering in Cypher queries to ensure that the selected process methods meet both technical requirements and are feasible.
[0133] The selected process methods are used as a candidate process set, which, together with the similar cases retrieved in step 3, are used as inputs to the subsequent TCN model for process prediction.
[0134] Step 6: Process sequence sorting based on the TCN model;
[0135] Step 6.1: Build and train the TCN model for process sequencing;
[0136] Constructing the TCN model;
[0137] During the training phase, the input to the TCN model is a vectorized set of historical case features and their corresponding process methods, and its output is a complete gear machining process sequence that conforms to the machining logic and constraints.
[0138] The historical gear processing cases in the gear processing knowledge graph are divided into training and testing sets. The TCN model is trained using the training set and tested using the testing set. During the training process, the TCN model is supervised using the cross-entropy loss function until a TCN model with prediction accuracy that meets the design requirements is obtained.
[0139] It should be noted that the TCN model only needs to be built and trained before the actual process prediction. For example, the TCN model can be built and trained between steps 2 and 3, and then deployed in practice and used directly in process prediction.
[0140] The principle of TCN model for process sequencing and output:
[0141] By leveraging the sequence modeling capabilities of Temporal Convolutional Networks (TCNs), the discrete process selection problem is transformed into a continuous probability space optimization problem, ultimately outputting a process sequence that meets production constraints.
[0142] Process ordination prediction is essentially a stepwise autoregressive sequence expansion process. Given an initial empty sequence... Starting from an empty sequence, in each step of the decision-making process Based on the currently determined partial sequences Predicting the next most likely process The probability distribution of all candidate processes as the next step is calculated until a termination condition is met. The TCN model employs a dual termination condition to control the generation of the process sequence; termination occurs when either condition is met:
[0143] 1. Process Quantity Limit: The maximum number of processes is set. The TCN model sets a maximum number of process steps, which is a reasonable range derived from historical data analysis.
[0144] 2. Process Integrity Requirements: In addition to all actual processes (such as "turning", "grinding"), we will introduce a special sequence terminator in the vocabulary (e.g., <eos>The TCN model makes predictions at each step. <eos>It will also participate in probability calculations as a candidate "process". When the TCN model predicts the next step in the autoregressive generation process at a certain step... <eos>When the probability of a given outcome is highest, the process sequence is considered complete, and generation is immediately terminated. This design avoids invalid and redundant predictions while ensuring that the output sequence contains all necessary process steps.
[0145] The process sequencing can be formalized as a Markov decision process, where the state transition probabilities are parameterized by the TCN model, as shown in the equation:
[0146]
[0147] in, This indicates that a partially generated sequence is known. Under the premise that, the next process step is The probability of; Indicates having parameters The TCN model uses parameters θ, which were learned during the initial training phase. The output layer of the TCN model employs a softmax function to convert the prediction scores of all processes into probability values, ensuring that the sum of the probabilities of all candidate processes equals 1.
[0148] For the Each process The probability of it being selected for the next step is calculated using the following formula:
[0149]
[0150] In the formula, This represents the total number of candidate process categories (i.e., processes waiting to be sorted). For the first The logit value corresponding to the process, i.e., the first process... The original predicted score for each process. This probabilistic output provides a quantitative basis for subsequent decision-making strategies.
[0151] Step 6.2: Process prediction of the gear to be processed;
[0152] The vectorized set of machining features of the gear to be machined, the vectorized set of candidate processes (if any, they need to be input), and the vectorized similar cases (the vectorization method is the same as in step 3.1.2) are input into the trained TCN model. The TCN model sorts the process steps in the candidate process set and similar cases and outputs the predicted process of the gear to be machined.
[0153] Considering that in practical applications, process planning is often constrained by various real-world conditions, such as the real-time availability of machine tools in the workshop and the inventory status of specific cutting tools, and faces constraints from a pre-defined set of candidate processes, in one preferred embodiment of the present invention, a dedicated constraint handling mechanism is designed in the TCN model, which can dynamically adjust the prediction results based on the currently available process options.
[0154] The specific implementation method is as follows:
[0155] First, based on the constraints of the actual conditions, the currently available subset of processes is determined from the candidate process set and similar cases. , Let it be the first The effective candidate process index set at each step retains only the probability values of the selectable processes. The probabilities of all other processes are forcibly set to zero, thus mathematically eliminating all infeasible options. Then, the probability values of the available processes are renormalized, and the TCN model predicts the next process step based on these renormalized probability values. Its mathematical expression is shown below:
[0156]
[0157] For example, when the TCN model initially predicts a probability of 0.70 for "fine grinding of the outer diameter," 0.25 for "fine turning of the outer diameter," and a combined probability of 0.05 for other processes, if the high-precision grinding machine is unavailable, this mechanism will first set the probability of "fine grinding of the outer diameter" to zero, and then recalibrate the probability of "fine turning of the outer diameter" to approximately 0.833, making it the optimal feasible choice under the constraints. This ensures that the final generated process sequence is both technically sound and feasible in the field. This conditional probability renormalization operation ensures that the prediction results strictly adhere to production feasibility constraints, while retaining the TCN model's original judgment on the relative preference relationships between processes.
[0158] Step 7: Inspection of process rules;
[0159] The process rule verification method involves comparing the entire generated process sequence against a predefined rule base containing all known process constraints, one by one, in a thorough manner. The rule base is pre-built, and each rule in the base explicitly defines the relationships that must be satisfied between processes. However, the rule base is not simply stored as text clauses, but rather in a structured, machine-readable, and executable manner.
[0160] Obtain the complete process sequence generated by the TCN model, for example: [rough turning, semi-finish turning, quenching, finish grinding, cleaning]. Then, retrieve the first rule from the rule base and check if the entire process sequence generated by the TCN model satisfies this rule. For example, check the rule "roughing must precede semi-finishing; semi-finishing must precede finishing": traverse the sequence to confirm that "rough turning" precedes "semi-finish turning," and "semi-finish turning" precedes "finish grinding." If satisfied, the check passes. Then retrieve the second rule and check again if the entire sequence generated by the TCN model satisfies the second rule, and so on.
[0161] If the entire process sequence generated by the TCN model does not find any rule conflicts after process rule verification, it is output as the correct process plan. If a rule conflict is detected after process rule verification, the suggestion generation module is invoked. Based on the formal expression template of the corresponding rule (which includes the violating process, the reason for the violation, and improvement suggestions), and through parameter substitution, natural language correction suggestions with clear guidance are automatically constructed. For example, if the input process is {"finish machining one end", "rough machining one end"}, and a conflict is detected after process rule verification, the output natural language correction suggestions are shown in the table below:
[0162]
[0163] The above description uses a gear manufacturing process as an example to illustrate the present invention. In practice, the method of the present invention can be applied to other complex parts. For other complex parts, such as aero-engine blades, the principle and steps of the manufacturing process generation method are the same as those for gears, with the only difference being: the ontology modeling stage constructs an engine blade machining process ontology model; the enterprise gear process card in the data preprocessing object and knowledge extraction object is an enterprise engine blade process card; and the knowledge graph construction stage constructs an engine blade machining knowledge graph. After reading the technical solution of the present invention, those skilled in the art can directly apply the method of the present invention to different types of parts to generate corresponding manufacturing processes.< / eos> < / eos> < / eos>
Claims
1. A method for generating component processes based on an ontology reasoning model, characterized in that, Including the following steps: Step 1: Construct the component processing technology ontology model; Step 2: Under the constraints of the component processing technology ontology model, knowledge is extracted from the preprocessed general knowledge base of machining and enterprise component process cards using a large language model, and the extracted knowledge is used to construct a component processing knowledge graph. Step 3: For the current part to be processed, search for similar cases in the part processing knowledge graph; Step 4: Verify whether similar cases cover all processing features of the parts to be processed. If yes, proceed to step 7; otherwise, proceed to step 5. Step 5: Use the uncovered processing features as query keywords to search for matching process methods in the parts processing knowledge graph. Then, filter the queried process methods based on quality constraints and real-time workshop resource status to obtain a candidate process set. Step 6: Input the vectorized processing features, similar cases, and candidate process set of the parts to be processed into the trained TCN model. The TCN model outputs the predicted process of the parts to be processed, and proceed to step 8. Step 7: Input the vectorized processing features and similar cases of the parts to be processed into the trained TCN model. The TCN model outputs the predicted process of the parts to be processed, and proceed to step 8. Step 8: Use the pre-built rule base to check the predicted process. If a rule conflict is detected, construct and output correction suggestions based on the violation process and cause. If no conflict is detected, the predicted process solution output will be generated.
2. The component process generation method based on ontology reasoning model according to claim 1, characterized in that, Step 1 is as follows: Step 1.1: Construct the component processing technology body; Step 1.2, Part processing technology ontology: Create a part processing technology ontology model in the modeling tool.
3. The component process generation method based on ontology reasoning model according to claim 1, characterized in that, The method for preprocessing the general knowledge base for machining and the enterprise's component process cards in step 2 is as follows: For unstructured text in the general knowledge base of machining: long documents are split into semantically complete segments through text segmentation; heterogeneity of terminology is eliminated by constructing a thesaurus, so that the same feature is expressed by the same terminology; For structured data in the general knowledge base of machining: no preprocessing is performed; For enterprise component process cards: standardize the expression of the data; add text tags to the standardized enterprise component process cards to convert the data in the enterprise component process cards into a data format with clear semantic definitions that can be directly read and parsed by machines.
4. The component process generation method based on ontology reasoning model according to claim 3, characterized in that, The specific method for extracting knowledge in step 2 is as follows: First, a prompt word template constrained by the component processing technology ontology model is designed. The prompt word template adopts a hierarchical instruction architecture, which transforms ontology constraints into multi-dimensional prompt elements. The first layer of the prompt word template is a domain positioning prompt layer, which is used to define the core concept categories related to the component process generation task. The second layer of the prompt word template is the structured extraction result output template layer, which converts the class-subclass relationships in the component processing technology ontology model into JSON format. It requires the large language model to classify and output entities according to the predetermined categories of the five-tuple { "s": subject name, "st": subject type path, "r": relation type, "o": object name,"ot": object type path}. The third layer of the prompt word template is the relation generation rule layer, which guides the large language model to establish entity associations that conform to the logic of the component processing domain, and encodes the class hierarchy and relation logic in the component processing technology ontology model into LLM-parsable semantic rules. Then, the preprocessed general knowledge base for machining and enterprise component process cards are combined with prompt word templates, and knowledge is extracted from the general knowledge base for machining and enterprise component process cards using a large language model.
5. The component process generation method based on ontology reasoning model according to any one of claims 1-4, characterized in that, Step 3 involves retrieving similar cases by calculating the comprehensive similarity between the part to be processed and each historical part processing case in the part processing knowledge graph; the comprehensive similarity is a weighted fusion result of the structural similarity between the part to be processed and the historical part processing cases and the semantic similarity between the part to be processed and the historical part processing cases.
6. The component process generation method based on ontology reasoning model according to claim 5, characterized in that, The method for calculating the structural similarity between the part to be processed and any historical part processing case A in step 3 is as follows: in, For processing features The weighting function for all processing features The sum of their weights equals 1; The weight of a processing feature is dynamically adjusted based on its importance. The greater the impact of a processing feature on the function of the part itself, the higher its importance, and the higher its weight. It is a vectorized feature set of the parts to be processed; This is a vectorized set of processing features from historical parts processing cases; The method for calculating semantic similarity in step 3 is as follows: First, calculate a certain machining feature of the part to be processed. Compare with any historical component processing case A for a certain processing feature Semantic similarity: In the formula, For processing features Vectorized string; For processing features Vectorized string; Then, a certain machining feature in the part to be machined Semantic similarity is calculated between the part to be processed and the other processing features in historical part processing case A. The maximum value among all semantic similarities is taken as the processing feature of the part to be processed. The best semantic similarity with historical parts processing case A; Next, repeat the above process for the remaining processing features of the parts to be processed. Finally, obtain the best semantic similarity between each processing feature of the parts to be processed and the historical parts processing case A. Take the average of all the best semantic similarities as the overall semantic similarity between the parts to be processed and the historical parts processing case A. The method for calculating the overall similarity in step 3 is as follows: in, These are the weighting coefficients. The semantic similarity between the parts to be processed and historical parts processing case A.
7. The component process generation method based on ontology reasoning model according to claim 4, characterized in that, The quality constraints mentioned in step 5 include accuracy grade and surface roughness; the real-time resource status of the workshop includes equipment availability and tool inventory.
8. The component process generation method based on ontology reasoning model according to claim 4, characterized in that, The TCN model in step 6 also includes a constraint handling mechanism to dynamically adjust the prediction results of the TCN model based on currently available process options. The implementation method of the constraint handling mechanism is as follows: First, based on the constraints of the actual conditions, the currently available subset of processes is determined from the candidate process set and similar cases. ,Will Let it be the first The effective candidate process index set at each step retains only the probability values of the selectable processes. The probability of any process other than the one in question is forcibly set to zero, thus mathematically eliminating all infeasible options. Then, the probability values of the optional processes are renormalized, and the TCN model predicts the next process step based on the renormalized probability values.
9. The component process generation method based on ontology reasoning model according to claim 8, characterized in that, The rule base pre-built in step 8 includes multiple rules, each of which specifies the relationships that must be satisfied between processes.