Application system and method of self-adaptive RAG frame in titanium alloy casting process optimization based on large model
By optimizing the titanium alloy casting process using an adaptive RAG framework based on a large model, efficient and accurate process parameter optimization was achieved, solving the problems of long optimization cycles and high costs in traditional methods, and improving the system reliability and efficiency of process parameters.
Patent Information
- Application Number
- CN202511468896.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-15
- Publication Date
- 2026-01-27
Smart Images

Figure CN121415940A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of intelligent manufacturing and metal material processing technology, specifically to an application system and method of an adaptive RAG framework based on a large model in the optimization of titanium alloy casting process. Background Technology
[0002] The titanium alloy casting process is characterized by multi-physics coupling, strong nonlinearity, high dependence on experience, and complex process parameters. Traditional methods mainly rely on expert experience, experimental trial and error, and computer-aided engineering (CAE) simulation, which suffers from long optimization cycles, high costs, and a lack of systematic knowledge reuse. Although some studies have attempted to introduce artificial intelligence technology into process optimization, there are still significant shortcomings in areas such as domain knowledge embedding, physical constraint satisfaction, and real-time response. Summary of the Invention
[0003] This invention aims to provide an application system and method for optimizing titanium alloy casting process using an adaptive RAG framework based on a large model, thereby achieving intelligent optimization of titanium alloy casting process parameters and significantly improving optimization efficiency, parameter accuracy, and system reliability.
[0004] The technical solution adopted in this invention is:
[0005] The application system of the large-model-based adaptive RAG framework in the optimization of titanium alloy casting process includes:
[0006] The query parsing module receives process optimization query commands input by users in natural language. It uses semantic understanding based on DeepSeek-R1 to analyze the query intent and identify the key parameters corresponding to the query command. These key parameters include, but are not limited to, variable types, target alloy materials, and process optimization objectives. Variable types include, but are not limited to, temperature, pressure, and cooling rate. Target alloy materials include, but are not limited to, TC4 and TC11. Optimization objectives include, but are not limited to, reducing porosity, improving dimensional accuracy, and reducing residual stress.
[0007] The multi-source knowledge retrieval module is used to retrieve process knowledge related to key parameters from structured knowledge graphs and unstructured case libraries;
[0008] The physical constraint embedding generation module is used to convert process knowledge into process parameters that conform to physical constraints based on a large model;
[0009] The distributed verification module verifies the feasibility of the generated process parameters through parallel computing.
[0010] The adaptive workflow scheduling module coordinates the data flow and control flow between various modules.
[0011] The structured knowledge graph and unstructured case library include:
[0012] ChromaDB vector database is used to store and retrieve historical process cases;
[0013] The FAISS indexing system supports semantic vector-based similarity matching;
[0014] Domain knowledge graphs are used for structured knowledge reasoning about entity relationships.
[0015] The Qwen2 embedding model is used to convert textual information into multidimensional semantic vectors.
[0016] The multi-source knowledge retrieval module includes:
[0017] The knowledge base building module is used to integrate historical process cases and experimental reports;
[0018] Entity relationship identification unit, used to build and maintain domain knowledge graphs;
[0019] The multi-source information fusion unit is used to comprehensively process structured and unstructured knowledge.
[0020] The large model of the physical constraint embedding generation module is based on the DeepSeek-R1-14B model, and the physical constraint embedding generation module includes the following constraint units:
[0021] Thermal gradient constraint elements are used to define constraint functions.
[0022] Residual stress constraint element, used to set the constraint function L_stress=max(0,σ_residual-250);
[0023] Solidification shrinkage constraint unit, used to set and control the shrinkage rate during the solidification process of materials;
[0024] The gas flow constraint unit is used to set limits to optimize and protect the gas flow rate within the range of 15-25 L / min.
[0025] The distributed verification module includes:
[0026] Ray parallel computing framework unit is used to accelerate simulation.
[0027] Thermo-mechanical coupled finite element analysis unit is used to verify the feasibility of multiphysics parameters;
[0028] The real-time feedback mechanism unit feeds back the verification results of the thermo-mechanical coupled finite element analysis unit to the physical constraint embedding generation module for parameter adjustment;
[0029] The adaptive workflow scheduling module includes:
[0030] LangGraph workflow engine, used for inter-module coordination and scheduling;
[0031] The dynamic path adjustment unit adaptively adjusts the workflow based on the verification results.
[0032] A multi-task scheduler that supports concurrent processing of multiple optimized tasks.
[0033] The optimization method for titanium alloy casting process based on the adaptive RAG framework of a large model includes the following steps:
[0034] Collect process optimization query commands input by users in natural language form, and use semantic understanding based on DeepSeek-R1 to analyze the query intent and identify the key parameters corresponding to the query commands;
[0035] Initiate multi-scale knowledge retrieval to obtain process knowledge related to key parameters from multi-source knowledge bases;
[0036] Based on physical constraints and a large model, a preliminary sequence of process parameters is generated from process knowledge.
[0037] The feasibility of generating parameters is verified through distributed parallel processing, and iterative optimization and adjustment are performed based on the verification results.
[0038] Output the final optimized process parameter report.
[0039] The multi-scale knowledge retrieval steps include:
[0040] The Qwen2 model is used to generate multidimensional semantic vectors for similarity matching.
[0041] Vector retrieval is achieved using the HNSW graph structure;
[0042] By combining domain knowledge graphs, entity relationship reasoning is performed to retrieve relevant physical constraints, material property parameters, and process rules.
[0043] Integrate metallurgical principles and process specifications from the ASM Handbook;
[0044] By combining historical process cases and experimental reports, multi-source information is fused to generate process knowledge.
[0045] The process of generating a preliminary process parameter sequence based on physical constraints includes the following steps:
[0046] Embed a differentiable physical constraint loss function to guide parameter generation;
[0047] An autoregressive sequence is used, combined with constraint functions and confidence assessments, to generate a complete set of process parameters, which includes melting temperature, holding time, casting speed, and cooling rate.
[0048] The distributed parallel verification steps include: deploying multi-node parallel simulation; performing thermo-mechanical coupled multiphysics simulation analysis; assessing the risk of pore formation, residual stress distribution, and dimensional deformation indices; and generating a detailed error analysis report.
[0049] The iterative optimization and adjustment steps include: setting the maximum number of iterations; adjusting the retrieval strategy and generation parameters according to the error type; recalibrating the physical constraint threshold; and forming a closed-loop optimization cycle mechanism.
[0050] The output report includes: a list of optimized process parameters and confidence assessment; physical verification results and safety proof; predictions of expected quality index improvements; and an explanation of resource consumption optimization analysis.
[0051] The present invention has the following beneficial effects and advantages:
[0052] This invention, through a closed-loop optimization mechanism of "retrieval-generation-verification", shortens the process optimization cycle by 37.6%, increases the parameter accuracy to 92.4%, controls the residual stress deviation within 8.3 MPa, and reduces argon consumption by 17.3%, effectively solving technical problems such as multi-physics field coupling, strong nonlinearity, and long optimization cycle in the titanium alloy casting process. Attached Figure Description
[0053] Figure 1 This is a schematic diagram illustrating the working principle of the system of the present invention.
[0054] Figure 2 This is a flowchart of the method of the present invention. Detailed Implementation
[0055] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Many specific details are set forth in the following description to provide a thorough understanding of the present invention. However, the present invention can be implemented in many other ways different from those described herein, and those skilled in the art can make similar modifications without departing from the spirit of the invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.
[0056] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The invention will now be described in further detail with reference to the accompanying drawings and embodiments.
[0057] Figure 1 This diagram illustrates the working principle of the system of the present invention. It shows that the system takes a large language model as its core, receives user process optimization tasks, generates and edits inference paths, and carries out knowledge retrieval and interaction in combination with a structured environment (including knowledge graphs, databases, etc.). When there are errors in the generation process, the error information will be fed back to the large language model, thus forming a closed-loop optimization mechanism of "retrieval-generation-verification", clearly showing the data flow and control logic between each module.
[0058] The core innovations of this invention are as follows:
[0059] Multi-source knowledge retrieval module:
[0060] It integrates structured knowledge graphs and unstructured case libraries, covering historical process parameters, material performance data, physical constraints, etc.
[0061] Multi-scale semantic retrieval is implemented using ChromaDB+FAISS, supporting vector retrieval and graph reasoning based on the Qwen2 embedding model.
[0062] Physical constraint embedding generation module:
[0063] Domain fine-tuning is performed based on the DeepSeek-R1-14B model, embedding differentiable physical constraint loss functions (such as thermal gradient constraints and residual stress constraints).
[0064] It supports autoregressive generation of process parameter sequences, ensuring that the output conforms to metallurgical principles.
[0065] Distributed verification module:
[0066] Parallel execution of finite element analysis (FEA) based on the Ray framework enables accelerated verification of thermo-mechanical coupling simulation;
[0067] The simulation results are fed back to the generation module, forming a closed-loop optimization mechanism of "retrieval-generation-verification".
[0068] Adaptive workflow scheduling module:
[0069] Build scalable and interpretable workflows using LangGraph, supporting multi-task scheduling and dynamic path adjustment.
[0070] Figure 2 This is a flowchart of the method of the present invention. It fully demonstrates the implementation path and key technical nodes of the adaptive RAG framework based on DeepSeek-R1 in the optimization of titanium alloy casting process, reflecting the innovative practice of deep integration of artificial intelligence technology and traditional manufacturing industry.
[0071] 1. System Setup and Configuration
[0072] 1.1 Hardware Environment:
[0073] 8×NVIDIA A100 80GB GPUs, dual Intel Xeon Platinum 8480C CPUs, 1.2TB NVMe storage;
[0074] Supports CUDA 12.3 and PyTorch 2.3 for accelerated computing.
[0075] 1.2 Software Deployment:
[0076] Deploy the DeepSeek-R1-14B model locally using Ollam;
[0077] LangGraph v0.12 is used for workflow orchestration;
[0078] ChromaDB+FAISS is used for vector retrieval and knowledge management.
[0079] 2. Knowledge Base Construction
[0080] Integrate authoritative materials such as historical process case studies, experimental reports, and the ASM Handbook;
[0081] Construct a domain knowledge graph of entity relationships;
[0082] Text embedding was performed using the Qwen2 model with a dimension of 768.
[0083] 3. Physical constraint design
[0084] The following differentiable constraint function is introduced as a loss term to guide the generation process:
[0085] Thermal gradient constraint (L_thermal):
[0086] Ensure that the temperature gradient does not exceed 120℃ / cm.
[0087] Residual stress constraint (L_stress): Lstress = max(0, σresidual - 250)
[0088] Ensure that the residual stress does not exceed 250 MPa.
[0089] 4. Detailed Explanation of the Process Parameter Optimization Flow of the Adaptive RAG System
[0090] 4.1 User Query Reception and Parsing
[0091] The system receives process optimization queries input by users in natural language, such as "optimize the casting temperature of TC4 turbine blades". The query parsing module uses semantic understanding technology based on DeepSeek-R1 to perform in-depth analysis of the query intent, identify key parameter types (temperature, pressure, cooling rate, etc.), target alloy materials (TC4, TC11, etc.), and optimization objectives (reducing porosity, improving dimensional accuracy, reducing residual stress, etc.).
[0092] 4.2 Multi-source knowledge retrieval and fusion
[0093] The system initiates a multi-scale knowledge retrieval mechanism to obtain relevant information from structured knowledge graphs and unstructured case libraries:
[0094] Similar historical process cases were retrieved from the ChromaDB vector database, and similarity matching was performed using 768-dimensional semantic vectors generated by Qwen2.
[0095] Utilize domain knowledge graphs to perform entity relationship reasoning and retrieve relevant physical constraints, material property parameters, and process rules;
[0096] Integrate metallurgical principles and process specifications from authoritative documents such as the ASM Handbook;
[0097] Multi-source information fusion was performed by combining historical process cases and experimental reports;
[0098] 4.3 Parameter Generation under Physical Constraints
[0099] Based on the retrieved multi-source knowledge, the system uses a domain-optimized DeepSeek-R1-14B model to generate preliminary process parameters. The generation process embeds differentiable physical constraint functions to ensure that the output parameters conform to metallurgical principles.
[0100] Thermal gradient constraint: Ensure that the temperature gradient does not exceed 120℃ / cm;
[0101] Residual stress constraint: L_stress=max(0,σ_residual-250), ensuring that the residual stress does not exceed 250MPa;
[0102] Solidification shrinkage constraint: controlling the shrinkage rate within the allowable range of the material;
[0103] Gas flow constraints: Optimize argon flow rate within the effective range of 15-25 L / min;
[0104] The generation module adopts an autoregressive sequence generation strategy to gradually output a complete set of process parameters, including key parameters such as melting temperature, holding time, casting speed, and cooling rate.
[0105] 4.4 Distributed Parallel Verification and Feedback
[0106] The system initiates distributed finite element analysis verification using the Ray framework:
[0107] Deploying multi-node parallel simulation achieves a simulation speedup of 12.7 times;
[0108] Perform thermo-mechanical coupled multiphysics simulations to verify the feasibility of the parameters;
[0109] Assess key indicators such as porosity formation risk, residual stress distribution, and dimensional deformation.
[0110] The single verification cycle has been shortened from the traditional 4 hours to less than 45 minutes;
[0111] The verification results are compared with physical constraints. If the parameters do not meet the constraints (such as excessive stress or abnormal temperature gradient), the system automatically generates an error analysis report and feeds it back to the retrieval and generation module for strategy adjustment.
[0112] 4.5 Iterative Optimization and Output
[0113] When verification fails, the system activates an adaptive adjustment mechanism:
[0114] Expand the search scope based on error type and increase the search weight of relevant cases and physical rules;
[0115] Adjust the generation strategy and strengthen the influence factors of relevant constraint terms;
[0116] Regenerate the parameters and perform secondary verification to form a closed-loop optimization cycle;
[0117] After a maximum of three iterations of optimization, the system outputs a final process parameter report, including:
[0118] Optimized process parameter list and confidence level assessment;
[0119] Physical verification results and security assessment;
[0120] Expected improvements in quality indicators (such as porosity reduced to 1.1% and dimensional accuracy improved to IT6 level);
[0121] Resource consumption optimization explanation (e.g., argon gas saving of 17.3%);
[0122] The entire optimization process shortens the optimization cycle by 37.6% compared to traditional methods, significantly improving product quality and production efficiency.
[0123] The above description is merely a preferred embodiment of the present invention and does not constitute any limitation on the present invention. Any simple modifications, alterations, or equivalent structural changes made to the above embodiments based on the technical essence of the present invention shall still fall within the protection scope of the present invention.
Claims
1. An application system of an adaptive RAG framework based on a large model in the optimization of titanium alloy casting process, characterized in that, include: The query parsing module is used to receive process optimization query commands input by users in natural language form, analyze the query intent using a large language model for semantic understanding, and identify the key parameters corresponding to the query command. The key parameters include, but are not limited to, variable types, target alloy materials, and process optimization objectives. The variable types include, but are not limited to, temperature, pressure, and cooling rate. The target alloy materials include, but are not limited to, TC4 and TC11. The optimization objectives include, but are not limited to, reducing porosity, improving dimensional accuracy, and reducing residual stress. The multi-source knowledge retrieval module is used to retrieve process knowledge related to key parameters from structured knowledge graphs and unstructured case libraries; The physical constraint embedding generation module is used to convert process knowledge into process parameters that conform to physical constraints based on a large model; The distributed verification module verifies the feasibility of the generated process parameters through parallel computing. The adaptive workflow scheduling module coordinates the data flow and control flow between various modules.
2. The application system of the adaptive RAG framework based on a large model in the optimization of titanium alloy casting process according to claim 1, characterized in that, The structured knowledge graph and unstructured case library include: ChromaDB vector database is used to store and retrieve historical process cases; The FAISS indexing system supports semantic vector-based similarity matching. Domain knowledge graphs are used for structured knowledge reasoning about entity relationships. The Qwen2 embedding model is used to convert textual information into multidimensional semantic vectors.
3. The application system of the large-model-based adaptive RAG framework in the optimization of titanium alloy casting process according to claim 2, characterized in that, The multi-source knowledge retrieval module includes: The knowledge base building module is used to integrate historical process cases and experimental reports; Entity relationship identification unit, used to build and maintain domain knowledge graph; The multi-source information fusion unit is used to comprehensively process structured and unstructured knowledge.
4. The application system of the large-model-based adaptive RAG framework in the optimization of titanium alloy casting process according to claim 1, characterized in that, The physical constraint embedding generation module includes the following constraint units: Thermal gradient constraint elements are used to define constraint functions. Residual stress constraint element, used to set the constraint function L_stress=max(0,σ_residual-250); Solidification shrinkage constraint unit is used to set and control the shrinkage rate during the solidification process of materials; The gas flow constraint unit is used to set limits to optimize and protect the gas flow rate within the range of 15-25 L / min.
5. The application system of the adaptive RAG framework based on a large model in the optimization of titanium alloy casting process according to claim 1, characterized in that, The distributed verification module includes: Ray parallel computing framework unit is used to accelerate simulation. Thermo-mechanical coupled finite element analysis unit is used to verify the feasibility of multiphysics parameters; The real-time feedback mechanism unit feeds back the verification results of the thermo-mechanical coupled finite element analysis unit to the physical constraint embedding generation module for parameter adjustment; The adaptive workflow scheduling module includes: LangGraph workflow engine, used for inter-module coordination and scheduling; The dynamic path adjustment unit adaptively adjusts the workflow based on the verification results. A multi-task scheduler that supports concurrent processing of multiple optimized tasks.
6. A method for optimizing titanium alloy casting process based on an adaptive RAG framework with a large model, characterized in that, Includes the following steps: Collect process optimization query commands input by users in natural language form, use a large language model to analyze the query intent and identify the key parameters corresponding to the query commands; Initiate multi-scale knowledge retrieval to obtain process knowledge related to key parameters from multi-source knowledge bases; Based on physical constraints and a large model, a preliminary sequence of process parameters is generated from process knowledge. The feasibility of generating parameters is verified through distributed parallel processing, and iterative optimization and adjustment are performed based on the verification results. Output the final optimized process parameter report.
7. The titanium alloy casting process optimization method based on a large model adaptive RAG framework according to claim 6, characterized in that, The multi-scale knowledge retrieval steps include: The Qwen2 model is used to generate multidimensional semantic vectors for similarity matching. Vector retrieval is achieved using the HNSW graph structure; By combining domain knowledge graphs, entity relationship reasoning is performed to retrieve relevant physical constraints, material property parameters, and process rules. Integrate metallurgical principles and process specifications from the ASM Handbook; By combining historical process cases and experimental reports, multi-source information is fused to generate process knowledge.
8. The titanium alloy casting process optimization method based on a large model adaptive RAG framework according to claim 6, characterized in that, The process of generating a preliminary process parameter sequence based on physical constraints includes the following steps: Embed a differentiable physical constraint loss function to guide parameter generation; An autoregressive sequence is used, combined with constraint functions and confidence assessments, to generate a complete set of process parameters, which includes melting temperature, holding time, casting speed, and cooling rate.
9. The titanium alloy casting process optimization method based on a large model adaptive RAG framework according to claim 6, characterized in that, The distributed parallel verification steps include: deploying multi-node parallel simulation; performing thermo-mechanical coupled multiphysics simulation analysis; assessing the risk of pore formation, residual stress distribution, and dimensional deformation indices; and generating a detailed error analysis report. The iterative optimization and adjustment steps include: setting the maximum number of iterations; adjusting the retrieval strategy and generation parameters according to the error type; recalibrating the physical constraint threshold; and forming a closed-loop optimization cycle mechanism.
10. The titanium alloy casting process optimization method based on a large model adaptive RAG framework according to claim 6, characterized in that, The output report includes: a list of optimized process parameters and confidence assessment; physical verification results and safety proof; predictions of expected quality index improvements; and an explanation of resource consumption optimization analysis.
