Method for knowledge decoupling and dynamic routing agent construction for composite component

By employing a knowledge decoupling and dynamic routing-based agent construction method, the problems of low efficiency, poor consistency, and low scalability in the automatic generation of manufacturing instructions for composite components are solved, achieving efficient and accurate instruction generation and flexible model expansion.

CN122509301APending Publication Date: 2026-08-04NANJING UNIV OF AERONAUTICS & ASTRONAUTICS
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NANJING UNIV OF AERONAUTICS & ASTRONAUTICS
Filing Date
2026-04-22
Publication Date
2026-08-04

AI Technical Summary

Technical Problem

In the automatic generation of manufacturing instructions for composite components, manual compilation suffers from low efficiency, poor consistency, low scalability of large language models, and severe interference from multi-source data.

Method used

We adopt a knowledge decoupling and dynamic routing agent construction method. By cleaning and standardizing multi-source heterogeneous process data at the data level, we construct a multi-adaptor modular modeling mechanism and introduce a dynamic knowledge routing mechanism in the inference stage to realize the structured expression and adaptive combination of knowledge.

Benefits of technology

It improves the accuracy and consistency of manufacturing instructions for composite components, reduces model update costs, and enhances the model's scalability and application adaptability in complex process scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122509301A_ABST
    Figure CN122509301A_ABST
Patent Text Reader

Abstract

The application relates to the field of high-end equipment intelligent manufacturing, in particular to a knowledge decoupling and dynamic routing intelligent agent construction method for composite component, which realizes phased modeling of a knowledge level and a model level by constructing a multi-source knowledge decoupling data processing mechanism and a model structure matched with the data processing mechanism. On the basis, a dynamic knowledge routing mechanism for an instruction generation task is introduced to reduce mutual interference between different knowledge and improve comprehensive expression capability of the model under multiple constraint conditions. The method has good expansion capability while ensuring stability of the model, can realize low-cost adaptation under new knowledge or task scenarios, and effectively improves accuracy, consistency and engineering application efficiency of composite component manufacturing instruction generation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent manufacturing of high-end equipment, and in particular to a method for constructing intelligent agents for knowledge decoupling and dynamic routing of composite components. Background Technology

[0002] With the aerospace manufacturing industry's relentless pursuit of lightweight components, composite materials have become core structural materials for aircraft. The superior performance of composite components highly depends on their precise and repeatable manufacturing process, making manufacturing instructions a crucial carrier for ensuring quality and controlling costs. Currently, manufacturing instructions for composite components rely on manual compilation by process engineers, resulting in low efficiency and poor consistency. Therefore, there is an urgent need to introduce artificial intelligence technology and utilize Large Language Model (LLM) technology to automatically generate manufacturing instructions for composite components. Existing LLM-based instruction generation methods have two main shortcomings: First, interference from multi-source knowledge fusion affects instruction accuracy. Existing multi-adaptor methods often construct adapter modules based on tasks, lacking a refined modeling mechanism oriented towards knowledge structures and failing to effectively distinguish between different types of knowledge. Simultaneously, existing methods typically train multiple types of constraint information, such as instruction format, process logic, and response patterns, resulting in high coupling of different knowledge within the model and difficulty in balancing the weight relationships between various constraints. When model learning capabilities are limited, it becomes difficult to simultaneously ensure the standardization of instruction formats, the accuracy of process content, and the consistency of response patterns, thus affecting the overall quality of generated instructions and failing to meet the application requirements of high accuracy and standardization in composite manufacturing. Secondly, the model has low scalability and difficulty in knowledge reuse. Existing large-scale model fine-tuning methods can lead to catastrophic forgetting. Multi-task learning requires re-acquiring all historical data for joint retraining when adding new tasks, making dynamic expansion difficult. Adding new enterprises or updating standards often necessitates retraining the model, hindering the modular reuse of general and proprietary process knowledge and resulting in wasted computational resources. Furthermore, these methods struggle to decouple and reuse different types of knowledge, limiting the model's ability to continuously evolve in complex manufacturing scenarios.

[0003] To address the problems of severe multi-source knowledge coupling and insufficient scalability in existing technologies, an intelligent generation method for manufacturing instructions of composite components is urgently needed. To this end, this invention proposes a large language model instruction generation method based on knowledge decoupling and multi-adaptor dynamic routing. By constructing a multi-source knowledge decoupling data processing mechanism and a matching model structure, it achieves phased modeling at the knowledge and model levels. Furthermore, a dynamic knowledge routing mechanism oriented towards instruction generation tasks is introduced to reduce mutual interference between different knowledge sets and improve the model's comprehensive expressive ability under various constraints. This method ensures model stability while possessing good scalability, enabling low-cost adaptation to new knowledge or task scenarios, thereby effectively improving the accuracy, consistency, and engineering application efficiency of composite component manufacturing instruction generation. Summary of the Invention

[0004] The main technical problem solved by this invention is the low efficiency and poor consistency of manual compilation of manufacturing instructions for composite components under the background of the need for automatic generation of manufacturing instructions, as well as the low scalability of large language models and interference from multiple data sources.

[0005] To address the above technical challenges, this invention employs a knowledge decoupling and dynamic routing intelligent agent construction method for composite components, comprising: S1. At the data level, a knowledge decoupling mechanism for manufacturing instructions of composite components is constructed. Multi-source heterogeneous process data is cleaned and standardized. The instruction content is structured and parsed based on a predefined semantic rule system. The original instructions are split into general process knowledge, private process knowledge and instruction generation mode. The low coupling between different knowledge subsets is ensured through conflict detection and semantic slicing strategies. S2. Construct a multi-adaptor modular modeling mechanism at the model level, build an efficient parameter fine-tuning framework based on a pre-trained large language model, introduce multiple functional adapter modules in the middle layer of the model, and freeze the backbone network parameters. S3. In the inference phase, a dynamic knowledge routing mechanism for instruction generation tasks is constructed. A lightweight routing layer is introduced inside the model to uniformly model the outputs of multiple adapters. Through a context-aware weight allocation strategy, the contribution of various types of knowledge in the current instruction generation is dynamically calculated to achieve adaptive combination of multi-source knowledge.

[0006] In one implementation, in step S1, various subsets are converted into standardized training data suitable for fine-tuning large language models to achieve a structured representation of knowledge.

[0007] In one implementation, in step S1, different types of process knowledge have formed multiple subsets with clear semantic boundaries and independent structures at the data level; a model structure matching the knowledge decoupling results is constructed to map different types of knowledge into mutually independent and functionally defined models.

[0008] In one implementation, in step S2, different adapters respectively undertake the functions of general knowledge modeling, private knowledge modeling and instruction generation mode, and realize the decoupled expression and distributed storage of different types of knowledge through modular training.

[0009] In one implementation, in step S2, after completing the modular modeling of multiple adapters, various types of process knowledge have formed mutually independent representation structures within the model. A context-aware dynamic knowledge routing mechanism is introduced to adaptively integrate the outputs of each module.

[0010] In one implementation, step S1 includes the following steps: Step 101: Import historical process instructions and process standard documents in various formats, and build a document cleaning tool based on natural language processing and optical character recognition to remove noise information; Step 102: Pre-define a domain knowledge classification rule schema file to define the semantic boundaries and feature identifiers of general process knowledge and private process knowledge. General process knowledge is defined as instruction compilation knowledge with high reusability across enterprises and parts, while private process knowledge is defined as specific instruction compilation knowledge that is private to an enterprise or unique to a part. The schema uses pre-defined semantic rules and domain feature constraints to determine the semantic attributes of text units. General knowledge is identified based on cross-task reuse features, while private knowledge is defined based on specific process parameters or numbers. Step 103: Perform semantic boundary-based splitting on text units containing multiple semantic categories to form sub-units with single semantic attributes, thereby ensuring low coupling between different knowledge subsets. Step 104: Deploy and call the pre-trained model locally, compile semantic parsing prompts, and perform semantic parsing on the text units divided in Step 103 according to the Schema defined in Step 102 to obtain JSON files of general knowledge subset and private knowledge subset. Step 105: Use a word frequency statistics algorithm to extract the high-frequency word set of the two knowledge subsets; Step 106: Evaluate the degree of semantic overlap between different knowledge subsets using a similarity measurement method; Step 107: Call the pre-trained model, compile data processing prompts, import general knowledge subsets and private knowledge subsets, and construct a general knowledge fine-tuning dataset and a private knowledge fine-tuning dataset in the form of "question-answer pairs" for fine-tuning, which are used to embed instruction compilation knowledge into the large language model; Step 108: Call the pre-trained model, compile instructions to generate prompts, parse the instruction compilation process, and establish an instruction generation fine-tuning dataset.

[0011] In one implementation, step S2 includes the following steps: Step 201: Import the general process knowledge fine-tuning dataset generated in step 107, load the pre-trained model weight file, traverse all parameter layers of the model, and set the requires_grad attribute of all backbone network parameters to false to freeze them. Step 202: Insert an adapter into the feedforward neural network layer of each Transformer layer of the model. The adapter adopts the form of a bottleneck feedforward network. Each adapter is independently modeled for different types of knowledge, and their parameter update processes are isolated from each other, thereby avoiding mutual interference of multi-source knowledge during the training phase. Step 203: Configure the hidden layer dimension, reduction factor, and activation function, and initialize the adapter parameters to ensure that the adapter is in a stable numerical state during the early stages of training. Step 204: Set the requires_grad parameter of the general knowledge adapter to true, set the loader batch size, and perform word segmentation and embedding on the input text; Step 205: Configure the optimizer to perform gradient updates only for the general knowledge adapter parameters and set the weight decay coefficient; Step 206: Obtain the model output, calculate the loss value between the model output and the sample labels, record the loss data of the current training round, and monitor the training convergence. Step 207: Perform backpropagation based on the calculated loss value, update the adapter parameters, and repeat this process for multiple iterations; Step 208: Save the general knowledge adapter parameters; Step 209: Repeat steps 201 to 208 above to obtain the private knowledge adapter and the instruction generation adapter.

[0012] 8. The method according to claim 6, characterized in that step S3 includes the following steps: Step 301: Call the pre-trained model, read the weight file, and load the required knowledge adapter and instruction generation adapter; Step 302: After inserting the loaded adapters into the feedforward neural network layer of each Transformer layer of the backbone network, configure the residual connection path to complete the assembly of the multi-adaptor model; Step 303: Freeze the parameters of the backbone network and all adapters; Step 304: Insert an adapter routing layer at the output of the adapter, construct a weight calculation mechanism based on context semantics, evaluate the relevance of different adapter outputs, and dynamically allocate the contribution weight of each knowledge module in the current generation process according to the evaluation results. Step 305: Initialize routing layer parameters; Step 306: Generate a fine-tuning dataset by batch reading instructions through the data loader, and perform word segmentation and embedding on the text; Step 307: Set the requires_grad property of all parameters in the routing layer to true, set the hyperparameters, and configure the optimizer to update the parameters; Step 308: Import the fine-tuning dataset, perform forward propagation through the backbone network and adapters to obtain the output vectors of each adapter, input them into the routing layer, and calculate the matching degree of the outputs of different adapters through a context-semantic relevance evaluation mechanism to obtain the contribution weight of each knowledge module in the current generation task. Dynamically activate the weights and calculate the weighted fusion output. Step 309: Calculate the loss value, perform backpropagation, update the routing layer parameters, and iterate multiple times. Step 310: Save the routing layer parameter file; Step 311: Load the backbone network, knowledge adapter, instruction generation adapter, and routing layer to form a complete instruction generation agent; Step 312: When generating instructions, the system receives prompts from user interaction. The routing layer calculates the attention score of each adapter based on the context and dynamically adjusts the contribution weight of each adapter to achieve dynamic knowledge routing. Step 313: The output vectors of each adapter are weighted and summed according to the weights calculated in step 312. The fused vector is then input into the next layer of the backbone network, and the capability enhancement instructions of the knowledge adapter are generated.

[0013] The beneficial effects of this invention are: This invention achieves structured separation of general process knowledge and private process knowledge through a knowledge decoupling mechanism, effectively reducing semantic interference caused by multi-source data mixing and improving model learning efficiency. Through a multi-adaptor collaborative modeling structure, it achieves functional modularization of different types of knowledge, avoiding the catastrophic forgetting problem in traditional fine-tuning methods and significantly reducing model update costs. Through a dynamic knowledge routing mechanism, it enables dynamic knowledge invocation for specific instruction generation tasks, enhancing the model's comprehensive expressive ability for complex process logic and format constraints. The overall architecture supports flexible expansion of the adapter module; when adding new enterprise knowledge or process specifications, only local training of the corresponding adapter is required, without overall retraining, demonstrating good engineering scalability and application adaptability. Attached Figure Description

[0014] The invention will now be described in more detail with reference to embodiments and the accompanying drawings. Figure 1 It is a specific implementation process for decoupling process knowledge and constructing structured data for the manufacturing of composite components; Figure 2 This is the specific implementation process of modular modeling for multiple adapters; Figure 3 It is the specific implementation process of dynamic knowledge routing for generating manufacturing instructions for composite components. Detailed Implementation

[0015] The invention will now be further described with reference to the accompanying drawings.

[0016] The main technical problem solved by this invention is the low efficiency and poor consistency of manual compilation of manufacturing instructions for composite components under the background of the need for automatic generation of manufacturing instructions, as well as the low scalability of large language models and interference from multiple data sources.

[0017] To address the aforementioned technical challenges, this invention employs a layered technical system based on a large language model, employing "data layer decoupling—model layer separation—dynamic routing in the inference stage." This system structurally decomposes process knowledge and establishes a multi-adaptor functional division mechanism within the model to automatically generate manufacturing instructions for composite components. The specific implementation process includes the following: Firstly, a knowledge decoupling mechanism for manufacturing instructions of composite components is constructed at the data level. Multi-source heterogeneous process data is cleaned and standardized. Based on a predefined semantic rule system, the instruction content is structurally parsed, splitting the original instructions into three semantic subspaces: general process knowledge, private process knowledge, and instruction generation patterns. Conflict detection and semantic slicing strategies ensure low coupling between different knowledge subsets. Furthermore, these subsets are converted into standardized training data suitable for fine-tuning large language models to achieve structured knowledge representation.

[0018] After completing the aforementioned knowledge decoupling and data construction, different types of process knowledge have formed multiple subsets with clear semantic boundaries and independent structures at the data level. However, relying solely on the data layer division is insufficient to leverage the synergistic effects of various knowledge types in complex instruction generation tasks. Further targeted modeling of different knowledge types at the model level is necessary. Therefore, it is essential to construct a model structure that matches the knowledge decoupling results, mapping different types of knowledge to mutually independent and functionally defined models to achieve consistency between knowledge representation and model structure. This will provide a foundation for the effective collaboration and dynamic routing of subsequent multi-source knowledge.

[0019] Secondly, a modular modeling mechanism with multiple adapters is constructed at the model level. Based on a pre-trained large language model, a parameter-efficient fine-tuning framework is built. Multiple functional adapter modules are introduced into the intermediate layers of the model, and the backbone network parameters are frozen. Different adapters respectively undertake the functions of general knowledge modeling, private knowledge modeling, and instruction generation mode. Modular training achieves decoupled representation and distributed storage of different types of knowledge. This mechanism avoids the interference problem caused by parameter coupling in traditional multi-task training, while supporting independent updates and incremental expansion of various knowledge modules.

[0020] After completing the modular modeling with multiple adapters, various types of process knowledge have formed independent representation structures within the model. However, there is still a lack of control mechanisms between different knowledge modules oriented towards specific generation tasks. In complex instruction generation scenarios, it is necessary to dynamically determine the participation level of different knowledge based on contextual semantics. Relying solely on fixed combination methods is insufficient to meet the generation requirements under multiple constraints. Therefore, it is necessary to introduce a context-aware dynamic knowledge routing mechanism to adaptively integrate the outputs of each module.

[0021] Thirdly, a dynamic knowledge routing mechanism for instruction generation tasks is constructed during the inference phase. A lightweight routing layer is introduced within the model to uniformly model the outputs of multiple adapters. Through a context-aware weight allocation strategy, the contribution of various types of knowledge to the current instruction generation is dynamically calculated, achieving adaptive combination of multi-source knowledge. This process can achieve task-level capability enhancement with only a small number of parameters, thereby significantly improving the accuracy and standardization of the generated results while ensuring model stability.

[0022] 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.

[0023] To make the technical approach of the embodiments of the present invention easier to understand and to better demonstrate the difference from existing instruction generation methods, the basic technical approach in the prior art will be briefly described below.

[0024] like Figure 1 The diagram illustrates the specific process of decoupling process knowledge and constructing structured data for composite component manufacturing, as per the first aspect of this invention, comprising the following steps: Step 101: Import historical process instructions and process standard documents in various formats, and build a document cleaning tool based on natural language processing and optical character recognition to remove noise information such as headers and footers; Step 102: A pre-defined domain knowledge classification rule schema file is prepared, defining the semantic boundaries and feature identifiers of general process knowledge and proprietary process knowledge. General process knowledge is defined as instruction compilation knowledge with high reusability across enterprises and parts, while proprietary process knowledge is defined as specific instruction compilation knowledge unique to an enterprise or a part. The schema uses pre-defined semantic rules and domain feature constraints to determine the semantic attributes of text units. General knowledge is identified based on cross-task reuse characteristics, while proprietary knowledge is defined based on specific process parameters or numbers. Step 103: Perform semantic boundary-based splitting on text units containing multiple semantic categories to form sub-units with single semantic attributes, thereby ensuring low coupling between different knowledge subsets. Step 104: Deploy and call the pre-trained model locally, compile semantic parsing prompts, and perform semantic parsing on the text units divided in Step 103 according to the Schema defined in Step 102 to obtain JSON files of general knowledge subset and private knowledge subset. Step 105: Use a word frequency statistics algorithm to extract the high-frequency word set of the two knowledge subsets; Step 106: Evaluate the degree of semantic overlap between different knowledge subsets using a similarity measurement method; Step 107: Call the pre-trained model, compile data processing prompts, import general knowledge subsets and private knowledge subsets, and construct a general knowledge fine-tuning dataset and a private knowledge fine-tuning dataset in the form of "question-answer pairs" for fine-tuning, which are used to embed instruction compilation knowledge into the large language model; Step 108: Call the pre-trained model, compile instructions to generate prompts, parse the instruction compilation process, and establish an instruction generation fine-tuning dataset.

[0025] like Figure 2 The diagram illustrates the specific process of modular training for multi-source adapters according to the second aspect of this invention, comprising the following steps: Step 201: Import the general process knowledge fine-tuning dataset generated in step 107, load the pre-trained model weight file, traverse all parameter layers of the model, and set the requires_grad attribute of all backbone network parameters to false to freeze them. Step 202: Insert an adapter into the feedforward neural network layer of each Transformer layer of the model. The adapter adopts the form of a bottleneck feedforward network. Each adapter is independently modeled for different types of knowledge, and their parameter update processes are isolated from each other, thereby avoiding mutual interference of multi-source knowledge during the training phase. Step 203: Configure parameters such as hidden layer dimension, reduction factor, and activation function, and initialize adapter parameters to ensure that the adapter is in a stable numerical state in the early stage of training. Step 204: Set the requires_grad parameter of the general knowledge adapter to true, set the loader batch size, and perform word segmentation and embedding on the input text; Step 205: Configure the optimizer to perform gradient updates only for the general knowledge adapter parameters and set the weight decay coefficient; Step 206: Obtain the model output, calculate the loss value between the model output and the sample labels, record the loss data of the current training round, and monitor the training convergence. Step 207: Perform backpropagation based on the calculated loss value, update the adapter parameters, and repeat this process for multiple iterations; Step 208: Save the general knowledge adapter parameters; Step 209: Repeat steps 201 to 208 above to obtain the private knowledge adapter and the instruction generation adapter.

[0026] like Figure 3 The diagram illustrates the specific process of multi-source capability fusion and instruction generation enhancement related to the third aspect of this invention, comprising the following steps: Step 301: Call the pre-trained model, read the weight file, and load the required knowledge adapter and instruction generation adapter; Step 302: After inserting the loaded adapters into the feedforward neural network layer of each Transformer layer of the backbone network, configure the residual connection path to complete the assembly of the multi-adaptor model; Step 303: Freeze the parameters of the backbone network and all adapters; Step 304: Insert an adapter routing layer at the output of the adapter, construct a weight calculation mechanism based on context semantics, evaluate the relevance of different adapter outputs, and dynamically allocate the contribution weight of each knowledge module in the current generation process according to the evaluation results. Step 305: Initialize routing layer parameters; Step 306: Generate a fine-tuning dataset by batch reading instructions through the data loader, and perform word segmentation and embedding on the text; Step 307: Set the requires_grad property of all parameters in the routing layer to true, set hyperparameters such as the learning rate, and configure the optimizer to update the parameters; Step 308: Import the fine-tuning dataset, perform forward propagation through the backbone network and adapters to obtain the output vectors of each adapter, input them into the routing layer, and calculate the matching degree of the outputs of different adapters through a context-semantic relevance evaluation mechanism to obtain the contribution weight of each knowledge module in the current generation task. Dynamically activate the weights and calculate the weighted fusion output. Step 309: Calculate the loss value, perform backpropagation, update the routing layer parameters, and iterate multiple times. Step 310: Save the routing layer parameter file; Step 311: Load the backbone network, knowledge adapter, instruction generation adapter, and routing layer to form a complete instruction generation agent; Step 312: When generating instructions, the system receives prompts from user interaction. The routing layer calculates the attention score of each adapter based on the context and dynamically adjusts the contribution weight of each adapter to achieve dynamic knowledge routing. Step 313: The output vectors of each adapter are weighted and summed according to the weights calculated in step 312. The fused vector is then input into the next layer of the backbone network, and the capability enhancement instructions of the knowledge adapter are generated.

[0027] When adding new process knowledge or enterprise rules, it is only necessary to build the corresponding knowledge adaptation module and connect it to the existing model structure, without having to retrain the existing model as a whole.

[0028] The above-disclosed embodiments are merely preferred embodiments of the present invention, but the present invention is not limited thereto. Any non-creative variations that can be conceived by those skilled in the art, as well as any improvements and modifications made without departing from the principles of the present invention, should be within the protection scope of the present invention.

Claims

1. A method for constructing a knowledge decoupling and dynamic routing intelligent agent for composite components, characterized in that, include: S1. At the data level, a knowledge decoupling mechanism for manufacturing instructions of composite components is constructed. Multi-source heterogeneous process data is cleaned and standardized. The instruction content is structured and parsed based on a predefined semantic rule system. The original instructions are split into general process knowledge, private process knowledge and instruction generation mode. The low coupling between different knowledge subsets is ensured through conflict detection and semantic slicing strategies. S2. Construct a multi-adaptor modular modeling mechanism at the model level, build an efficient parameter fine-tuning framework based on a pre-trained large language model, introduce multiple functional adapter modules in the middle layer of the model, and freeze the backbone network parameters. S3. In the inference phase, a dynamic knowledge routing mechanism for instruction generation tasks is constructed. A lightweight routing layer is introduced inside the model to uniformly model the outputs of multiple adapters. Through a context-aware weight allocation strategy, the contribution of various types of knowledge in the current instruction generation is dynamically calculated to achieve adaptive combination of multi-source knowledge.

2. The method according to claim 1, characterized in that, In step S1, various subsets are converted into standardized training data suitable for fine-tuning large language models to achieve structured representation of knowledge.

3. The method according to claim 1, characterized in that, In step S1, different types of process knowledge have formed multiple subsets with clear semantic boundaries and independent structures at the data level; a model structure matching the knowledge decoupling results is constructed to map different types of knowledge into mutually independent and functionally defined models.

4. The method according to claim 1, characterized in that, In step S2, different adapters respectively undertake the functions of general knowledge modeling, private knowledge modeling and instruction generation mode, and realize the decoupled expression and distributed storage of different types of knowledge through modular training.

5. The method according to claim 1, characterized in that, In step S2, after completing the modular modeling of multiple adapters, various types of process knowledge have formed independent representation structures within the model. A context-aware dynamic knowledge routing mechanism is introduced to adaptively integrate the outputs of each module.

6. The method according to claim 1, characterized in that, Step S1 includes the following steps: Step 101: Import historical process instructions and process standard documents in various formats, and build a document cleaning tool based on natural language processing and optical character recognition to remove noise information; Step 102: Pre-define a domain knowledge classification rule schema file to define the semantic boundaries and feature identifiers of general process knowledge and private process knowledge. General process knowledge is defined as instruction compilation knowledge with high reusability across enterprises and parts, while private process knowledge is defined as specific instruction compilation knowledge that is private to an enterprise or unique to a part. The schema uses pre-defined semantic rules and domain feature constraints to determine the semantic attributes of text units. General knowledge is identified based on cross-task reuse features, while private knowledge is defined based on specific process parameters or numbers. Step 103: Perform semantic boundary-based splitting on text units containing multiple semantic categories to form sub-units with single semantic attributes, thereby ensuring low coupling between different knowledge subsets. Step 104: Deploy and call the pre-trained model locally, compile semantic parsing prompts, and perform semantic parsing on the text units divided in Step 103 according to the Schema defined in Step 102 to obtain JSON files of general knowledge subset and private knowledge subset. Step 105: Use a word frequency statistics algorithm to extract the high-frequency word set of the two knowledge subsets; Step 106: Evaluate the degree of semantic overlap between different knowledge subsets using a similarity measurement method; Step 107: Call the pre-trained model, compile data processing prompts, import general knowledge subsets and private knowledge subsets, and construct a general knowledge fine-tuning dataset and a private knowledge fine-tuning dataset in the form of "question-answer pairs" for fine-tuning, which are used to embed the instruction compilation knowledge into the large language model; Step 108: Call the pre-trained model, compile instructions to generate prompts, parse the instruction compilation process, and establish an instruction generation fine-tuning dataset.

7. The method according to claim 6, characterized in that, Step S2 includes the following steps: Step 201: Import the general process knowledge fine-tuning dataset generated in step 107, load the pre-trained model weight file, traverse all parameter layers of the model, and set the requires_grad attribute of all backbone network parameters to false to freeze them. Step 202: Insert an adapter into the feedforward neural network layer of each Transformer layer of the model. The adapter adopts the form of a bottleneck feedforward network. Each adapter is independently modeled for different types of knowledge, and their parameter update processes are isolated from each other, thereby avoiding mutual interference of multi-source knowledge during the training phase. Step 203: Configure the hidden layer dimension, reduction factor, and activation function, and initialize the adapter parameters to ensure that the adapter is in a stable numerical state during the early stages of training. Step 204: Set the requires_grad parameter of the general knowledge adapter to true, set the loader batch size, and perform word segmentation and embedding on the input text; Step 205: Configure the optimizer to perform gradient updates only for the general knowledge adapter parameters and set the weight decay coefficient; Step 206: Obtain the model output, calculate the loss value between the model output and the sample labels, record the loss data of the current training round, and monitor the training convergence. Step 207: Perform backpropagation based on the calculated loss value, update the adapter parameters, and repeat this process for multiple iterations; Step 208: Save the general knowledge adapter parameters; Step 209: Repeat steps 201 to 208 above to obtain the private knowledge adapter and the instruction generation adapter.

8. The method according to claim 6, characterized in that, Step S3 includes the following steps: Step 301: Call the pre-trained model, read the weight file, and load the required knowledge adapter and instruction generation adapter; Step 302: After inserting the loaded adapters into the feedforward neural network layer of each Transformer layer of the backbone network, configure the residual connection path to complete the assembly of the multi-adaptor model; Step 303: Freeze the parameters of the backbone network and all adapters; Step 304: Insert an adapter routing layer at the output of the adapter, construct a weight calculation mechanism based on context semantics, evaluate the relevance of different adapter outputs, and dynamically allocate the contribution weight of each knowledge module in the current generation process according to the evaluation results. Step 305: Initialize routing layer parameters; Step 306: Generate a fine-tuning dataset by batch reading instructions through the data loader, and perform word segmentation and embedding on the text; Step 307: Set the requires_grad property of all parameters in the routing layer to true, set the hyperparameters, and configure the optimizer to update the parameters; Step 308: Import the fine-tuning dataset, perform forward propagation through the backbone network and adapters to obtain the output vectors of each adapter, input them into the routing layer, and calculate the matching degree of the outputs of different adapters through a context-semantic relevance evaluation mechanism to obtain the contribution weight of each knowledge module in the current generation task. Dynamically activate the weights and calculate the weighted fusion output. Step 309: Calculate the loss value, perform backpropagation, update the routing layer parameters, and iterate multiple times. Step 310: Save the routing layer parameter file; Step 311: Load the backbone network, knowledge adapter, instruction generation adapter, and routing layer to form a complete instruction generation agent; Step 312: When generating instructions, the system receives prompts from user interaction. The routing layer calculates the attention score of each adapter based on the context and dynamically adjusts the contribution weight of each adapter to achieve dynamic knowledge routing. Step 313: The output vectors of each adapter are weighted and summed according to the weights calculated in step 312. The fused vector is then input into the next layer of the backbone network, and the capability enhancement instructions of the knowledge adapter are generated.