GraphRAG-based large and small model collaborative process route generation method

By using a collaborative process route generation method based on large and small models under the graphRAG architecture, the problem of insufficient collaboration between large and small models in process planning is solved. This achieves the structuring of process knowledge and the integration of the production system, thereby improving the accuracy and interpretability of process planning.

CN121995876APending Publication Date: 2026-05-08CHONGQING UNIV
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHONGQING UNIV
Filing Date
2025-12-30
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

Existing process planning methods lack a collaborative mechanism between large and small models, resulting in a disconnect between semantic understanding and engineering calculations. Process knowledge is not structured, and the generated results lack interpretability and integration capabilities with the production system.

Method used

A graphRAG-based method for generating process routes using a large and small model collaboration is adopted. Through multimodal recognition and combination of prompt word templates, combined with a knowledge graph in the forging field for semantic calibration and logical reasoning, a structured process route is generated and integrated with the production system.

Benefits of technology

It improves the accuracy, interpretability, and integration capability of process solutions with production systems, ensures that the generated results conform to process logic constraints, and supports collaborative reasoning and traceability of multi-dimensional process knowledge.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121995876A_ABST
    Figure CN121995876A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of intelligent manufacturing, and particularly relates to a GraphRAG-based large and small model collaborative process route generation method, which comprises the following steps: S1, receiving multi-modal input data; generating a multi-modal cue word oriented to forging process planning; s2, inputting the multi-modal cue word into a cue word optimization module; encoding the multi-modal cue word into a query vector, executing mixed retrieval in the knowledge graph, and outputting an enhanced cue word in combination with a chain logic reasoning mechanism; s3, inputting the enhanced cue word into the large language model; performing global semantic reasoning and procedure path planning to generate structured process route data; and S4, performing multi-modal structured analysis on the structured process route data, and synchronously generating an interpretable process document, a visual process representation and structured process data which can be stored persistently. According to the method, the accuracy, the interpretability and the structuring degree of the process scheme and the integration capability with a production system can be synchronously improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of intelligent manufacturing technology, and in particular relates to a method for generating process routes based on graphRAG-based large and small models. Background Technology

[0002] With the deep integration of artificial intelligence and advanced manufacturing technologies, intelligent manufacturing has become a core driving force for the transformation and upgrading of industrial systems. Against this backdrop, process planning, as a crucial link in mechanical manufacturing, directly determines product quality, production efficiency, and resource utilization efficiency through its level of intelligence. Traditional process planning mainly relies on engineer experience or rule-based expert systems, which are insufficient to address the challenges posed by today's complex product structures, multi-material systems, and highly flexible production demands. Therefore, how to construct an intelligent planning method that can integrate multi-source heterogeneous data, possess deep knowledge reasoning capabilities, and generate structured, interpretable, and executable process routes has become a key technological bottleneck that urgently needs to be overcome in the field of intelligent manufacturing.

[0003] In recent years, Large Language Models (LLMs) have demonstrated great potential in process knowledge modeling and decision support due to their powerful semantic understanding and text generation capabilities. However, relying solely on large models for process route generation still faces significant limitations: on the one hand, large models lack the ability to accurately model and calculate engineering elements such as process mechanisms, equipment constraints, and material properties in the physical world, which can easily lead to "illusionary" outputs and make the generated results unreliable in engineering practice; on the other hand, although some studies have attempted to improve the performance of large models on specific tasks by fine-tuning or providing engineering hints (such as the intelligent process planning method based on large models proposed in patent CN117436236A), they have not effectively solved the problems of knowledge gaps and logical inconsistencies, making it difficult to guarantee the feasibility and consistency of process solutions.

[0004] Meanwhile, while small models designed for specific process tasks (such as quality prediction, parameter optimization, and correlation analysis) possess high-precision numerical computation capabilities, their context awareness is weak and their generalization range is limited, making them unable to independently complete global process planning tasks covering multiple processes and constraints. Therefore, achieving efficient synergy between the semantic reasoning advantages of large models and the precise computational capabilities of small models has become crucial for improving the overall performance of intelligent process generation systems. At the knowledge organization level, existing process knowledge largely exists in the form of unstructured documents, drawings, or database records, lacking unified semantic expression and logical connections. Even when some methods attempt to introduce geometric feature matching or rule engines (such as the automatic process specification generation method based on 3D model comparison proposed in patent CN106529028A), their knowledge expression remains limited to local features, failing to construct an explicit process knowledge graph covering multiple dimensions such as materials, equipment, processes, and constraints. Consequently, they cannot support cross-process logical reasoning, constraint propagation, and context consistency verification. This directly results in a lack of interpretability, robustness, and engineering feasibility in the generated process routes. Furthermore, most current process generation systems still output unstructured text or static tables, which not only make it difficult to intuitively present the temporal logic and dependencies of the process flow, but also cannot be seamlessly integrated with enterprise-level manufacturing execution systems (MES), product lifecycle management (PLM) and other platforms, which seriously restricts the traceability, reuse and closed-loop optimization capabilities of process data.

[0005] The root cause of the above problems is: (1) the lack of an effective collaboration mechanism between large and small models leads to the disconnect between semantic understanding and engineering calculation; (2) the lack of structured and graphical organization of process knowledge limits the reasoning depth and knowledge reuse efficiency of the system; and (3) the lack of standardized and structured expression of the generated results hinders the deep integration with the production system.

[0006] Therefore, how to simultaneously improve the accuracy, interpretability, structure, and integration capability with the production system of process solutions has become an urgent problem to be solved. Summary of the Invention

[0007] To address the shortcomings of the existing technologies, this invention provides a method for generating process routes based on graphRAG-based large and small models, which can simultaneously improve the accuracy, interpretability, structure, and integration capability with the production system of the process plan.

[0008] To solve the above-mentioned technical problems, the present invention adopts the following technical solution:

[0009] The method for generating process routes based on graphRAG-based large and small models includes the following steps:

[0010] S1. Receive multimodal input data; classify the multimodal input data into multiple categories using a multimodal recognition model to obtain single-modal data of multiple categories; for each category of single-modal data, call the corresponding prompt word template in the preset single-modal prompt word template library, fill in parameters and map rules according to the content of the single-modal data, and generate multiple single-modal prompt word fragments; combine the multiple single-modal prompt word fragments into multimodal prompt words for forging process planning;

[0011] S2. Input the multimodal prompts generated in S1 into the prompt optimization module. The prompt optimization module is based on the graphRAG architecture and relies on a pre-built forging domain knowledge graph. The knowledge graph contains multiple process-related entity nodes and semantic relationship edges representing logical constraints between entities. The prompt optimization module encodes the multimodal prompts into query vectors and performs a hybrid retrieval in the knowledge graph: on the one hand, it matches semantically similar entity nodes based on vector similarity; on the other hand, it performs path traversal and structured reasoning along the semantic relationship edges in the graph, thereby recalling knowledge subgraphs related to the current process context. Then, combined with a chain-like logical reasoning mechanism, it uses the knowledge subgraph to perform semantic calibration and context completion on the multimodal prompts and outputs enhanced prompts.

[0012] S3. Input the enhanced prompt words output in S2 into the large language model; the large language model parses the semantics of the enhanced prompt words, and according to the identified process planning task type, initiates a call request to the corresponding dedicated small model deployed in the model coordination server through a standardized function call interface; the dedicated small model is used to perform quality prediction, process parameter correlation analysis, or multi-objective parameter optimization tasks, and returns the corresponding calculation results; based on the enhanced prompt words and the calculation results returned by the dedicated small model, the large language model performs global semantic reasoning and process path planning to generate structured process route data;

[0013] S4. Perform multimodal structured parsing on the structured process route data generated in S3, extract process element information, and simultaneously generate interpretable process documents, visual process representations, and persistently stored structured process data to achieve integration of process data with the production execution system.

[0014] Compared with the prior art, the present invention has the following beneficial effects:

[0015] 1. Enhance the comprehensiveness and adaptability of process semantic understanding. Traditional methods typically rely on single text or structured parameter inputs, making it difficult to effectively integrate multi-source heterogeneous information such as drawings, images, and process documents. This solution, through a multimodal recognition and prompt word template combination mechanism, transforms different modal data into prompt word fragments in a unified semantic space and constructs multimodal prompt words oriented towards specific tasks. This significantly enhances the system's ability to understand complex process contexts, making the generation process more closely aligned with actual engineering scenarios.

[0016] 2. Enhance the depth and logical consistency of process knowledge utilization. Compared to existing methods that rely on isolated keyword matching or rule bases, this solution leverages a forging domain knowledge graph, implementing a hybrid mechanism of vector retrieval and graph structure reasoning within the graphRAG architecture. This not only recalls semantically similar knowledge nodes but also performs path reasoning along semantic relationship edges, thereby correcting ambiguity or missing information in prompts, ensuring that generated content conforms to process logic constraints, effectively suppressing the "illusion" of large models, and improving the engineering feasibility and consistency of the results.

[0017] 3. Achieving complementary advantages between large-scale semantic reasoning and small-scale precise computation. Existing purely large-scale model solutions lack the ability to quantitatively model physical processes, while purely small-scale model solutions struggle to complete global planning tasks. This solution, through a standardized function call interface, enables the large language model to understand the task semantics and, on demand, schedule dedicated small models to perform high-precision calculations such as quality prediction and parameter optimization, integrating the results into the final decision. This collaborative mechanism balances macroscopic path planning with the rationality of microscopic parameters, significantly improving the overall accuracy of the process plan.

[0018] 4. Output highly structured and integrable process results. Unlike traditional systems that only output unstructured text or static tables, this solution focuses on structured data from the generation stage, simultaneously parsing it into interpretable process documents, visual flowcharts, and standardized data formats. This not only facilitates engineers' understanding and review but also supports seamless integration with production execution systems such as MES and PLM, laying the foundation for the traceability, reuse, and closed-loop optimization of process data.

[0019] In summary, this method can simultaneously improve the accuracy, interpretability, structure, and integration capability with the production system of the process scheme.

[0020] Preferably, in S1, the multimodal input data includes at least two of the following: finished forging drawing, quality requirement text, order data, equipment parameters, and material properties.

[0021] This setup enables deep integration of multi-dimensional engineering contexts. Traditional process planning methods typically rely on a single type of input (such as drawings or process cards), making it difficult to fully reflect actual production constraints. This solution explicitly incorporates at least two types of heterogeneous data—forging drawings, material properties, equipment capabilities, quality indicators, and order requirements—into a unified processing framework. Through modal classification and prompt word template mapping, key elements such as geometric features, performance requirements, and capacity limitations are transformed into semantically consistent prompts. This allows the subsequent generation process to fully integrate design intent and manufacturing capabilities, significantly improving the real-world adaptability of the process solution.

[0022] Preferably, in S1, the multimodal recognition model adopts a multimodal Transformer architecture to classify the input data into image modality, natural language text modality, or structured numerical modality.

[0023] This setup enables high-precision, unified multimodal perception and classification. Traditional methods often require separate preprocessing modules for different modalities (such as images, text, and tables), resulting in complex and difficult-to-maintain systems. This solution employs a unified multimodal Transformer architecture, capable of end-to-end identification of the modality type (image modality, natural language text modality, or structured numerical modality) of the input data. This not only improves the accuracy of modality discrimination but also avoids redundancy and inconsistencies caused by multiple parsing engines, providing reliable and standardized modality labels for subsequent processing.

[0024] Preferably, in S1, the single-modal prompt word template library includes image prompt word templates, text prompt word templates, and numerical prompt word templates. Each template has preset parameter placeholders and combination rules, which are used to realize parameter replacement and rule mapping.

[0025] This setup achieves two key advantages: 1. Controllable conversion from multimodal input to standardized semantic prompts. Different modal data (such as forging images, quality text, and equipment parameters) have vastly different information organization formats. By pre-setting dedicated prompt word templates and placeholder rules for each modality, the system can accurately extract key information from the original input (such as geometric features, tolerance requirements, temperature ranges, etc.) and fill it into a unified semantic framework. This avoids semantic drift caused by free generation and ensures that the prompt content is both faithful to the original input and conforms to the understanding specifications of the large model.

[0026] 2. Improve the semantic accuracy and task orientation of generated prompts. Compared to the reliance on manual writing or simple splicing in general prompt engineering, this solution achieves automated logical mapping through domain rules embedded in templates (such as "material X needs to be preheated to Y℃"). This ensures that the generated prompts not only contain factual descriptions but also implicitly contain process constraints and decision-making clues. This structured guidance significantly enhances the relevance and rationality of subsequent large-scale model reasoning, reducing invalid or conflicting outputs.

[0027] 3. Enhance system maintainability and knowledge scalability. Single-modal prompt templates are organized in a modular fashion, supporting on-demand updates or expansions. For example, when a new material type or equipment model is added, only the new parameter rules need to be added to the corresponding template, without refactoring the entire prompt generation process. This design allows process knowledge to be explicitly and auditably stored in the template library, facilitating engineering experts' participation in optimization and improving the system's adaptability to new scenarios.

[0028] Preferably, in S2, the forging domain knowledge graph includes various types of entity nodes and semantic relationship edges connecting the entity nodes; wherein, the types of the entity nodes include product type, process stage, equipment capability, material properties, and quality indicators; the semantic relationship edges are used to characterize at least one of process constraints, material adaptability, or equipment compatibility.

[0029] This setup achieves two key advantages: 1. It enables the explicit and structured expression of process knowledge. Traditional process knowledge often exists in the form of unstructured documents or implicit experience, making it difficult for intelligent systems to directly utilize. This solution, by defining multi-dimensional entity types and semantic relationships, transforms scattered process rules (such as "a certain material is only suitable for a specific heating temperature range" or "a certain piece of equipment cannot complete high-precision final forging") into nodes and edges in a graph. This gives domain knowledge a machine-readable and reasonable structure, providing a solid foundation for subsequent intelligent decision-making.

[0030] 2. Supports context-aware, precise knowledge retrieval and logical calibration. Within the graphRAG framework, the system not only retrieves semantically similar entities based on vector similarity but also traverses paths along semantic relationships (e.g., from "material properties" → "applicable process stage" → "matching equipment capabilities") to construct a knowledge subgraph highly relevant to the current task. This hybrid retrieval mechanism significantly outperforms traditional keyword matching or isolated vector retrieval, effectively identifying implicit constraints and semantically calibrating ambiguous, missing, or conflicting information in initial prompts, thereby improving the engineering rationality of the generated content.

[0031] 3. Enhanced Collaborative Reasoning Capabilities Amidst Cross-Dimensional Process Constraints. Forging processes involve strong coupling of multiple factors such as materials, equipment, quality, and procedures. This solution explicitly connects entities of different dimensions through semantic relationship edges (e.g., "Material A → Adaptation → Heating Process B", "Equipment C → Incompatibility → Tolerance Requirement D"), enabling the system to automatically propagate constraints during reasoning and avoid generating process routes that violate physical laws or production line capabilities. Compared to the limitations of existing methods that treat elements in isolation, this design achieves true multi-dimensional collaborative reasoning.

[0032] 4. Enhance the interpretability and traceability of generated results. Since each relationship in the knowledge graph corresponds to a clear engineering rule, when optimizing prompts or generating process routes, the system can trace back to the specific entities and relationship paths upon which it is based (e.g., "This heating temperature was chosen because the phase transition point of material X is Y"). This transparent reasoning chain not only facilitates engineer review and verification but also provides auditable evidence for subsequent process optimization, fault attribution, and knowledge iteration.

[0033] Preferably, in S3, if the calculation result returned by the dedicated small model conflicts with the process constraints, a retry mechanism is triggered to re-call the small model or adjust the prompt words until structured process route data that meets the constraints is generated.

[0034] This setup ensures: 1. The engineering feasibility and constraint consistency of the process solution. Traditional large-model-driven generation methods often lack closed-loop verification of the consistency between calculation results and physical / process constraints, easily resulting in theoretically reasonable but practically infeasible solutions. This solution explicitly verifies the results returned by the small model against the constraints defined in the knowledge graph. Once a conflict is found, a correction process is initiated, fundamentally avoiding "seemingly reasonable but actually ineffective" process outputs and significantly improving the engineering feasibility of the final solution.

[0035] 2. Implementing feedback-driven optimization in large-small model collaboration. Existing large-small model collaboration methods are mostly one-way calls, lacking evaluation and feedback on the output quality of the small model. This solution introduces a retry mechanism, constructing a closed-loop collaboration paradigm of "large model planning—small model calculation—constraint verification—feedback correction". This iterative optimization capability enables the system to adaptively handle abnormal outputs of the small model caused by input bias, parameter sensitivity, or model limitations, enhancing the overall system's robustness and fault tolerance.

[0036] Preferably, in S2, the chain-like logical reasoning mechanism is used to perform consistency verification and context completion on the recalled knowledge subgraph, so as to suppress the illusionary output of the large language model.

[0037] This setup, by embedding a chain-like logical reasoning mechanism within the graphRAG framework, enables in-depth verification and intelligent completion of knowledge subgraphs. It effectively integrates the rigor of symbolic reasoning with the flexibility of large-scale model generation, significantly improving the reliability, completeness, and credibility of the generated results while ensuring the logical consistency of the process solution.

[0038] Preferably, in S3, the model coordination server is an MCP Server, which uniformly encapsulates and deploys all dedicated small models and algorithms, provides standardized interfaces that conform to the MCP specification, and supports functional tool calls or remote procedure calls.

[0039] This setup achieves: 1. Unified management and efficient scheduling of dedicated small models. In traditional systems, various small models (such as quality prediction, parameter optimization, and material performance analysis) are often deployed as independent services, with inconsistent interfaces, complex calls, and difficulty in collaboration. This solution centrally encapsulates and registers all small models through an MCP Server (Model Coordination Protocol Server), exposing standardized interfaces based on a unified protocol. This allows large language models to accurately call the required capabilities according to task semantics, significantly improving model scheduling efficiency and system integration.

[0040] 2. Enhanced interoperability and scalability of large and small models. The MCP specification defines clear input / output formats, calling contracts, and error handling mechanisms, allowing large models to safely call functions without needing to understand the internal implementation details of small models. This decoupled design not only reduces system coupling but also facilitates the addition or replacement of small models (such as introducing new multi-objective optimization algorithms) without modifying the logic of the large model, greatly improving the flexibility and evolvability of the entire process generation system.

[0041] 3. Ensuring the reliability and controllability of the invocation process. By supporting functional tool calls and Remote Procedure Calls (RPC), MCP Server can uniformly monitor, log, and capture exceptions during the execution of small models. When a small model returns an abnormal result or times out, the system can quickly respond using the retry mechanism in S3, ensuring the stability of the overall process. Compared to direct embedding or hard-coded invocation methods, this architecture significantly improves the operational reliability and controllability in industrial scenarios.

[0042] Preferably, in S3, the special small model includes a special small model for die forging and a special small model for free forging.

[0043] This setup, by deploying dedicated small models for die forging and free forging, enables refined modeling and precise calculation of the characteristics of different forging processes. It not only improves the accuracy and professionalism of the collaboration between large and small models, but also provides scalable and evolvable technical support for intelligent forging systems that integrate multiple processes.

[0044] Preferably, in S4, the interpretable process document is a printable process card, the visualized process is a process flow diagram rendered based on the relationship between process nodes and flow direction, and the persistently stored structured process data is written into a relational database to form a process database instance.

[0045] This setup enables a multi-dimensional, multi-role-friendly presentation of technological achievements. Different users have varying needs for technological information: engineers require printable, standardized process cards for on-site guidance, managers focus on process logic and node dependencies, and IT systems rely on structured data for integration. This solution generates and outputs three formats simultaneously—industry-standard compliant process documents (such as PDF format), graphical process flow diagrams, and machine-readable structured data—in a single step, meeting the needs of the entire chain from the operational level to the management level and then to the system level, significantly improving the practicality and breadth of coverage of technological achievements. Attached Figure Description

[0046] To make the objectives, technical solutions, and advantages of the invention clearer, the invention will now be described in further detail with reference to the accompanying drawings, wherein:

[0047] Figure 1 This is a flowchart of the method;

[0048] Figure 2 A flowchart is set up for the example scenario in Example 2;

[0049] Figure 3 A flowchart for constructing multimodal cue words in Example 2;

[0050] Figure 4 This is a flowchart of the multimodal process card construction process in Example 2. Detailed Implementation

[0051] The following detailed explanation illustrates the specific implementation methods:

[0052] Example 1

[0053] like Figure 1 As shown, this embodiment discloses a method for generating process routes based on graphRAG-based large and small models, including the following steps:

[0054] S1. Receive multimodal input data; classify the multimodal input data into multiple categories using a multimodal recognition model to obtain single-modal data of multiple categories; for each category of single-modal data, call the corresponding prompt word template in the preset single-modal prompt word template library, fill in parameters and map rules according to the content of the single-modal data to generate multiple single-modal prompt word fragments; combine the multiple single-modal prompt word fragments into multimodal prompt words for forging process planning.

[0055] The multimodal input data includes at least two categories from forging finished product drawings, quality requirement text, order data, equipment parameters, and material properties. This enables deep integration of multi-dimensional engineering contexts. Traditional process planning methods typically rely on only a single type of input (such as drawings or process cards), making it difficult to fully reflect actual production constraints. This solution explicitly incorporates at least two types of heterogeneous data, such as forging finished product drawings, material properties, equipment capabilities, quality indicators, and order requirements, into a unified processing framework. Through modal classification and prompt word template mapping, key elements such as geometric features, performance requirements, and capacity limitations are transformed into semantically consistent prompt information. This allows the subsequent generation process to fully integrate design intent and manufacturing capabilities, significantly improving the real-world adaptability of the process solution.

[0056] In practical implementation, the multimodal recognition model adopts a multimodal Transformer architecture to classify input data into image modality, natural language text modality, or structured numerical modality. Traditional methods often require designing separate preprocessing modules for different modalities (such as images, text, and tables), resulting in complex and difficult-to-maintain systems. This solution uses a unified multimodal Transformer architecture, enabling end-to-end identification of the modality type (image modality, natural language text modality, or structured numerical modality) of the input data. This not only improves the accuracy of modality discrimination but also avoids redundancy and inconsistency caused by multiple parsing engines, providing reliable and standardized modality labels for subsequent processing.

[0057] In practice, the single-modal prompt word template library includes image prompt word templates, text prompt word templates, and numerical prompt word templates. Each template has preset parameter placeholders and combination rules to realize parameter replacement and rule mapping.

[0058] In this way, different modal data (such as forging images, quality text, and equipment parameters) have distinct information organization forms. By pre-setting dedicated prompt word templates and placeholder rules for each modality, the system can accurately extract key information from the original input (such as geometric features, tolerance requirements, temperature ranges, etc.) and fill it into a unified semantic framework, avoiding semantic drift caused by free generation and ensuring that the prompt content is both faithful to the original input and conforms to the understanding specifications of the large model. In addition, compared to the method of relying on manual writing or simple splicing in general prompt engineering, this solution achieves automated logical mapping through domain rules embedded in the template (such as "material X needs to be preheated to Y℃"), so that the generated prompt words not only contain factual descriptions but also implicitly contain process constraints and decision clues. This structured guidance significantly enhances the relevance and rationality of subsequent large model reasoning and reduces invalid or conflicting outputs. Furthermore, the single-modal prompt word templates are organized in a modular form, supporting updates or expansions as needed. For example, when adding a new material type or equipment model, only new parameter rules need to be added to the corresponding template, without reconstructing the entire prompt generation process. This design allows process knowledge to be explicitly and auditably stored in the template library, facilitating optimization by engineering experts and enhancing the system's adaptability to new scenarios.

[0059] S2. Input the multimodal prompts generated in S1 into the prompt optimization module. The prompt optimization module is based on the graphRAG (Graph-based Retrieval-Augmented Generation) architecture and relies on a pre-built forging domain knowledge graph. The knowledge graph contains multiple process-related entity nodes and semantic relationship edges representing logical constraints between entities. The prompt optimization module encodes the multimodal prompts into query vectors and performs a hybrid retrieval in the knowledge graph: on the one hand, it matches semantically similar entity nodes based on vector similarity; on the other hand, it performs path traversal and structured reasoning along the semantic relationship edges in the graph to recall knowledge subgraphs related to the current process context. Then, combined with a chain-like logical reasoning mechanism, it uses the knowledge subgraph to perform semantic calibration and context completion on the multimodal prompts and outputs enhanced prompts.

[0060] In practical implementation, the chain-like logical reasoning mechanism is used to perform consistency verification and context completion on the recalled knowledge subgraphs to suppress the illusionary output of large language models. By embedding the chain-like logical reasoning mechanism into the graphRAG framework, this solution achieves deep verification and intelligent completion of knowledge subgraphs, effectively integrating the rigor of symbolic reasoning with the generation flexibility of large models. While ensuring the logical consistency of the process solution, it significantly improves the reliability, completeness, and credibility of the generated results.

[0061] In specific implementation, the knowledge graph in the forging field includes various types of entity nodes and semantic relationship edges connecting entity nodes; wherein, the types of entity nodes include product type, process stage, equipment capability, material properties and quality indicators; the semantic relationship edges are used to represent at least one of process constraints, material adaptability or equipment compatibility.

[0062] Traditional process knowledge often exists in the form of unstructured documents or implicit experience, making it difficult for intelligent systems to directly utilize. This solution defines multi-dimensional entity types and semantic relationships, transforming scattered process rules (such as "a certain material is only suitable for a specific heating temperature range" or "a certain piece of equipment cannot complete high-precision final forging") into nodes and edges in a graph. This gives domain knowledge a machine-readable and reasonable structure, providing a solid foundation for subsequent intelligent decision-making. Furthermore, within the graphRAG framework, the system not only retrieves semantically similar entities based on vector similarity but also traverses paths along semantic relationship edges (e.g., from "material properties" → "applicable process stage" → "matching equipment capabilities"), constructing a knowledge subgraph highly relevant to the current task. This hybrid retrieval mechanism significantly outperforms traditional keyword matching or isolated vector retrieval, effectively identifying implicit constraints and semantically calibrating ambiguous, missing, or conflicting information in initial prompts, thereby improving the engineering rationality of the generated content.

[0063] Furthermore, the forging process involves strong coupling of multiple factors such as materials, equipment, quality, and procedures. This solution explicitly connects entities of different dimensions through semantic relationship edges (e.g., "Material A → Adaptation → Heating Process B", "Equipment C → Incompatibility → Tolerance Requirement D"), enabling the system to automatically propagate constraints during reasoning and avoid generating process routes that violate physical laws or production line capabilities. Compared to the limitations of existing methods that treat each element in isolation, this design achieves true multi-dimensional collaborative reasoning. In addition, since each relationship in the knowledge graph corresponds to a clear engineering rule, the system can trace back to the specific entities and relationship paths it relies on when optimizing prompts or generating process routes (e.g., "This heating temperature is chosen because the phase transition point of material X is Y"). This transparent reasoning link not only facilitates engineer review and verification but also provides auditable evidence for subsequent process optimization, fault attribution, and knowledge iteration.

[0064] S3. Input the enhanced prompt words output in S2 into the large language model; the large language model parses the semantics of the enhanced prompt words, and according to the identified process planning task type, initiates a call request to the corresponding dedicated small model deployed in the model coordination server through a standardized function call interface; the dedicated small model is used to perform quality prediction, process parameter correlation analysis, or multi-objective parameter optimization tasks, and returns the corresponding calculation results; based on the enhanced prompt words and the calculation results returned by the dedicated small model, the large language model performs global semantic reasoning and process path planning to generate structured process route data. In specific implementation, process route data in JSON format is generated.

[0065] The dedicated small models include a die forging-specific small model and a free forging-specific small model. By deploying these dedicated small models, this solution achieves refined modeling and precise calculation of the characteristics of different forging processes. This not only improves the accuracy and professionalism of the collaboration between large and small models but also provides scalable and evolvable technical support for intelligent forging systems oriented towards multi-process integration.

[0066] In practice, the model coordination server is the MCP Server, which uniformly encapsulates and deploys all dedicated small models and algorithms, provides standardized interfaces that conform to the MCP specification, and supports functional tool calls or remote procedure calls.

[0067] In traditional systems, various small models (such as quality prediction, parameter optimization, and material performance analysis) are often deployed as independent services, with inconsistent interfaces, complex calls, and difficulties in collaboration. This solution centrally encapsulates and registers all small models through the MCP Server (ModelCoordination Protocol Server), exposing standardized interfaces based on a unified protocol. This allows large language models to accurately call the required capabilities according to task semantics, significantly improving model scheduling efficiency and system integration. Furthermore, the MCP specification defines clear input / output formats, calling contracts, and error handling mechanisms, enabling large models to safely call the functions of small models without needing to understand their internal implementation details. This decoupled design not only reduces system coupling but also facilitates the addition or replacement of small models (such as introducing new multi-objective optimization algorithms) without modifying the logic of the large model, greatly enhancing the flexibility and evolvability of the entire process generation system. In addition, by supporting functional tool calls and Remote Procedure Calls (RPC), the MCP Server can uniformly monitor, log, and capture anomalies during the execution of small models. When a small model returns abnormal results or times out, the system can quickly respond using the retry mechanism in S3, ensuring overall process stability. Compared to direct embedding or hard-coded calling methods, this architecture significantly improves operational reliability and controllability in industrial scenarios.

[0068] In practice, if the calculation results returned by the dedicated small model conflict with the process constraints, a retry mechanism is triggered to re-call the small model or adjust the prompt words until structured process route data that meets the constraints is generated.

[0069] This approach ensures the engineering feasibility and constraint consistency of the process design. Traditional large-model-driven generation methods often lack closed-loop verification of the consistency between calculation results and physical / process constraints, easily leading to theoretically reasonable but practically infeasible solutions. This solution explicitly verifies the results returned by the small model against the constraints defined in the knowledge graph. Upon detecting a conflict, a correction process is initiated, fundamentally avoiding "seemingly reasonable but actually ineffective" process outputs and significantly improving the engineering feasibility of the final solution. Furthermore, existing collaboration between large and small models is mostly unidirectional, lacking dynamic evaluation and feedback on the output quality of the small model. This solution introduces a retry mechanism, constructing a closed-loop collaborative paradigm of "large model planning—small model calculation—constraint verification—feedback correction." This iterative optimization capability enables the system to adaptively handle abnormal outputs from small models caused by input bias, parameter sensitivity, or model limitations, enhancing the overall system's robustness and fault tolerance.

[0070] S4. Perform multimodal structured parsing on the structured process route data generated in S3, extract process element information, and simultaneously generate interpretable process documents, visual process representations, and persistently stored structured process data to achieve integration of process data with the production execution system.

[0071] In practical implementation, the interpretable process document is a printable process card, the visualized process is a process flow diagram rendered based on the relationship between process nodes and flow direction, and the persistently stored structured process data is written into a relational database to form a process database instance. This allows for a multi-dimensional, multi-role-friendly presentation of process results. Different users have different needs for process information: engineers require printable, standardized process cards for on-site guidance, managers focus on process logic and node dependencies, and IT systems rely on structured data for integration. This solution generates and outputs three forms simultaneously at once—industry-standard compliant process documents (such as PDF process cards generated using pdfLaTeX), graphical process flow diagrams, and machine-readable structured data—meeting the needs of the entire chain from the operational level to the management level and then to the system level, significantly improving the practicality and coverage of process results.

[0072] Traditional methods typically rely on single text or structured parameter inputs, making it difficult to effectively integrate heterogeneous information from multiple sources such as drawings, images, and process documents. This solution utilizes a multimodal recognition and prompt word template combination mechanism to transform different modal data into prompt word fragments within a unified semantic space. It also constructs multimodal prompt words tailored to specific tasks, significantly enhancing the system's ability to understand complex process contexts and making the generation process more aligned with real-world engineering scenarios. Furthermore, compared to existing methods that rely on isolated keyword matching or rule bases, this solution leverages a forging domain knowledge graph, implementing a hybrid mechanism of vector retrieval and graph structure reasoning within the graphRAG architecture. This not only recalls semantically similar knowledge nodes but also performs path reasoning along semantic relationship edges, thereby correcting ambiguity or missing information in the prompt words, ensuring that the generated content conforms to process logic constraints, effectively suppressing the "illusion" of large models, and improving the engineering feasibility and consistency of the results. Moreover, existing purely large-model solutions lack the ability to quantitatively model physical processes, while purely small-model solutions struggle to complete global planning tasks. This solution utilizes a standardized function call interface, enabling a large language model to understand the task semantics and then schedule dedicated smaller models to perform high-precision calculations such as quality prediction and parameter optimization as needed, integrating the results into the final decision. This collaborative mechanism balances macro-level path planning with the rationality of micro-level parameters, significantly improving the overall accuracy of the process plan. Furthermore, unlike traditional systems that only output unstructured text or static tables, this solution focuses on structured data from the generation stage, simultaneously parsing it into interpretable process documents, visual flowcharts, and standardized data formats. This not only facilitates engineer understanding and review but also supports seamless integration with production execution systems such as MES and PLM, laying the foundation for the traceability, reuse, and closed-loop optimization of process data.

[0073] This method addresses the problems of reliance on human experience, complex path reasoning, and low knowledge utilization in process planning, thereby achieving intelligent, automated, and interpretable process planning, and improving production efficiency and product quality. This method can simultaneously improve the accuracy, interpretability, structure, and integration capability of process solutions with the production system.

[0074] Example 2

[0075] To help those skilled in the art better understand this method, the following examples are provided.

[0076] This example employs a B / S (Browser / Server) architecture. The front-end uses the layui framework to implement the user interface, while the back-end uses the Spring Boot framework to handle business logic. For data storage, MySQL is used as the relational database, and Neo4j is used as the graph database to support the management and querying of the entire forging process knowledge graph. This example demonstrates the generation of a die forging process route, as shown in the flowchart below. Figure 2As shown.

[0077] 1. Multimodal cue word construction

[0078] Users submit multimodal forging data, including CAD drawings of the finished forging, textual quality requirements, and material properties. The system invokes a modal recognition algorithm, which automatically classifies the input data based on a multimodal Transformer architecture: CAD drawings are identified as "image modality," quality requirements as "text modality," and material parameters as "structured numerical modality." Subsequently, the system matches corresponding templates from a pre-defined single-modal prompt word template library. Image templates contain geometric parameter placeholders, text templates contain quality constraint placeholders, and numerical templates contain equipment and material placeholders. The system then performs parameter replacement and rule mapping to generate initial multimodal prompt words.

[0079] 2. Optimization of prompt words

[0080] The generated multimodal prompt input is based on the graphRAG prompt enhancement algorithm. This algorithm incorporates a knowledge graph of the entire forging process stored in Neo4j. Graph nodes include key entities such as "forging type," "process stage," "equipment capability," "material properties," and "quality indicators," while edge relationships represent logical rules such as process constraints, material adaptability, and equipment compatibility. A hybrid retrieval mechanism is employed: on one hand, a vector encoder semantically embeds the prompts and performs similarity matching with pre-computed node vectors in the knowledge graph to recall semantically relevant entities; on the other hand, multi-hop path traversal is performed based on the graph structure to mine implicit process association rules. Subsequently, a rule-guided graph reasoning mechanism is used to verify the logical consistency and complete the context of the recalled results. The final output is an enhanced prompt containing knowledge of the forging domain, logically consistent, and with complete context. The flowchart is shown below. Figure 3 As shown.

[0081] 3. Process route generation

[0082] First, the client establishes a connection with the MCP Server via Streamable HTTP, obtaining a list of registered models and algorithms from the MCP Server through a three-way handshake. The first handshake confirms the MCP versions used by both the client and the MCP Server, as well as the capabilities supported by the MCP Server. The second handshake prevents the MCP Server from pushing messages before the client is ready, ensuring timing safety. The third handshake allows the client to obtain the list of registered models and algorithms from the MCP Server.

[0083] The enhanced prompts, along with a list of model algorithms registered in the MCP Server, are sent to the large model. After parsing the semantics of the prompts, the large model identifies the model algorithm required for the current process planning task. Through the functional tool interface provided by the MCP Server, the large model returns a call command. The system then initiates a call request to the MCP Server, calling models such as "Turbine Disk Quality Prediction" from the model library to obtain the calculation results. The MCP Server encapsulates the small model's response and returns it to the system. The system integrates the enhanced prompts and the small model's calculation results, returning them to the large model. The large model performs global semantic reasoning and path planning, generating a JSON-formatted turbine disk process route, including process sequence, equipment configuration, quality control points, and other information. If the model's calculation results do not match the process requirements, the above steps are repeated.

[0084] Finally, the generated JSON-formatted turbine disk process route is input into the structured data generation method. This method first parses the JSON content, extracting process nodes, process names, and process requirements. Then, it generates three output formats in parallel: PDF format using the pdfLaTeX engine; process flow diagram rendering using the Graphviz engine; and a database instance definition, mapping the process route to a structured table in MySQL and writing it to the process database to achieve persistent storage and version management of the process data. The generation process is as follows: Figure 4 As shown.

[0085] This method first extracts multimodal input data from the order context, including forging CAD drawings, quality requirements, and forging attributes. Then, a modal recognition algorithm is invoked to automatically classify the input data, and initial multimodal prompts are generated based on a single-modal prompt template library. Next, these prompts are input into a graphRAG-based prompt optimization algorithm, which, through hybrid retrieval and chained reasoning, outputs enhanced prompts containing forging domain knowledge. Subsequently, the system submits the enhanced prompts and the list of model algorithms registered with the MCP Server to the large model. The large model returns a call instruction, and the system initiates a call request, dynamically calling registered models such as "turbine disk quality prediction" through the MCP Server to obtain the calculation results returned by the models. The large model integrates the semantics of the prompts with the model calculation results to generate a complete process route in JSON format.

[0086] After the process route is generated, the engine calls the structured data generation method: on the one hand, it calls the pdfLaTeX engine to generate PDF process cards for printing in the workshop; on the other hand, it renders the process flow diagram through Graphviz; simultaneously, it writes the structured process data into the MySQL process database, forming a queryable and reusable persistent record. If the results returned by the small model conflict with the process constraints, the system will automatically trigger a retry mechanism until the constraints are met.

[0087] This invention aims to apply a collaborative mechanism between large and small models in digital environments such as smart manufacturing workshops to the field of process planning. This invention can effectively integrate multimodal data to construct prompts and operating rules oriented towards process themes. At the same time, relying on MCP Server, the algorithm and model are uniformly encapsulated as services, and through the collaborative reasoning mechanism of large model driving small model, the intelligent generation and automatic verification of process paths can be realized, thereby promoting the deep empowerment and practical application of artificial intelligence in the field of process planning.

[0088] 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 the technical solutions. Those skilled in the art should understand that any modifications or equivalent substitutions to the technical solutions of the present invention without departing from the spirit and scope of the present invention should be covered within the scope of the claims of the present invention.

Claims

1. A method for generating process routes based on graphRAG-based large and small models, characterized in that, Includes the following steps: S1. Receive multimodal input data; perform modal classification on the multimodal input data using a multimodal recognition model to obtain single-modal data of multiple categories; For each type of monomodal data, the corresponding prompt word template in the preset monomodal prompt word template library is called, and parameters are filled and rules are mapped according to the content of the monomodal data to generate multiple monomodal prompt word fragments; The multiple single-modal prompt word fragments are combined into multimodal prompt words for forging process planning; S2. Input the multimodal prompts generated in S1 into the prompt optimization module. The prompt optimization module is based on the graphRAG architecture and relies on a pre-built forging domain knowledge graph. The knowledge graph contains multiple process-related entity nodes and semantic relationship edges representing logical constraints between entities. The prompt optimization module encodes the multimodal prompts into query vectors and performs hybrid retrieval in the knowledge graph: on the one hand, it matches semantically similar entity nodes based on vector similarity; on the other hand, it performs path traversal and structured reasoning along the semantic relationship edges in the graph, thereby recalling the knowledge subgraph related to the current process context. Furthermore, by combining the chain-based logical reasoning mechanism, the knowledge subgraph is used to perform semantic calibration and context completion on the multimodal prompt words, and outputs enhanced prompt words; S3. Input the enhanced prompt words output in S2 into the large language model; the large language model parses the semantics of the enhanced prompt words, and according to the identified process planning task type, initiates a call request to the corresponding dedicated small model deployed in the model coordination server through a standardized function call interface; the dedicated small model is used to perform quality prediction, process parameter correlation analysis or multi-objective parameter optimization tasks, and returns the corresponding calculation results; The large language model performs global semantic reasoning and process path planning based on the enhanced prompt words and the calculation results returned by the dedicated small model, generating structured process route data. S4. Perform multimodal structured parsing on the structured process route data generated in S3, extract process element information, and simultaneously generate interpretable process documents, visual process representations, and persistently stored structured process data to achieve integration of process data with the production execution system.

2. The method for generating large and small collaborative process routes based on graphRAG as described in claim 1, characterized in that: In S1, the multimodal input data includes at least two of the following: finished forging drawing, quality requirement text, order data, equipment parameters, and material properties.

3. The method for generating large and small collaborative process routes based on graphRAG as described in claim 1, characterized in that: In S1, the multimodal recognition model adopts a multimodal Transformer architecture to classify input data into image modality, natural language text modality, or structured numerical modality.

4. The method for generating large and small collaborative process routes based on graphRAG as described in claim 1, characterized in that: In S1, the single-modal prompt word template library includes image prompt word templates, text prompt word templates, and numerical prompt word templates. Each template has preset parameter placeholders and combination rules, which are used to realize parameter replacement and rule mapping.

5. The method for generating large and small collaborative process routes based on graphRAG as described in claim 1, characterized in that: In S2, the forging domain knowledge graph includes various types of entity nodes and semantic relationship edges connecting entity nodes; wherein, the types of entity nodes include product type, process stage, equipment capability, material properties and quality indicators; the semantic relationship edges are used to characterize at least one of process constraints, material adaptability or equipment compatibility.

6. The method for generating large and small collaborative process routes based on graphRAG as described in claim 5, characterized in that: In S3, if the calculation results returned by the dedicated small model conflict with the process constraints, a retry mechanism is triggered to call the small model again or adjust the prompt words until structured process route data that meets the constraints is generated.

7. The method for generating collaborative process routes based on graphRAG-based large and small models as described in claim 1, characterized in that: In S2, the chain-based logical reasoning mechanism is used to perform consistency verification and context completion on the recalled knowledge subgraphs in order to suppress the illusionary output of the large language model.

8. The method for generating collaborative process routes based on graphRAG-based large and small models as described in claim 1, characterized in that: In S3, the model coordination server is the MCP Server, which uniformly encapsulates and deploys all dedicated small models and algorithms, provides standardized interfaces that conform to the MCP specification, and supports functional tool calls or remote procedure calls.

9. The method for generating collaborative process routes based on graphRAG-based large and small models as described in claim 1, characterized in that: In S3, the special small model includes a special small model for die forging and a special small model for free forging.

10. The method for generating large and small collaborative process routes based on graphRAG as described in claim 1, characterized in that: In S4, the interpretable process document is a printable process card, the visualized process is a process flow diagram rendered based on the relationship between process nodes and flow direction, and the persistently stored structured process data is written into a relational database to form a process database instance.

Citation Information

Patent Citations

  • Technological procedure automatic generating method

    CN106529028A