Manufacturing task autonomous negotiation and execution method based on large language model agent

By constructing a multi-role large language model intelligent agent and combining a prediction-verification-rollback architecture with causal counterfactual reasoning, the problem of insufficient real-time performance and security in LLM manufacturing control is solved, realizing autonomous negotiation and execution of manufacturing tasks and improving the system's real-time performance, security, and interpretability.

CN121235408APending Publication Date: 2025-12-30JIANGSU UNIV OF TECH
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202511736906.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-25
Publication Date
2025-12-30

AI Technical Summary

Technical Problem

Existing technologies that introduce Large Language Models (LLMs) into manufacturing control suffer from issues such as lack of real-time performance, weak security, and insufficient interpretability. They cannot meet the millisecond-level response requirements of manufacturing control and are difficult to accurately pinpoint the causes of manufacturing anomalies.

Method used

Multiple large language model agents with predefined roles are constructed. Task decomposition and negotiation are carried out through production scheduling, equipment management, material distribution and quality control agents. Combined with prediction-verification-rollback architecture, temporal Petri net verification and causal counterfactual reasoning, autonomous negotiation and execution of manufacturing tasks are realized.

Benefits of technology

It achieves millisecond-level real-time performance, security, and interpretability improvements in manufacturing tasks, ensures the stability and security of the control closed loop, and improves the model's adaptability and parameter repair accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121235408A_ABST
    Figure CN121235408A_ABST
Patent Text Reader

Abstract

The invention discloses a manufacturing task autonomous negotiation and execution method based on a large language model agent, and the method comprises the steps: constructing a production scheduling agent, an equipment management agent, a material distribution agent and a quality control agent, analyzing a natural language task instruction through the production scheduling agent, and decomposing the natural language task instruction into subtasks; each agent calculates a utility value based on the load rate, the resource matching degree, the estimated completion time and the historical success rate, and performs structured negotiation to achieve a task allocation consensus; a prediction-check-rollback architecture is adopted to generate an action instruction sequence, the sequence is compiled into a time Petri network transition sequence, and reachability verification is carried out based on hard security constraints; production environment data is collected in real time to trigger anomaly detection and re-negotiation, and a formalized security verification and causal anti-factual reasoning parameter updating mechanism is introduced. According to the method, unstructured instruction understanding, autonomous task planning, multi-agent collaborative decision and closed-loop optimization are realized, and the problems of real-time performance, safety and interpretability of a large language model in manufacturing control are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a method for autonomous negotiation and execution of manufacturing tasks based on a large language model intelligent agent. Background Technology

[0002] With the development of Industry 4.0 and flexible manufacturing, manufacturing systems are placing higher demands on autonomy, adaptability, and semantic understanding capabilities. Traditional MES relies on preset rules and centralized scheduling, which shows obvious rigidity and response lag when facing highly uncertain scenarios such as multi-variety, small-batch production, sudden order changes, and unexpected equipment failures.

[0003] To overcome this bottleneck, researchers have begun exploring the introduction of Large Language Models (LLMs) into intelligent manufacturing. Thanks to their powerful natural language understanding, contextual reasoning, and task decomposition capabilities, LLMs are expected to achieve semantic-level autonomous collaboration from "instruction parsing" to "task planning," thereby supporting the dynamic reconfiguration of flexible production lines and efficient human-machine collaboration. Currently, LLMs have been initially implemented in scenarios such as industrial dialogue systems and work order semantic parsing. However, integrating them into the manufacturing control closed loop still presents the following challenges:

[0004] 1. Lack of real-time performance: LLM inference latency is high and uncertain (usually hundreds of milliseconds to several seconds), which cannot meet the millisecond-level response requirements of manufacturing control. Although the traditional "fast and slow separation" architecture ensures the real-time performance of the underlying layer, it breaks the closed-loop collaboration between high-level decision-making and low-level execution.

[0005] 2. Weak security: LLM has the risk of "illusion" and may generate action commands that violate hard constraints such as device interlocks and safety light curtains. The existing "post-filtering" mechanism lacks formal verification and cannot guarantee absolute security.

[0006] 3. Insufficient interpretability and adaptability: When abnormalities occur in the manufacturing process (such as welding defects or assembly misalignment), it is difficult to accurately locate whether it is an error in the LLM task decomposition or a deviation in equipment execution. Fine-tuning of all parameters is inefficient and can easily lead to catastrophic amnesia.

[0007] Therefore, it is necessary to construct a novel multi-LLM agent collaborative framework to achieve autonomous intelligent control of manufacturing tasks from semantic understanding to closed-loop execution, while ensuring millisecond-level real-time response and formal security constraints. Summary of the Invention

[0008] This invention provides a method for autonomous negotiation and execution of manufacturing tasks based on a large language model intelligent agent to solve the problems existing in the prior art.

[0009] The technical solutions adopted in this invention are as follows:

[0010] A method for autonomous negotiation and execution of manufacturing tasks based on a large language model intelligent agent includes the following steps:

[0011] S1: Construct multiple large language model intelligent agents with predefined roles, including production scheduling intelligent agent, equipment management intelligent agent, material distribution intelligent agent, and quality control intelligent agent;

[0012] S2: Receives high-level manufacturing task instructions in natural language form, and performs semantic parsing and task decomposition through the production scheduling agent to generate multiple sub-tasks;

[0013] S3: The generated subtasks are broadcast to the equipment management agent, the material distribution agent, and the quality control agent.

[0014] S4: The equipment management agent, material distribution agent, and quality control agent each calculate their own task execution utility value based on their own load rate, resource matching degree, estimated completion time, and historical success rate.

[0015] S5: The equipment management agent, material distribution agent, and quality control agent reach a consensus on task allocation through structured natural language negotiation based on their respective calculated utility values, and generate a structured sequence of action instructions through a prediction-verification-rollback architecture.

[0016] S6: Compile the generated action instruction sequence into a time Petri net transition sequence, and perform reachability verification on the action sequence based on the prohibited state library constructed by the hard safety constraints of the manufacturing system to ensure that it meets the safety requirements;

[0017] S7: Collects production environment data in real time and feeds it back to the production scheduling agent, equipment management agent, material distribution agent, and quality control agent, triggering anomaly detection and renegotiation mechanisms; during task adjustment, it introduces formal security verification and parameter update mechanisms based on causal counterfactual reasoning to optimize the decision-making process of the agents.

[0018] Furthermore, when the production scheduling intelligent agent performs semantic parsing through keyword matching and semantic retrieval mechanisms, it includes the following steps:

[0019] Divide the knowledge base documents into text blocks according to semantic boundaries;

[0020] Extract keywords from high-level manufacturing task instructions;

[0021] Initial screening of relevant text blocks based on keyword overlap;

[0022] By calculating the semantic similarity between the user query and the text block through an embedding model, the most relevant text block is recalled as the context input for the large language model.

[0023] Furthermore, the embedding model is a pre-trained language model based on the Transformer architecture, such as the BERT model, or an embedding model using other Transformer architectures such as RoBERTa and ALBERT.

[0024] Furthermore, the task execution utility value is calculated through a utility function, which comprehensively considers the current load rate, the estimated task completion time, the resource matching degree, and the historical task success rate, and is obtained by weighted summation, wherein the sum of the weight coefficients of each item is 1.

[0025] Furthermore, the structured natural language negotiation adopts a standardized message format, including three types of semantic messages: bid messages, rejection messages, and confirmation messages;

[0026] The bidding message is used to express the willingness to undertake the project and to provide utility value and reasons;

[0027] The rejection message is used to clearly state that the task cannot be accepted and the reason;

[0028] The confirmation message is used to issue the final task allocation result; all messages are automatically generated and parsed by the large language model based on the role prompt template.

[0029] Furthermore, the predict-verify-rollback architecture includes the following steps during the execution of the action instruction sequence:

[0030] During the idle period of the control cycle, the corresponding functional intelligent agent calls its internal large language model to predict the candidate action sequence for the next multiple steps;

[0031] Deploy a lightweight timing logic engine to perform real-time matching and verification of the current sensor data and the preconditions of the action sequence, with a single verification latency of no more than 1 millisecond;

[0032] If the environment conditions match, action instructions are issued sequentially; if they do not match, a preset safety rollback strategy is immediately triggered, and a new sequence is regenerated from the large language model online.

[0033] The Smith predictor model is integrated into the verification loop to dynamically compensate for the impact of large language model inference delay on the stability of the closed-loop control system. The dynamic compensation is achieved through a first-order adaptive prediction model.

[0034] Furthermore, the expression for the first-order adaptive prediction model is:

[0035] ,

[0036] in, Let d(k−1) represent the prediction error at step k, e(k) represent the actual error at step k, and e(k−1) represent the actual error at step k−1. α is the adaptive gain coefficient.

[0037] Furthermore, the reachability verification of the temporal Petri net transition sequence includes the following steps:

[0038] Automatically compile action sequences into transition sequences in a temporal Petri net;

[0039] A set of prohibited states is pre-constructed based on the hard safety constraints of the manufacturing system;

[0040] Before the action is executed, it is verified whether all system states that the action sequence can reach have an intersection with the set of prohibited states;

[0041] If an intersection exists, the counterexample path that leads to the conflict is extracted and injected as structured feedback into the prompt words of the relevant agent, guiding it to regenerate an action sequence that satisfies the safety constraints.

[0042] Furthermore, the parameter update mechanism based on causal counterfactual reasoning includes the following steps:

[0043] Construct a cause-effect graph of the manufacturing process that covers task instructions, subtask decomposition, equipment parameters, and quality results;

[0044] Identify key variables influencing decisions in large language models through counterfactual intervention analysis;

[0045] Low-rank adaptation fine-tuning is applied only to the specific attention head associated with this variable;

[0046] The updated model needs to be verified in a digital twin environment to demonstrate the effectiveness of the repair before it can be used for subsequent tasks.

[0047] Furthermore, the identification of key variables is achieved through the following formula:

[0048] argmin X [P(Y bad |do(X=x′),Pa(X))−P(Y good )],

[0049] Where X represents the decision variable, x′ represents the value of the variable after intervention, and Y bad Y represents the probability of an adverse outcome occurring. good Let Pa(X) represent the probability of a favorable outcome, and let Pa(X) represent the probability distribution of X under action a.

[0050] The present invention has the following beneficial effects:

[0051] (1) In view of the problem that the inference latency of LLM is high and uncertain and cannot meet the millisecond-level real-time control requirements of manufacturing, this invention proposes a prediction-verification-rollback architecture, which combines millisecond-level timing logic verification and Smith predictor latency compensation. While retaining the high-level decision-making capability of LLM, it transforms uncertain inference into deterministic execution output, effectively ensuring the hard real-time performance and stability of the control loop, and overcoming the defect of the traditional "fast and slow separation" architecture that separates decision-making and execution coordination.

[0052] (2) In view of the problem that LLM may generate dangerous actions that violate hard constraints such as equipment safety interlocks due to illusion, and that post-filtering alone cannot guarantee absolute safety, this invention formally models the manufacturing safety rules as a prohibited state library of time Petri nets, performs reachability pre-verification before the action is executed, and uses counterexample paths to guide LLM self-correction, realizing a paradigm shift from "intercepting after generation" to "compliance upon generation", fundamentally eliminating the risk of issuing dangerous instructions and meeting the requirements of industrial functional safety standards.

[0053] (3) In view of the difficulty in distinguishing whether the manufacturing anomaly is due to an error in LLM task decomposition or a deviation in equipment execution, the low efficiency of full parameter fine-tuning and the easy catastrophic forgetting, this invention introduces a cause-finding mechanism based on causal counterfactual reasoning to accurately locate the key variables affecting the decision and only performs LoRA fine-tuning on the attention head associated with the variable to achieve precise parameter-level repair, which can effectively improve the model adaptation efficiency and avoid knowledge coverage. Attached Figure Description

[0054] Figure 1 This is a flowchart of the present invention.

[0055] Figure 2 This is a schematic diagram of the intelligent agent architecture.

[0056] Figure 3 This is a flowchart of the keyword matching and semantic retrieval mechanism.

[0057] Figure 4 A flowchart for precise tracing and parameter updating of causal counterfactual reasoning knowledge. Detailed Implementation

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

[0059] like Figure 1 and Figure 2This invention discloses a method for autonomous negotiation and execution of manufacturing tasks based on a large language model intelligent agent. In this embodiment, the intelligent agent is an entity including a reasoning and decision-making module, a role prompting module, a knowledge base module, a tool invocation module, a perception module, a memory module, and an action module. This entity can use its own components to perceive the environment and act and make decisions autonomously based on the perceived information. This application uses a large language model as the reasoning and decision-making module to achieve natural language understanding and text generation. A multi-language model intelligent agent is a system of several interacting single agents. The method uses a multi-language model intelligent agent instead of a single agent primarily due to a combination of factors. First, a multi-language model intelligent agent can overcome the limitations of a single agent in handling long contexts by splitting functions and optimizing memory, thereby improving processing efficiency and accuracy. Second, using a multi-language model intelligent agent allows for more effective management of prompt words. Each agent is only responsible for a specific task, effectively avoiding the confusion that arises when the agent processes input due to maintaining a large amount of context.

[0060] This invention relates to a method for autonomous negotiation and execution of manufacturing tasks based on a large language model intelligent agent, comprising the following steps:

[0061] S1: Construct multiple large language model agents with predefined roles, including a production scheduling agent, an equipment management agent, a material distribution agent, and a quality control agent.

[0062] Production scheduling intelligent agent: Receives natural language instructions such as "process 100 parts A", and calls upon the knowledge base and thought chain prompts to decompose the task;

[0063] Equipment management intelligence agent: monitors the status of equipment such as CNC machine tools and injection molding machines, and provides feedback such as "available / faulty / under maintenance" and estimated processing time;

[0064] Intelligent material delivery agent: controls AGVs to transport raw materials from the warehouse to the workstation;

[0065] Quality control agent: Calls AOI equipment to detect dimensions and determines whether they are qualified.

[0066] S2: Receives high-level manufacturing task instructions in natural language form, and performs semantic parsing and task decomposition through the production scheduling agent to generate multiple sub-tasks.

[0067] like Figure 3As shown, the original document D is divided into n text blocks. When the high-level manufacturing task instructions are input into the production scheduling agent, keywords are extracted using natural language processing tools such as spaCy, jieba, and regular expressions. The first m relevant manufacturing rules and historical case text blocks are obtained from the system knowledge base through keyword matching and semantic retrieval mechanisms. The first k relevant knowledge are recalled using similarity. The prompt words are injected through the thinking chain prompt strategy to guide the large language model to decompose step by step. Finally, a structured subtask list is output in JSON format, with fields including task_id, type, executor_role, resources, duration, and priority.

[0068] S3: The generated subtasks are broadcast to the equipment management agent, material distribution agent, and quality control agent.

[0069] S4: The equipment management agent, material distribution agent, and quality control agent calculate their respective task execution utility values ​​based on their load rate, resource matching degree, estimated completion time, and historical success rate.

[0070] Each intelligent agent utilizes the perception module to invoke tools and obtains the device's load rate, resource matching degree, estimated completion time, and historical success rate from the data acquisition and monitoring control system via API interfaces. The utility value of each device intelligent agent is then calculated based on the following formula:

[0071]

[0072] In the formula, This represents the utility value of the i-th agent. Indicates the current load rate. This indicates the estimated time to complete the task. This represents the resource matching degree, with a value range of [0,1]. Indicates the success rate of historical missions. , , , These are the weighting coefficients, and .

[0073] S5: The equipment management agent, material distribution agent, and quality control agent reach a consensus on task allocation through structured natural language negotiation based on their respective calculated utility values, and generate a structured sequence of action instructions through a prediction-verification-rollback architecture.

[0074] Each functional agent generates a structured JSON response message based on the evaluation results. Specifically, when resources are available and > Send bidding messages when resources are unavailable or ≤ A rejection message is sent when necessary, and the message must include the following fields: agent_id, task_id, utility, response_type, and reason. After reaching a consensus on task allocation, during the idle period of the control cycle, the corresponding functional agent invokes the large language model to predict the future. Step sequence:

[0075] ,

[0076] In the formula, The instructions are structured, such as {"action":"start_milling","device":"CNC-01"}. After the action sequence is generated, a lightweight timing logic engine (such as BeepBeep) performs real-time matching and verification between the current sensor data and the preconditions of the action sequence. The single verification delay does not exceed 1 millisecond. If the current state meets the preconditions, the action instructions are issued sequentially; otherwise, a preset safety rollback strategy (maintaining the current position) is immediately triggered, and the large language model is requested to regenerate the action sequence. Simultaneously, a Smith predictor model is integrated into the verification loop. For the first The actual execution error of the step. The adaptive gain coefficients are used to establish a first-order adaptive prediction model based on historical delays.

[0077] ,

[0078] This model is used to evaluate the execution deviation trend of the current action sequence and dynamically compensate for the impact of large language model inference delay on the stability of the closed-loop control system.

[0079] S6: Compile the generated action instruction sequence into a time Petri net transition sequence, and perform reachability verification on the action sequence based on the prohibited state library constructed by the hard safety constraints of the manufacturing system to ensure that it meets the safety requirements.

[0080] The JSON action instructions generated by LLM are automatically translated into Petri net transition trigger sequences. Simultaneously, a temporal Petri net model is constructed, and the hard safety constraints of the manufacturing system (such as "the safety door must be closed when the robotic arm moves") are compiled into a prohibited state library of the temporal Petri net. Let the current system identifier be... The action sequence generated by LLM is Then its reachable state set is denoted as Verification before execution:

[0081] ,

[0082] If the set of reachable states and the set of forbidden states are... If there is an overlap in the coding security rules (e.g., detecting "protective door open while the spindle is running"), causing pre-execution verification to fail, the counterexample path causing the conflict is extracted: "Action 3 (starting the spindle) is executed while the protective door is not closed," and the prompt word "Please ensure the protective door is closed before starting the spindle" is injected. Based on this, LLM regenerates the action sequence that satisfies the security constraints.

[0083] S7: Collects production environment data in real time and feeds it back to the production scheduling agent, equipment management agent, material distribution agent, and quality control agent, triggering anomaly detection and renegotiation mechanisms; during task adjustment, it introduces formal security verification and parameter update mechanisms based on causal counterfactual reasoning to optimize the decision-making process of the agents.

[0084] like Figure 4 As shown, a causal graph of manufacturing is constructed, and the mapping relationship between attention heads and decision variables is designed. When the same failure occurs three times consecutively, the minimum intervention set is calculated based on Do-Calculus to identify the most critical variable X affecting LLM decision.

[0085] argmin X [P(Y bad |do(X=x′),Pa(X))−P(Y good )],

[0086] In the formula, Indicating active intervention variables And its parent node Unfavorable results if they remain unchanged The probability of occurrence, This represents the probability of a positive outcome; the larger the difference between the two, the stronger the intervention. The greater the impact, the more... The function is used to find the variable that minimizes the above difference. When the solution is found Subsequently, through the mapping relationship, LoRA fine-tuning (rank r=8) was performed only on the attention head in the LLM that processes the corresponding intervention token, with the number of parameters increasing by only 0.1%. After the update, simulation verification was performed in a digital twin environment, and after successful verification, it was deployed to the physical system.

[0087] In summary, this invention constructs a multi-role large language model intelligent agent, combines a prediction-verification-rollback architecture, a hybrid compilation and verification of Petri nets for manufacturing safety constraints and LLM-generated actions, and precise traceability of manufacturing knowledge and LLM parameter updates based on causal counterfactual reasoning. This enables semantic understanding, autonomous decomposition, distributed negotiation, and closed-loop execution of manufacturing tasks, significantly improving the real-time performance, security, interpretability, and adaptability of manufacturing systems.

[0088] This embodiment is applied to a flexible production line for automotive parts. The production line includes 3 CNC machine tools (CNC-01~03), 2 AGVs (AGV-01~02), and 1 AOI vision inspection device. It needs to achieve autonomous negotiation and execution of "multi-variety, small-batch" production tasks. This embodiment constructs an intelligent agent based on the GPT-4 large language model and combines it with an Industrial Internet of Things (IIoT) system and a digital twin platform to achieve closed-loop control. The specific implementation steps are as follows:

[0089] This embodiment constructs four predefined agents, each implementing a reasoning and decision-making module based on GPT-4. The module configuration is as follows:

[0090] Production scheduling intelligent agent:

[0091] Role prompt template: "You are the chief scheduler of the flexible production line, responsible for receiving natural language task instructions, breaking them down into sub-tasks, coordinating other intelligent agents, monitoring progress and handling anomalies."

[0092] Knowledge base module: Associated with ISO9001 production rules and historical processing cases of part A / part B (2000+ entries);

[0093] Tool calling module: calls IIoT platform API and digital twin simulation interface.

[0094] Device management intelligent agent:

[0095] Role prompt template: "You are responsible for monitoring the status of CNC machine tools, assessing machining capabilities, providing feedback on available time, reporting equipment failures, and receiving adjustment suggestions."

[0096] Sensing module: Real-time acquisition of CNC machine tool operating status (running / stopping / fault), spindle speed, and load rate (sampling frequency 1Hz);

[0097] Memory module: Stores equipment maintenance records and processing accuracy data for the past 30 days.

[0098] Intelligent agent for material distribution:

[0099] Role prompt template: "You are responsible for scheduling raw materials / semi-finished products through AGVs, tracking material locations, and responding to material supply requests."

[0100] Tool calling module: Calls the AGV scheduling system API to control AGV path planning and transport actions;

[0101] Sensing module: Receives AGV positioning data and warehouse inventory sensor data.

[0102] Quality control intelligent agent:

[0103] Role prompt template: "You are responsible for defining quality inspection standards, calling AOI equipment for inspection, determining the qualification of parts, initiating the rework process and providing feedback on adjustment suggestions";

[0104] Knowledge base module: Stores the quality inspection standards for part A (dimensional tolerance ±0.02mm, no surface scratches);

[0105] Tool calling module: calls the AOI equipment inspection interface and defect tracing system.

[0106] Suppose a user inputs a high-level manufacturing task instruction: "Process 100 A parts (material 45 steel, size φ20×50mm) within 24 hours, requiring no surface scratches, and put them into storage after passing inspection." The production scheduling agent executes the following operations:

[0107] Keyword extraction: The keywords "within 24 hours, processing, 100, A part, 45 steel, φ20×50mm, no scratches on the surface, warehousing" were extracted using the jieba word segmentation tool.

[0108] Semantic retrieval: The knowledge base documents are divided into text blocks according to semantics, such as 200 text blocks such as "Machining process of part A" and "Cutting parameters of No. 45 steel".

[0109] Based on keyword overlap, 30 relevant text blocks were initially screened out, such as text blocks containing "Part A" and "processing".

[0110] By using the BERT embedding model, user commands and text blocks are mapped to a 768-dimensional semantic space. Cosine similarity is calculated to recall the top 5 most relevant text blocks, such as "CNC machining process for part A" and "suggested spindle speed for 45# steel".

[0111] Mind Chain Hint: Inject the hint word into GPT-4: "Based on the following knowledge: [Top 5 text block content], break down the task 'process 100 A parts within 24 hours' into subtasks. Each subtask must include task ID, task type, executing agent role, required resources, estimated duration, and priority (high 1, medium 2, low 3)."

[0112] Output a structured list of subtasks:

[0113] Task ID: T001, Task Type: Material Preparation, Executing Agent Role: Material Delivery Agent, Required Resources: 100 pieces of No. 45 steel billets, Estimated Duration: 1 hour, Priority: 1 (High).

[0114] Task ID: T002, Task Type: CNC Machining, Executing Agent Role: Equipment Management Agent, Required Resources: CNC Machine Tool, Cutting Fluid, Estimated Duration: 18 Hours, Priority: 1 (High);

[0115] Task ID: T003, Task Type: Quality Inspection, Executing Agent Role: Quality Control Agent, Required Resources: AOI Inspection Equipment, Estimated Duration: 3 hours, Priority: 2 (Medium);

[0116] Task ID: T004, Task Type: Finished Goods Inbound, Executing Agent Role: Material Delivery Agent, Required Resources: AGV, Finished Goods Warehouse, Estimated Duration: 1 hour, Priority: 2 (Medium).

[0117] The process of subtask broadcasting and utility value calculation is as follows.

[0118] To achieve refined equipment management, each physical device corresponds to one intelligent agent instance for equipment management. Specifically, CNC-01~03 machine tools correspond to Agent-CNC01~03 respectively, and AGV-01~02 correspond to Agent-AGV01~02.

[0119] The production scheduling agent broadcasts subtasks T001 to T004 to the corresponding agents via the MQTT protocol. Taking subtask T002 (CNC machining) as an example, the equipment management agents (Agent-CNC01~03) corresponding to the three CNC machine tools calculate the utility value.

[0120] Utility function: , Weight coefficient: a=0.2, β=0.3, γ=0.2, δ=0.3.

[0121] Parameters and calculation results of each agent:

[0122] intelligent agent load rate Estimated completion time (hours) Resource matching degree Historical success rate Final utility value Agent-CNC01 0.2 10 0.95 0.98 0.674 Agent-CNC02 0.6 18 0.92 0.93 0.5597 Agent-CNC03 0.4 14 0.94 0.96 0.6174

[0123] Utility value ranking: Agent-CNC01 > Agent-CNC03 > Agent-CNC02.

[0124] The structure negotiation and action instruction generation are as follows:

[0125] (1) Negotiation process:

[0126] Agent-CNC01 sends a bidding message containing the agent ID (CNC01), task ID (T002), utility value, response type (bidding), and reason (load rate 20%, estimated completion time 10 hours, A part processing success rate 98%).

[0127] Agent-CNC02 sends a rejection message containing the agent ID (CNC02), task ID (T002), utility value, response type (rejection), and reason (load rate 60%, estimated completion time 18 hours, high risk of exceeding the total task time limit).

[0128] The production scheduling agent sends a confirmation message, which includes the task ID (T002), the executing agent (CNC01), the response type (confirmation), and the deadline (14 hours).

[0129] (2) Execution of the prediction-verification-rollback architecture:

[0130] Agent-CNC01 calls GPT-4 during the idle period of the control cycle to predict the sequence of the next 5 actions. The idle period of the control cycle can be set to 50~200 milliseconds (100 milliseconds is selected in this embodiment).

[0131] The first step is the workpiece clamping action, which is performed by a CNC01 with a clamping force of 500N and the prerequisite that the blank is in place.

[0132] The second step is to start the spindle. The executing device is CNC01, with parameters of spindle speed of 3000 rpm and the prerequisite of workpiece clamping.

[0133] The third step is the cutting action, executed by CNC01 with a feed rate of 100 mm / min and the prerequisite being spindle start; the fourth step is the spindle stop action, executed by CNC01 with the prerequisite being cutting completion; the fifth step is the workpiece clamping action, executed by CNC01 with the prerequisite being spindle stop.

[0134] Deploy a lightweight timing logic engine (BeepBeep) to verify sensor data and preconditions in real time: if the workpiece clamping sensor reports "clamped", then issue a "spindle start" command (verification delay 0.8 milliseconds).

[0135] Integrate the Smith predictor model to dynamically compensate for LLM inference latency (assuming an LLM inference latency of 200 milliseconds):

[0136] First-order adaptive prediction model: ;

[0137] If the actual error in step 1 is e(1)=0.05 and in step 2 is e(2)=0.03, then d(2)=0.05+0.1×(0.03-0.05)=0.048, and the closed-loop response delay is made ≤10 milliseconds through compensation.

[0138] The time-based Petri net reachability verification is as follows:

[0139] Action sequence compilation: The above 5 action sequences are automatically compiled into a time Petri net transition sequence, which is as follows: transition 1 (clamping) → transition 2 (starting the spindle) → transition 3 (cutting) → transition 4 (stopping the spindle) → transition 5 (releasing the clamp).

[0140] Construction of prohibited state set: Based on manufacturing hard safety constraints, define prohibited state locations, including location 1 (workpiece not clamped when the spindle is running) and location 2 (protective door is open during cutting).

[0141] Reachability verification: The transition sequence is simulated using Petri net tools (CPNTools) to verify that there is no intersection between all reachable states and prohibited states in the library. If the simulation finds that "the workpiece is not clamped when transition 2 (start spindle) is triggered" (i.e., reaching library 1), the counterexample path "transition 2 (start spindle) is executed before transition 1 (clamping) is completed" is extracted, and the prompt word "please ensure that the workpiece is clamped before starting the spindle and adjust the preconditions of the action sequence" is injected. Agent-CNC01 regenerates the action sequence. After regenerating the action sequence, the reachability verification needs to be performed again through CPNTools. This process is repeated until no prohibited state is triggered (maximum 3 iterations to balance safety and real-time performance).

[0142] The anomaly detection and parameter update process is as follows:

[0143] Real-time data acquisition: Production data (such as AOI inspection results, equipment parameters, and material positions) are collected through the IIoT platform at a sampling frequency of 1Hz.

[0144] Abnormal Trigger: If AOI detection finds three consecutive A parts with out-of-tolerance dimensions (repeated quality defects), the renegotiation mechanism will be triggered.

[0145] The quality control agent collaborates with the production scheduling agent to construct a cause-effect graph of the manufacturing process, with nodes including "task instruction → subtask decomposition → CNC cutting parameters → machining accuracy → quality inspection results".

[0146] Counterfactual intervention analysis: using the formula argmin X [P(Y bad |do(X=x′),Pa(X))−P(Y good Identify key variables:

[0147] Assuming the intervention variable X is "spindle speed" (original parameter 3000 rpm), after intervention x' = 2800 rpm, the corresponding calculation above yields P(Y). bad |do(X=2800))=0.02,P(Y good The difference is 0.98, the smallest, therefore "spindle speed" is the key variable. Here, 'Action a' refers to the operation of adjusting key parameters of the manufacturing process (in this embodiment, 'adjusting spindle speed'), P a (X) represents the probability distribution of the spindle speed under this action.

[0148] LoRA fine-tuning: LoRA fine-tuning is applied only to the attention heads (layers 3 and 5) that process 'spindle speed' related tokens in GPT-4 (rank r=8, the increase in parameters is far less than 0.1%, and the efficiency is 10 times higher than full parameter fine-tuning).

[0149] Digital twin verification: The fine-tuned model is deployed to the digital twin platform to simulate the processing of 100 A parts. The quality inspection pass rate is improved from 92% to 99.5%. After verification, it is deployed to the physical system.

[0150] The above description is only a preferred embodiment of the present invention. It should be noted that those skilled in the art can make several improvements without departing from the principle of the present invention, and these improvements should also be considered within the scope of protection of the present invention.

Claims

1. A method for autonomous negotiation and execution of manufacturing tasks based on large language model agents, characterized in that: The method comprises the following steps: S1: constructing a plurality of large language model agents with predefined roles, including production scheduling agents, equipment management agents, material distribution agents and quality control agents; S2: receiving high-level manufacturing task instructions in natural language form, and performing semantic analysis and task decomposition through the production scheduling agent to generate a plurality of subtasks; S3: sending the generated subtasks to the equipment management agent, material distribution agent and quality control agent through broadcasting; S4: The equipment management agent, material distribution agent and quality control agent respectively calculate their task execution utility values according to their load rates, resource matching degrees, estimated completion times and historical success rates; S5: The equipment management agent, material distribution agent and quality control agent reach a consensus on task allocation based on the utility values calculated by each agent through structured natural language negotiation, and generate a structured action instruction sequence through a prediction-verification-rollback architecture; S6: The generated action instruction sequence is compiled into a time Petri net transition sequence, and the reachability of the action sequence is verified based on the forbidden state library constructed based on the hard safety constraints of the manufacturing system to ensure that it meets the safety requirements; S7: Real-time collection of production environment data and feedback to the production scheduling agent, equipment management agent, material distribution agent and quality control agent to trigger abnormality detection and renegotiation mechanism; In the task adjustment process, formal safety verification and parameter updating mechanism based on causal counterfactual reasoning are introduced to optimize the decision-making process of the agent.

2. The manufacturing task autonomous negotiation and execution method based on a large language model agent according to claim 1, characterized in that: When the production scheduling agent performs semantic analysis through keyword matching and semantic retrieval mechanism, the following steps are included: Cut the knowledge base document into text blocks according to semantic boundaries; Extract keywords from high-level manufacturing task instructions; Preliminary screening of relevant text blocks based on keyword overlap; Calculate the semantic similarity between user query and text block through embedding model, recall the most relevant text block as context input for large language model.

3. The method of claim 2, wherein the method further comprises: receiving, by the at least one processor, a manufacturing task from the at least one user; and determining, by the at least one processor, a manufacturing task execution plan based on the manufacturing task and the at least one manufacturing task execution plan. The embedding model is a pre-trained language model based on Transformer architecture.

4. The manufacturing task autonomous negotiation and execution method based on a large language model agent according to claim 1, characterized in that: The task execution utility value is calculated by a utility function, which considers the current load rate, task estimated completion time, resource matching degree and historical task success rate, and obtains the weighted sum, where the sum of the weight coefficients is 1.

5. The manufacturing task autonomous negotiation and execution method based on a large language model agent according to claim 1, characterized in that: The structured natural language negotiation adopts a standardized message format, including three types of semantic messages: bid messages, rejection messages and confirmation messages; The bid message is used to express the intention to undertake and provide utility value and reason; The rejection message is used to explicitly inform that the task cannot be undertaken and the reason; The confirmation message is used to issue the final task allocation result; all messages are automatically generated and parsed by the large language model according to the role prompt template.

6. The manufacturing task autonomous negotiation and execution method based on a large language model agent according to claim 1, characterized in that: The prediction-verification-rollback architecture includes the following steps during the execution of the action instruction sequence: In the idle period of the control cycle, the corresponding functional agent calls its internal large language model to predict the candidate action sequence in the future multiple steps; A lightweight temporal logic engine is deployed to perform real-time matching verification of the preconditions of the current sensor data and action sequence, with a single verification delay of no more than 1 millisecond; If the environmental state matches, the action instructions are issued in sequence; if it does not match, the preset safety rollback strategy is triggered immediately, and the large language model is requested online to regenerate a new sequence; A Smith predictor model is integrated into the verification loop to dynamically compensate for the impact of large language model inference delay on the stability of the closed-loop control system, where the dynamic compensation is achieved through a first-order adaptive prediction model.

7. The manufacturing task autonomous negotiation and execution method based on a large language model agent according to claim 6, characterized in that: The expression of the first-order adaptive prediction model is: , wherein, denotes the prediction error of the kth step, d(k−1) denotes the prediction error of the k−1th step, e(k) denotes the actual error of the kth step, e(k−1) denotes the actual error of the k−1th step, and a is an adaptive gain factor.

8. The method of claim 1, wherein the method further comprises: receiving a manufacturing task from a user; and determining a manufacturing task execution plan based on the manufacturing task. The reachability verification of the time Petri net transition sequence includes the following steps: The action sequence is automatically compiled into a transition sequence in the time Petri net; Based on the hard safety constraints of the manufacturing system, a set of forbidden states is constructed in advance; Before the action is executed, it is verified whether all the system states that can be reached by the action sequence have an intersection with the set of forbidden states; If there is an intersection, the counterexample path that causes the conflict is extracted and injected into the prompt words of the relevant agent as structured feedback to guide it to regenerate an action sequence that satisfies the safety constraints.

9. The manufacturing task autonomous negotiation and execution method based on a large language model agent according to claim 1, characterized in that: The parameter updating mechanism based on causal counterfactual reasoning includes the following steps: A manufacturing process causal graph is constructed covering task instructions, subtask decomposition, device parameters, and quality results; Through counterfactual intervention analysis, key variables that affect the decision of the large language model are identified; Only the specific attention heads associated with the variable are subjected to low-rank adaptive fine-tuning; The updated model needs to be verified for repair effect in the digital twin environment before it can be used for subsequent task execution.

10. The manufacturing task autonomous negotiation and execution method based on a large language model agent according to claim 9, characterized in that: The identification of key variables is achieved through the following formula: argmin X [P(Y bad ∣do(X=x′),Pa(X))−P(Y good )], where X represents a decision variable, x' represents a variable value after intervention, Y bad represents a probability of occurrence of an adverse outcome, Y good represents a probability of occurrence of a good outcome, and Pa(X) represents a probability distribution of X under action a.

Citation Information

Cited By

  • Multi-robot task allocation method and system based on hybrid dialogue negotiation

    CN121724127A

  • Industrial XR reverse control system based on intelligent agent

    CN121946534A

  • Production scheduling cooperative control method and system based on AI full-stack intelligent agent

    CN122089016A