Industrial agent decision-making method and device, electronic equipment and storage medium

By combining knowledge graphs and large language models in industrial process planning, and constructing domain ontology and MCP ontology, the problems of reliance on human experience and knowledge fragmentation in existing technologies are solved, and the accuracy of compliant collaborative decision-making and process planning across software systems is achieved.

CN120912131APending Publication Date: 2025-11-07HANGZHOU HOLLYSYS AUTOMATION
View PDF 0 Cites 16 Cited by

Patent Information

Application Number
CN202510988796.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-17
Publication Date
2025-11-07

AI Technical Summary

Technical Problem

Existing technologies in industrial process planning rely heavily on human experience, resulting in fragmented knowledge and a lack of a unified, dynamic, and reasonable semantic foundation. This makes it difficult to achieve compliant collaborative decision-making across software systems. Furthermore, LLM lacks industrial expertise, which can lead to inaccurate outputs, and the heterogeneity of traditional interfaces results in high maintenance costs.

Method used

By loading multi-source industrial data into a knowledge graph, a domain ontology and an MCP ontology are constructed, a large language model is fine-tuned, entities, attributes and relationships are stored using the knowledge graph, user input is received and process planning schemes are generated, rule verification is performed based on the knowledge graph to ensure compliance, and the output is a control script that can be parsed by the industrial execution system.

Benefits of technology

It achieves unified knowledge, automatic generation, and rule-verified cross-software system compliance process planning, improving the domain expertise and planning accuracy of LLM, and dynamically binding heterogeneous industrial software services to ensure the rationality and correctness of process planning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120912131A_ABST
    Figure CN120912131A_ABST
Patent Text Reader

Abstract

The invention provides an industrial agent decision-making method and device, electronic equipment and a storage medium. The method comprises the following steps: loading multi-source industrial data to a knowledge graph, and constructing a domain ontology and an MCP ontology; performing parameter fine tuning on a preset base large language model; receiving an industrial process planning demand input by a user, and performing semantic analysis on the industrial process planning demand; processing the query result by utilizing an MCP context strategy to generate a prompt context; inputting the prompt context and the industrial process planning demand into a fine tuning large language model to generate a first process planning scheme; performing rule verification on the first process planning scheme based on the knowledge graph, and judging whether the first process planning scheme meets a preset rule or not according to a verification result; and converting the final process planning scheme into a control script or an interface calling sequence which can be analyzed by an industrial execution system, and outputting the control script or the interface calling sequence. According to the method, the cross-software system compliance process planning with unified knowledge, automatic generation and rule verification can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of industrial artificial intelligence, and in particular to an industrial agent decision-making method and device, an electronic device, and a storage medium. BACKGROUND

[0002] Industrial automation systems are shifting from fixed rule-based control mode to intelligent mode capable of autonomous decision-making in complex and variable working conditions. Large language models (LLM) have natural language understanding and reasoning capabilities, knowledge graphs (KG) can explicitly express industry semantics, and model context protocols (MCP) provide a unified interface between models and external tools. The integration of these three types of technology lays the foundation for building high-autonomy industrial agents.

[0003] Existing technical solutions generally include the following categories:

[0004] Expert system / rule engine: relies on manually preset rules to drive control logic, has strong explainability but poor scene expansion, and is difficult to handle undefined working conditions.

[0005] Data-driven machine learning model: makes predictions or optimizations through historical data, has better generalization ability than rule systems, but relies heavily on high-quality large-scale samples and lacks explainability.

[0006] Fully LLM-driven agent: breaks down tasks, decisions, and execution to be completed by a general-purpose large model, which has some adaptability but is difficult to meet the needs in terms of accuracy, stability, and industrial compliance.

[0007] LLM-RAG solution: uses retrieval augmentation to reduce hallucinations, but is still limited by the context window and lacks real-time context management.

[0008] Multi-software point-to-point integration: achieves system linkage based on custom API scripts, which has non-uniform interfaces, high maintenance costs, and difficulty in ensuring compliance verification of service call order.

[0009] However, the above existing technologies still have the following problems: process planning is highly dependent on human experience, with low automation level; industry knowledge is fragmented, lacking a unified, dynamic, and inferable semantic basis; general LLM lacks industrial professional corpus, leading to inaccurate output and difficulty in explanation; multiple industrial software interfaces are heterogeneous, lacking unified orchestration and security compliance verification; existing solutions are difficult to balance decision-making accuracy, real-time adaptability, and cross-system collaboration. SUMMARY

[0010] Therefore, the embodiment of the present application provides a device tree-based user mode driver cross-platform support method, device and medium to solve the problem that the existing industrial process planning is highly dependent on manual experience, knowledge is fragmented, and there is a lack of cross-software system compliance collaborative decision-making.

[0011] In a first aspect, the embodiment of the present application provides an industrial intelligent agent decision-making method, comprising: loading multi-source industrial data to a knowledge graph, and constructing a domain ontology and an MCP ontology, so that the knowledge graph stores entities, attributes and relationships; performing parameter fine-tuning on a predetermined base large language model, taking the corpus related to process planning and MCP metadata in the knowledge graph as training samples, to obtain a fine-tuned large language model; receiving an industrial process planning requirement input by a user, performing semantic analysis on the industrial process planning requirement, and obtaining at least one key entity, process target and constraint information; querying the knowledge graph according to the key entity and the constraint information to obtain an MCP context strategy, processing the query result using the MCP context strategy to generate a prompt context; inputting the prompt context and the industrial process planning requirement into the fine-tuned large language model to generate a first process planning scheme; performing rule verification on the first process planning scheme based on the knowledge graph to obtain a verification result, determining whether the first process planning scheme meets a preset rule according to the verification result, taking the first process planning scheme as a final process planning scheme when the determination is yes, generating a new process planning scheme when the determination is no, and until a final process planning scheme meeting the preset rule is obtained; and converting the final process planning scheme into a control script or an interface calling sequence that can be parsed by an industrial execution system, and outputting the control script or the interface calling sequence, so that the industrial execution system executes a corresponding industrial task.

[0012] In a second aspect, an industrial intelligent agent decision-making device is provided, including: a construction module configured to load multi-source industrial data to a knowledge graph, and to construct a domain ontology and a MCP ontology, so that the knowledge graph stores entities, attributes, and relationships; a fine-tuning module configured to perform parameter fine-tuning on a predetermined base large language model, to obtain a fine-tuned large language model by taking process planning related corpus and MCP metadata in the knowledge graph as training samples; an analysis module configured to receive an industrial process planning requirement input by a user, to perform semantic analysis on the industrial process planning requirement, and to obtain at least one key entity, process target, and constraint information; a processing module configured to query the knowledge graph according to the key entity and the constraint information, to obtain an MCP context strategy, to process the query result by using the MCP context strategy, and to generate a prompt context; a generation module configured to input the prompt context and the industrial process planning requirement to the fine-tuned large language model, and to generate a first process planning scheme; a verification module configured to perform rule verification on the first process planning scheme based on the knowledge graph, to obtain a verification result, to determine whether the first process planning scheme meets a preset rule according to the verification result, to take the first process planning scheme as a final process planning scheme when the determination is positive, and to generate a new process planning scheme when the determination is negative, and to continue until a final process planning scheme that meets the preset rule is obtained; and a conversion module configured to convert the final process planning scheme into a control script or an interface calling sequence that can be parsed by an industrial execution system, and to output the control script or the interface calling sequence, so that the industrial execution system executes a corresponding industrial task.

[0013] In a third aspect, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the above method when executing the computer program.

[0014] The above at least one technical solution adopted by the embodiments of the present application can achieve the following beneficial effects:

[0015] The multi-source industrial data is loaded into the knowledge graph, and the field ontology and the MCP ontology are constructed to enable the knowledge graph to store entities, attributes and relationships; a predetermined base large language model is parameter fine-tuned, the corpus related to process planning in the knowledge graph and the MCP metadata are taken as training samples, and a fine-tuned large language model is obtained; an industrial process planning requirement input by a user is received, the industrial process planning requirement is semantically analyzed, and at least one key entity, process target and constraint information is obtained; the knowledge graph is queried according to the key entity and the constraint information, an MCP context strategy is obtained, the query result is processed by using the MCP context strategy, and a prompt context is generated; the prompt context and the industrial process planning requirement are input into the fine-tuned large language model, and a first process planning scheme is generated; the first process planning scheme is subjected to rule verification based on the knowledge graph, a verification result is obtained, whether the first process planning scheme meets the preset rule is judged according to the verification result, when the judgment is yes, the first process planning scheme is taken as a final process planning scheme, when the judgment is no, a new process planning scheme is generated, and the final process planning scheme meeting the preset rule is obtained; and the final process planning scheme is converted into a control script or an interface calling sequence that can be parsed by an industrial execution system and is output, so that the corresponding industrial task is executed by the industrial execution system. The application can realize knowledge unification, automatic generation and rule-verified cross-software system compliance process planning. BRIEF DESCRIPTION OF DRAWINGS

[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0017] Figure 1 is a whole process schematic diagram of an industrial intelligent agent decision method involved in the actual scene of the present application;

[0018] Figure 2 is a process schematic diagram of an industrial intelligent agent decision method provided by an embodiment of the present application;

[0019] Figure 3 is a knowledge graph construction process schematic diagram provided by an embodiment of the present application;

[0020] Figure 4 is an LLM fine-tuning process schematic diagram provided by an embodiment of the present application;

[0021] Figure 5 is a construction MCP server process schematic diagram provided by an embodiment of the present application;

[0022] Figure 6is a structural schematic diagram of an industrial intelligent agent decision-making device provided by an embodiment of the present application.

[0023] Figure 7 is a structural schematic diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION

[0024] In the following description, for the purpose of explanation and not limitation, specific details are set forth, such as particular system configurations, techniques, etc., in order to provide a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application can be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.

[0025] The present application relates to the field of industrial artificial intelligence technology, in particular to an industrial intelligent agent decision-making method based on knowledge graph and large model cooperation, which is especially suitable for complex industrial scenarios that require multi-software system linkage. Traditional automation systems often lack flexibility and intelligence when adapting to dynamic industrial environments. Although traditional industrial automation excels in performing repetitive, rule-based tasks, modern industrial environments require systems that can adapt to changing conditions, predict faults, and optimize complex workflows. Artificial intelligence, especially large language models (LLM) with reasoning capabilities and knowledge graphs (KG) with context understanding capabilities, model context protocols (MCP), provide potential for achieving this level of adaptability and intelligence.

[0026] LLM is trained on massive amounts of text data, enabling powerful natural language understanding, generation, and reasoning. In process planning, LLM can understand complex natural language planning requirements, generate detailed step descriptions, and even perform preliminary logical reasoning. LLM's ability to understand and generate natural language provides a more intuitive and accessible way for human operators, engineers, and managers to interact with complex industrial systems.

[0027] Knowledge graph is a structured representation of information organized into interconnected nodes (entities) and edges (relationships), functioning by capturing complex relationships between entities and providing context for data. In industrial process planning, knowledge graph can integrate device capabilities, process constraints, material properties, personnel skills, safety standards, historical process cases, and other heterogeneous information, providing clear, inferable domain knowledge, and serving as the "brain" of process planning.

[0028] MCP is an open standard designed to simplify the way AI models interact with external tools, data sources, and services. It adopts a client-server architecture, where AI applications act as MCP clients and external resources implement MCP servers. The main role of MCP is to provide a unified interface for AI agents to securely and efficiently access and integrate various data sources without the need for custom integration.

[0029] How to combine existing technologies and solve the pain points of existing technologies to realize a complete industrial intelligent agent is a great challenge. Modern industrial control systems have the following pain points in process planning:

[0030] 1. Highly dependent on expert experience and manual intervention, the complexity of process planning is high, requiring a large amount of manual experience, resulting in low efficiency and being easily affected by subjectivity.

[0031] 2. Knowledge fragmentation and management difficulties, equipment manuals, process specifications, historical data, and other knowledge are scattered and difficult to effectively integrate and utilize, resulting in limited planning efficiency and quality.

[0032] 3. Difficulty in dealing with dynamic changes and uncertainties, real-time changes in market demand, material supply, equipment status, etc., traditional planning solutions are difficult to quickly adapt.

[0033] And LLM as a new representative of artificial intelligence, it is difficult to implement in industrial scenarios due to the requirement of high precision and stability. The problems of LLM are as follows:

[0034] 1. General LLM lacks professional knowledge in the industrial field, and is prone to generate inaccurate or false information ("hallucinations"), which is fatal in the industrial scene with high requirements for safety and accuracy.

[0035] 2. The input context length of LLM is limited, making it difficult to handle complex process flows, large amounts of historical data, or detailed equipment manuals at once.

[0036] 3. Although LLM performs well in natural language processing, it may have difficulty understanding the complex logical relationships between entities and processes in industrial systems and conducting in-depth reasoning.

[0037] 4. The decision-making process of LLM is not transparent, making it difficult to explain the reasoning process behind its output. This will reduce trust and adoption rate in critical industrial applications.

[0038] 5. Seamlessly integrating LLM into existing industrial control systems, databases, and software may face challenges such as inconsistent data formats and different communication protocols.

[0039] Another pain point is in the industry, different industrial software (such as CAD, CAE, MES, etc.) of each equipment manufacturer is difficult to guarantee compatibility, leading to increased interaction costs between systems, and in extreme cases, additional point-to-point connection is required, increasing additional workload.

[0040] The existing industrial scene application is mainly based on traditional expert system / rule engine, which runs stably, has strong interpretability, and performs well in fixed scenarios.

[0041] Data-driven machine learning models are good at learning patterns from data and have strong generalization ability, making them suitable for prediction and optimization tasks.

[0042] The task planning and execution of the fully large model-driven scheme (such as AutoGPT, autoGen) are performed by the large model, usually by obtaining the return result after execution, and making corresponding decisions and execution according to the return result, but this behavior does not conform to the industrial logic planning. In the industry, the task flow needs to be determined and then executed, and the execution needs to be guaranteed to be correct. However, the existing products adjust by obtaining feedback after execution.

[0043] The LLM combined with database retrieval method (Retrieval Augmented Generation, RAG) uses external knowledge base to make up for the lack of domain knowledge of LLM, thereby reducing hallucination.

[0044] Traditional expert system / rule engine system lacks flexibility and can only schedule according to pre-arranged processes, making it difficult to handle unpredefined scenarios. For unpredefined scenarios, a large amount of human resources is required for arrangement, debugging, and maintenance, which is costly and difficult to adapt to complex, dynamic, and uncertain environments, lacking generalization and self-learning ability.

[0045] Data-driven machine learning models are highly dependent on high-quality, large-scale labeled data; model interpretability is poor; it is difficult to integrate expert knowledge directly; and performance is lacking in small sample or new scene.

[0046] The task planning and decision-making process of the fully large model-driven scheme is contrary to the concept of the industrial field. This scheme adjusts by continuously executing and obtaining feedback, and the large model has hallucination problems and randomness in output, making it difficult to meet the precise constraints of process parameters, safety specifications, etc. (such as injection pressure error <±0.5MPa). This is not allowed in the industrial field.

[0047] The fully large model-driven scheme still has some shortcomings in daily application after learning a large number of samples, and in the industrial field, there are fewer samples, which will exacerbate the logical contradictions in the generated Plan.

[0048] In the LLM+RAG scheme, the external knowledge base is usually a collection of documents, and the search results may be redundant and discontinuous. RAG only solves the "search" problem and does not deeply solve the "intelligent management and utilization of context" problem, which is still limited by the context window of LLM.

[0049] In addition, multi-system collaboration is also a difficult problem. The existing full large model driven scheme still cannot plan according to effective ways for the scheduling of multiple systems and multiple tools, and lacks industry compliance verification of service calling order (such as must call CAE simulation before triggering PLC control). The interface protocols of multiple industrial software (CAE, MES, SCADA) are not unified, and traditional API integration requires customized development and cannot be dynamically adapted.

[0050] On the knowledge graph, the traditional knowledge graph only stores entity relationships and cannot dynamically generate service calling chains combined with real-time data (such as adjusting service calling priority according to device sensor data).

[0051] Therefore, the present application combines knowledge graph with LLM to form an industrial intelligent agent to mainly solve the following problems:

[0052] 1) Improve the field specialization and planning accuracy of LLM.

[0053] 2) Inject industry prior knowledge through knowledge graph to constrain the large model to generate process planning conforming to industrial logic.

[0054] 3) Iteratively optimize knowledge graph and service calling strategy through real-time data feedback.

[0055] 4) Dynamically bind heterogeneous industrial software services based on MCP open protocol and verify the compliance of service chain;

[0056] 5) Reasonable verification to ensure the data correctness of LLM in process arrangement and output results.

[0057] The present application combines LLM, knowledge graph, industrial software, and MCP technology to complete the overall industrial intelligent agent technical solution. The main idea is to use a large model as a reasoning tool for a knowledge graph to obtain reasoning generalization and reasoning rigor. The mapping relationship between knowledge graph and application can be dynamically loaded using MCP.

[0058] Before describing the technical solution of the present application in detail, first, the system structure involved in the actual scene of the technical solution of the present application is described. The system architecture involved in the industrial intelligent agent decision-making method of the present application includes the following three core modules:

[0059] I. Knowledge Graph

[0060] The construction process of the knowledge graph is as follows:

[0061] 1. Data collection: including equipment parameters, performance curves, process parameters, bill of materials, safety operation procedures, quality control standards, historical planning cases, existing standard operation processes (SOP), etc.

[0062] 2. Ontology design:

[0063] Core domain ontology: refer to the industry standard design prototype

[0064] International and industry standards related to digital delivery, ISO 15926, DEXPI, etc. define entities and relationships such as process equipment, process steps, materials, safety procedures, constraints, performance indicators, etc. Mainly describe the equipment designed by engineering design institute and key parameter attributes, specific models can be added to the existing ontology under the next level ontology;

[0065] 1) Control system hardware related standards, IEC 61131-1, IEC 61499, etc. Mainly describe the components and parameters of the control system hardware, each supplier provides custom extensions and next level ontology;

[0066] 2) Control system control logic related standards, IEC 61131-3, mainly describe engineering components and mainly define function blocks (FB), functions (FUN), etc. Each supplier can extend according to their own characteristics.

[0067] 3) Fault cause and treatment suggestion, refer to industry standards such as ISO 14224:2016 "Petroleum, petrochemical and natural gas industry - Collection and exchange of reliability and maintenance data of equipment".

[0068] 4) Main mechanism model processing suggestion, described by MCP.

[0069] 5) Application ontology and the association between production process elements;

[0070] 3. Knowledge graph instance extraction

[0071] 1) Analyze the PFD and P&ID diagrams and other materials provided by the design institute engineering delivery to the existing engineering design sub-road

[0072] 2) According to the control system PLC / DCS engineering hardware configuration file, it is parsed and converted into a control system;

[0073] 3) Knowledge extraction according to the existing control system control logic;

[0074] 4) Timed or triggered MCP acquisition of ontology and instance relationships, updating knowledge graph;

[0075] 5) Extracting existing unstructured documents into knowledge using large models, etc.

[0076] 4. Knowledge graph fusion

[0077] Integrate different domain knowledge graph instances into the same knowledge graph according to their relevance.

[0078] 5. MCP ontology: Model MCP as knowledge graph industry software and application attributes. Define entity types such as context policies, relevance metrics, clipping rules, interaction history, and relationships such as applied to, contains, and based on. For example: a context policy entity can contain attributes such as priority, maximum token number, and dynamic clipping algorithm, and be associated with a specific process step or device.

[0079] 6. Knowledge extraction and loading: Extract knowledge from unstructured documents and combine expert experience to load all structured knowledge (including MCP-related metadata) into a graph database.

[0080] II. LLM fine-tuning

[0081] Customize pre-trained LLMs on industrial data to improve accuracy and relevance. Fine-tuning can help LLMs understand industry-specific language and context. By training LLMs on relevant industrial datasets, their performance in understanding specific tasks such as maintenance procedures can be significantly improved, reducing errors and improving task execution efficiency. The LLM fine-tuning process in this application is as follows:

[0082] 1. Call MCP functions;

[0083] 2. Knowledge graph query logic, including knowledge semantic query, instance semantic query, entity attribute query, relationship association query, etc.

[0084] 3. Industry standard terminology semantics

[0085] 4. Fine-tuning method: Select appropriate base LLM and use parameter-efficient fine-tuning techniques (such as LoRA, QLoRA) to enable it to grasp the logic of industrial process planning, optimization goals, and understand and utilize MCP policy instructions to generate high-quality planning solutions.

[0086] III. MCP

[0087] Develop or utilize existing MCP servers for industrial data sources and tools, and expose MCP clients to external applications. Based on industrial software, build basic industrial software functions, unify communication interfaces through model context protocols, and expose unified services to the outside for knowledge graph integration.

[0088] The implementation process of the MCP server of the present application is as follows:

[0089] 1. MCP describes existing application resources;

[0090] 2. MCP describes instances with the same semantic entity name as the existing knowledge graph;

[0091] 3. MCP models and templates of ontology;

[0092] 4. MCP for existing instantiated data, models and templates.

[0093] After the above three modules are designed, the overall execution process of the industrial intelligent agent decision-making method of the present application is as shown in Figure 1 Figure 1 is the overall flowchart of the industrial intelligent agent decision-making method involved in the actual scene of the present application, and the specific operation process is as follows:

[0094] 1. User demand input

[0095] The user inputs the process planning requirements through natural language.

[0096] 2. Demand analysis and knowledge graph retrieval

[0097] Input analysis: entity recognition, intent recognition and keyword extraction are performed on the user input.

[0098] Graph query: use the analysis result to send a query to the knowledge graph to retrieve core knowledge related to the requirements, including device capability, process constraint, optimization target, historical planning case, MCP context strategy and other contents.

[0099] Preliminary context construction: the retrieved core knowledge (including MCP strategy metadata) is preliminarily organized into a format understandable by LLM.

[0100] 3. MCP model context protocol processing embedded in the knowledge graph

[0101] ​Contextual Decision and Optimization: Unlike traditional RAG, the MCP module here is deeply integrated with the knowledge graph. MCP is no longer just an external program, it queries the knowledge graph for contextual policy entities related to the current task. MCP intelligently trims, compresses, abstracts, and reorganizes the raw information returned by RAG, ensuring that the most critical and relevant information is presented to the LLM in the most efficient way, based on the policy in the knowledge graph and the current context window of the LLM. MCP can even embed some reasoning guidance information in the context.

[0102] Dynamic Context Management: In multi-round dialogue or complex planning scenarios, MCP dynamically updates the context, integrating user feedback, intermediate planning results of LLM, and new knowledge graph retrieval results.

[0103] 4. LLM Process Planning Generation

[0104] The optimized context processed by MCP is submitted to the fine-tuned LLM as input prompts along with user instructions.

[0105] LLM generates detailed industrial process planning schemes based on its domain knowledge and the provided context.

[0106] 5. Process Planning Verification and Optimization

[0107] Rule Extraction: Extract verification rules related to the current planning scheme from the knowledge graph (including: process feasibility, safety compliance, resource constraints, production standards, optimization objectives, etc.).

[0108] Scheme Analysis and Semantic Analysis: Analyze the process planning scheme generated by LLM into a structured data model.

[0109] Rule Matching and Reasoning:

[0110] Feasibility Verification: Check if the planning steps meet the physical and logical constraints such as equipment capacity, material properties, process flow, etc.

[0111] Compliance Verification: Check if the planning scheme violates the safety procedures, environmental standards, etc. in the knowledge graph.

[0112] Resource Optimization Evaluation: Evaluate whether the planning scheme meets the optimization objectives proposed by the user based on energy consumption models, time models, etc.

[0113] Conflict Detection: Detect resource conflicts, time conflicts, etc.

[0114] Generate Verification and Optimization Report: Output detailed reports including pass / fail status, problem type, location, cause analysis, and quantitative evaluation for optimization objectives.

[0115] 6. Feedback and iteration

[0116] If the verification fails or there is room for optimization, a detailed verification and optimization report will be fed back to the LLM. After receiving the report, the LLM tries to understand the problem and generate a revised or optimized planning scheme through its fine-tuning capability, forming an iterative optimization cycle. Users can also manually intervene according to the report and provide new instructions to the LLM.

[0117] 7. Process execution and monitoring interface

[0118] The verified and optimized process planning scheme can be output in a standard format (such as XML, JSON) or directly converted into a script for an automation platform to guide production execution (such as MES, SCADA system).

[0119] The technical solutions of the present application will be described in detail below in conjunction with the drawings and specific embodiments.

[0120] Figure 2 is a flowchart of an industrial intelligent agent decision-making method provided by an embodiment of the present application. As shown in Figure 2 the industrial intelligent agent decision-making method can specifically include:

[0121] S201, loading multi-source industrial data to a knowledge graph, and constructing a domain ontology and an MCP ontology to enable the knowledge graph to store entities, attributes, and relationships;

[0122] S202, performing parameter fine-tuning on a predetermined base large language model, using the corpus related to process planning in the knowledge graph and the MCP metadata as training samples to obtain a fine-tuned large language model;

[0123] S203, receiving a user input industrial process planning requirement, performing semantic analysis on the industrial process planning requirement to obtain at least one key entity, process target, and constraint information;

[0124] S204, querying the knowledge graph according to the key entity and constraint information to obtain an MCP context strategy, processing the query result using the MCP context strategy to generate a prompt context;

[0125] S205, inputting the prompt context and the industrial process planning requirement into the fine-tuned large language model to generate a first process planning scheme;

[0126] S206, performing rule verification on the first process planning scheme based on the knowledge graph to obtain a verification result, determining whether the first process planning scheme meets the preset rules according to the verification result, taking the first process planning scheme as the final process planning scheme when the determination is yes, generating a new process planning scheme when the determination is no, and continuing until the final process planning scheme that meets the preset rules is obtained;

[0127] S207, convert the final process planning scheme into a control script or interface call sequence that can be parsed by an industrial execution system, and output it for the industrial execution system to execute the corresponding industrial task.

[0128] In some embodiments, multi-source industrial data is loaded into the knowledge graph, and a domain ontology and an MCP ontology are constructed to enable the knowledge graph to store entities, attributes, and relationships, including:

[0129] Multi-source industrial data is collected from structured control system files, real-time application interfaces, and unstructured technical documents, and data standardization and semantic normalization processing is performed;

[0130] A domain ontology describing devices, process steps, materials, constraints, and performance indicators is constructed according to industry standards, and an MCP ontology describing industrial software interfaces, calling systems, and context strategies is constructed;

[0131] Using entity mapping rules or knowledge extraction models, the semantically normalized data is mapped to instances of the domain ontology and the MCP ontology, generating corresponding entities, attributes, and relationships;

[0132] The generated entities, attributes, and relationships are written into a graph database, and ontology alignment and consistency verification are performed to update the knowledge graph.

[0133] Specifically, in this embodiment, an injection molding section of a certain discrete manufacturing line is taken as an example and combined with the accompanying drawings to illustrate how multi-source industrial data is loaded into the knowledge graph, and a domain ontology and an MCP ontology are constructed based on industry standards to enable the knowledge graph to store entities, attributes, and relationships completely. Figure 3 is a knowledge graph construction process schematic diagram provided by the embodiments of the present application. As shown in Figure 3 , the knowledge graph construction process can specifically include:

[0134] First, the data collection and semantic normalization of the present embodiment includes the following contents:

[0135] 1. Collect data from structured control system files: The PLC configuration file of the production line is exported in XML format, which contains device tags, I / O addresses, process variables, and alarm thresholds. The system first parses the XML nodes, extracts each device tag and its attributes, and converts all fields uniformly to UTF-8 encoding.

[0136] 2. Collect data from real-time application interfaces: Field devices publish real-time temperature, pressure, and energy consumption data through OPCUA protocol. The collection end subscribes to the corresponding nodes, caches the data stream according to the millisecond timestamp, and uniformly converts the units reported by different devices, such as converting psi to MPa.

[0137] 3. Data collection from unstructured technical documents: Text information in PDF manuals and maintenance records provided by equipment vendors is input into a named entity recognition module assisted by a large language model after being recognized by OCR, to extract semantic fragments such as equipment model, key components, fault causes, and treatment suggestions.

[0138] 4. Semantic normalization processing: Combine self-built industry term dictionary and BERT-CRF sequence labeling model to perform synonym merging and abbreviation expansion on the extracted fields, and merge words such as "cooling pump" and "cooling water pump" into a unified equipment category "cooling pump".

[0139] Further, the domain ontology and MCP ontology construction process of the embodiment includes the following contents:

[0140] 1. Domain ontology design: Refer to ISO15926 and IEC61131-1 / 3 standards to define five categories of concepts and their hierarchical attributes, such as Equipment, ProcessStep, Material, Constraint, and PerformanceIndex. For example, Equipment is divided into subcategories such as InjectionMoldingMachine, CoolingPump, and DryingOven; ProcessStep is divided into process steps such as Melt, Inject, Hold, and Cool.

[0141] 2. MCP ontology design: According to the MCP specification, abstract industrial software interfaces into four types of entities: Service, InputParameter, OutputParameter, and ContextPolicy. Service entities record software names, versions, and endpoints; ContextPolicy entities record window size, priority, and clipping algorithm identification.

[0142] 3. Ontology persistence: Write the ontology into the ontology management library in OWL format, and declare class inheritance, attribute domain, and attribute range through RDFSchema.

[0143] Further, the instance mapping and relationship generation of the embodiment can include the following contents:

[0144] 1. Entity mapping rules: Based on XPath and regular expressions, map the node named "IM_260T" in the PLC configuration XML to the InjectionMoldingMachine subclass instance, and map the equipment number to the IRI suffix of owl:NamedIndividual; the corresponding variable "InjectPressureSet" is mapped to PerformanceIndex:InjectPressure.

[0145] 2. Knowledge extraction model: For the OCR text, a large language model fine-tuned by LoRA is called to analyze the sentence "If the outlet pressure of the cooling pump is lower than 0.3 MPa, the seal needs to be replaced", and label the equipment entity CoolingPump-001, the performance indicator OutletPressure, the threshold 0.3 MPa, and the maintenance action ReplaceSeal, and automatically establish the hasMaintenanceAction relationship between CoolingPump-001 and the maintenance action.

[0146] 3. Relationship completion: It is determined that InjectionMoldingMachine-001 and CoolingPump-001 exist physical connection through a path-based similarity algorithm, and the connectsTo relationship is added in the graph.

[0147] Further, the graph database writing and consistency checking of the embodiment can include the following contents:

[0148] 1. Data writing: all entities, attributes and relationships are imported into the graph database in the form of RDF triples, and the RDF plug-in of Neo4j is used to map the triples into nodes and edges.

[0149] 2. Ontology alignment: owl:sameAs comparison is performed to merge the same serial number equipment instances in the equipment manual and the PLC file; skos:exactMatch is used to perform equivalent mapping on multilingual attributes.

[0150] 3. Consistency checking: according to the SHACL rule, it is checked whether each InjectionMoldingMachine instance is associated with at least one CoolingPump instance and has the rated clamp force attribute at the same time; if the checking fails, the conflict node is recorded and manual confirmation is triggered.

[0151] In some examples, when the OPCUA data stream triggers the injection molding pressure abnormal event, the system calls the MCP service through the event-driven function, writes the latest pressure curve into the graph database, and automatically establishes the hasRealtimeData relationship between the PressureTrend entity and InjectionMoldingMachine-001, so that the knowledge graph keeps real-time.

[0152] Through the steps of the above embodiment, the embodiment completes the collection, standardization, normalization, ontology mapping, entity relationship generation and consistency checking of multi-source industrial data, constructs a high-quality knowledge graph that can be called by subsequent industrial intelligent agents for reasoning and decision-making, and realizes the landing of the method of the application in the injection molding production line scene.

[0153] In some embodiments, parameter fine-tuning is performed on a predetermined base large language model, and a corpus related to process planning in a knowledge graph and MCP metadata are used as training samples to obtain a fine-tuned large language model, including:

[0154] The corpus containing device capabilities, process steps, constraint rules and corresponding MCP context strategies is extracted from the knowledge graph, and text standardization processing is performed according to industry terminology specifications;

[0155] Based on the corpus and the MCP metadata, training samples are generated. The training samples embed key entities, attributes and context strategy markers on the instruction side, and describe process flow logic on the response side;

[0156] The base large language model is inserted with an adaptation module, and the original model parameters are frozen. Only the adaptation module is trained to fine-tune the parameters;

[0157] In the training stage, the adaptation module is optimized by using a staged learning rate, gradient clipping and mixed precision strategy until the fine-tuned large language model is obtained.

[0158] Specifically, based on the above-mentioned injection molding section knowledge graph that has been constructed, this embodiment will explain how to fine-tune the parameters of a predetermined base large language model (hereinafter referred to as base model) to make it have the ability of domain process planning and MCP context analysis. Figure 4 is a LLM fine-tuning process diagram provided by the embodiment of the present application. As shown in Figure 4 The parameter fine-tuning process of the base large language model can specifically include:

[0159] I. Training corpus construction

[0160] 1. Corpus extraction: Call the SPARQL query interface to batch retrieve the capability boundaries of Injection Molding Machine, Cooling Pump and other device instances, the parameter constraints of process steps Melt, Inject, Hold, Cool, and the associated ContextPolicy entities from the knowledge graph.

[0161] 2. Term standardization: Replace synonyms according to the self-built ISO15926 term table for the extracted text, and unify “injection pressure” to “InjectPressure”. All units are converted to international units such as MPa, ℃, s, etc.

[0162] 3. Instruction-response pair generation: Generate training samples in the format of “instruction first, response later”. Insert special markers on the instruction side, for example <entity>Injection Molding Machine - 260T <constraint>Inject Pressure < 3.5 MPa< / constraint> <policy>Window 512 Token< / policy> ; on the response side, describe the process that meets the above constraints, such as "step 1 set barrel temperature 230℃… step 4 cooling time 12s".

[0163] 4. MCP metadata embedding: for each sample, on the instruction side, append the service name, input parameter template, and priority, explicitly marked with tags such as "Service Name", "Input Parameter Template", and "Priority", so that the model learns the service orchestration logic. <service>CAE_Sim< / service>

[0164] II. Fine-tuning strategy and adaptation module configuration

[0165] 1. Base model selection: choose a bilingual general-purpose model with 70B parameters, and solidify the original weights.

[0166] 2. Adaptation module insertion: insert LoRA low-rank adaptation matrix at the query-key product of each Transformer layer, with rank set to 8; at the same time, insert Bias adaptation vector at the embedding layer and output layer to capture industrial term bias.

[0167] 3. Parameter freezing: all other parameters are locked except the above adaptation matrix and Bias vector, to ensure that the memory usage and training time are within a controllable range.

[0168] III. Training process

[0169] 1. Hardware environment: use a server with 8 80GB GPUs, enable tensor parallelism and pipeline parallelism in a hybrid mode.

[0170] 2. Optimization scheduling: train a total of 240,000 steps, with the learning rate linearly increasing to 2e-4 for the first 30,000 steps, and then decaying to 2e-5 according to the cosine annealing method; perform gradient clipping every thousand steps with a threshold of 0.8 to prevent gradient explosion.

[0171] 3. Mixed precision: use FP16 weights and BF16 forward calculation throughout the process, and update the gradient after 8 steps of accumulation to reduce memory pressure.

[0172] 4. Monitoring indicators: monitor Perplexity and instruction compliance accuracy on the validation set, and trigger early stopping when the Perplexity decreases by less than 0.1 for five consecutive evaluations.

[0173] IV. Model convergence and export

[0174] ​Training converged at the 180th epoch, validation set Perplexity dropped from an initial 35 to 7.2, and instruction following accuracy improved to 94.3%. LoRA weight and bias weight files were then exported and model version number "IM-LLM-v1.0" was recorded.

[0175] V. Runtime Integration

[0176] 1. Weight Mounting: Load "IM-LLM-v1.0" adapted weights in the inference service startup script, keeping the base model in read-only state.

[0177] 2. Context Validation: When receiving an injection molding process planning request, the inference service first checks if the prompt sequence contains <service>Tag with <constraint>Tag, if missing, invoke MCP strategy to complete default context parameters.

[0178] 3. Inference output: The text output by the model is mapped to the process step object through the regular parser, and is accompanied by the Service call sequence and parameter details, and then enters the rule verification link.

[0179] Through the above process of the embodiment, the fine-tuned large language model can understand the domain terminology, parse the MCP context strategy, and output the injection molding process planning that meets the device capability and process constraints, providing a reliable language reasoning core for the overall industrial intelligent agent decision-making process.

[0180] In some embodiments, in the aforementioned injection molding section scenario, to realize the unified calling of the large language model to multiple industrial software, the embodiment explains how to build an MCP server and expose it as a client interface to external application programs for calling by the knowledge graph and intelligent agent decision-making process. Figure 5 is the flowchart of building an MCP server provided by the embodiment of the present application. As shown in Figure 5 , the MCP server building process includes:

[0181] I. Encapsulation of industrial software external interface

[0182] The commonly used software in the injection molding section includes three-dimensional modeling tools, CAE simulation platforms, MES execution systems, and SCADA monitoring systems. The developer first checks the existing external interface forms of each software: some support REST, some publish services through OPCUA, and some only provide local script calls.

[0183] 1. For software with REST interface, directly collect the endpoint address, request method, input parameter, and return format.

[0184] 2. For OPCUA nodes, record the node path, data type, and subscription frequency.

[0185] 3. For local script calls, encapsulate them into daemon processes that can receive JSON parameters and return execution results.

[0186] Finally, a lightweight adaptation layer is added in front of each interface to uniformly receive "MCP call messages" and return "MCP response messages".

[0187] II. Resource description of MCP server

[0188] In the MCP server, the developer creates a resource description entry for each software function instance, which contains five pieces of information:

[0189] Service identification, used to uniquely identify the function;

[0190] The system, such as CAE or MES;

[0191] Input parameter list, indicating parameter name, data type and whether it is required;

[0192] Output parameter list, indicating return field and its meaning;

[0193] Service version and update date.

[0194] All entries are stored in the MCP configuration library in a uniform resource description language, and subsequent retrieval can be performed in milliseconds according to the service identifier.

[0195] III. Semantic alignment and knowledge graph mapping

[0196] The MCP server automatically reads the service entities related to industrial software in the knowledge graph when it starts, and performs two-level alignment:

[0197] 1. Name synonym merging: Hash matching the service identifier of the resource description entry with the label of the knowledge graph service entity. If there are differences in device codes but the semantics are consistent, such as "CAE_Simulate" and "CAE simulation", they are mapped to the same service entity.

[0198] 2. Parameter semantic alignment: Check if the input and output parameter names exist in different writing styles, such as "CoolingTime" and "CoolTime". If differences are found, create a synonymous attribute mapping in the knowledge graph to ensure consistency in subsequent queries.

[0199] IV. Management of ontology model and template

[0200] The MCP server has a set of ontology model files and corresponding configuration templates built-in.

[0201] The ontology model is used to describe the service classification hierarchy, parameter inheritance relationship and call dependency relationship.

[0202] The template file records the standard call format, abnormal return field and retry strategy of each type of service.

[0203] When a new service entry is written to the configuration library, the system first checks if its category already exists in the ontology model; if not, it automatically clones the parent model and adds exclusive attributes to maintain the overall ontology hierarchy.

[0204] V. Synchronization of instantiated data, model and template

[0205] The system triggers the synchronization process at the daily production shift to transfer the updated content in the MCP configuration library to the knowledge graph instance area:

[0206] 1. If the service entry is changed, update the version number and update time of the corresponding entity in the knowledge graph;

[0207] 2. If the template file is modified, update the template reference relationship synchronously and mark the modification reason;

[0208] 3. If a new execution script or simulation model is added, upload it to the file warehouse in the form of a "service instance file", and write the file fingerprint into the knowledge graph for retrieval.

[0209] Six, unified service exposure to the outside

[0210] When an external application or large language model initiates a call request through the MCP client, the process is as follows:

[0211] 1. The client carries the target service identifier and call parameters in the request header;

[0212] 2. The MCP server reads the resource description entry and locates the system and port it belongs to;

[0213] 3. Replace the actual parameters according to the template to generate the underlying interface message;

[0214] 4. Send the message to the adaptation layer, and the corresponding software executes the business logic;

[0215] 5. After execution, the adaptation layer returns the result message, and the MCP server parses and maps it into a standard response format and returns it to the client.

[0216] Through this process, the multiple software functions originally with different interfaces are encapsulated under a unified protocol, and appear to the intelligent agent as a set of services that can be queried, called, and traced.

[0217] Any newly added industrial software only needs to write the adaptation layer and resource description, and can be called without modifying the intelligent agent logic;

[0218] The knowledge graph can directly query the MCP service entity and its parameters, providing real-time and accurate interface information for LLM context prompts;

[0219] The call sequence and dependency relationship are explicitly maintained by the ontology model, ensuring that service orchestration meets process flow and industry compliance requirements.

[0220] Through this embodiment, the system completes the construction of the MCP server, resource description, semantic alignment, and the whole process of unified service exposure to the outside, providing a reliable, standardized, and maintainable interface environment for subsequent industrial intelligent agent decision-making links.

[0221] In some embodiments, the knowledge graph is queried according to key entities and constraint information to obtain an MCP context strategy, including:

[0222] Based on the key entity, process target and constraint information, a semantic query statement is generated according to the semantic constraints of the domain ontology and the MCP ontology;

[0223] The graph reasoning engine is called to execute the semantic query, and the context strategy entity associated with the key entity or the constraint information is located by recursively searching along the preset association relationship in the entity relationship network;

[0224] The obtained candidate context strategy entity is sorted according to the relevance rule, and the target MCP context strategy and the corresponding parameter set are determined.

[0225] Specifically, based on the constructed injection molding section knowledge graph, when the system knows the key entity "injection molding machine Injection Molding Machine-260T", the process target "shorten the cooling time", and the constraint information "the injection pressure is not more than 3.5 MPa", how to retrieve and determine the most suitable MCP context strategy is explained.

[0226] The system first selects a semantic query template containing device, process target and constraint placeholders from the preset query template library according to the semantic constraints of the domain ontology and the MCP ontology. Then "injection molding machine Injection Molding Machine-260T" is replaced into the device placeholder, "shorten the cooling time" is replaced into the process target placeholder, and "injection pressure ≤ 3.5 MPa" is replaced into the constraint placeholder.

[0227] In some examples, during the replacement process, the system automatically inserts the three semantic predicates specified in the ontology:

[0228] "applicable relationship" between device and context strategy;

[0229] "optimization relationship" between context strategy and process target;

[0230] "compliance relationship" between context strategy and process constraint.

[0231] Further, when starting the graph reasoning engine, the system loads the OWL 2RL rule set and enables a custom reasoning rule for recursive derivation along the "physical connection → drive → monitor" chain, so as to identify the auxiliary devices such as cooling pump and temperature controller closely associated with the injection molding machine.

[0232] After running the query, the reasoning engine first locates the context strategy entity directly associated with the injection molding machine, and then extends to the strategy entity associated with the cooling pump through the reasoning chain, and finally forms a candidate strategy set. If there are multiple versions of the same strategy, the system retains the version with the latest update date, and marks the old version as a historical instance and excludes it.

[0233] In some examples, the system calculates three scores for each candidate policy:

[0234] Target match: 1 if the optimization target declared by the policy is exactly "shorten cooling time", otherwise 0.

[0235] Constraint coverage: the ratio of the number of constraints covered by the policy to the total number of constraints in the current plan, e.g. 0.67 if the policy covers two constraints out of three in the plan.

[0236] Priority weight: read the policy weight attribute and normalize it to a value between 0 and 1.

[0237] The combined score is calculated in a weighted manner, with the target match weight being 0.5, the constraint coverage weight being 0.3, and the priority weight being 0.2. After the calculation, the system sorts the policies according to the combined score from high to low, and the policies with a score not lower than 0.8 enter the final candidate set. If there is a tie, the policy instance with the most recent update time is selected.

[0238] Further, the final determined policy instance is named "Policy-Window512Token". The policy contains the following key parameters:

[0239] Context window size 512token;

[0240] Entity priority mapping, with "injection pressure" priority being 1 and "cooling time" priority being 0.9;

[0241] Text summarization algorithm using keyword ranking-based algorithm.

[0242] The system assembles the above parameters and policy identifier into a "context policy object" and passes it to the prompt context generation module for subsequent large language model inference.

[0243] Through the steps of the above embodiments, the system automatically determines the MCP context policy that best fits the current scenario by means of semantic template filling, inference expansion, and relevance sorting, providing accurate and efficient context configuration for the subsequent process plan generation link.

[0244] In some embodiments, the MCP context policy is used to process the query results to generate a prompt context, including:

[0245] Read the window parameters, entity priority mapping, clipping threshold, and summary algorithm identifier in the target MCP context policy;

[0246] Sort the entities, attributes, and relationships in the query results according to the entity priority mapping, and delete nodes and edges with a priority lower than the threshold according to the clipping threshold;

[0247] The semantic compression module corresponding to the abstract algorithm identifier is called to perform semantic compression and reorganization on the reserved nodes and associated relationships to obtain a compressed representation.

[0248] The compressed representation is dynamically blocked based on the window parameter, and a preset prompt template is inserted to generate a prompt context conforming to the input format of the fine-tuning large language model.

[0249] Specifically, in the context of the preceding injection molding section, after the system has determined the target MCP context strategy "Policy-Window512Token" and obtained the knowledge graph query result, this embodiment explains how to process the query result into a prompt context suitable for the fine-tuning large language model according to the strategy.

[0250] I. Strategy parameter reading

[0251] The system first reads four core parameters from the strategy entity.

[0252] 1. Window parameter: the context window size is set to 512 tokens.

[0253] 2. Entity priority mapping: injection pressure priority 1.0, cooling time priority 0.9, device energy consumption priority 0.6, and the rest of the entities default to 0.5.

[0254] 3. Trimming threshold: nodes and edges with a priority lower than 0.6 will be deleted.

[0255] 4. Abstract algorithm identifier: specify the use of a semantic compression algorithm based on keyword weight ordering.

[0256] II. Entity sorting and trimming

[0257] The system annotates all entities, attributes, and relationships in the query result with priority, and then sorts them from high to low according to the score, for example:

[0258] Injection pressure and cooling time are placed at the front because their priority is not lower than 0.9.

[0259] Device energy consumption priority 0.6 is at the threshold critical, retained but at the end.

[0260] Entities such as edge device temperature and injection machine lubricating oil temperature with a priority lower than 0.6 are completely removed, and the related relationships are also deleted, ensuring that high-value information occupies more window space in subsequent steps.

[0261] III. Semantic compression and reorganization

[0262] The system calls the semantic compression module to perform two rounds of compression.

[0263] 1. Keyword extraction: Utilize the strategy-specified keyword weight algorithm to generate a keyword summary for each piece of retained entity, for example, compress "injection pressure real-time curve" into "injection pressure curve".

[0264] 2. Relationship reorganization: Merge multiple relationships with the same core keyword, for example, merge "injection pressure curve - dependent - injection machine model" and "injection pressure curve - measured - sensor A" into "injection pressure curve - associated - injection machine model / sensor A". The compressed content is presented in a phrase-level form while maintaining the logical coherence between entities.

[0265] Four, dynamic chunking and template insertion

[0266] 1. Dynamic chunking: The system dynamically calculates the number of blocks that can be accommodated according to the remaining text length and the 512 token window parameter. The compressed representation is divided into three blocks: the first block contains high-priority entities and their main relationships; the second block contains secondary high-priority attributes; and the third block contains strategy summary information.

[0267] 2. Template insertion: Insert fixed prompt labels before each block to guide the fine-tuning large language model to identify information categories. For example, insert "core process information" at the head of the first block, insert "secondary constraint information" at the head of the second block, and insert "strategy metadata" at the head of the third block.

[0268] 3. Context splicing: Splice in sequence according to block order, and then append the user's original requirements "shorten cooling time" and "injection pressure ≤ 3.5 MPa" description to form a complete prompt sequence.

[0269] Five, result verification and output

[0270] The system counts the number of tokens in the spliced sequence and confirms that it does not exceed 512 tokens. Then, the prompt context is submitted to the fine-tuning large language model together with the user's requirements to generate a new round of process planning scheme. If subsequent verification finds that the model still has missing information, the threshold of low-priority entities can be adjusted or the number of blocks can be reduced to trigger the process of this embodiment again.

[0271] Through the steps of the above embodiment, the query result is trimmed, compressed and reorganized without exceeding the context window limit, while retaining key entities and relationships that meet the process objectives, providing a compact and semantically sufficient input for the large language model, improving the quality and compliance of process planning.

[0272] In some embodiments, the prompt context and industrial process planning requirements are input into the fine-tuning large language model to generate a first process planning scheme, including:

[0273] According to the preset prompt template, the industrial process planning requirements are filled into the target description field, the prompt context is filled into the knowledge field, and the constraint description field is inserted, and a prompt sequence conforming to the input format of the fine-tuning large language model is spliced;

[0274] According to the generation temperature, sampling probability threshold and maximum Token number recorded in the MCP context strategy, the inference parameters of the fine-tuning large language model are configured;

[0275] The fine-tuning large language model is called to perform forward inference, and a text result containing process steps, device process mapping relationship and service call sequence mark is output;

[0276] The text result is parsed to obtain a structured first process planning scheme.

[0277] Specifically, after completing the construction of the prompt context, this embodiment explains how to input the prompt context and the industrial process planning requirements into the fine-tuning large language model together to generate a first version of injection section process planning scheme and convert it into a structured result.

[0278] I. Prompt template filling

[0279] 1. Template structure

[0280] The preset prompt template consists of three parts, namely the target description field, the knowledge field and the constraint description field. Each part starts with a clear Chinese label so that the fine-tuning large language model can distinguish the content categories.

[0281] 2. Field filling

[0282] Target description field: write the user requirement "shorten the cooling time and keep the injection pressure below 3.5 MPa".

[0283] Knowledge field: write the three pieces of information of the prompt context generated in the previous embodiment, and keep the original order after the label.

[0284] Constraint description field: list the mandatory constraints "injection pressure ≤ 3.5 MPa" and "cooling time ≤ 12 s", and the soft constraint "minimize energy consumption".

[0285] 3. Prompt sequence splicing

[0286] The system splices the three parts in the order of the template, only keeping a single line separator in the middle to ensure consistent model input format.

[0287] II. Inference parameter configuration

[0288] According to the inference control parameters in the target MCP context strategy, the system is set as follows:

[0289] The generation temperature is set to 0.2 to obtain more certain output;

[0290] The sampling probability threshold is set to 0.9 to balance creativity and stability;

[0291] The maximum number of generated tokens is limited to 400 to ensure that the output does not exceed the window;

[0292] The Top-k value adopts the strategy of default 10, which is used to control the size of the highest probability word candidate set.

[0293] The above parameters and prompt sequences are packaged together as a reasoning request.

[0294] III. Fine-tuning of large language model reasoning

[0295] The system calls the fine-tuned large language model to perform forward reasoning. The model combines the target, knowledge, and constraint information to output a piece of text marked by tags, for example, containing:

[0296] <flow step sequence> … < / flow step sequence>

[0297] <device-process mapping> … < / device-process mapping>

[0298] <service call sequence> … < / service call sequence>

[0299] IV. Result tag analysis

[0300] 1. Flow step analysis

[0301] Identify the content inside the <flow step sequence> tag and split it according to the "step number-process action-target parameter" mode. For example, "step 1-injection molding-injection pressure 3.2 MPa; step 2-cooling-time 11.5 s".

[0302] 2. Device-process mapping analysis

[0303] Extract device identifiers such as InjectionMoldingMachine-260T and CoolingPump-001 and associate them with corresponding process actions.

[0304] 3. Service call sequence analysis

[0305] Read the service identifiers enclosed by angle brackets, such as "CAE_Simulate" and "MES_Schedule", and record the call order and dependency relationship.

[0306] 4. Structured packaging

[0307] The system writes the parsed information into three data structures respectively: a process step list, a device-process mapping table, and a service call list, which together form a structured first process planning scheme.

[0308] V. Scheme persistence and subsequent processing

[0309] The structured scheme is then written to a buffer storage area, waiting for the rule verification module to call. If the rule verification passes, the scheme will enter the subsequent script conversion link; if it does not pass, a revised scheme is generated according to the iteration mechanism of the foregoing embodiment.

[0310] Through the steps of the foregoing embodiment, the system realizes the automatic generation of a structured process planning scheme that meets the requirements of MCP context strategy reasoning parameters from natural language requirements, laying the foundation for subsequent verification and execution.

[0311] In some embodiments, a new process planning scheme is generated and iterated until a final process planning scheme that meets the preset rules is obtained, including:

[0312] Analyzing the verification results to determine the process steps, conflicting resources, and corresponding knowledge graph entities that violate the preset rules;

[0313] Based on the parsed violation information, the knowledge graph is queried again to retrieve alternative device capabilities, process steps, or safety procedure entities, and revised information is generated;

[0314] The revised information is written into the original prompt context or a constructed incremental prompt context to form an updated prompt context;

[0315] The updated prompt context and the industrial process planning requirement are input into the fine-tuned large language model again to obtain a new process planning scheme;

[0316] The new process planning scheme is repeatedly subjected to rule verification, and if the verification still does not meet the preset rules, the steps of parsing, querying, updating, and generating are iterated until a final process planning scheme that meets the preset rules is obtained.

[0317] Specifically, in the injection molding section scenario, if the first process planning scheme is found to not meet the preset rules after rule verification, this embodiment explains how to drive iterative revision based on the verification results until a final process planning scheme that meets all the rules is obtained.

[0318] I. Verification result analysis

[0319] The rule verification module performs process feasibility, safety procedure, and resource conflict checking on the first flow planning scheme. If it is found that "cooling time is shortened to ten seconds" still causes the mold temperature to be higher than the allowed upper limit, a verification report is generated, listing the violating process step "cooling", the conflicting resource "cooling pump flow is insufficient", and the corresponding knowledge graph entity "CoolingPump-001".

[0320] II. Violation information driven knowledge graph re-search

[0321] After the system reads the violation information, it initiates targeted search in the knowledge graph:

[0322] 1. Query whether there is a higher flow level of cooling pump instance;

[0323] 2. Search for alternative cooling step parameter combinations in the process template;

[0324] 3. Search for safety procedure entities to confirm whether the new cooling time and pressure combination meets the specifications.

[0325] The search result returns the combination of "CoolingPump-003" (flow increased by 20%) and "cooling time eleven seconds", and the system generates correction information accordingly.

[0326] III. Update the prompt context

[0327] The system writes the correction information into the original prompt context, while retaining the high-priority entities in the previous context, forming an updated prompt context. If the correction only involves individual entities, an incremental approach is used to append the label "

Correction suggestion

[0328] IV. Re-call the fine-tuned large language model

[0329] The system re-populates the updated prompt context and the original industrial flow planning requirements into the prompt template, maintaining the target description and constraint description fields unchanged, and using the same set of generation temperature, sampling threshold, and maximum Token number parameters. The fine-tuned large language model outputs a new flow planning scheme accordingly, where the cooling step has been updated, and a "cooling pump switching" instruction has been added to the service call list.

[0330] V. Repeat verification and loop iteration

[0331] The rule verification module checks the new flow planning scheme again. If there are still situations that do not meet the rules, such as energy consumption exceeding the standard after replacing the cooling pump, the system performs violation analysis, graph search, context update, and model generation again.

[0332] In each cycle, the system maintains an iteration counter and a set of attempted solutions to prevent repeated attempts at the same modification path. When the verification results are all passed, and the solution meets the process objectives, constraints, and safety procedures, the system marks the current solution as the "final flow plan solution".

[0333] VI. Solution validation and persistence

[0334] The final flow plan solution is written into the database along with the verification report, and the script conversion module is notified through the event bus to enter the subsequent execution process. If the user allows manual review, the system will also generate a comparison summary listing the differences between the initial solution and the final solution in terms of equipment selection, parameter settings, and expected energy consumption, allowing engineers to quickly confirm.

[0335] Through the method of the embodiment, the system supports a knowledge graph and uses a fine-tuned large language model as a generation engine to build a closed-loop iterative mechanism of violation detection-knowledge retrieval-context correction-solution regeneration, which can automatically output an industrial flow plan solution that meets all preset rules without relying on manual repeated parameter tuning.

[0336] In some embodiments, the final flow plan solution is converted into a control script or interface call sequence that can be parsed by an industrial execution system and output for the industrial execution system to execute the corresponding industrial task, including:

[0337] Performing semantic analysis on the final flow plan solution to construct a structured flowchart containing task nodes and dependency relationships;

[0338] For each task node, querying the knowledge graph to obtain the industrial software interface identifier and parameter template corresponding to the task node;

[0339] Filling in the device identifier, process parameters, and timing information according to the parameter template to generate a call instruction matching the industrial software interface identifier;

[0340] Sorting the call instructions according to the dependency relationships and packaging them as a control script or interface call sequence;

[0341] Performing syntax checking and version marking on the packaged control script or interface call sequence, and outputting the control script or interface call sequence that passes the syntax checking to the industrial execution system through the model context protocol.

[0342] Specifically, after completing the iterative verification and obtaining the final flow plan solution, the embodiment explains how to convert the solution content into a control script or interface call sequence that can be parsed by an industrial execution system and push it to the MES and SCADA system in the production field through the model context protocol.

[0343] I. Semantic analysis and flowchart construction

[0344] The system first performs semantic parsing on the text labels of the final process planning scheme, extracting four types of elements: "step name, target device, key parameters, and pre-step". The parsing results are organized into a node set, with each node corresponding to a process task, such as "injection molding-injection", "cooling-cooling", and "pick-up-robot grabbing". Then the system establishes directed dependency edges according to the pre-step information to form a structured flowchart. This flowchart is stored in memory in the form of a task node set and a list of dependency relationships, which is called by the subsequent script generator.

[0345] II. Interface identification and parameter template retrieval

[0346] For each task node, the system initiates a query to the knowledge graph to read the "service entity-interface identification-parameter template" triplets. For example, the node "injection molding-injection" matches the PLC control service entity, with the interface identifier "PLC_Command_Inject" and the parameter template containing device number, injection pressure, injection speed, and holding time. The node "cooling-cooling" matches the SCADA control service entity, with the interface identifier "SCADA_Set_Cooling" and the parameter template containing cooling pump number, flow position, and target mold temperature.

[0347] III. Call instruction generation

[0348] The system fills in specific values based on the parameter template:

[0349] The device number is directly taken from the device-process mapping in the process planning scheme, such as Injection Molding Machine-260T.

[0350] The process parameters are taken from the target values given in the scheme steps, such as injection pressure 3.2 MPa.

[0351] The timing information is automatically calculated based on the pre-dependence in the flowchart and the target beat, ensuring a safe buffer time between upstream and downstream steps.

[0352] After filling, the system generates a call instruction string that conforms to the interface identifier syntax, and adds the MCP protocol header field to mark the version and transaction number.

[0353] IV. Instruction sorting and script packaging

[0354] The script generator sorts the call instructions globally according to the topological order of the flowchart; if there are parallel branches, concurrent markers and synchronization points are written in the instructions. After sorting, the instruction set is packaged into two output formats:

[0355] 1. Control script: a text script for PLC or robot controller, containing sequential and parallel execution segment identification.

[0356] 2. Interface call sequence: a JSON message stream for MES and SCADA, recording interface identification, parameter list and trigger condition for each record.

[0357] Five, syntax checking and version marking

[0358] After encapsulation, the script verification module checks the syntax specification, parameter range and dependency declaration for completeness. After passing the verification, the system generates a unique version mark "IM-Plan-v1.3" for the script and writes it into the version library; if the verification fails, return the error report and block the delivery process, wait for the designer to revise the script or re-adjust the planning scheme.

[0359] Six, script delivery

[0360] The final control script or interface call sequence is packaged through the model context protocol and written into the "execution request" message. The message contains policy tags, version marks and security signatures to ensure that it is not tampered with during network transmission. The MCP client sends the message to the MES and SCADA systems, and the on-site system executes the injection-pressure adjustment, cooling pump switching, mechanical arm grabbing and other operations accordingly. The execution status and key production line data are reported in real time to form a closed-loop monitoring.

[0361] Through the method of the embodiment, the final process planning scheme is automatically translated into a control script or call sequence that meets the interface specifications of multiple industrial software, ensuring that the production line can seamlessly execute the process flow generated by the agent, while the version mark and security signature guarantee the traceability and reliability of the execution process.

[0362] Through the technical scheme of the above embodiment, the present application has at least the following advantages:

[0363] 1. Realize intelligent and efficient industrial process planning

[0364] The planning period of several weeks or even months is shortened to several hours or several minutes.

[0365] The natural language understanding and generation capabilities of LLM, combined with the accurate knowledge of the knowledge graph, significantly improve the quality, feasibility and optimizability of the planning scheme.

[0366] 2. Significantly improve the accuracy and compliance of the planning scheme

[0367] The fine-tuned LLM can more accurately understand the industrial context.

[0368] MCP embedded in the knowledge graph ensures that the LLM is always working in the best context, significantly reducing "hallucinations" and unrealistic planning.

[0369] Strict constraints and verification rules in the knowledge graph ensure that the planning scheme complies with all relevant specifications such as process, safety, and environmental protection, reducing production risks.

[0370] 3、Breakthrough the context limitations of LLM, realize the efficient use of massive industrial knowledge

[0371] RAG mechanism enables LLM to access unlimited external knowledge.

[0372] MCP as part of the knowledge graph makes context management itself also inferable knowledge, enabling more intelligent and accurate tailoring and utilization of context, ensuring high efficiency of LLM in complex planning tasks.

[0373] 4、Enhance the explainability and traceability of industrial process planning

[0374] Each decision step of the planning scheme can be traced back to specific knowledge in the knowledge graph (equipment capability, process parameters, safety rules, MCP strategy, etc.). This increases the transparency of the system, making it easier for engineers to understand, review, and trust AI-generated planning schemes.

[0375] 5、Empower flexible manufacturing and rapid response capabilities

[0376] Quickly respond to changes in market demand, generate flexible process planning for new products, new orders, or unexpected situations.

[0377] Support personalized, small-batch, and multi-variety flexible production modes, improve the flexibility and competitiveness of the production system.

[0378] 6、Reduce dependence on single expert experience, realize knowledge inheritance and reuse

[0379] Explicitly structure and store expert tacit knowledge in the knowledge graph.

[0380] The system can automatically learn and utilize this knowledge, reducing over-reliance on individual senior engineers, and facilitating knowledge inheritance and standardization.

[0381] 7、Build an evolvable and self-optimizing industrial agent

[0382] Through feedback loops and continuous learning, the agent can continuously optimize its planning strategies and knowledge graph to adapt to changing industrial environments and new optimization goals.

[0383] The following is an apparatus embodiment of the present application, which can be used to execute the method embodiments of the present application. For details not disclosed in the apparatus embodiments of the present application, please refer to the method embodiments of the present application.

[0384] Figure 6 FIG. 1 is a structural schematic diagram of an industrial intelligent agent decision-making apparatus provided by an embodiment of the present application. As shown in FIG. 1, the industrial intelligent agent decision-making apparatus comprises: Figure 6

[0385] A construction module 601 is configured to load multi-source industrial data to a knowledge graph, and construct a domain ontology and an MCP ontology, so as to store entities, attributes and relationships in the knowledge graph.

[0386] A fine-tuning module 602 is configured to perform parameter fine-tuning on a predetermined base large language model, take the corpus related to process planning and MCP metadata in the knowledge graph as training samples, and obtain a fine-tuned large language model.

[0387] An analysis module 603 is configured to receive an industrial process planning requirement input by a user, perform semantic analysis on the industrial process planning requirement, and obtain at least one key entity, process target and constraint information.

[0388] A processing module 604 is configured to query the knowledge graph according to the key entity and constraint information, obtain an MCP context strategy, process the query result by using the MCP context strategy, and generate a prompt context.

[0389] A generation module 605 is configured to input the prompt context and the industrial process planning requirement to the fine-tuned large language model, and generate a first process planning scheme.

[0390] A verification module 606 is configured to perform rule verification on the first process planning scheme based on the knowledge graph, obtain a verification result, determine whether the first process planning scheme meets a preset rule according to the verification result, take the first process planning scheme as a final process planning scheme when the determination is yes, generate a new process planning scheme when the determination is no, and continue until a final process planning scheme meeting the preset rule is obtained.

[0391] A conversion module 607 is configured to convert the final process planning scheme into a control script or an interface calling sequence that can be parsed by an industrial execution system, and output the control script or the interface calling sequence, so as to enable the industrial execution system to execute a corresponding industrial task.

[0392] In some embodiments, Figure 6 ​The construction module 601 collects multi-source industrial data from structured control system files, real-time application interfaces, and unstructured technical documents, performs data standardization and semantic normalization processing; constructs a domain ontology describing devices, process steps, materials, constraints, and performance indicators according to industry standards, and constructs an MCP ontology describing industrial software interfaces, calling systems, and context strategies; using entity mapping rules or knowledge extraction models, the semantically normalized data is mapped to instances of the domain ontology and the MCP ontology, generating corresponding entities, attributes, and relationships; the generated entities, attributes, and relationships are written into a graph database, and ontology alignment and consistency verification are performed to update the knowledge graph.

[0393] In some embodiments, Figure 6 The fine-tuning module 602 extracts a corpus containing device capabilities, process steps, constraint rules, and corresponding MCP context strategies from the knowledge graph, and performs text standardization processing according to industry terminology specifications; generate training samples based on the corpus and MCP metadata, training samples embed key entities, attributes, and context strategy markers on the instruction side, and describe process flow logic on the response side; insert an adaptation module into the base large language model, and freeze the original model parameters, only training the adaptation module to fine-tune the parameters; in the training stage, use the stage-by-stage learning rate, gradient clipping, and mixed precision strategy to optimize the adaptation module until convergence to obtain the fine-tuned large language model.

[0394] In some embodiments, Figure 6 The processing module 604 generates a semantic query statement based on key entities, process targets, and constraint information, according to the semantic constraints of the domain ontology and the MCP ontology; calls the graph reasoning engine to perform semantic query, recursively retrieves along the preset association relationship in the entity relationship network, locates the context strategy entity associated with the key entity or the constraint information; the obtained candidate context strategy entity is sorted according to the relevance according to the scoring rule, and the target MCP context strategy and the corresponding parameter set are determined.

[0395] In some embodiments, Figure 6 The processing module 604 reads the window parameters, entity priority mapping, clipping threshold, and summary algorithm identifier in the target MCP context strategy; sorts the entities, attributes, and relationships in the query results according to the entity priority mapping, and deletes nodes and edges with priority lower than the threshold according to the clipping threshold; call the semantic compression module corresponding to the summary algorithm identifier to perform semantic compression and reorganization on the retained nodes and associated relationships to obtain a compressed representation; based on the window parameters, the compressed representation is dynamically blocked, and a preset prompt template is inserted to generate a prompt context that conforms to the input format of the fine-tuned large language model.

[0396] In some embodiments, Figure 6 The generation module 605 fills the industrial process planning requirements into the target description field, fills the prompt context into the knowledge field, and inserts the constraint description field according to the preset prompt template, and splices to obtain a prompt sequence conforming to the input format of the fine-tuned large language model. According to the generation temperature, the sampling probability threshold and the maximum Token number recorded in the MCP context strategy, the inference parameters of the fine-tuned large language model are configured; the fine-tuned large language model is called to perform forward inference, and a text result containing process steps, device process mapping relationship and service calling sequence mark is output; the text result is marked and parsed to obtain a structured first process planning scheme.

[0397] In some embodiments, Figure 6 The verification module 606 parses the verification result to determine the process steps that violate the preset rules, the conflict resources and the corresponding knowledge graph entities; based on the parsed violation information, the knowledge graph is queried again to retrieve alternative device capabilities, process steps or safety procedure entities, and correction information is generated; the correction information is written into the original prompt context or an incremental prompt context is constructed to form an updated prompt context; the updated prompt context and the industrial process planning requirements are input into the fine-tuned large language model again to obtain a new process planning scheme; the new process planning scheme is repeatedly executed for rule verification, and if the verification still does not satisfy the preset rules, the parsing, querying, updating and generating steps are repeatedly executed until a final process planning scheme that satisfies the preset rules is obtained.

[0398] In some embodiments, Figure 6 The conversion module 607 performs semantic analysis on the final process planning scheme to construct a structured process graph containing task nodes and dependency relationships; for each task node, the knowledge graph is queried to obtain the industrial software interface identifier and parameter template corresponding to the task node; the device identifier, process parameters and timing information are filled in accordance with the parameter template to generate calling instructions matching the industrial software interface identifier; the calling instructions are sorted according to the dependency relationship and encapsulated into control scripts or interface calling sequences; the encapsulated control scripts or interface calling sequences are subjected to syntax checking and version marking, and the control scripts or interface calling sequences that pass the checking are output to the industrial execution system through the model context protocol.

[0399] It should be understood that the size of the serial number of each step in the above embodiments does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0400] Figure 7 is a schematic diagram of an electronic device 7 provided by an embodiment of the present application. As shown in Figure 7 As shown, the electronic device 7 of this embodiment includes a processor 701, a memory 702, and a computer program 703 stored in the memory 702 and executable on the processor 701. The processor 701 implements the steps in each of the above method embodiments when executing the computer program 703. Alternatively, the processor 701 implements the functions of each module / unit in each of the above apparatus embodiments when executing the computer program 703.

[0401] The electronic device 7 can be a desktop computer, a notebook computer, a palm computer, a cloud server, or the like. The electronic device 7 can include but is not limited to the processor 701 and the memory 702. Those skilled in the art can understand that the electronic device 7 can include more or less components, or different components than those shown. Figure 7 The electronic device 7 shown is merely an example and does not constitute a limitation on the electronic device 7, which can include more or less components, or different components than those shown.

[0402] The processor 701 can be a central processing unit (CPU), or other general purpose processors, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic, discrete hardware components, or the like.

[0403] The memory 702 can be an internal storage unit of the electronic device 7, such as a hard disk or a memory of the electronic device 7. The memory 702 can also be an external storage device of the electronic device 7, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, or the like. The memory 702 can also include both an internal storage unit and an external storage device of the electronic device 7. The memory 702 is used to store computer programs and other programs and data required by the electronic device.

[0404] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above functional units and modules is taken as an example, and in actual application, the above functions can be completed by different functional units and modules according to needs, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiment can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of software functional unit.

[0405] If the integrated module / unit is realized in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium (for example, a computer readable storage medium). Based on this understanding, all or part of the processes in the above-mentioned embodiment methods can also be completed by a computer program instructing related hardware, and the computer program can be stored in a computer readable storage medium. When the processor executes the computer program, the steps of each method embodiment described above can be implemented. The computer program can include computer program code, which can be in the form of source code, object code, executable file or some intermediate form, etc. The computer readable storage medium can include any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), electric carrier signal, telecommunication signal and software distribution medium, etc.

[0406] The above embodiments are only used to illustrate the technical solutions of the present application, but not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement for part of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application.< / constraint> < / service> < / entity>

Claims

1. An industrial agent decision-making method, characterized in that, The method comprises the following steps: loading multi-source industrial data into a knowledge graph, and constructing a domain ontology and an MCP ontology, so that the knowledge graph stores entities, attributes and relationships; performing parameter fine-tuning on a predetermined base large language model, using process planning-related corpus and MCP metadata in the knowledge graph as training samples to obtain a fine-tuned large language model; receiving an industrial process planning requirement input by a user, performing semantic analysis on the industrial process planning requirement to obtain at least one key entity, process target and constraint information; querying the knowledge graph according to the key entity and constraint information to obtain an MCP context strategy, processing the query result using the MCP context strategy to generate a prompt context; inputting the prompt context and the industrial process planning requirement into the fine-tuned large language model to generate a first process planning scheme; performing rule verification on the first process planning scheme based on the knowledge graph to obtain a verification result, and determining whether the first process planning scheme meets a preset rule according to the verification result, wherein if the determination result is yes, the first process planning scheme is taken as a final process planning scheme, and if the determination result is no, a new process planning scheme is generated until a final process planning scheme meeting the preset rule is obtained; converting the final process planning scheme into a control script or an interface calling sequence that can be parsed by an industrial execution system, and outputting the control script or the interface calling sequence for the industrial execution system to execute a corresponding industrial task.

2. The method of claim 1, wherein, The method comprises the following steps: collecting multi-source industrial data from structured control system files, real-time application interfaces and unstructured technical documents, and performing data standardization and semantic normalization processing; constructing a domain ontology describing devices, process steps, materials, constraints and performance indicators according to industry standards, and constructing an MCP ontology describing industrial software interfaces, calling systems and context strategies; mapping the data after semantic normalization to instances of the domain ontology and the MCP ontology using entity mapping rules or knowledge extraction models to generate corresponding entities, attributes and relationships; writing the generated entities, attributes and relationships into a graph database, and performing ontology alignment and consistency checking to update the knowledge graph.

3. The method of claim 1, wherein, The method comprises the following steps: extracting corpus containing device capabilities, process steps, constraint rules and corresponding MCP context strategies from the knowledge graph, and performing text standardization processing according to industry terminology specifications; generating training samples based on the corpus and MCP metadata, wherein the training samples embed key entities, attributes and context strategy tags on the instruction side, and describe process flow logic on the response side; inserting an adaptation module into the base large language model, and freezing the original model parameters, and only training the adaptation module to fine-tune the parameters; The adaptation module is optimized in the training stage by adopting a staged learning rate, gradient clipping and a mixed precision strategy until convergence to obtain the fine-tuned large language model.

4. The method of claim 1, wherein, The MCP context strategy is obtained by querying the knowledge graph according to the key entity and constraint information, including: Based on the key entity, process target and constraint information, a semantic query sentence is generated according to the semantic constraints of the domain ontology and MCP ontology; The graph reasoning engine is called to execute the semantic query, recursively search along the preset association relationship in the entity relationship network, and locate the context strategy entity associated with the key entity or constraint information; The candidate context strategy entities obtained are sorted according to the relevance rules to determine the target MCP context strategy and the corresponding parameter set.

5. The method of claim 4, wherein, The query result is processed using the MCP context strategy to generate a prompt context, including: Read the window parameters, entity priority mapping, clipping threshold and summary algorithm identifier in the target MCP context strategy; According to the entity priority mapping, the entities, attributes and relationships in the query result are sorted, and nodes and edges with a priority lower than the threshold are deleted according to the clipping threshold; Call the semantic compression module corresponding to the summary algorithm identifier to perform semantic compression and reorganization on the retained nodes and associated relationships to obtain a compressed representation; Based on the window parameters, the compressed representation is dynamically blocked, and a preset prompt template is inserted to generate a prompt context conforming to the input format of the fine-tuned large language model.

6. The method of claim 1, wherein, The prompt context and the industrial process planning requirement are input into the fine-tuned large language model to generate a first process planning scheme, including: According to the preset prompt template, the industrial process planning requirement is filled into the target description field, the prompt context is filled into the knowledge field, and the constraint description field is inserted to splice a prompt sequence conforming to the input format of the fine-tuned large language model; According to the generation temperature, sampling probability threshold and maximum Token number recorded in the MCP context strategy, the inference parameters of the fine-tuned large language model are configured; Call the fine-tuned large language model to perform forward inference and output a text result containing process steps, device process mapping relationships and service call sequence labels; The text result is parsed to obtain a structured first process planning scheme.

7. The method of claim 1, wherein, The new process planning scheme is generated, and the final process planning scheme that meets the preset rules is obtained, including: The verification result is parsed to determine the process steps, conflict resources and corresponding knowledge graph entities that violate the preset rules; Based on the parsed violation information, the knowledge graph is queried again to retrieve alternative device capabilities, process steps or safety procedure entities, and generate correction information; The correction information is written into the original prompt context or a delta prompt context is constructed to form an updated prompt context; The updated prompt context and the industrial process planning requirement are input into the fine-tuned large language model again to obtain a new process planning scheme; The rule verification is repeatedly performed on the new process planning scheme, and if the verification still does not satisfy the preset rule, the steps of analysis, query, update and generation are cyclically performed until a final process planning scheme satisfying the preset rule is obtained.

8. The method of claim 1, wherein, The final process planning scheme is converted into a control script or an interface calling sequence that can be parsed by an industrial execution system, and is output for the industrial execution system to execute a corresponding industrial task, which comprises: The final process planning scheme is semantically analyzed to construct a structured process graph containing task nodes and dependency relationships; For each task node, the knowledge graph is queried to obtain an industrial software interface identifier and a parameter template corresponding to the task node; According to the parameter template, the equipment identifier, process parameters and timing information are filled in to generate a calling instruction matching the industrial software interface identifier; The calling instructions are sorted according to the dependency relationships and encapsulated into a control script or an interface calling sequence; The encapsulated control script or interface calling sequence is subjected to syntax checking and version marking, and the control script or interface calling sequence that passes the checking is output to the industrial execution system through a model context protocol.

9. An industrial agent decision making apparatus, characterized by, Comprise: The construction module is used to load multi-source industrial data into the knowledge graph, and construct a domain ontology and an MCP ontology, so that the knowledge graph stores entities, attributes and relationships; The fine-tuning module is used to perform parameter fine-tuning on a predetermined base large language model, and use the process planning related corpus and MCP metadata in the knowledge graph as training samples to obtain a fine-tuned large language model; The analysis module is used to receive a user input industrial process planning requirement, and perform semantic analysis on the industrial process planning requirement to obtain at least one key entity, process target and constraint information; The processing module is used to query the knowledge graph according to the key entity and constraint information to obtain an MCP context strategy, and process the query result using the MCP context strategy to generate a prompt context; The generation module is used to input the prompt context and the industrial process planning requirement into the fine-tuned large language model to generate a first process planning scheme; The verification module is used to perform rule verification on the first process planning scheme based on the knowledge graph to obtain a verification result, and determine whether the first process planning scheme satisfies a preset rule according to the verification result, and if yes, the first process planning scheme is taken as a final process planning scheme, and if no, a new process planning scheme is generated until a final process planning scheme satisfying the preset rule is obtained; The conversion module is used to convert the final process planning scheme into a control script or an interface calling sequence that can be parsed by an industrial execution system, and output for the industrial execution system to execute a corresponding industrial task.

10. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the computer program to realize the steps of the method of any one of claims 1 to 8. The processor executes the computer program to realize the steps of the method of any one of claims 1 to 8.

Citation Information

Cited By

  • Information processing method, task processing method, electronic device, storage medium and program product

    CN121168507A

  • Virtual model assembling method based on knowledge graph and mechanism embedding

    CN121234777A

  • A Virtual Model Assembly Method Based on Knowledge Graph and Mechanism Embedding

    CN121234777B

  • Hybrid AI adaptive optimization system and method based on agent context engineering

    CN121301536A

  • Industrial cognitive base system based on multi-modal comparative learning and execution method

    CN121303234A