A Spinach Processing System and Method Based on Large Model Orchestration and Security Arbitration
The spinach processing system based on large model orchestration and security arbitration solves the problems of low processing efficiency and safety risks caused by batch-to-batch differences in spinach. It achieves accurate perception and adaptive process parameter generation, thereby improving the efficiency and quality consistency of spinach processing.
Patent Information
- Application Number
- CN202611501025.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-24
- Publication Date
- 2026-11-17
AI Technical Summary
Existing spinach processing systems suffer from problems such as limited hourly processing capacity, difficulty in adapting to batch-to-batch differences, difficulty in coordinating visual recognition with downstream processes, easy scattering of leaves during air drying, and uneven packaging. Furthermore, the process parameters output by the large language model have uncertainties and safety risks.
The system employs a large-scale model orchestration and security arbitration approach to process data. It acquires multimodal data through a data acquisition module, generates batch state vectors through a perception agent, generates structured process parameters through a process planning agent, performs multi-layer constraint verification through a security arbitration module, and ensures the safety of mechanical execution through a low-level execution control module.
It achieves accurate perception of batch differences in spinach and adaptive generation of process parameters, improves processing efficiency and product quality consistency, reduces the security risks of large language model output, and ensures the security and stability of the system.
Smart Images

Figure CN123113776A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of large language model driven control system technology, specifically relating to a spinach processing system and method based on large model orchestration and security arbitration. Background Technology
[0002] Spinach, as a frequently consumed leafy vegetable, is widely used in fresh food supermarkets, group meal delivery, central kitchens, and pre-prepared food processing. Spinach leaves are soft, have a high water content, are fluffy when stacked, and are easily broken. Their surface is often covered with dirt, yellow leaves, and foreign objects. Batch processing typically involves sorting, drying, weighing, and packaging.
[0003] The existing equipment mainly suffers from the following problems: it mostly adopts a semi-automatic approach, relying on manual assistance for sorting, resulting in limited hourly processing capacity and low standardization; it uses fixed parameter control methods, making it difficult to adapt to the differences in the proportion of yellow leaves, residual mud and sand, leaf fluffiness, and leaf fragility among different batches of spinach; visual recognition is mostly used in a single sorting stage, making it difficult to achieve inter-process collaboration with downstream processes such as pressing, drying, weighing, and packaging; during the drying process, spinach leaves are easily rolled and scattered by the wind, leading to uneven moisture retention; the packaging stage mainly uses weight as the sole control target, making it difficult to adapt to the large fluctuations in spinach volume, resulting in uneven packaging tightness and inconsistent specifications.
[0004] In addition, although general-purpose large language model control has the ability to understand tasks, reason, and generate policies, and can solve the above problems to a certain extent, there are many uncertainties and safety risks in directly applying its output to mechanical actuators.
[0005] Therefore, how to adaptively generate process parameters that balance the impurity removal effect, leaf integrity, and processing efficiency when there are differences in leaf fragility, surface residual moisture, and impurity status between batches of spinach, while avoiding the direct impact of field errors, parameter coupling conflicts, and execution timing conflicts from the output of large language models on the mechanical actuator, is a technical problem that urgently needs to be solved in this field. Summary of the Invention
[0006] To address the shortcomings of existing technologies, this application aims to provide a spinach processing system and method based on large model orchestration and security arbitration, which aims to solve the following technical problems: there are differences in the fragility of spinach leaves, surface residual moisture and impurity status between batches, and it is difficult to balance the impurity removal effect, leaf integrity and processing efficiency with fixed process parameters; at the same time, the process parameters generated by the large language model may have field errors, parameter coupling conflicts and execution timing conflicts, and cannot be directly used for mechanical control.
[0007] The first aspect of this application relates to a gambling processing system based on large-scale model orchestration and secure arbitration, comprising: a data acquisition module, a multi-agent orchestration control module, a secure arbitration module, a low-level execution control module, and at least one mechanical execution module; the multi-agent orchestration control module includes: a perception agent and a process planning agent; the output of the data acquisition module is connected to the input of the perception agent; the output of the perception agent is connected to the input of the process planning agent; the input of the secure arbitration module is connected to the output of the process planning agent; the output of the secure arbitration module is connected to the input of the low-level execution control module; the low-level execution control module... The output end connects to the input end of each mechanical execution module; the data acquisition module is configured to collect multimodal data of spinach; the perception agent is configured to generate a batch state vector representing the current batch state of spinach based on the multimodal data; the process planning agent is configured to generate structured process parameters containing process parameters of the mechanical execution modules based on the batch state vector using a pre-trained large language model; the safety arbitration module is configured to perform multi-layer constraint verification on the received structured process parameters and output the deterministic parameters that pass the verification or are corrected and re-verified to the underlying execution control module; the underlying execution control module is configured to control the actions of the mechanical execution modules only based on the deterministic parameters.
[0008] In one embodiment, the multi-Agent orchestration control module further includes: an execution agent group; the execution agent group includes one or more execution agents corresponding one-to-one with the mechanical execution modules; the input end of the execution agent is connected to the output end of the process planning agent; the output end of the execution agent is connected to the input end of the safety arbitration module; the execution agent is configured to decompose the structured process parameters into instruction parameters corresponding to the mechanical execution modules and transmit them to the safety arbitration module; the safety arbitration module is further configured to perform multi-level constraint verification on the received instruction parameters and output the parameters that pass the verification or correction to the underlying execution control module.
[0009] In one embodiment, the multi-Agent orchestration control module further includes: a quality evaluation agent and a process optimization agent; the input end of the quality evaluation agent is connected to the output end of the data acquisition module; the output end of the quality evaluation agent is connected to the input end of the process optimization agent; the output end of the process optimization agent is connected to the input end of the process planning agent; the quality evaluation agent is configured to perform quality evaluation on the processed spinach and generate quality evaluation results; the process optimization agent is configured to optimize and update the process parameters based on historical structured process parameters and quality evaluation results, and provide the updated recommended values of the process parameters to the process planning agent for use when generating structured process parameters in subsequent batches.
[0010] In one embodiment, the security arbitration module includes a verification unit and a correction unit. The verification unit is configured to sequentially perform format validity verification, mechanical constraint verification, food processing constraint verification, timing constraint verification, and abnormal constraint verification on the structured process parameters. After all verifications pass, the structured process parameters are marked as passed and forwarded to the underlying execution control module. If there are any failed verification items that are allowed to be corrected, the correction unit is driven to correct the failed verification items according to preset deterministic correction rules, and all verifications are re-executed on the corrected structured process parameters. Only when all re-verifications pass is the corrected structured process parameters marked as corrected and forwarded to the underlying execution control module. If there are any disallowed correction items, no feasible correction results, or the re-verification fails, the structured process parameters are marked as rejected, and the rejection reason is fed back to trigger the regeneration of the process planning agent.
[0011] In one embodiment, the security arbitration module further includes a degradation processing unit. The degradation processing unit is used to select alternative parameters from a preset set of applicable rule parameters based on the current batch status and equipment configuration when the number of consecutive rejections or large language model inference times out in the same batch of planned tasks. These alternative parameters are then submitted to the verification unit for verification. The unit only outputs the parameters to the underlying execution control module when the verification passes. If no applicable alternative parameters exist or the alternative parameters fail verification, a preset pause or security handling process is triggered. The preset rule parameter set consists of multi-level combinations of empirical parameters based on the spinach variety and status. Each level of empirical parameter combination has corresponding applicable raw material status, equipment configuration, and packaging film material conditions. Furthermore, the preset rule parameter set does not have the authority to bypass the security arbitration module's verification.
[0012] In one embodiment, the online gambling processing system based on large model orchestration and security arbitration further includes: a loop feedback module; the loop feedback module is communicatively connected to the data acquisition module, the multi-Agent orchestration control module, the security arbitration module, the underlying execution control module, and at least one mechanical execution module; the loop feedback module is configured to receive processing information from each module, and when the processing information meets the triggering conditions, collect the scoring results of the online gambling processing results; and update the recommended values of non-safety key evaluation parameters or process parameters in the multi-Agent orchestration control module based on the scoring results, and update the process optimization constraints of the security arbitration module within the preset hard constraint range; the hard constraints are not directly modified by online feedback triggered by the scoring results.
[0013] In one embodiment, the pre-trained large language model invoked by the process planning agent is deployed through at least one of the following methods: cloud API call, local private deployment, or lightweight edge deployment; the output of the pre-trained large language model is constrained by JSON Schema, inference is triggered in batches, the device does not start new processing actions that have not yet obtained valid process parameters during inference, and the preset safety handling actions are unrestricted.
[0014] In one embodiment, the process optimization agent is configured to smoothly update the process parameters using an exponentially weighted moving average algorithm based on historical structured process parameters and quality evaluation results.
[0015] The second aspect of this application relates to a method for processing computer-generated ...
[0016] In one embodiment, after the spinach processing is completed, the method further includes: evaluating the quality of the processed spinach and generating a quality evaluation result; optimizing and updating the process parameters based on historical structured process parameters and the quality evaluation result, and using the updated process parameters to generate structured process parameters for subsequent batches.
[0017] Overall, the technical solutions conceived in this application have the following beneficial effects compared with the prior art: This application collects multimodal data of spinach through a data acquisition module, providing a comprehensive and real-time batch status perception foundation for the system. Compared with the existing technology that relies on a single sensor or manual observation, it can more accurately reflect the actual processing status of the current batch of spinach, thus providing reliable data support for subsequent batch-aware process planning.
[0018] Based on this, the perception agent fuses multimodal data into a batch state vector that represents the current batch of spinach. This enables the system to characterize batch features such as the proportion of yellow leaves, fluffiness, and moisture content of spinach in a structured and quantitative manner, achieving accurate perception of differences between different batches of spinach. This lays the foundation for overcoming the problem that existing fixed parameter control methods are difficult to adapt to batch differences.
[0019] Furthermore, the process planning agent, based on a pre-trained large language model, generates structured process parameters containing process parameters of mechanical execution modules according to the batch state vector. By introducing the high-level cognition and reasoning capabilities of the general large language model, the system can automatically generate appropriate process parameters according to the real-time batch state, realizing the leap from fixed parameter control to batch-level dynamic process decision-making, and solving the technical problem of fixed parameters and inability to dynamically adjust with batch state in the prior art.
[0020] However, due to the inherent uncertainty of the output of large language models, direct application to mechanical actuators may generate control commands that exceed physical limits or violate safety regulations. To address this, this application establishes a safety arbitration module between the process planning agent and the underlying execution control module. This module performs multi-layer constraint verification on structured process parameters and outputs parameters that pass verification or correction to the underlying execution control module. By adding a safety arbitration layer to filter and constrain the output of the large language model, the impact of abnormal parameters from the large language model output on the mechanical execution process is reduced. This enables the high-level planning capabilities of the large language model to be reliably applied to the engineering control of food processing machinery, solving the core problem of the lack of a reliable coupling method between general-purpose large language models and food processing machinery in existing technologies.
[0021] Ultimately, the underlying execution control module controls the mechanical execution module's actions only based on the parameters that have passed verification or correction, ensuring that the actual instructions driving the machinery are always within a safe, compliant, and executable deterministic range. This achieves effective isolation between the large language model's cognitive decision-making and the underlying deterministic control, thereby ensuring the safety and stability of the system operation while gaining intelligent process decision-making capabilities. Attached Figure Description
[0022] Figure 1 This is a first structural block diagram of the online gaming processing system based on large model orchestration and security arbitration provided in the embodiments of this application; Figure 2 This is an interactive schematic diagram of the multi-Agent orchestration control module provided in an embodiment of this application; Figure 3 This is a second structural block diagram of the online gaming processing system based on large model orchestration and security arbitration provided in the embodiments of this application; Figure 4This is an interactive schematic diagram of the security arbitration module provided in an embodiment of this application; Figure 5 This is a third structural block diagram of the online gaming processing system based on large model orchestration and security arbitration provided in the embodiments of this application; Figure 6 This is a flowchart illustrating the spinach processing method based on large model orchestration and security arbitration provided in the embodiments of this application.
[0023] In all the accompanying drawings, the same reference numerals are used to denote the same elements or structures, wherein: 10 is the data acquisition module; 20 is the multi-agent orchestration and control module; 21 is the perception agent; 22 is the process planning agent; 23 is the quality evaluation agent; 24 is the process optimization agent; 30 is the safety arbitration module; 31 is the verification unit; 32 is the correction unit; 33 is the degradation processing unit; 40 is the low-level execution control module; 50 is the mechanical execution module; 60 is the loop feedback module. Detailed Implementation
[0024] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0025] In this application, the term "and / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent three cases: A existing alone, A and B existing simultaneously, and B existing alone. In this application, the symbol " / " indicates that the related objects are in an "or" relationship, for example, A / B means A or B.
[0026] It should be understood that expressions such as “comprising” and “may include” used in this application indicate the existence of the disclosed functions, operations, or constituent elements, and do not limit one or more additional functions, operations, and constituent elements. In this application, terms such as “comprising” and / or “having” are to be interpreted as indicating a particular characteristic, number, operation, constituent element, component, or combination thereof, but not to exclude the existence or possibility of adding one or more other characteristics, numbers, operations, constituent elements, components, or combinations thereof.
[0027] In this application, the terms "first" and "second," etc., are used to distinguish different objects, not to describe a specific order of objects. For example, "first response message" and "second response message," etc., are used to distinguish different response messages, not to describe a specific order of response messages. The term "connection" in this application can refer to a direct circuit connection or signal transmission via a communication protocol.
[0028] In the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design that is described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design. Specifically, the use of the terms "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
[0029] In the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more, for example, multiple processing units means two or more processing units, multiple elements means two or more elements, etc.
[0030] Based on the background technology, this application proposes a betting processing system based on large model orchestration and security arbitration. Its technical essence is a betting processing system based on large language model process planning and security constraint arbitration. Please refer to... Figure 1 , Figure 1 This is a first structural block diagram of the online gaming processing system based on large model orchestration and security arbitration provided in the embodiments of this application.
[0031] In this embodiment, the system includes: a data acquisition module 10, a multi-agent orchestration control module 20, a security arbitration module 30, a low-level execution control module 40, and at least one mechanical execution module 50.
[0032] The output of the data acquisition module 10 is connected to the input of the sensing agent 21; the output of the sensing agent 21 is connected to the input of the process planning agent 22; the input of the safety arbitration module 30 is connected to the output of the process planning agent 22; the output of the safety arbitration module 30 is connected to the input of the underlying execution control module 40; and the output of the underlying execution control module 40 is connected to the input of each mechanical execution module 50.
[0033] It should be noted that this connection primarily describes the flow of the process, and its specific implementation is not necessarily limited to a direct physical electrical connection. At the hardware level, signal transmission between modules can be achieved through intermediate conversion devices (such as signal isolators, analog-to-digital converters, and communication gateways), without requiring a direct wire connection between the two points. At the software level, the "connection" between modules can manifest as function calls, data object transfers, message publishing and subscription, or binding of network communication ports. The actual path of the data flow may pass through multiple intermediate nodes (such as data caching servers, protocol conversion middleware, and edge computing gateways). For example, image data acquired by the data acquisition module 10 can first be stored in a local memory buffer, and then the perception agent 21 can retrieve the data by reading from this buffer. In this case, the connection between the two is manifested as a read-write relationship of a shared memory area, rather than a direct physical connection.
[0034] Furthermore, when the system adopts a distributed architecture, each module can be deployed on different computing devices. The input and output terminals of the modules are logically connected through network protocol stacks (such as TCP / IP and UDP) and routing devices (such as switches and routers). The physical topology may be star, tree, or mesh.
[0035] Specifically, the mechanical execution module 50 in this application may include, but is not limited to, any one or a combination of the following modules: for example, a conveying module, a visual inspection module, a yellow leaf removal module, a flexible pressing module, an air-drying module, and a weighing and packaging module. Here, the mechanical execution module should be understood as a terminal device that receives the drive signals output by the underlying execution control module 40 and completes specific physical actions. The modules listed above correspond to the material conveying, defect identification, foreign object removal, physical pressing, surface dehydration, and quantitative packaging processes in the spinach processing production line. Those skilled in the art can select one or more of these modules to form a complete automated production line according to actual production needs, or add other functional modules (such as a cleaning module or a sterilization module) or delete some modules without departing from the concept of this application.
[0036] It should be noted that the conveying module includes a permeable conveyor belt, a drive roller, a driven roller, a drive motor, a sprocket and chain transmission mechanism, and an encoder. The drive motor drives the drive roller to rotate via the sprocket and chain, thereby driving the permeable conveyor belt. The encoder detects the belt's running position in real time, enabling the system to precisely control the timing of processes such as visual inspection, rejection, pressing, drying, and packaging. The conveying module also supports three modes: continuous operation, intermittent operation, and shutdown.
[0037] It should be noted that the visual inspection module includes an RGB camera, a depth camera, a supplementary lighting device, and an embedded computing unit, which can be positioned above the delivery module. The embedded computing unit runs an object detection model (such as YOLOv8 or an equivalent object detection model) to identify yellow leaf areas, foreign object areas, and leaf stacking distribution in the spinach.
[0038] The depth camera is used to acquire information on the stack height and volume distribution of the spinach, providing input for subsequent modules.
[0039] It should be noted that the yellow leaf removal module is located after the vision inspection station and includes a brush, a brush motor, a motor driver, and a transmission system consisting of a sprocket and chain drive mechanism. When a yellow leaf is detected, a removal command is received. Typically, the conveyor belt is first stopped or slowed down, and then the brush motor is controlled to operate at a preset speed and duration to sweep the yellow leaf off the conveyor belt.
[0040] It should be noted that the flexible pressing module includes a flexible pressing mesh, a screw lifting mechanism, a slide rail slider mechanism, a pressure sensor, and a reset structure. The flexible pressing mesh is made of food-grade flexible mesh material and is located above the permeable conveyor belt. The screw lifting mechanism is driven by a stepper motor or servo motor, causing the flexible pressing mesh to move up and down along the slide rail; the reset structure uses gravity or a spring to reliably return the pressing mesh to its original position. The pressure sensor detects the pressing force applied to the spinach by the flexible pressing mesh in real time and feeds back the detection results. A target pressing force value can be generated based on the spinach stacking height, damage risk score, and current process status.
[0041] It should be noted that the air-drying module is located after or shares a workstation with the flexible holding module, and includes a fan, air knife, and airflow adjustment mechanism. The air-drying process is linked to the flexible holding net: before the fan starts, the flexible holding net uses holding force to limit the spinach, preventing the leaves from turning over or scattering under the influence of the wind; after the fan starts, the wind speed and duration are dynamically adjusted according to the moisture residue index. The linkage control sequence is as follows: the holding net descends to the holding position, a delay confirms the holding net is stable, the fan starts, the wind speed is dynamically adjusted, the fan stops, and the holding net returns to its original position.
[0042] It should be noted that the weighing and packaging module includes an inclined weighing platform, a weighing sensor, a depth camera or height sensor, a shaping mechanism, a packaging film traction mechanism, a heating mechanism, a sealing and melting mechanism, and a cutting mechanism. The inclined weighing platform monitors the weight in real time by the weighing sensor, and tilts to unload the material after reaching a preset value; the shaping mechanism gently presses and shapes the spinach to bring its fluffiness into a set range; the packaging film traction mechanism, heating mechanism, and sealing and melting mechanism work together with gears and racks to achieve the wrapping, heating, sealing, melting, and tightening of the plastic wrap.
[0043] As can be seen, each of the above modules contains, to varying degrees, some modal data acquisition devices, such as encoders, vision inspection modules, pressure sensors, weighing sensors, etc. Although these devices are located at their respective workstations, they all belong to the data acquisition module 10 proposed in this application.
[0044] It should be noted that the devices used for modal data acquisition here refer to sensors or sensing systems capable of sensing the physical environment and generating electrical signals. Different modes correspond to different physical quantities, such as position (encoder), image (RGB camera, depth camera), force (pressure sensor), weight (weighing sensor), etc. Although these devices are physically distributed across various workstations such as conveying, detection, rejection, pressing, drying, and packaging, from a system architecture perspective, they are all components of the data acquisition module 10, uniformly providing input data to the multi-Agent orchestration control module 20. This affiliation does not require all sensors to be centrally connected through a single hardware device, but rather that they are logically and functionally configured to acquire multimodal data during the spinach processing, and their output signals are aggregated to the data interface of the data acquisition module 10 via fieldbus or industrial Ethernet. This module performs timestamp alignment, format conversion, and preprocessing (such as filtering and calibration) on the multi-source heterogeneous data, and then packages and sends it to the sensing agent 21. By unifying the scattered sensors into the data acquisition module 10, the system achieves standardization of the perception layer, making it easy to add new sensor types or replace existing sensors without changing the upper-level control logic.
[0045] Understandably, the data acquisition module 10 is configured to collect multimodal data of spinach. This multimodal data includes visual modalities (RGB images, depth images), positional modalities (encoder pulses), force modalities (pressure sensor signals), weight modalities (weighing sensor signals), and environmental modalities (temperature, humidity, optional). This module is configured to perform the following operations: First, synchronously trigger each sensor according to a preset sampling frequency, or achieve timestamp alignment via hardware trigger lines; second, perform analog-to-digital conversion on the acquired analog signals and decode the digital signals; then, correlate the data from different modalities to the same coordinate system (e.g., convert the pixel coordinates of the depth image to the physical coordinates of the conveyor belt); finally, send the multimodal dataset to the perception agent 21 via a communication interface. This configuration enables the system to simultaneously acquire the physical attributes (position, weight, shape) and state attributes (yellowing leaves, moisture, stacking height) of the spinach, providing a comprehensive information foundation for subsequent perception and planning, thereby improving the automation level and decision-making accuracy of the processing.
[0046] It should be noted that the multi-agent orchestration control module 20 includes at least: a perception agent 21 and a process planning agent 22. Here, the multi-agent orchestration control module refers to a software control module based on a multi-agent system architecture, deployed in edge computing devices or industrial control computers. This module implements complex industrial control logic by defining agents with different roles and coordinating their interactions. Agents communicate asynchronously via message queues, using a publish / subscribe model; agents send structured messages in JSON format; and each agent can be deployed and run independently. In the event of an anomaly in a single agent, the system can consider degraded operation through timeout detection (heartbeat timeout threshold of 5 seconds), task retries (maximum of 3 times), or a preset set of rule parameters.
[0047] Among them, Perception Agent 21 and Process Planning Agent 22 are the core components that complete the closed loop from data perception to instruction generation. Perception Agent 21 is responsible for processing the raw data from the lower level and extracting key features; Process Planning Agent 22 is responsible for generating high-level process strategies based on the feature information. This design, which separates perception and planning into independent agents, enables the system to process data streams in parallel, reduces the complexity of individual modules, and facilitates the subsequent expansion of new agents without affecting the stability of existing modules.
[0048] Specifically, the Perception Agent21 is configured to generate a batch state vector representing the current batch's spinach state based on multimodal data. Here, "configured" means that the Perception Agent21 internally runs a specific algorithm program that defines the mapping rules from input data to output vectors.
[0049] It should be noted that the batch state vector is a multi-dimensional numerical array used to mathematically abstractly represent the physical and state characteristics of the currently processed batch of spinach. Each dimension of this vector corresponds to a specific feature index.
[0050] For example, the input to the sensing agent includes RGB images, depth images, conveyor belt encoder position, pressing pressure, weighing data, and moisture data. Optionally, when the system is equipped with a cleaning module, it also includes the turbidity of the cleaning water.
[0051] At this point, the output is a batch state vector, which includes at least the following: The first dimension of the vector represents the proportion of yellow leaves (0 to 100%), based on the proportion of the yellow leaf area identified by the target detection model to the total leaf area; the distribution of foreign objects (location coordinates and area), based on the bounding boxes of non-spinach objects identified by the target detection model; the second dimension represents the leaf stacking height (mm), based on the distance between the highest point of the leaf surface and the mesh plane in the depth image; the third dimension represents the leaf bulkiness, defined as the ratio of stacked volume to actual leaf volume, where the stacked volume is calculated by integrating the depth image, and the actual leaf volume is estimated by the ratio of weight to density; the fourth dimension represents the leaf damage risk score (0-1), which combines the leaf edge integrity (calculated by the edge detection algorithm to determine the proportion of broken edges) and the leaf surface crack detection results (based on image texture analysis); the fifth dimension represents the estimated moisture content (%), which is jointly estimated based on moisture sensor readings, leaf surface gloss, and historical moisture data.
[0052] It should be noted that each dimension of the batch state vector is also configured with a validity flag to characterize the missing, expired, abnormal, or low-confidence state of the data in that dimension. When the validity flag of a certain dimension is invalid, the corresponding process parameter adopts the default value in the preset rule parameter set, or triggers the corresponding degradation processing. The mapping relationship between each state variable and the process parameter is as follows: the proportion of yellow leaves is mapped to the brush speed and the number of rejection actions; the distribution of foreign objects is mapped to the rejection action; the stacking height and fluffiness of the blades are mapped to the pressing distance and holding force of the pressing net; the blade damage risk score is mapped to the upper limit of the holding force; and the estimated moisture content is mapped to the drying time and wind speed level. The above mapping ensures that each dimension of the batch state vector corresponds to a clear process constraint or control parameter, rather than just being used as an input term. The determination threshold of the validity flag is determined based on the actual sensor calibration and operating conditions.
[0053] Understandably, by generating batch state vectors, the Perception Agent21 transforms heterogeneous sensor data into standardized semantic information that can be understood by higher-level control modules, eliminating data silos and providing a unified data interface for subsequent decision-making.
[0054] It should be noted that the process planning Agent22 is configured to generate structured process parameters, including 50 process parameters for the mechanical execution module, based on a pre-trained large language model and the batch state vector. Here, the pre-trained large language model refers to a neural network model (such as the GPT series, LLaMA series, etc.) pre-trained using massive amounts of text data. This model possesses powerful contextual understanding, logical reasoning, and text generation capabilities.
[0055] In this embodiment, the model deployment method can include cloud API calls, local private deployment, or lightweight edge deployment. The batch state vector, historical process parameters (parameters of the previous 5 batches and their corresponding quality scores), and constraint library are used as prompts to output structured process parameters (JSON format) constrained by a JSON schema. Each inference is triggered batch by batch (approximately 2 to 8 seconds per batch) and does not participate in millisecond-level real-time control. During inference, the underlying execution control module 40 maintains or transitions to the predefined state corresponding to the current process, and does not initiate new actions for which valid process parameters have not yet been obtained; approved actions that have passed verification in the previous batch are allowed to complete; when the standby operating conditions are met, the standby parameters that have passed current verification are executed.
[0056] It should be noted that JSON Schema constraints ensure the determinism of output format and field range. The JSON output by the large language model must conform to predefined field names, data types, and value ranges. If the output of the large language model does not conform to the schema (such as missing fields or incorrect types), the subsequent security arbitration module 30 can directly reject it at the schema validation layer.
[0057] It should be noted that the process planning Agent22 does not directly process natural language, but rather through fine-tuning or prompt word engineering, it is able to understand the batch state vector in numerical form and output control commands.
[0058] In practice, the system converts the batch state vector into a text description that the model can understand (e.g., batch state information is "Current spinach batch: high stacking height, yellow leaf ratio 15%, high moisture content"; historical reference (previous batch) is "Previous batch netting force = 3.0N, air drying time = 10s, packaging weight = 250g"; the constraint range that must be followed is "Netting force: [1,6] N"). This serves as an input prompt for the large language model.
[0059] It should be noted that the process planning Agent22 uses a large language model for reasoning. Based on learned knowledge (such as agricultural processing standards and common sense physics), the model determines that for high moisture and high stacking conditions, higher holding force and longer air-drying time are required. The resulting structured process parameters are a set of parameters with a clear format and field definitions, typically in JSON, XML, or string format with specific delimiters, containing the target module identifier, parameter name, and parameter value. For example, the output might be in JSON Schema format: {"Module": "Air-drying module", "Wind speed": "80%", "Duration": "30 seconds", "Holding force": "5N"}.
[0060] In addition, the structured process parameters include, but are not limited to: the operating mode and pause time of the conveying module; the rotation speed (r / min), duration (s) and number of actions of the yellow leaf removal brush; the pressing distance (mm), holding force (N) and holding time (s) of the flexible pressing mesh; the fan speed (level), drying time (s) and wind direction (angle); the target packaging weight (g), target volume (cm³), heat sealing temperature (°C), heat sealing time (s) and cutting timing.
[0061] Specifically, the functional positioning, inputs and outputs, and bound mechanical objects of each Agent are shown in the table below.
[0062] It should be noted that the responsibilities of each Agent are as follows: Only the Process Planning Agent 22 calls the pre-trained large language model; the Perception Agent 21, the Execution Agent group, the Quality Evaluation Agent 23, and the Process Optimization Agent 24 are all implemented by deterministic algorithms and do not call the large language model; the calling order of each Agent is: Perception Agent 21, Process Planning Agent 22, (Execution Agent group), Safety Arbitration Module 30, Low-level Execution Control Module 40, (Quality Evaluation Agent 23), and (Process Optimization Agent 24); when a single Agent times out (heartbeat timeout threshold of 5 seconds) or outputs abnormally, it triggers task retry (maximum 3 times) or downgrade of the preset rule parameter set; each Agent can only propose process parameter suggestions and must not bypass the Safety Arbitration Module 30 to directly issue control commands to the Mechanical Execution Module 50, nor can it modify the constraint library belonging to the Safety Arbitration Module 30.
[0063] Table 1. Comparison of Perception Agent and Process Planning Agent:
[0064] In this application, the pre-trained large language model only undertakes batch-level process planning tasks, i.e., generating candidate structured process parameters based on batch state vectors, historical parameter records, and constraint libraries. Multimodal data fusion, batch state vector generation, five-layer constraint verification, parameter correction, quality index calculation, and EWMA parameter updates are all handled by deterministic algorithms, independent of the large language model. When the large language model is unavailable (e.g., inference timeout, service interruption), the safety arbitration module 30 switches to a preset rule parameter set, and the equipment operates with preset safety parameters, ensuring uninterrupted production. The reason for using a large language model instead of a fixed recipe table or rule system is that the batch states of spinach are highly unstructured, multi-dimensional combinations. Fixed recipe tables and simple threshold rules cannot cover all state combinations. The large language model can generate suitable process parameter candidates for unseen complex state combinations based on semantic understanding, which are then filtered and corrected by the deterministic safety arbitration module, thus balancing adaptability and safety. It should be noted that the above-mentioned adaptability advantages can be further verified through comparative experiments.
[0065] Understandably, this planning approach based on large language models has stronger generalization capabilities compared to traditional expert systems based on hard-coded rules. It can handle complex combinations of states that have never been seen before and can automatically generate reasonable control strategies.
[0066] In summary, the collaborative work of Perception Agent 21 and Process Planning Agent 22 has yielded significant technical benefits. First, the decoupling of the perception and planning layers is achieved through the mediation of batch state vectors, ensuring that replacements or upgrades of data acquisition hardware do not affect the upper-level decision-making logic. Second, the introduction of a pre-trained large language model for process planning solves the problem of traditional automated systems struggling to handle highly unstructured environments (such as diverse agricultural product forms). The system can generate process parameters based on semantic understanding rather than simple threshold comparisons, significantly improving the intelligence and adaptability of control. Finally, the generated structured process parameters directly correspond to the control interface of the mechanical execution module 50, enabling the system to automatically and continuously adjust processing strategies and implement customized processing techniques for spinach batches in different states (such as freshness, moisture content, and impurity ratios). This ensures the removal of yellow leaves and reduces damage rates while optimizing drying and packaging efficiency, thereby improving the quality and consistency of the final product.
[0067] It should be noted that the safety arbitration module 30 is configured to perform multi-level constraint verification on the received structured process parameters and output the parameters that pass verification or correction to the lower-level execution control module 40. Here, "configured" means that the safety arbitration module 30 internally runs a verification algorithm and constraint rule library. This module is deployed in software form in a separate safety controller or a processor with a redundant architecture, or it can be implemented through hardware logic circuits. Multi-level constraint verification means that the verification process is executed sequentially according to a preset hierarchical order, with each level corresponding to a type of safety or process constraint condition.
[0068] The multi-layer constraint verification mechanism should cover multiple dimensions such as data legality, physical feasibility, operational safety, and timing logic to ensure that the instructions generated by the process planning Agent22 will not cause equipment conflicts, over-limit operation, or safety accidents.
[0069] Understandably, when a certain layer of verification fails, the safety arbitration module 30 can block the parameter or correct it according to a preset correction strategy. Parameters that pass verification or correction are encapsulated into standardized control commands and output to the underlying execution control module 40 via a communication interface. The independence of this module ensures that even if the process planning agent 22 generates dangerous commands due to model illusions or data anomalies, they can be effectively intercepted or corrected, thereby achieving separation of control decisions and safety monitoring, and meeting the requirements of industrial safety standards for safety-related systems.
[0070] It should be noted that the underlying execution control module 40 is configured to control the mechanical execution module 50 based on the parameters that have passed verification or correction. Here, "configured" means that the underlying execution control module 40 includes motion control algorithms, drive interfaces, and signal processing circuits; its function is to convert the structured process parameters from higher levels into drive signals that the underlying actuator can directly recognize.
[0071] Specifically, after receiving parameters from the safety arbitration module 30, the underlying execution control module 40 first performs protocol parsing to extract the target module identifier (such as "flexible holding module") and parameter key-value pairs; then, according to the built-in device configuration file, it maps the parameters to specific control quantities, such as converting "holding force: 5N" into the set value of the pressure closed-loop controller and "wind speed: 80%" into the frequency setpoint of the frequency converter; then, it sends drive signals to the mechanical execution module 50 through the corresponding output interface (such as analog output card, pulse output channel or industrial Ethernet slave interface).
[0072] It should be noted that the underlying execution control module 40 only executes deterministic instructions that have been verified or corrected by the safety arbitration module 30, and has the following deterministic execution guarantee mechanisms: binding batch numbers with process parameters to prevent the reuse of process parameters across batches; setting version numbers and validity periods for process parameters, performing integrity checks on received parameters, and not executing duplicate messages; setting communication interruption detection and a controller watchdog, entering a safe state when communication is interrupted or the watchdog times out; setting precondition verification for the actions of the mechanical execution module 50, and configuring emergency stop, protection, and overload interlocks; the underlying execution control module 40 runs a state machine for start-up, pause, fault, and recovery, and outputs drive signals only when verification is passed and preconditions are met. Large language model planning and software arbitration cannot replace the necessary safety interlocks at the underlying level; the execution phase still needs to respond to the real-time equipment status.
[0073] During the operation, the underlying execution control module 40 also collects feedback signals from each execution module in real time (such as the position feedback of the motor encoder and the actual value of the pressure sensor), and runs closed-loop control algorithms (such as PID control and adaptive control) to reduce tracking errors. For example, when controlling the flexible pressing module, module 40 adjusts the drive pulse frequency of the stepper motor according to the deviation between the target value and the actual value of the pressing force, so that the force applied by the flexible pressing mesh is stabilized within the allowable range.
[0074] It should be noted that the execution results of this module (such as action completion status and fault codes) can be fed back to the multi-Agent orchestration control module 20 for subsequent batch status updates or anomaly recovery. Through the isolation and conversion of the underlying execution control module 40, the upper-level control module does not need to care about the details of the underlying driver, thus achieving decoupling between the control strategy and the execution hardware, making it easy for the system to adapt to different brands or types of actuators.
[0075] Understandably, the collaboration between the aforementioned safety arbitration module 30 and the underlying execution control module 40 yields significant technical benefits. First, the multi-layered constraint verification mechanism provides defense in depth, ensuring system operational safety from multiple dimensions, including data integrity, physical feasibility, operational safety, and timing logic, thus preventing equipment damage, product scrapping, or personnel injury due to a single fault or erroneous decision. Second, parameter correction functions during the verification process (such as clamping and replacement) enable the system to continue operating in a safe mode even when non-fatal errors occur, improving the continuity and robustness of the production process. Finally, the precise generation and closed-loop adjustment of drive signals by the underlying execution control module 40 ensures that the mechanical execution module 50 can accurately reproduce the intent of the process planning agent 22, transforming intelligent decisions into high-precision physical actions, thereby improving automation levels while maintaining the stability and consistency of processing quality.
[0076] In one feasible implementation, the multi-Agent orchestration control module 20 may further include an execution agent group. The execution agent group comprises multiple execution agents that correspond one-to-one with the mechanical execution module 50. Here, the execution agent group refers to a collection of multiple independent execution agents, each of which is represented in the software architecture as an independent process or thread, possessing its own input interface, output interface, and internal processing logic.
[0077] It should be noted that the one-to-one correspondence between the execution agents and the mechanical execution modules 50 means that each execution agent is specifically responsible for the control logic of a particular mechanical execution module 50. For example, one execution agent corresponds to the conveying module, another to the vision inspection module, and yet another to the yellow leaf removal module. This one-to-one correspondence can be established through configuration files or the registry, enabling the system to dynamically perceive the hardware composition and flexibly reconfigure the system by adding or deleting the corresponding execution agents when adding or removing mechanical execution modules 50, without modifying the code of other agents.
[0078] It should be noted that the input of the execution agent is connected to the output of the process planning agent 22; the output of the execution agent is connected to the input of the security arbitration module 30.
[0079] Understandably, the aforementioned connections define the transmission path of control flow within the group of execution agents. The structured process parameters generated by the process planning agent 22 are a high-level instruction set containing parameters from multiple modules, such as conveyor speed, holding force, air velocity, and packaging weight. After receiving these structured process parameters, the execution agents extract relevant parameters according to their own responsibilities and convert them into instruction parameters that the underlying execution control module 40 can understand. For example, the flexible holding agent extracts fields such as "target holding force value" and "grip descent speed" from the structured process parameters and adds parameters specific to that module (such as the calibration coefficient of the pressure sensor and the travel limit of the slide rail) to form instruction parameters for the flexible holding module 50. These instruction parameters also use a structured format but are finer-grained and directly correspond to the underlying control interface. The execution agents send the instruction parameters to the safety arbitration module 30, which performs multi-layer constraint verification. This architecture separates the task decomposition function from the process planning Agent22, allowing the process planning Agent22 to focus only on generating the global strategy without having to worry about the specific control details of each module, thus reducing the coupling between modules.
[0080] For example, the execution agent group may include a sorting agent, a flexible holding agent, a drying agent, and a weighing and packaging agent, each responsible for breaking down the overall strategy output by the process planning agent into control subtasks for their respective modules. The subtask decomposition logic for each agent is shown in Table 2 below.
[0081] Table 2. Comparison of Sorting Agent, Flexible Holding Agent, Air Drying Agent, and Weighing & Packaging Agent:
[0082] It should be noted that each execution agent does not directly control the mechanical actuators; their output control subtask requests must be verified by the safety arbitration module. In other words, each agent can only propose process parameter suggestions and must not bypass the safety arbitration module 30 to directly issue control commands to the mechanical actuator module 50. After verification by the safety arbitration module 30, any modification that changes the meaning of the process parameter control must undergo a complete safety verification before it can be issued.
[0083] Understandably, by decomposing the overall task, the system achieves further decentralization of control and parallel processing. The global strategy generated by Process Planning Agent 22 is decomposed into multiple independent subtasks. Each execution agent can process its own subtask in parallel, reducing the computational burden of single-point decisions and improving the system's response speed. Simultaneously, this decomposition allows each execution agent to focus on the control logic of a specific module, facilitating algorithm optimization or parameter tuning for that module. For example, the drying agent can learn the optimal wind speed adjustment curve based on historical data without affecting other agents. Furthermore, when a mechanical execution module 50 fails, the corresponding execution agent can independently enter a safe state or execute a degradation strategy without affecting the normal operation of other modules, thereby improving the system's fault tolerance and maintainability. This multi-agent-based task decomposition architecture provides a modular and scalable solution for complex industrial automation systems.
[0084] Based on the above embodiments, this application proposes yet another embodiment.
[0085] Specifically, please refer to Figure 2 , Figure 2 This is an interactive schematic diagram of the multi-Agent orchestration control module provided in the embodiments of this application.
[0086] In this embodiment, the multi-agent orchestration control module 20 further includes a quality evaluation agent 23 and a process optimization agent 24. The input of the quality evaluation agent 23 is connected to the output of the data acquisition module 10; the output of the quality evaluation agent 23 is connected to the input of the process optimization agent 24; and the output of the process optimization agent 24 is connected to the input of the process planning agent 22. These connections establish a closed-loop feedback path from data acquisition to quality assessment and then to process optimization.
[0087] It should be noted that Quality Evaluation Agent23 is configured to evaluate the quality of the processed spinach and generate quality evaluation results; Process Optimization Agent24 is configured to optimize and update the process parameters based on historical structured process parameters and quality evaluation results, and provide the updated recommended values of process parameters to Process Planning Agent22 for use in generating structured process parameters in subsequent batches.
[0088] Understandably, after the mechanical execution module 50 completes processing, the data acquisition module 10 continues to collect multimodal data from the end of the production line, such as RGB images (for observing the appearance of the finished product), depth images (for measuring the volume after packaging), weighing sensor data (for verifying net weight), and possible near-infrared spectral data (for assessing internal quality) from the weighing and packaging module. The quality evaluation agent 23 receives this data, executes a quality evaluation algorithm, and generates results reflecting the processing quality of the current batch of spinach. This result is output in structured data form (such as a JSON object), containing scores for multiple quality dimensions and an overall rating.
[0089] Specifically, quality assessment can be triggered at the following two points in time: After air drying is completed: RGB images and moisture sensor data are collected, and the residual contamination index is calculated. C and moisture residue index M After packaging: acquire RGB images (leaf condition and sealing condition), weight data, and sealing images; calculate the leaf damage index. D Packaging weight error and sealing pass rate.
[0090] Understandably, the five indicators mentioned above are compared with their respective preset thresholds, and a weighted overall confidence score is calculated. When the overall confidence score is lower than the preset threshold (e.g., 0.6), it is marked as "low confidence" and triggers subsequent steps.
[0091] Specifically, the quality evaluation Agent23 collects images, moisture content, and sealing status information after air drying and packaging are completed, and calculates the following indicators.
[0092] Residual pollution index (0-100%) .
[0093] in, For the area of remaining yellow leaves, The total area of the blades. The number of foreign objects. This is the foreign object weighting coefficient (value 0.02). This represents the area of the muddy / sand-colored region. , , These are empirical weights. The areas mentioned above are all calculated based on the segmentation mask output by the object detection model.
[0094] Leaf damage index (0-100%) .
[0095] in, The length of the damaged edge identified by the edge detection algorithm. This represents the total edge length of the blade. The number of broken blades detected. For the area of color anomaly, , , For experience weights.
[0096] Moisture Residual Index (0-100%) .
[0097] in, This is the sensor's measured value for the surface residual moisture content. The target surface residual moisture content. This represents the area of the highly reflective surface region (indicating residual water film on the surface). , For experience weights.
[0098] Packaging weight tolerance: The unit is g. The actual packaging weight is the weight value measured by the weighing sensor of the weighing packaging module at the packaging station, in grams (g). The target packaging weight is the set packaging target value for this batch, expressed in grams (g).
[0099] Sealing pass rate: Based on the image detection of the sealing area, the sealing integrity is qualified if there are no gaps, wrinkles, or burn-through in the sealing area.
[0100] Overall confidence level: Calculated by weighting the deviations of each of the above indicators from their respective thresholds, with a value range of 0-1.
[0101] It should be noted that the calculation of the area of the bright reflection region in the image needs to exclude the influence of uneven lighting and leaf posture. A calibration method using multi-angle supplementary lighting and leaf normal vector correction can be used. The statistical sample size and denominator of the sealing pass rate need to be clearly defined. Appearance qualification obtained from image detection is not directly equivalent to airtightness or sealing strength qualification. Visual residual pollution indicators cannot directly prove that food safety indicators such as microorganisms and pesticide residues are qualified. The correspondence between the above indicators and food safety indicators is verified through testing.
[0102] Understandably, Process Optimization Agent 24 receives the quality evaluation results and simultaneously acquires historical structured process parameters (i.e., the set of process parameters that led to the quality result). It then uses an optimization algorithm to calculate the direction and magnitude of process parameter adjustments, generating updated recommended process parameter values. These recommended values are sent to Process Planning Agent 22, serving as part of the reference context or cue words for its pre-trained large language model during inference, thus influencing the generation of structured process parameters for subsequent batches. This closed-loop architecture allows the system to learn from actual processing results and gradually improve its control strategy.
[0103] Specifically, process optimization is performed after each batch is completed: based on quality evaluation results and historical parameter records, the parameter database is smoothly updated using an exponentially weighted moving average (EWMA) algorithm. .
[0104] in: Recommended values for the updated parameters; These are the recommended parameter values before the update. Based on the current batch quality evaluation results, the recommended parameter values are calculated according to the mapping relationship of "quality anomaly, possible causes, adjustable parameters, and limiting conditions": when yellow leaf residue exceeds the standard, This refers to the adjustment value for the brush rotation speed or the removal action parameters; when the residual mud and sand exceed the standard, These are the adjustment values for the parameters corresponding to the cleaning process; when the residual moisture on the surface exceeds the standard, This is an adjustment value for drying time or wind speed level; when blade damage exceeds the standard, This refers to the reduced values for holding force, brush speed, or airflow; when the packaging weight error exceeds the standard, This is an adjustment value for the weighing threshold or shaping parameters; when the sealing is abnormal, These are the adjustment values for heat sealing temperature, heat sealing time, or sealing pressure. In addition, quality abnormalities may also originate from sensor drift, equipment wear, or changes in raw materials. Such situations are not handled automatically through parameter optimization, but should trigger corresponding abnormality handling or manual intervention. This is a smoothing coefficient, ranging from 0.2 to 0.5, with a typical value of 0.3. The larger the value, the greater the weight of a single batch of feedback. The smaller the value, the smoother the parameter updates.
[0105] It should be noted that the recommended parameter values are... The calculation follows these rules: The adjustment step size is determined based on the range of abnormality in the quality indicators. For example, when the residual contamination index exceeds the threshold by no more than 10%, the adjustment step size is 5% of the corresponding parameter; when it exceeds 10% but not more than 30%, the adjustment step size is 10%; and when it exceeds 30%, the adjustment step size is 20% of the corresponding parameter's rated range. The parameter adjustment range for each batch shall not exceed 20% of the corresponding parameter's rated range, and any excess shall be truncated at the upper limit. When multiple quality indicators are simultaneously abnormal and their corresponding adjustment directions conflict (e.g., increasing wind speed to reduce surface residual moisture, while decreasing wind speed to reduce blade damage), they are processed sequentially according to preset priorities, from highest to lowest: blade damage, residual contamination, surface residual moisture, packaging weight, and sealing quality. Second-priority indicators are processed only after the highest-priority indicator is satisfied. When it is impossible to generate recommended parameter values that satisfy all hard constraints and process optimization constraints, the parameter update for the current batch is frozen, and manual inspection is triggered. The above adjustment step size, limit, and priority are exemplary values and can be configured based on actual calibration and experimental data.
[0106] It should be noted that when When the corresponding process parameters are discrete levels (e.g., wind speed levels 1-5), the parameter library retains continuous recommended values. During updates, these continuous recommended values are smoothly updated. Only during execution is the parameter quantized to the nearest valid level according to preset rules, and then a validity check is performed. If the quantized level exceeds the constraint range, it is clamped to the nearest boundary level, and the constraint verification of the safety arbitration module 30 is re-executed before it can be used in subsequent batches. This embodiment distinguishes between three concepts: continuous recommended status, quantized candidate level, and actual execution level after arbitration approval, avoiding the long-term stagnation of discrete levels due to batch-by-batch rounding. Taking holding force as an example, if the recommended holding force value for the previous batch is 3.0N, and the suggested value calculated for this batch's quality evaluation is 3.5N, the smoothing coefficient... =0.3, then the updated recommended value for bearing force. =0.3×3.5+0.7×3.0=3.15N. The range of values for the variables in each formula, the calibration method, and the rules for handling missing values are determined based on actual sensor calibration and experimental data.
[0107] Furthermore, when the same non-safety-critical quality indicator reaches a preset number of anomalies (e.g., 3 times) consecutively, the set of process parameters related to the anomaly is frozen, automatic updates to this parameter set are suspended, other optimization tasks must not overwrite the frozen parameters, the anomaly batch is recorded, and sensor and actuator checks are initiated; after the checks confirm and the recovery conditions are met, the freeze is lifted and parameter optimization resumes. Frozen recommended values still need to undergo current safety verification before they can be used in subsequent batches. Safety-critical anomalies are handled immediately without waiting for the accumulated number of occurrences. The logic for each Agent is shown in Table 3 below.
[0108] Table 3. Comparison of Quality Evaluation Agent and Process Optimization Agent:
[0109] Understandably, the system achieves significant technical effects and benefits through the aforementioned closed-loop feedback architecture. First, the quality evaluation agent 23 provides objective quantitative feedback, reducing reliance on manual sampling and improving the timeliness of batch evaluation, ensuring that the processing effect of each batch can be assessed promptly. Second, the process optimization agent 24 automatically optimizes process parameters using historical data, solving the problem of traditional automated systems relying on expert experience and struggling to cope with fluctuations in raw material characteristics, making it particularly suitable for scenarios with variable raw material states in agricultural product processing (such as seasonal changes and regional differences). Third, the optimized recommended values are fed back to the process planning agent 22, enabling decisions based on a large language model to incorporate actual production line operating experience, enhancing the model's domain adaptability, and reducing the risk of abnormal parameters being executed through historical feedback and independent verification. Finally, the entire multi-agent orchestration control module 20 forms a complete closed loop of "perception, planning, execution, evaluation, and optimization," with each agent performing its specific function while working collaboratively, improving the system's intelligence, robustness, and maintainability, and providing a feasible technical path for achieving a fully automated, self-optimizing intelligent processing production line.
[0110] Based on the above embodiments, this application proposes another embodiment.
[0111] Before introducing the security arbitration module 30, please refer to Figure 3 , Figure 3 This is a second structural block diagram of the spinach processing system based on large language model process planning and safety constraint arbitration provided in this embodiment. This embodiment combines... Figure 3 This further explains the structured process planning process of the large language model in the process planning Agent22.
[0112] Input construction: The batch state vector, historical parameter records (from the parameter library, including the process parameters and corresponding quality scores of the first N batches) and the constraint library (including the range values of currently effective mechanical constraints, food processing constraints, timing constraints and abnormal constraints) are concatenated into a structured prompt.
[0113] Large Language Model Invocation: Sends prompts to the deployed large language model server endpoint via HTTP API. The request includes the temperature parameter (set to zero or a low value such as 0.1 to improve output determinism) and the response_format parameter (set to json_object to force JSON output).
[0114] It should be noted that the `response_format` parameter is only used to request the large language model to output in JSON format, and cannot guarantee that the output meets the fields, types, and ranges of the predefined schema. Therefore, in this embodiment, after the large language model is output, it is independently verified by a local schema validator. The verification content includes at least: whether the required fields are complete, whether the data types of each field are correct, whether the numerical units match, whether the values of the enumerated fields are valid, whether there are any extra fields not defined in the schema, and the handling rules for missing or unknown fields. If the local schema verification fails, it is regenerated a preset number of times; if it still fails, it switches to the preset rule parameter set.
[0115] Output parsing: Receives the JSON string returned by the large language model and parses it into a structured process parameter object.
[0116] Schema validation: The parsed parameter object is compared with the predefined JSON Schema. The validation includes: whether all required fields exist, whether the data types of each field are correct, and whether each numeric field is within the allowed range of the Schema declaration (the range settings in the Schema are wider than those in the constraint library, and are only for format validity validation; the substantive physical range validation is completed by the security arbitration module).
[0117] Send Arbitration: After the schema verification passes, the structured process parameters are sent to the secure arbitration module 30.
[0118] This embodiment provides a suitable JSON Schema field definition. The Schema of the structured process parameters defines the name, type, unit, and allowed rough legal range of each field, as shown in Tables 4.1 and 4.2.
[0119] Table 4.1, Example Definitions of Main Fields in the Schema:
[0120] Table 4.2, Example Definitions of Main Fields in the Schema:
[0121] It should be noted that the scope settings in the Schema are broader than those in the constraint library, and are only for format validity verification; the substantive physical scope verification is completed by the mechanical constraint layer and food processing constraint layer of the security arbitration module 30. Therefore, please refer to... Figure 4 , Figure 4 This is an interactive schematic diagram of the security arbitration module provided in the embodiments of this application.
[0122] In this embodiment, the security arbitration module 30 includes a verification unit 31 and a correction unit 32. The verification unit 31 is configured to sequentially perform format validity verification, mechanical constraint verification, food processing constraint verification, timing constraint verification, and abnormal constraint verification on the structured process parameters. The validity verification, mechanical constraint verification, food processing constraint verification, timing constraint verification, and abnormal constraint verification are shown below.
[0123] The first layer, JSON Schema validation, verifies field integrity, data type, and format. It should be noted that this layer validates the integrity of structured process parameters, the correctness of data types, and the validity of the JSON format. This layer only verifies format validity and does not cover the range of physical parameters.
[0124] The second layer, mechanical constraint verification: Each numerical parameter is checked item by item to ensure it is within the physical range. It should be noted that specific mechanical constraint verification details are provided in Table 5. The determination of the constraint ranges in Table 5 is based on the equipment's rated parameters, prototype calibration results, spinach damage test data, and the applicable equipment model and operating conditions. The values listed in Table 5 are exemplary values for specific prototypes and operating conditions, not universally applicable safety ranges.
[0125] Table 5. Mechanical Constraint Verification Table:
[0126] The third layer, food processing constraint verification: checks parameters related to food safety and processing quality. It should be noted that specific food processing constraint verification details are provided in Table 6. The heat-sealing temperature and packaging film compatibility ranges in Table 6 are determined in conjunction with the packaging film material, thickness, and sealing pressure calibration.
[0127] Table 6. Food Processing Constraint Verification Table:
[0128] The fourth layer, timing constraint verification, checks whether the preconditions for each mechanism's actions are met. It should be noted that timing constraint verification is divided into two stages: the first is process plan timing verification, which verifies whether the process plan includes necessary preconditions, whether mutually exclusive actions are executed simultaneously, and whether there are sequence conflicts; the second is bottom-level action initiation interlocking, which verifies the actual preconditions (such as whether the conveyor belt has stopped, whether the mesh pressing is in a holding state, whether the weighing is stable, and whether the packaging film is in place) before each action is initiated. The preconditions shown in Table 7 are bottom-level action initiation interlocks, belonging to the real-time interlocking check during the execution phase; sequence conflicts in the process plan itself and missing preconditions are uncorrectable items, marked as rejected, and trigger regeneration.
[0129] Table 7. Timing Constraint Verification Table:
[0130] The fifth layer, anomaly constraint detection, detects whether there are any abnormal states requiring special handling. It should be noted that the monitoring of safety-critical anomalies (anomalies involving personnel safety and equipment interlocks) runs independently of the above parameter hierarchical verification process and has a higher handling priority. It is not delayed due to large language model inference, parameter correction, or re-verification. The above fifth layer of anomaly constraint detection is mainly used for status checks during the candidate process parameter generation stage. For specific anomaly constraint verification, please refer to Table 8.
[0131] It should be noted that the detection of material blockage and motor overcurrent is configured based on the motor and driver type, starting method, and protection characteristics, and distinguishes between the starting state and the stable operation state; candidate parameter verification and general anomaly filtering should not disable the driver's original necessary protections such as short circuit and severe overcurrent. Material blockage determination is based on the deviation between the speed command and the actual speed; normal deceleration and stopping should not be mistakenly judged as material blockage simply because the speed drop exceeds the threshold; when multiple anomalies occur simultaneously, relevant protections can be triggered in parallel without waiting for the underlying software to finish checking.
[0132] Table 8. Anomaly Constraint Verification Table:
[0133] It should be noted that the handling of the above-mentioned anomalies follows a tiered degradation principle. The system supports four degradation levels: continue operation, reduce processing capacity, pause, and safe shutdown. Anomalies such as visual anomalies and weighing anomalies, which can be automatically adjusted and recovered, will automatically recover and continue operation once the recovery conditions are met. Anomalies requiring manual intervention, such as material blockage and motor overcurrent, will resume operation after manual confirmation following the handling by this module. Safety-critical anomalies involving personnel safety and equipment interlocks will trigger an immediate safe shutdown without waiting for multiple consecutive batches to occur. The recovery conditions and thresholds after each anomaly is resolved are determined based on the actual equipment configuration.
[0134] Next, after all verifications pass, the verification unit 31 marks the structured process parameters as passed and forwards them to the underlying execution control module 40. If there are any failed verification items that are allowed to be corrected, the correction unit 32 is driven to perform deterministic corrections on the failed verification items in a preset order. The preset order is: first verify the range of single parameter values, then verify the coupling conditions of multiple parameters, then verify the timing of equipment actions, and then correct according to deterministic rules. Parameter correction does not mean that the parameter is allowed to be executed. After the correction is completed, the corrected structured process parameters must be re-executed with a complete multi-layer constraint verification. Only when all re-verifications pass will the parameter be marked as corrected and forwarded to the underlying execution control module 40. If the re-verification still fails or there is no feasible correction result, it is marked as rejected, and the reason for rejection is fed back to the process planning agent 22 to trigger regeneration. If there are any failed verification items that are not allowed to be corrected, the structured process parameters are marked as rejected and fed back to the process planning agent 22 to trigger regeneration. At the same time, the arbitration log is recorded. This log can be stored in local memory or an external database for subsequent auditing, fault tracing, or model optimization.
[0135] Specifically, the table in this embodiment clearly indicates which parameters are correctable and which are not. It should be noted that correction only applies to single-parameter out-of-bounds errors. For cases where multi-parameter coupling constraints are not met (e.g., the combination of heat-sealing temperature and heat-sealing time must simultaneously satisfy the sealing process window), or where the process plan itself has sequential conflicts or missing prerequisite actions, correction results are not obtained through item-by-item clamping, but rather marked as rejected and regeneration is triggered. The result after single-parameter correction must still satisfy all coupling constraints; if correction causes new coupling conflicts, it must not be allowed. For cases where the process sequence is correct but the real-time equipment is not yet in place, the underlying execution control module 40 verifies the actual prerequisite conditions before the action is initiated. If the conditions are not met, the action is prohibited from starting and continuous monitoring is implemented, entering the exception handling process after a timeout. Regardless of the correction method used, the corrected parameters must be fully verified again before being issued.
[0136] Taking the coupling constraint between heat-sealing temperature and heat-sealing time as an example, this embodiment adopts a segmented constraint relationship: For PE film, when the heat-sealing temperature T satisfies 130℃≤T<140℃, the heat-sealing time is not less than 1.5s; when 140℃≤T≤150℃, the heat-sealing time is not less than 1.2s; for PP film, when the heat-sealing temperature T satisfies 140℃≤T<150℃, the heat-sealing time is not less than 1.3s; when 150℃≤T≤160℃, the heat-sealing time is not less than 1.0s. The above temperature ranges do not overlap, and the final feasible parameters must simultaneously satisfy the mechanical constraint range, film material compatibility range, temperature-time coupling conditions, and other effective constraints; the specific segmentation is determined based on the packaging film material, thickness, and sealing pressure calibration. When the combination of heat-sealing temperature and heat-sealing time does not satisfy the above coupling constraints, the coupling conflict is an uncorrectable item, marked as rejected, and triggers regeneration, rather than obtaining a correction result through item-by-item clamping.
[0137] In this embodiment, the security arbitration module 30 further includes a degradation processing unit 33. The degradation processing unit 33 is used to select alternative parameters from a preset rule parameter set with corresponding applicable scope according to the current batch status and equipment configuration when the number of consecutive rejections or the large language model inference timeout is reached in the same batch of planning tasks. The alternative parameters are submitted to the verification unit 31 for verification. The alternative parameters are only output to the underlying execution control module 40 when the verification is successful. If there are no applicable alternative parameters or the verification of the alternative parameters fails, a preset pause or safety handling process is triggered. The preset rule parameter set is a combination of multi-level experience parameters preset according to the spinach variety and status. Each level parameter has corresponding applicable raw material status, equipment configuration and packaging film material conditions. The preset rule parameter set does not have the authority to bypass the verification of the security arbitration module 30.
[0138] It should be noted that the consecutive preset number of times here refers to a configurable integer threshold, such as 3 times, used to determine whether the process planning Agent22 is in a state of continuous failure. This rejection count is accumulated for the same batch of planning tasks, and after reaching the upper limit, it enters the degradation process, and is reset to zero at the beginning of the next batch. The large language model inference timeout refers to the process planning Agent22 failing to return results within a preset time (e.g., 10 seconds) when calling the pre-trained large language model to generate structured process parameters. This may be caused by insufficient computing resources, model service interruption, or abnormal input data. This inference timeout threshold is greater than the normal batch inference time (approximately 2 to 8 seconds per batch) and leaves a margin, distinguishing it from the heartbeat timeout threshold (e.g., 5 seconds) used to detect the survival of the Agent process. To ensure the consistency of batch responses, the system configures a batch number, planning task number, and candidate parameter version number for each batch; a total deadline is set for planning tasks in the same batch (e.g., the product of a single inference timeout threshold and a preset number of retries plus a preset margin), and planning tasks that exceed the total deadline are terminated; large language model responses returned later than the timeout threshold or the total deadline are considered expired and invalid, regardless of whether backup parameters have been issued, and are not overwritten with the current valid parameters.
[0139] When any of the above conditions are met, the degradation processing unit 33 is activated, interrupting its dependence on the output of the large language model and instead selecting a suitable combination of parameters from the preset rule parameter set. The preset rule parameter set consists of multiple levels pre-defined based on common spinach varieties (such as round-leaf spinach and pointed-leaf spinach) and typical conditions (such as freshness grade, moisture content range, and stacking height range). Each level corresponds to a fixed set of process parameters (such as conveying speed, holding force, wind speed, drying time, and packaging weight). This parameter set is set by domain experts based on historical experience or experimental data and stored in the non-volatile memory of the security arbitration module 30.
[0140] Understandably, the degradation processing unit 33 first filters preset parameter levels that match the current state in terms of applicable raw material status, equipment configuration, and packaging film material conditions. If multiple applicable levels exist, the alternative parameter is determined according to preset selection rules. Only after the alternative parameter passes the verification by the verification unit 31 can it be output to the underlying execution control module 40. If no applicable level exists or the verification fails, a preset pause or safety handling process is initiated.
[0141] Understandably, through the above configuration, the safety arbitration module 30 achieves refined safety monitoring in normal mode and robust assurance in abnormal mode. The multi-layered verification and correction mechanism of the verification unit 31 and the correction unit 32 ensures that even if the process planning agent 22 generates parameters that deviate from the constraints, the system can automatically correct them to fall within the safety boundary, thus ensuring safety and reducing task interruptions caused by minor deviations. For serious violations or uncorrectable errors, the system rejects the error and triggers a regeneration mechanism, prompting the process planning agent 22 to adjust its output based on feedback, forming a rapid iterative closed loop of planning, arbitration, and feedback.
[0142] Meanwhile, the introduction of degradation processing unit 33 further provides system-level fault tolerance: when intelligent planning based on the large language model becomes unavailable due to continuous errors or timeouts, if applicable and verified backup parameters exist, the system can switch to rule-based degradation mode, using verified preset experience parameters to maintain production and reduce the probability of production interruption caused by the unavailability of the large language model; if the backup operating conditions are not met, the system will be suspended or safely handled according to preset procedures. The above architecture improves the system's high availability and continuous production capability through multiple redundancy and degradation strategies.
[0143] In addition, this embodiment introduces a loop feedback module 60. The loop feedback module 60 is communicatively connected to the data acquisition module 10, the multi-agent orchestration control module 20, the security arbitration module 30, the low-level execution control module 40, and at least one mechanical execution module 50. These communication connections can be implemented via industrial Ethernet (e.g., EtherCAT, PROFINET), serial bus, or wireless communication networks, used to transmit status information, control commands, and feedback signals between the modules. The loop feedback module 60 can be deployed as a standalone industrial computer or embedded controller in hardware, and manifests as a background service running data aggregation and decision optimization algorithms in software.
[0144] It should be noted that the loop feedback module 60 is configured to receive processing information from each module, and when the processing information meets the triggering conditions, collect the scoring results of the gambling processing results; and correct the multi-Agent orchestration control module 20 and the security arbitration module 30 based on the scoring results, so that the gambling processing results tend to the expected results represented by the scoring results.
[0145] It is understood that the processed information includes, but is not limited to: raw sensor data and preprocessing results collected by the data acquisition module 10; batch state vectors, structured process parameters, and interaction logs between agents generated by the multi-agent orchestration control module 20; arbitration logs from the security arbitration module 30 (including records of verification pass, correction pass, or rejection); drive commands and execution status issued by the underlying execution control module 40; and operating parameters of the mechanical execution module 50 (such as motor current, temperature, and position feedback). By collecting this multi-dimensional information, the loop feedback module 60 can construct a global snapshot of the system operation, providing a data foundation for subsequent trigger judgments and correction operations.
[0146] It is understandable that the triggering condition here refers to a pre-defined logical judgment rule used to determine whether to initiate the scoring collection and correction process. The triggering condition can be based on a time period, event-driven, or quality anomaly.
[0147] Specifically, the loop feedback module 60 can be triggered when any of the following conditions are met: the overall confidence level of the quality evaluation agent is lower than a preset threshold; the residual pollution index is higher than a preset threshold for a preset number of consecutive times (e.g., 3 times); the leaf damage index is higher than a preset threshold for a preset number of consecutive times; the packaging weight error is higher than a preset threshold for a preset number of consecutive times or the sealing pass rate is lower than a preset threshold; the system determines that the Euclidean distance between the current batch state vector and historical samples exceeds a preset deviation threshold (e.g., 2 standard deviations), that is, the batch characteristics deviate significantly from the historical distribution; or the preset sampling cycle is reached (e.g., every 50 batches).
[0148] When the triggering conditions are met, the loop feedback module 60 collects the scoring results of the spinach processing. This scoring result can be automatically generated by the quality assessment Agent23, or input by the operator through a human-machine interface (HMI), or uploaded by independent laboratory testing equipment.
[0149] Specifically, manual scoring can be entered through a human-machine interface (web interface or industrial touch screen). The scoring dimensions include: cleanliness (1 to 5 points), leaf integrity (1 to 5 points), moisture suitability (1 to 5 points), packaging specification consistency (1 to 5 points), and overall score (1 to 5 points). The scoring results quantify the gap between the current treatment effect and the expected result. The expected result is usually defined as a set of target indicators, such as yellow leaf residue rate less than 1%, leaf damage rate less than 2%, surface residual moisture rate between 5% and 8% (this indicator represents the amount of water attached to the surface of the spinach after the air-drying process, which is different from the overall moisture content of the spinach tissue), and the absolute value of the packaging weight error less than 2 g.
[0150] It should be noted that the loop feedback module 60 corrects the multi-Agent orchestration control module 20 and the safety arbitration module 30 based on the scoring results in the following ways: For the multi-Agent orchestration control module 20, the loop feedback module 60 can adjust the feature extraction weights of the perception agent 21 (e.g., increase the proportion of depth information in the batch state vector), update the prompt word engineering of the process planning agent 22 (e.g., add the scoring results as negative feedback examples to the prompt words to guide the large language model to avoid generating similar parameters), or optimize the proxy model parameters of the process optimization agent 24. For the safety arbitration module 30, the loop feedback module 60 can only update the process optimization constraints of the verification unit 31 within the range allowed by the preset hard constraints (e.g., narrowing or adjusting the recommended range of processing parameters, quality preferences, or efficiency targets within the hard constraint range according to the scoring results), and record the basis for the change and support rollback; hard constraints involving equipment rated limits, anti-collision conditions, personnel safety interlocks, and verified critical food safety limits are not allowed to be directly modified by the large language model or online feedback, and their changes must be authorized, verified, and released. In addition, changes to the correction strategy of the correction unit 32 or the preset rule parameter set of the downgrade processing unit 33 by the loop feedback module 60 first enter the candidate area, and only take effect after being verified and authorized according to regulations. They do not directly overwrite the currently effective version, and the old version is retained to support rollback.
[0151] The above correction process is adjusted by the system administrator based on the scoring report and verification results, or automatically completed by a verified and authorized online learning algorithm. However, authorization of the algorithm itself does not automatically grant release rights to all its outputs. Non-safety-critical recommended values can be updated online according to the approval mechanism. Changes to correction rules, alternative recipes, and safety judgment-related configurations must meet the corresponding verification and release conditions before taking effect. The perception model, sensor calibration, and confidence thresholds used for safety judgments must not be arbitrarily modified online based solely on manual scoring. The objective function of the correction is to ensure that subsequent batches of spinach processing results (obtained by the quality assessment Agent23 or external detection) achieve higher scores in the scoring system, i.e., to approach the desired result.
[0152] In other words, it involves comparing the results of manual scoring with the system scoring. For example, the comparison results are used to correct the weights of the quality assessment model, update the parameter mapping table, and adjust the process optimization constraints within the limits allowed by preset hard constraints.
[0153] The revised quality evaluation model weighting uses manual scoring as the target value and automatically calculated indicators as feature values. Linear regression analysis is used to adjust the weight coefficients of each quality indicator in the comprehensive score, gradually bringing the system score closer to the manual scoring standard. It should be noted that this embodiment distinguishes between two types of weights: one is the feature weight within each individual indicator, i.e., w1-w3 in the residual pollution index C, v1-v3 in the leaf damage index D, and u1-u2 in the moisture residue index M, used for weighting the feature quantities within each individual indicator; the other is the weight between each quality indicator in the comprehensive score, used to weight the residual pollution index, leaf damage index, moisture residue index, weight error, and sealing pass rate into the comprehensive score. Manual scoring calibration only adjusts the weights between quality indicators in the comprehensive score and the weights of non-safety-critical features; it does not change the objective measurement values themselves, nor does it lower the safety compliance standard.
[0154] The updated parameter mapping table involves adding batches with a manual score of ≥4 points, passing objective quality inspection and hard constraint verification, and without any unhandled safety anomalies, as positive samples along with their corresponding batch state vectors and final executed process parameters. These samples are then used by the process planning agent22 as a "historical reference" in the construction of prompts for subsequent batches. Manual scores are primarily used to calibrate appearance quality evaluation, adjust non-safety-critical quality weights, and screen process reference cases; they are not considered substitute evidence for equipment safety, personnel safety, or food safety compliance.
[0155] Among these adjustments, process optimization constraints involve narrowing the allowable range of the corresponding process parameter within the preset hard constraints when manual evaluations repeatedly indicate a directional deviation in a certain parameter (e.g., multiple manual evaluations deeming insufficient drying). This can be done by either increasing the lower limit of the drying time from 3 seconds to 5 seconds, or adjusting the corresponding value in the preset set of rule parameters. Such adjustments must not involve hard constraints corresponding to critical limits for equipment safety, personnel safety, or food safety.
[0156] Understandably, by introducing the loop feedback module 60, the system adds a higher-level adaptive optimization loop to the existing perception, planning, execution, and safety arbitration closed loops. This module aggregates the processing information scattered across various components and uses the scoring results to drive the co-evolution of control logic and safety constraints, thereby achieving continuous improvement in system performance. Specifically, when the characteristics of raw materials in the production line change (such as the general increase in water content of spinach due to seasonal changes), the loop feedback module 60 can detect that the original process parameters are no longer applicable. It then corrects the parameters so that the multi-Agent orchestration control module 20 generates parameters that adapt to the new characteristics, while adjusting the boundaries of the safety arbitration module 30 to allow for the necessary expansion of the parameter range, ensuring that the system is both safe and efficient. This architecture avoids the shortcomings of traditional automated systems, such as fixed parameters and difficulty in coping with dynamic environments, providing a feasible technical path for the self-maintenance and self-optimization of intelligent production lines.
[0157] Furthermore, by integrating the foregoing embodiments, the final system embodiment of this application is derived. Please refer to... Figure 5 , Figure 5 This is a third structural block diagram of the spinach processing system based on large language model process planning and safety constraint arbitration provided in the embodiments of this application. The following describes the complete working cycle of a spinach batch from feeding to packaging to illustrate the collaborative process of the various components of the system.
[0158] The following is an exemplary workflow for a batch of spinach from feeding to packaging. The time points are process examples and not actual test results. Batch information: Batch number B20260515-003 (example), spinach variety "Super Green", sourced from Hebei, batch weight approximately 5kg.
[0159] T=0s: Spinach enters the permeable conveyor belt through the feed inlet. The conveyor module starts in intermittent mode (runs for 2s / stops for 1.5s) with a belt speed of 0.15 m / s.
[0160] T=2s: Spinach passes through the visual inspection station, and images are captured by an RGB camera. Target detection model results: Yellow leaf rate 15%, 2 foreign objects (total area 3cm²). Depth camera estimates average stack height 25mm, fluffiness 1.8.
[0161] T=3s: Sensing Agent21 integrates all sensor data to generate a batch state vector: {Yellow leaf rate: 15%, Foreign object area: 3cm², Stacking height: 25mm, Fluffiness: 1.8, Damage risk: 0.3, Moisture content: 45%}.
[0162] T=3s-9s: Process planning Agent22 calls the large language model, inputs the state vector, the parameter records of the first 5 batches and the constraint library, takes about 6s, and outputs the structured process parameters.
[0163] T=9s: Security Arbitration Module 30 Five-Layer Item-by-Item Verification—JSON Schema Verification (Passed); Mechanical Constraints: Mesh Pressure 3.5N within [1,6]N (Passed), Fan Level 3 within [1,5] (Passed), Brush 120r / min within [60,240] (Passed), Heat Sealing Temperature 145℃ within [130,160] (Passed); Food Processing Constraints: Currently Loaded PE Film, 145℃ within [130,150] (Passed); Timing Constraints: Before Brush Start, Confirm Encoder Speed = 0 and Maintain for More Than 0.5s (Passed); Abnormal Constraints: No Abnormal State (Passed). Ultimately, all verifications passed.
[0164] T=9s: Parameters are sent to the PLC (i.e., an example of the underlying execution control module 40), and the following process is executed: T=9s-12s: The conveyor belt stops, and the brush moves twice at 120r / min, each time for 0.8s; T=12s-28s: The flexible pressing net descends by 15mm, and the pressure sensor feedback stabilizes at 3.5N for 15s; T=14s-26s: The fan runs at level 3 speed for 12s (starting after a 2s delay to confirm the pressing net is stable, and stopping 2s before the pressing net returns to its position); T=28s-35s: Spinach enters the weighing platform, and the weight stabilizes at 248g (target 250g, error -2g, within the preset error range, stabilization time 0.4s > preset stabilization time threshold), triggering unloading; T=35s-42s: The shaping mechanism applies light pressure, the packaging film closes, heat seals at 145℃ for 1.5s, and then cuts.
[0165] T=42s: Quality assessment by Agent23. Residual contamination index. All sub-items were within the threshold; Leaf damage index Moisture Residual Index Packaging weight error The sealing pass rate was 100% (the statistical sample size was the number of seals in this batch, and the detection method was image detection of the sealing area); the overall confidence level was 0.85.
[0166] T=43s: Process optimization Agent24 uses EWMA ( Update parameters - mesh pressure Air drying time .
[0167] T=43s: Batch completed, system enters preparation state for the next batch. No human feedback was triggered in this batch (confidence level 0.85>0.6, all indicators are within the threshold).
[0168] Meanwhile, examples of relevant parameter ranges are provided: conveyor belt speed 0.05 m / s to 0.30 m / s; brush rotation speed 60 r / min to 240 r / min, single action time 0.3 s to 1.5 s; flexible mesh holding force 1 N to 6 N, which can be adaptively adjusted according to stacking height; fan speed divided into 1 to 5 levels (the fan speed level corresponds to the fan PWM duty cycle 20%-100% according to a preset mapping relationship, and the actual wind speed corresponding to each level is determined by the air duct calibration), drying time 3 s to 30 s; packaging target weight can be set to 200 g, 250 g, 500 g or other specifications, weight error threshold ±5 g, volume deviation threshold ±15%, weighing stability time threshold 0.3 s; heat sealing temperature 130 ℃ to 160 ℃ (selected according to packaging film material, PE film 130-150 ℃, PP film 140-160 ℃), heat sealing time 1.0 s. Up to 2.5 seconds; Large language model inference timeout threshold 10 seconds (normal inference time is about 2-8 seconds, after which it automatically switches to the preset rule parameter set); EWMA smoothing coefficient α =0.3 (adjustable range 0.2-0.5); human sampling cycle of 50 batches; comprehensive confidence threshold of quality evaluation agent 0.6, consecutive abnormal trigger count 3 times; agent heartbeat timeout threshold 5 s, maximum number of task retries 3 times, maximum number of planned task rejections in the same batch 3 times. The above parameter ranges and thresholds are exemplary values for this embodiment, and their specific values are determined based on actual prototype calibration, spinach damage test and packaging material process window.
[0169] In summary, this embodiment achieves the following technical effects.
[0170] 1. Achieve batch-level adaptive control in the clean sorting and packaging process of spinach: Compared with the existing fixed parameter control method, it can automatically adjust the process parameters according to the real-time status of different batches of spinach, such as yellow leaf rate, fluffiness, and moisture content.
[0171] 2. By adopting a three-layer control architecture of large language model planning layer, safety arbitration layer and bottom execution layer, the impact of uncertainty of large language model on mechanical execution is effectively reduced: the output of large language model can only be applied to the execution mechanism after being verified by the safety arbitration module. Before the parameters are issued, parameters that exceed the physical limits of the machine, violate food safety requirements or do not conform to the process sequence logic are intercepted, reducing the risk of them being directly executed.
[0172] 3. By binding multiple agents to specific mechanical processes one-to-one, the high-level reasoning capabilities of the large language model are decomposed into executable, verifiable, and traceable control sub-tasks, thereby improving the linkage between visual recognition and downstream processes.
[0173] 4. Reduce leaf scattering and damage by linking the flexible pressing agent and the air drying agent: The pressing net is pre-positioned before air drying, and the wind speed is dynamically adjusted according to the residual moisture during the air drying process. The linkage control sequence ensures that the spinach is under control throughout the air drying process.
[0174] 5. Improve packaging consistency through weight-volume dual feedback: Use both weight and volume as control targets to avoid uneven packaging tightness due to differences in spinach fluffiness.
[0175] 6. Achieve batch-to-batch parameter self-learning through quality evaluation and process optimization agents: Utilize the EWMA algorithm to smoothly update parameters and progressively optimize process effects.
[0176] 7. By using a human feedback mechanism in the loop, human judgment is introduced when the system uncertainty is high, thereby improving the model's adaptability to different batches of spinach without significantly increasing labor costs.
[0177] In addition to the above embodiments, this application also proposes an embodiment of a betting processing method based on large-scale model orchestration and secure arbitration, applying the betting processing system based on large-scale model orchestration and secure arbitration described above. Please refer to... Figure 6 , Figure 6 This is a flowchart illustrating the spinach processing method based on large model orchestration and security arbitration provided in the embodiments of this application.
[0178] In this embodiment, the method includes: step S10, collecting multimodal data of spinach and generating a batch state vector representing the current batch of spinach state based on the multimodal data; step S20, generating structured process parameters containing process parameters of mechanical execution modules based on the batch state vector using a pre-trained large language model; step S30, performing multi-layer constraint verification on the structured process parameters and issuing the parameters that pass the verification or correction; step S40, controlling the actions of each mechanical execution module according to the parameters that pass the verification or correction to complete the spinach processing.
[0179] It should be noted that step S10 corresponds to the functions of the data acquisition module 10 and the perception agent 21 in the system. In specific execution, the data acquisition module 10 controls various sensors (such as RGB cameras, depth cameras, encoders, pressure sensors, and weighing sensors) to synchronously acquire data according to preset trigger conditions. Then, it converts the raw signals into digital information through data preprocessing algorithms (including noise reduction, time alignment, and coordinate transformation). After receiving this multimodal data, the perception agent 21 runs feature extraction algorithms, such as calculating the proportion of yellow leaf pixels through an image segmentation network, calculating the stacking height and volume of spinach through point calculation, and calculating the delivery position through encoder pulses. These feature values are then combined into a fixed-length numerical vector, i.e., a batch state vector. Each dimension of this vector represents a quantifiable attribute of the spinach in the current batch, providing standardized input for subsequent decision-making.
[0180] It should be noted that step S20 corresponds to the function of Process Planning Agent 22 in the system. During execution, the system first converts the batch state vector into a natural language description or structured text prompt, such as "Current batch: Spinach variety is round-leaf spinach, stack height 120mm, yellow leaf ratio 12%, moisture content index 0.75, weight 2.5kg". This prompt is then input into a pre-trained large language model. The model infers based on the domain knowledge stored in its parameters, generating a structured output containing 50 process parameters for each mechanical execution module. This output is typically in JSON or XML format, explicitly listing the actions and parameter values to be performed by each module, such as the wind speed and duration of the drying module, and the holding force and descent speed of the flexible holding module. This step utilizes the semantic understanding and logical reasoning capabilities of the large language model to achieve automatic mapping from high-level state descriptions to specific control parameters.
[0181] It should be noted that step S30 corresponds to the function of the security arbitration module 30 in the system. In specific execution, the verification unit 31 of the security arbitration module 30 verifies the received structured process parameters according to a preset hierarchical order. If all verification items pass, the parameter is marked as "passed" and issued. If there are failed items but belong to the type that can be corrected, the correction unit 32 performs deterministic correction on the value according to a preset order, and re-performs a complete verification on the corrected structured process parameters. Only when all re-verifications pass is the parameter marked as "correction passed" and issued. If there are failed items that cannot be corrected, no feasible correction results, or the re-verification after correction still fails, the parameter is rejected, and the process planning agent 22 is triggered to regenerate. This step ensures the security and reliability of the control commands.
[0182] It should be noted that step S40 corresponds to the functions of the underlying execution control module 40 and the mechanical execution module 50 in the system. During execution, the underlying execution control module 40 parses the received parameters and converts them into drive signals recognizable by each actuator. For example, it converts the target holding force value into a pulse sequence for the stepper motor, the wind speed value into an analog input for the frequency converter, and the rejection command into a switching signal for the solenoid valve. The underlying execution control module 40 sends these signals to the corresponding mechanical execution modules 50 via fieldbus or I / O interface, such as the conveying module, vision inspection module, yellow leaf rejection module, flexible holding module, drying module, and weighing and packaging module, driving the physical equipment to complete the conveying, inspection, rejection, holding, drying, and packaging of spinach according to a predetermined process. During the operation, the underlying execution control module 40 also collects execution feedback in real time (such as motor current and actual position) and ensures the accuracy of the operation through a closed-loop control algorithm (such as PID).
[0183] In one embodiment, after step S40, the method further includes: performing a quality evaluation on the processed spinach and generating a quality evaluation result; optimizing and updating the process parameters based on historical structured process parameters and the quality evaluation result, and using the updated recommended values of the process parameters for generating structured process parameters in subsequent batches.
[0184] It should be noted that this optimization step corresponds to the functions of Quality Evaluation Agent 23 and Process Optimization Agent 24 in the system. After completing the processing of the current batch, the data acquisition module 10 continues to collect multimodal data of the finished product (such as images after packaging and final weight). Based on this data, Quality Evaluation Agent 23 calculates a quality score and generates a quality evaluation result. Process Optimization Agent 24 collects this result and the historical structured process parameters that led to the result, and uses rule mapping and EWMA smoothing mechanism consistent with the above embodiment to determine the updated recommended values of the process parameters. This recommended value is injected into the prompt words of Process Planning Agent 22 in step S20 of subsequent batches, thereby affecting the generation of new parameters. This closed-loop optimization process enables the system to continuously learn and adapt to changes in raw material characteristics, gradually improving processing quality.
[0185] Compared with existing technologies, the beneficial effects of the spinach processing method based on large model orchestration and security arbitration provided in this application are the same as those of the spinach processing system based on large model orchestration and security arbitration provided in the above embodiments, and will not be repeated here. Specifically, this method organically combines multimodal perception, large language model decision-making, security arbitration, and low-level execution through a standardized process of steps S10 to S40, realizing the intelligent, safe, and adaptive nature of the spinach processing process. This method is not only applicable to spinach processing, but the perception, planning, arbitration, execution, and optimization framework it reveals can also be extended to the field of automated processing of other agricultural products, and has universal technical guiding significance.
[0186] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A gambling processing system based on large-scale model orchestration and secure arbitration, characterized in that, include: The system includes a data acquisition module, a multi-agent orchestration and control module, a security arbitration module, a low-level execution control module, and at least one mechanical execution module. The multi-Agent orchestration and control module includes: a perception agent and a process planning agent; The output of the data acquisition module is connected to the input of the perception agent; the output of the perception agent is connected to the input of the process planning agent; the input of the safety arbitration module is connected to the output of the process planning agent; the output of the safety arbitration module is connected to the input of the underlying execution control module; and the output of the underlying execution control module is connected to the input of each of the mechanical execution modules. The data acquisition module is configured to collect multimodal data of spinach; The perception agent is configured to generate a batch state vector representing the current batch of spinach based on the multimodal data; The process planning agent is configured to generate structured process parameters containing process parameters of mechanical execution modules based on a pre-trained large language model and the batch state vector. The security arbitration module is configured to perform multi-layer constraint verification on the received structured process parameters and output the deterministic parameters that pass the verification or are corrected and re-verified to the underlying execution control module. The underlying execution control module is configured to control the mechanical execution module's actions solely based on the deterministic parameters.
2. The online gambling processing system based on large model orchestration and secure arbitration as described in claim 1, characterized in that, The multi-Agent orchestration control module further includes: executing a group of agents; The group of execution agents includes one or more execution agents that correspond one-to-one with the mechanical execution modules; The input terminal of the execution agent is connected to the output terminal of the process planning agent; the output terminal of the execution agent is connected to the input terminal of the security arbitration module. The execution agent is configured to decompose the structured process parameters into instruction parameters for the corresponding mechanical execution modules and transmit them to the security arbitration module; The security arbitration module is also configured to perform multi-level constraint verification on the received instruction parameters and output the parameters that pass the verification or correction to the underlying execution control module.
3. The online gambling processing system based on large-scale model orchestration and secure arbitration as described in claim 1, characterized in that, The multi-Agent orchestration and control module also includes: a quality evaluation agent and a process optimization agent; The input terminal of the quality evaluation agent is connected to the output terminal of the data acquisition module; the output terminal of the quality evaluation agent is connected to the input terminal of the process optimization agent; the output terminal of the process optimization agent is connected to the input terminal of the process planning agent. The quality evaluation agent is configured to evaluate the quality of the processed spinach and generate quality evaluation results. The process optimization agent is configured to optimize and update the process parameters based on historical structured process parameters and the quality evaluation results, and provide the updated recommended values of the process parameters to the process planning agent for use when generating structured process parameters in subsequent batches.
4. The online gambling processing system based on large-scale model orchestration and secure arbitration as described in any one of claims 1 to 3, characterized in that, The security arbitration module includes: a verification unit and a correction unit; The verification unit is configured to sequentially perform format validity verification, mechanical constraint verification, food processing constraint verification, timing constraint verification, and abnormal constraint verification on the structured process parameters. After all verifications pass, the structured process parameters are marked as passed and forwarded to the underlying execution control module; When there are failed verification items that are allowed to be corrected, the correction unit is driven to correct the failed verification items according to the preset deterministic correction rules, and all verifications are re-executed on the corrected structured process parameters; only when all re-verifications pass, the corrected structured process parameters are marked as corrected and forwarded to the underlying execution control module. If there are disallowed modification items, no feasible modification results, or re-verification fails, the structured process parameters are marked as rejected, and the reason for rejection is fed back to trigger the regeneration of the process planning agent.
5. The online gambling processing system based on large model orchestration and secure arbitration as described in claim 4, characterized in that, The security arbitration module also includes: a degradation processing unit; The degradation processing unit is used to select alternative parameters from a set of preset rule parameters with corresponding applicable scopes according to the current batch status and device configuration when the planned tasks in the same batch continuously reach the preset rejection number or the large language model inference timeout, and submit them to the verification unit for verification; it only outputs to the underlying execution control module when the verification passes; if there are no applicable alternative parameters or the verification of the alternative parameters fails, it triggers a preset pause or safety handling process. The preset rule parameter set is a combination of multiple levels of experience parameters based on the spinach variety and condition. Each level of experience parameter combination has corresponding applicable raw material conditions, equipment configurations, and packaging film material conditions. Moreover, the preset rule parameter set does not have the authority to bypass the verification of the security arbitration module.
6. The online gambling processing system based on large model orchestration and secure arbitration as described in claim 1, characterized in that, The online gambling processing system based on large model orchestration and secure arbitration also includes: a loop feedback module; The loop feedback module is communicatively connected to the data acquisition module, the multi-Agent orchestration control module, the security arbitration module, the underlying execution control module, and at least one mechanical execution module. The loop feedback module is configured to receive processing information from each module, and when the processing information meets the triggering conditions, collect a score for the spinach processing result; and update the recommended values of non-safety critical evaluation parameters or process parameters in the multi-Agent orchestration control module based on the score, and update the process optimization constraints of the safety arbitration module within a preset hard constraint range; the hard constraints are not directly modified by online feedback triggered by the score.
7. The online gambling processing system based on large model orchestration and secure arbitration as described in claim 1, characterized in that, The pre-trained large language model invoked by the process planning agent is deployed through at least one of the following methods: cloud API call, local private deployment, or lightweight edge deployment; the output of the pre-trained large language model is constrained by JSON Schema, inference is triggered in batches, the device does not start new processing actions that have not yet obtained valid process parameters during inference, and the preset safety handling actions are unrestricted.
8. The online gambling processing system based on large model orchestration and secure arbitration as described in claim 3, characterized in that, The process optimization agent is configured to smoothly update the process parameters using an exponentially weighted moving average algorithm based on historical structured process parameters and the quality evaluation results.
9. A method for processing online gambling based on large-scale model orchestration and security arbitration, characterized in that, The application of the online gambling processing system based on large-scale model orchestration and secure arbitration as described in any one of claims 1 to 8 includes: Collect multimodal data of spinach and generate a batch state vector representing the current batch of spinach state based on the multimodal data; Based on a pre-trained large language model, structured process parameters containing process parameters of the mechanical execution module are generated according to the batch state vector; The structured process parameters are subjected to multi-layer constraint verification. When a parameter exceeds the constraint range and is a permissible correction item, the parameter is corrected within the corresponding constraint boundary, and all verifications are re-executed on the corrected structured process parameters. Execution is only initiated when the re-verification passes. When a parameter cannot be corrected, has no feasible correction result, or fails the re-verification, the structured process parameter is marked as rejected and feedback is provided to trigger regeneration. When the same batch of planning tasks reaches the preset rejection count consecutively or the large language model inference times out, alternative parameters are selected from the preset rule parameter set and verified. Execution is only initiated when the verification passes. If no alternative parameters are available or the alternative parameter verification fails, predefined processing is initiated. Based on the parameters that have passed verification or correction, control the actions of each mechanical execution module to complete the spinach processing.
10. The method for processing online gambling based on large model orchestration and security arbitration as described in claim 9, characterized in that, After processing the spinach, the following steps are also included: The quality of the processed spinach is evaluated, and the quality evaluation results are generated. The process parameters are optimized and updated based on historical structured process parameters and the quality evaluation results, and the updated process parameters are used to generate structured process parameters for subsequent batches.
