A high-end equipment forming process-oriented LLM field adaptive knowledge extraction method
Patent Information
- Application Number
- CN202610991917.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-03
- Publication Date
- 2026-09-29
AI Technical Summary
现有的通用大模型微调策略通常依赖简单的“输入-输出”映射,难以捕捉工艺文档中隐含的材料-工艺-参数关联
本发明通过构建融合物理逻辑思维链与对抗样本的高质量指令数据,从源头赋予大模型工艺推理能力;利用高密度LoRA注入与结构一致性正则化,实现了模型在格式与逻辑上的双重受控微调;通过物理规则内嵌的FSA动态剪枝机制,在Token生成阶段实时拦截非法路径,首次实现了从“事后校验”到“生成即合规”的范式跨越,彻底杜绝了物理幻觉;结合知识图谱增强解码与坏例驱动的轻量化增量学习闭环,仅更新0.1%的参数即可完成模型进化,实现了数据-模型-图谱的螺旋上升,为高可信、低成本的工业知识自动化抽取提供了全新的技术路径。
Smart Images

Figure CN122840201A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of high-end equipment manufacturing technology, and in particular to an adaptive knowledge extraction method for LLM domains oriented towards high-end equipment forming processes. Background Technology
[0002] In the field of high-end equipment manufacturing, a large amount of forming process knowledge is stored in unstructured documents such as technical standards, process cards, and fault reports. There is an urgent need to automatically transform this knowledge into a structured knowledge base that computers can understand and reason about, in order to support the transformation of intelligent manufacturing towards "knowledge-driven" manufacturing. However, existing technologies face the following three bottlenecks in industrial implementation: (1) High-quality domain instruction data is scarce and lacks logical annotation: Currently, high-quality domain-specific labeled data is severely lacking. Existing general large-scale model fine-tuning strategies typically rely on simple "input-output" mappings, making it difficult to capture the material-process-parameter relationships implicit in process documentation. Furthermore, existing data construction methods often neglect the introduction of adversarial examples, resulting in poor robustness of the model when faced with confusing or ambiguous process parameters, making reliable logical deduction difficult.
[0003] (2) The generation of general large models under constrained format and physical constraints is uncontrollable: Process knowledge extraction requires the output to strictly adhere to a predefined structured format (such as JSON Schema). Furthermore, numerical parameters must satisfy physical laws (such as reasonable ranges for temperature and pressure). However, general large models based on purely probabilistic autoregressive generation mechanisms lack underlying syntax and physical constraints. Physical rules are mostly used as post-hoc verification methods and cannot perceive dynamic physical boundaries during the generation process. This easily leads to format errors or "illusionary" data that violates common sense in engineering (such as generating heating temperatures exceeding the melting point of materials). As a result, the output results are fluent but unreliable and cannot be directly connected to industrial databases.
[0004] (3) The model iteration cost is high, and it lacks a continuous evolution mechanism based on bad examples: Process knowledge is characterized by dynamic evolution. Existing model fine-tuning methods often require costly full retraining or large-scale data backfilling when faced with online feedback errors (bad examples) or the introduction of new processes, resulting in long model update cycles and high costs. Current technologies lack a closed-loop evolutionary mechanism for knowledge enhancement during the decoding stage, automatic capture of bad examples, and lightweight incremental learning, making it difficult to achieve rapid defect repair and knowledge evolution based on a small amount of incremental data. Summary of the Invention
[0005] The purpose of this invention is to provide an adaptive knowledge extraction method for the LLM field of high-end equipment forming processes, which realizes the efficient transformation and continuous self-evolution of unstructured process documents into a highly reliable and executable industrial knowledge base, providing a brand-new technical path for the automated extraction of highly reliable and low-cost industrial knowledge.
[0006] To achieve the above objectives, the present invention provides the following solution: An adaptive knowledge extraction method for LLM domain in high-end equipment forming processes includes the following steps: S1. Construct a high-quality instruction dataset, including a process physical logic thought chain and adversarial examples; the process physical logic thought chain forces the model to perform multi-step reasoning, including entity recognition, physical attribute verification, parameter legality judgment, and compliance triple output; S2. Based on a high-quality instruction dataset, a low-rank adaptation technique is used to perform domain-adaptive fine-tuning on the pre-trained large language model, and a structural consistency regularization term is introduced into the loss function to constrain the output format, thus obtaining the fine-tuned model. S3. When using the fine-tuning model for inference and decoding, a finite state automaton with embedded physical rules is constructed. Based on the current decoding state and the physical constraint interval, the Logits of the vocabulary token are dynamically pruned to block illegal paths from the source and achieve compliance upon generation. S4. Establish a bad example-driven closed-loop evolution mechanism, capture erroneous samples in the decoding stage for lightweight incremental fine-tuning, and feed back the verified extraction results to the process knowledge graph to achieve continuous optimization of the model through knowledge enhancement.
[0007] Preferably, in S1, the construction of the process physical logic chain specifically includes: S101. Identify material, process, equipment, and defect entities in the input text; S102. Retrieve the corresponding physical properties based on the identified material grade, including melting point, phase transition temperature, and strength range; S103. Verify the matching and legality of process parameters and physical properties; S104. Output structured triple knowledge that conforms to physical rules and JSON Schema specifications.
[0008] Preferably, in S1, constructing adversarial examples specifically includes: Physically contradictory negative samples are generated by inputting parameter combinations that violate the physical laws of the process. These parameter combinations include setting the heating temperature of the material below the critical point of phase transformation, or setting the forming temperature above the phase transformation point of the material, which leads to coarse grains.
[0009] Preferably, in S2, a structural consistency regularization term is introduced into the loss function to constrain the output format, specifically including: During supervised fine-tuning, a composite loss function is designed: L= +λ
[0010] in, For conventional cross-entropy loss, Here, λ is the structural consistency regularization term, and λ is the coefficient of the structural consistency regularization term. If the token sequence generated by the model deviates from the predefined JSON Schema specification, The increased term value results in a higher penalty during backpropagation, thus correcting the model parameters.
[0011] Preferably, in S3, a finite state automaton with embedded physical rules is constructed, specifically including: First, based on a predefined process knowledge graph JSON schema, a formalized finite state automaton M=(Q,Σ,δ, ,F); where the state set Q defines the various stages of knowledge extraction, including the root state. Entity recognition status Relationship judgment status Attribute value generation status and automatic correction status The input symbol Σ corresponds to a Token in the vocabulary of the large language model; the transition function δ is defined as the next state q to which the input Token should proceed from the current state q; the initial state. Decoding the starting root state The state machine F terminates with a valid output state that satisfies the SON Schema structure.
[0012] Preferably, in S3, the Logits of the vocabulary token are dynamically pruned based on the current decoding state and the physical constraint interval, specifically including: Decoding begins; FSA is in the root state. Fine-tuning the model generates a token sequence to identify entities; FSA detects the entity end-of-state marker and automatically identifies the entity status. Transfer to relational judgment status When FSA enters the attribute value generation state Furthermore, the physical rules engine is activated when the fine-tuning model attempts to generate process names; The decoder reads the generated historical token sequence to confirm the subject currently in effect; the physical rule engine calculates the dynamic legal physical interval in real time based on the material grade, and uses this as the current parameter to generate constraints; FSA discretizes the physical constraint interval and maps it to the corresponding set of legal numeric token IDs in the vocabulary. In the t-th step of the autoregressive generation, for all tokens in the vocabulary whose values exceed the valid range, FSA sets their corresponding Logits values to 0. ∞, and then use Softmax to reduce the probability of generating these illegal tokens to 0, thus achieving dynamic pruning.
[0013] Preferably, S3 also includes an automatic threshold approximation correction mechanism: When the generated value approaches the upper or lower limit of the dynamic valid physical range, FSA automatically generates a state from the attribute value. Switch to automatic correction mode This guides the model to regenerate compliant values.
[0014] Preferably, in S4, the bad example-driven closed-loop evolution mechanism specifically includes: By intercepting illegal token generation or monitoring output results with a confidence level below a preset threshold of 0.1 using FSA, bad examples are automatically captured and aggregated into a bad example pool. LoRA technology is used to update only the parameters of the low-rank adaptation matrix, and the samples in the bad example pool are subjected to lightweight incremental fine-tuning. The verified and qualified extraction results are written into the process knowledge graph in real time, updating the node attributes and relationships in the graph, forming a spiral evolution of data-model-graph.
[0015] Preferably, step S4 also includes a knowledge-enhanced decoding step: During the inference phase, the process knowledge graph is retrieved in real time to obtain historical successful cases and standard parameter distributions associated with core entities in the input text. The standard parameter distribution is used as prior knowledge and superimposed on the Logits generated by the fine-tuning model to form a dynamic bias of Logits. If the parameters generated by the fine-tuning model deviate from the historical data in the knowledge graph beyond a preset threshold, its generation probability is automatically reduced to guide the output to converge toward the historical credibility interval.
[0016] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements an LLM domain adaptive knowledge extraction method for high-end equipment forming processes as described above.
[0017] According to specific embodiments provided by the present invention, the present invention discloses the following technical effects: This invention endows large-scale models with process reasoning capabilities from the source by constructing high-quality instruction data that integrates physical logic thought chains and adversarial examples; it achieves dual controlled fine-tuning of the model in terms of format and logic by utilizing high-density LoRA injection and structural consistency regularization; through the FSA dynamic pruning mechanism embedded in physical rules, it intercepts illegal paths in real time during the token generation stage, realizing a paradigm shift from "post-verification" to "generation equals compliance" for the first time, completely eliminating physical illusions; combined with knowledge graph enhanced decoding and a lightweight incremental learning closed loop driven by bad examples, it can complete model evolution by updating only 0.1% of the parameters, realizing a spiral ascent of data-model-graph, and providing a brand-new technical path for highly reliable and low-cost automated extraction of industrial knowledge. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 This is a flowchart illustrating the dynamic pruning mechanism guided by FSA physical rules used in this invention. Figure 2 This is a flowchart illustrating the process of the present invention based on the knowledge graph-enhanced decoding and automatic fusion continuous evolution mechanism. Figure 3 This is a text input interface diagram of the adaptive knowledge extraction system in an embodiment of the present invention; Figure 4 This is a diagram showing the result generation and display interface of the adaptive knowledge extraction system in this embodiment of the invention. Detailed Implementation
[0020] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0021] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0022] This invention addresses the pain points of knowledge extraction in high-end equipment forming processes, such as low data quality, uncontrollable generation, severe physical illusion, and high model iteration costs. It proposes a domain-adaptive knowledge extraction method for large language models, which involves physical logic injection, dynamic constraint decoding, knowledge graph enhancement, and bad example-driven closed-loop evolution. Instead, it constructs a full-link collaborative mechanism that includes data construction, decoding control, real-time enhancement, and closed-loop evolution.
[0023] This invention provides an adaptive knowledge extraction method for LLM domain in high-end equipment forming processes, comprising the following steps: S1. Construct a high-quality instruction dataset, including a process physical logic thought chain and adversarial examples; the process physical logic thought chain forces the model to perform multi-step reasoning, including entity recognition, physical attribute verification, parameter legality judgment, and compliance triple output; S2. Based on a high-quality instruction dataset, a low-rank adaptation technique is used to perform domain-adaptive fine-tuning on the pre-trained large language model, and a structural consistency regularization term is introduced into the loss function to constrain the output format, thus obtaining the fine-tuned model. S3. When using the fine-tuning model for inference and decoding, a finite state automaton with embedded physical rules is constructed. Based on the current decoding state and the physical constraint interval, the Logits of the vocabulary token are dynamically pruned to block illegal paths from the source and achieve compliance upon generation. S4. Establish a bad example-driven closed-loop evolution mechanism, capture erroneous samples in the decoding stage for lightweight incremental fine-tuning, and feed back the verified extraction results to the process knowledge graph to achieve continuous optimization of the model through knowledge enhancement.
[0024] The method of this invention specifically includes: 1. Construction of high-quality instruction data based on physical logic traps and thought chain injection This step addresses the issues of a lack of high-quality labeled data in the field, a lack of in-depth process logic, and insufficient model robustness, by endowing the model with process physics reasoning capabilities from the training source.
[0025] 1.1 Displaying the Injection of Mind Chains Instead of the simple "input-output" flat labeling of general large models, the process knowledge extraction labels are reconstructed into a multi-step reasoning chain that forces physical verification, so that the model learns the engineering logic of "recognition-judgment-verification-output" rather than a simple text mapping.
[0026] The typical reasoning steps are as follows: Step 1: Identify core entities such as materials, processes, equipment, performance, and defects; Step 2: Search for physical properties (melting point, phase transition temperature, strength range, etc.) based on the material grade; Step 3: Verify the compatibility and legality of process parameters and materials; Step 4: Output triplet knowledge that conforms to physical rules and format specifications. This is to obtain a uniform austenitic structure and avoid quenching cracks.
[0027] In this way, the model internalizes the deep physical relationship between materials, processes, and parameters during the training phase, and has the ability to self-verify and logically deduce.
[0028] 1.2 Construction of Adversarial Examples Based on Physical Contradictions We construct negative samples of physical contradictions related to the forming process of high-end equipment to improve the robustness of the model under scenarios involving parameter confusion and ambiguous representations. An example is shown below: The austenitizing temperature of 22MnB5 boron steel is deliberately set far below the standard 650℃ to prevent the formation of martensite. Setting the superplastic forming temperature of TC4 titanium alloy above the phase transformation point results in coarse grains.
[0029] These samples are not general text perturbations, but industrial scenario traps that directly violate the physical laws of the process, enabling the model to learn to identify erroneous logic, reject illegal parameters, and output reliable results.
[0030] 2. Domain-Adaptive Efficient Fine-Tuning Based on High-Density LoRA and Structural Consistency Regularization Based on a high-quality instruction dataset, a lightweight domain adaptation is performed on a general large model to enable it to have long context understanding and process knowledge extraction capabilities.
[0031] 2.1 Context-Aware Training First, an open-source base model with strong logical reasoning capabilities (supporting 32K tokens and above) is selected. By leveraging its inherent long context window capability, the entire section or entire process document can be directly input to solve the long-distance dependency problem from a physical level.
[0032] 2.2 High-density LoRA injection Low-Rank Adaptation (LoRA) is employed for efficient fine-tuning, freezing all original weight parameters of the pre-trained model while preserving its general language capabilities. Only the Query function in the Transformer layer is optimized. ) and Value ( Next to the projection matrix, a trainable low-rank decomposition matrix (A×B) is injected. To address the scattered entity characteristics in the process text, the coverage density of the LoRA module in the Attention layer is increased to enhance the model's ability to perceive the global context, enabling it to connect the material mentioned in the first paragraph with the defects described in the third paragraph.
[0033] 2.3 Structural Consistency Regularization During supervised fine-tuning, a composite loss function is designed: L= +λ
[0034] in, For conventional cross-entropy loss, Here, λ is the structural consistency regularization term, and λ is the coefficient of the structural consistency regularization term, used to control the penalty strength of format constraints, and λ>0. If the token sequence generated by the model deviates from the predefined schema (e.g., entity types are not in the whitelist, relation types exceed the predefined set), then... The increased term value results in a higher penalty during backpropagation, thus correcting the model parameters.
[0035] 3. FSA dynamic pruning decoding guided by the physics rule engine Using the "instruction-fine-tuned large model" obtained in the previous step, this step constructs a real-time reasoning service from "unstructured document input" to "structured knowledge output".
[0036] This invention abandons the traditional "post-verification" model and pioneers a dynamic constraint decoding mechanism that embeds physical rules into a finite state automaton (FSA). It imposes constraints in real time during the token generation stage, eliminating physical illusions and format errors from the source and achieving compliance from generation.
[0037] 3.1 Construction of Finite State Automata (FSA) First, based on a predefined process knowledge graph JSON schema, a formalized finite state automaton M=(Q,Σ,δ, ,F).
[0038] State set Q: Defines the various stages of knowledge extraction, including the root state. Entity recognition status Relationship judgment status Attribute value generation status Automatic correction status .
[0039] Input symbol Σ: corresponds to the Token in the large model vocabulary; The transition function δ defines the next state q′ to which a token should be input after the current state q has been reached.
[0040] initial state Decoding the starting root state .
[0041] Aborted state machine F: A valid output termination state that satisfies the JSON Schema structure.
[0042] 3.2 Dynamic pruning mechanism This invention constructs a product space of "model probability distribution × physical state machine" and generates paths by decoding dynamic constraints at each step. The specific implementation process is as follows: 3.2.1 State Initialization: Decoding begins, FSA is in the root state. .
[0043] 3.2.2 Entity Recognition and State Transition: The model generates a token sequence and identifies the entity "22MnB5". FSA detects the entity's end-of-state marker and automatically transitions to the entity's state. Entering a relationship status .
[0044] 3.2.3 Physical Rule Triggering and Dynamic Pruning: When FSA enters attribute state Furthermore, the physical rules engine is activated when the model attempts to generate process names.
[0045] (1) Context awareness: The decoder reads the generated historical token sequence and confirms that the subject currently in action is "22MnB5".
[0046] (2) Rule calculation: The physical rule engine calculates the dynamic legal physical range in real time based on the material grade. For example, the austenitizing temperature range of 22MnB5 is [900℃, 950℃], which is used as the current parameter to generate constraints.
[0047] (3) Valid Token Mapping: FSA discretizes the physical constraint interval and maps it to the corresponding set of valid numeric Token IDs in the vocabulary. .
[0048] (4) Dynamic pruning: In step t of the autoregressive generation, for all tokens in the vocabulary whose values exceed the valid range (such as 800, 1000, 2000), FSA sets their corresponding Logits values to 0. ∞, and then Softmax is used to reduce the probability of generating these illegal tokens to 0, thus blocking the generation of physical illusions at the source. For example... Figure 1 As shown.
[0049] 3.2.4 Automatic Threshold Approximation Correction: When the generated value approaches the upper / lower limit of the physical range, FSA automatically corrects from... Switch to correction mode This guides the model to regenerate compliant values, rather than simply discarding or blocking them.
[0050] This mechanism transforms physical rules from "post-event interception" to "generative guidance," completely blocking path searches that violate physical laws and realizing "physical information guiding neural network decoding."
[0051] 4. Continuous evolution mechanism based on knowledge graph-enhanced decoding and automatic fusion This step, based on the inference output of the previous step, establishes a real-time interaction mechanism between the memory and processor, constructing a closed-loop system of "real-time data entry—automatic monitoring—continuous evolution." This solves the problem of model capabilities degrading or lagging over time, such as... Figure 2 As shown.
[0052] 4.1 Knowledge Enhancement Decoding During the inference phase, the system does not operate in isolation, but rather retrieves existing process knowledge graphs in real time.
[0053] 4.1.1 Real-time retrieval: For core entities in the input text (such as material grade, process type), the system retrieves historical successful cases, standard parameter ranges, and typical process relationships associated with that entity in the graph in real time.
[0054] 4.1.2 Logits Dynamic Bias: Using the retrieved historical parameter distribution as prior knowledge Before the decoder outputs the Softmax, It is then overlaid onto the Logits generated by the model.
[0055] 4.1.3 Confidentiality Interval Constraint: If the parameters generated by the model deviate too much from historical successful cases (e.g., exceeding 3 times the standard deviation), the generation probability will be automatically reduced to guide the model to converge toward the "historical confidence interval".
[0056] 4.1.4 Knowledge Consistency Verification: If the triple relationship output by the model contradicts the existing authoritative knowledge in the knowledge graph, it will automatically trigger regeneration to ensure that the extraction results are consistent with the prior knowledge of the domain.
[0057] 4.2 Automated Closed-Loop Evolution 4.2.1 Automatic Bad Example Capture: The system monitors output quality in real time. When FSA triggers an interception (i.e., the model attempts to generate an invalid token but is forced to zero) or the confidence level of the output result is lower than the threshold, the sample is automatically collected into the "bad example pool". Bad examples intercepted by physical rules (such as temperature exceeding limits) can be directly used to update the physical rule base, while bad examples with low model confidence require more manual intervention.
[0058] 4.2.2 Incremental Lightweight Fine-tuning: Domain experts correct samples in the bad example pool and label the causes of their physical and logical errors. Using LoRA technology, only these incremental data are used to perform lightweight fine-tuning of the model (updating only about 0.1% of the parameters).
[0059] 4.2.3 Automatic Knowledge Graph Update: Validated extraction results are written into the knowledge graph in real time to update the graph.
[0060] Example 1: Knowledge Extraction of High-End Equipment Forming Processes This embodiment uses the extraction of process knowledge of 22MnB5 boron steel in the hot stamping forming process of high-end equipment as a scenario to illustrate the complete process of the present invention: Step 1: Construction of Process Physical Logic Thinking Chain Instruction Data In this embodiment, the instruction data adopts the process physical logic chain format of "entity recognition → physical verification → parameter judgment → compliance output": Enter text: "In the hot stamping process of 22MnB5 boron steel, the sheet material needs to be heated to 900-950℃ and held for 3-5 minutes to obtain a uniform austenitic structure and avoid quenching cracks." Annotated output: { "Mind Chain": [ Step 1: Identify the material entity: 22MnB5; the process entity: hot stamping; the defect entity: quenching cracks. Step 2: Physical property verification: The austenitizing temperature of 22MnB5 is 900-950℃. Step 3: Parameter validity check: Insulation time of 3-5 minutes conforms to process specifications. Step 4: Output compliant triples. "triple": { "subject": "22MnB5", "predicate": "Hot stamping heating temperature", "object": "900-950℃" } At the same time, construct physical logic trap adversarial samples, such as: "Heating 22MnB5 to 650℃ and holding it for 5 minutes can avoid quenching cracks", forcing the model to identify and reject such illegal parameters that violate physical laws.
[0061] Step 2: Lightweight Model Adaptation Based on the LoRA lightweight fine-tuning scheme, without changing the backbone weights of the basic model, the above-mentioned customized process instruction dataset is used to complete the domain adaptation, so that the model can be adapted to the tasks of forming process text understanding and structured extraction, and meet the requirements of industrial format output constraints.
[0062] Step 3: Decoding the Co-constraints of FSA and Physical Rules Combined with appendix Figure 1 During the inference and decoding phase, relying on the FSA state machine linked with the physical rule engine, dynamic constraint ranges are set for key numerical parameters such as material, temperature, and pressure. Through dynamic token mask pruning in the decoding layer, the generation of illegal parameters is intercepted, and the system automatically enters the S phase based on boundary judgment. evise The correction process ensures that the output fully conforms to physical laws and structured specifications.
[0063] Step 4: Knowledge Graph Augmentation Decoding and Closed-Loop Evolution Combined with appendix Figure 2 The reasoning process integrates prior information from the process knowledge graph to assist in generation; the system automatically captures abnormal bad cases, and completes local model optimization by relying on a lightweight incremental fine-tuning method. Qualified extraction results are synchronously fed back to the knowledge base and knowledge graph, realizing the continuous accumulation of process knowledge and stable system iteration.
[0064] System prototype experiment verification The present invention has passed the functional verification of the prototype system and the accuracy verification of extraction. The results show that the technical solution is feasible and effective.
[0065] 1. System functional connectivity verification The system constructs a complete closed-loop system that includes "data preprocessing - large model inference - FSA dynamic masking - physical rule verification - graph storage".
[0066] A typical unstructured document illustrating the superplastic forming process was selected as the test set, and the system's modules operated stably in coordination. The Dynamic Syntax Mask (FSA) mechanism successfully intercepted all illegal token generation at the decoding layer, achieving 100% compliance in the output format without the need for post-processing correction. Experiments confirmed that the system can stably output structured data conforming to the predefined schema and automatically store it in the database, demonstrating the engineering feasibility of the architecture.
[0067] 2. Validation of extraction accuracy and map construction The text input interface and result generation and display interface of the adaptive knowledge extraction system are as follows: Figures 3-4 As shown in the test case, the system can accurately identify key process elements in the text and precisely extract the standard "subject-relationship-object" process triplet.
[0068] Given the input text "Using 316L stainless steel as raw material, under parameters of 200W laser power, 800mm / s scanning speed, and 30μm powder layer thickness, the powder layer is selectively melted by a laser beam and stacked layer by layer to form a dense entity that balances precision and efficiency," the system accurately outputs the following triplets: (316L stainless steel, additive manufacturing process, selective laser melting), (selective laser melting, powder layer thickness, 30μm), (selective laser melting, scanning speed, 800mm / s), (selective laser melting, laser power, 200W). The extracted triplets are successfully mapped to nodes and edges in the graph. The system automatically completes entity alignment and relationship connection, intuitively generating a visualized process knowledge graph.
[0069] The verification results show that the system can not only process single-sentence information, but also effectively integrate cross-sentence logical relationships, forming a clear and logically coherent graph structure.
[0070] In summary, experiments and prototype verification fully demonstrate that the technical solution of this invention is feasible, the extraction results are accurate, and the system operates stably. It can meet the industrial-grade requirements for extracting knowledge of high-end equipment forming processes and has good practicality and prospects for promotion.
[0071] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements an LLM domain adaptive knowledge extraction method for high-end equipment forming processes as described above.
[0072] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0073] This document uses specific examples to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. Furthermore, those skilled in the art will recognize that, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. An adaptive knowledge extraction method for LLM domain in high-end equipment forming processes, characterized in that, Includes the following steps: S1. Construct a high-quality instruction dataset, including process physical logic thought chain and adversarial examples; The process physical logic thinking chain forces the model to perform multi-step reasoning, including entity recognition, physical attribute verification, parameter legality judgment, and compliant triple output. S2. Based on a high-quality instruction dataset, a low-rank adaptation technique is used to perform domain-adaptive fine-tuning on the pre-trained large language model, and a structural consistency regularization term is introduced into the loss function to constrain the output format, thus obtaining the fine-tuned model. S3. When using the fine-tuning model for inference and decoding, a finite state automaton with embedded physical rules is constructed. Based on the current decoding state and the physical constraint interval, the Logits of the vocabulary token are dynamically pruned to block illegal paths from the source and achieve compliance upon generation. S4. Establish a bad example-driven closed-loop evolution mechanism, capture erroneous samples in the decoding stage for lightweight incremental fine-tuning, and feed back the verified extraction results to the process knowledge graph to achieve continuous optimization of the model through knowledge enhancement.
2. The adaptive knowledge extraction method for LLM domain of high-end equipment forming process according to claim 1, characterized in that, In step S1, constructing the process physical logic chain specifically includes: S101. Identify material, process, equipment, and defect entities in the input text; S102. Retrieve the corresponding physical properties based on the identified material grade, including melting point, phase transition temperature, and strength range; S103. Verify the matching and legality of process parameters and physical properties; S104. Output structured triple knowledge that conforms to physical rules and JSON Schema specifications.
3. The adaptive knowledge extraction method for LLM domain of high-end equipment forming process according to claim 1, characterized in that, In S1, constructing adversarial examples specifically includes: Physically contradictory negative samples are generated by inputting parameter combinations that violate the physical laws of the process. These parameter combinations include setting the heating temperature of the material below the critical point of phase transformation, or setting the forming temperature above the phase transformation point of the material, which leads to coarse grains.
4. The adaptive knowledge extraction method for LLM domain of high-end equipment forming process according to claim 1, characterized in that, In S2, a structural consistency regularization term is introduced into the loss function to constrain the output format, specifically including: During supervised fine-tuning, a composite loss function is designed: L= +λ in, For conventional cross-entropy loss, Here, λ is the structural consistency regularization term, and λ is the coefficient of the structural consistency regularization term. If the token sequence generated by the model deviates from the predefined JSON Schema specification, The increased term value results in a higher penalty during backpropagation, thus correcting the model parameters.
5. The adaptive knowledge extraction method for LLM domain of high-end equipment forming process according to claim 1, characterized in that, In step S3, constructing a finite state automaton embedded with physical rules specifically includes: First, based on a predefined process knowledge graph JSON schema, a formalized finite state automaton M=(Q,Σ,δ, ,F); where the state set Q defines the various stages of knowledge extraction, including the root state. Entity recognition status Relationship judgment status Attribute value generation status and automatic correction status The input symbol Σ corresponds to a Token in the vocabulary of the large language model; the transition function δ is defined as the next state q to which the input Token should proceed from the current state q; the initial state. Decoding the starting root state The state machine F terminates with a valid output state that satisfies the SON Schema structure.
6. The adaptive knowledge extraction method for LLM domain of high-end equipment forming process according to claim 5, characterized in that, In step S3, dynamic pruning of the Logits of the vocabulary Token is performed based on the current decoding state and the physical constraint interval, specifically including: Decoding begins; FSA is in the root state. Fine-tuning the model generates a token sequence to identify entities; FSA detects the entity end-of-state marker and automatically identifies the entity status. Transfer to relational judgment status When FSA enters the attribute value generation state Furthermore, the physical rules engine is activated when the fine-tuning model attempts to generate process names; The decoder reads the generated historical token sequence to confirm the subject currently in effect; the physical rule engine calculates the dynamic legal physical interval in real time based on the material grade, and uses this as the current parameter to generate constraints; FSA discretizes the physical constraint interval and maps it to the corresponding set of legal numeric token IDs in the vocabulary. In the t-th step of the autoregressive generation, for all tokens in the vocabulary whose values exceed the valid range, FSA sets their corresponding Logits values to 0. ∞, and then use Softmax to reduce the probability of generating illegal tokens to 0, thus achieving dynamic pruning.
7. The adaptive knowledge extraction method for LLM domain of high-end equipment forming process according to claim 6, characterized in that, S3 also includes an automatic threshold approximation correction mechanism: When the generated value approaches the upper or lower limit of the dynamic valid physical range, FSA automatically generates a state from the attribute value. Switch to automatic correction mode This guides the model to regenerate compliant values.
8. The adaptive knowledge extraction method for LLM domain of high-end equipment forming process according to claim 1, characterized in that, The bad-example-driven closed-loop evolution mechanism established in S4 specifically includes: By intercepting illegal token generation or monitoring output results with confidence levels below a preset threshold using FSA, bad examples are automatically captured and aggregated into a bad example pool. LoRA technology is used to update only the parameters of the low-rank adaptation matrix, performing lightweight incremental fine-tuning on the samples in the bad example pool. Verified and qualified extraction results are written into the process knowledge graph in real time, updating the node attributes and relationships in the graph, forming a spiral evolution of data-model-graph.
9. The adaptive knowledge extraction method for LLM domain of high-end equipment forming process according to claim 1, characterized in that, S4 also includes a knowledge-enhanced decoding step: During the inference phase, the process knowledge graph is retrieved in real time to obtain historical successful cases and standard parameter distributions associated with core entities in the input text. The standard parameter distribution is used as prior knowledge and superimposed on the Logits generated by the fine-tuning model to form a dynamic bias of Logits. If the parameters generated by the fine-tuning model deviate from the historical data in the knowledge graph beyond a preset threshold, its generation probability is automatically reduced to guide the output to converge toward the historical credibility interval.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements an LLM domain adaptive knowledge extraction method for high-end equipment forming processes as described in any one of claims 1-9.