An AI agent-based farm full-process management decision method, device and equipment

By adopting an AI-based full-process management and decision-making method, and utilizing a large language model and dynamic behavior tree orchestration engine to generate safety control instructions, the shortcomings of existing systems in terms of adaptability and security are solved, realizing the intelligentization and autonomous decision-making capabilities of farms, and improving the robustness and security of the system.

CN122089091BActive Publication Date: 2026-07-21厦门农芯数字科技有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
厦门农芯数字科技有限公司
Filing Date
2026-04-23
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

Existing farm management systems lack semantic understanding, multi-system collaboration, and dynamic planning capabilities, resulting in poor adaptability, low decision reliability, and a lack of verification and correction mechanisms for physical safety constraints, making it difficult to cope with unexpected scenarios in complex environments.

Method used

The system adopts an AI-based full-process management and decision-making approach. It parses user commands using a large language model, generates subtask trees, performs real-time orchestration using a dynamic behavior tree orchestration engine, and conducts security verification through a digital twin model and control barrier functions. Finally, it generates and executes secure control commands, and dynamically adjusts them using an introspection triggering mechanism.

Benefits of technology

It has enabled intelligent management and autonomous decision-making capabilities for farms, improved the system's robustness and autonomy in complex environments, ensured the professionalism and security of decision-making, and enabled it to respond to emergencies and perform immediate and self-optimization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122089091B_ABST
    Figure CN122089091B_ABST
Patent Text Reader

Abstract

The application discloses a farm whole-process management decision method, device and equipment based on an AI agent. An input instruction is received, semantic analysis and task decomposition are performed on the input instruction based on a large language model and in combination with a long-term breeding strategy, and a subtask tree is generated. Each subtask in the subtask tree is distributed to a corresponding agent, a logical execution intention is generated. Based on a dynamic behavior tree arrangement engine, dynamic arrangement is performed according to the logical execution intention and real-time environment feedback, and a control behavior tree is generated. The control behavior tree is verified through multi-level rehearsal in a digital twin model, and after the verification is passed, the nominal control instruction corresponding to the control behavior tree is input into a safety filter for correction to obtain an actual control instruction, and the actual control instruction is issued to the corresponding farm physical equipment for execution. The execution result of the actual control instruction is monitored, and when it is judged that the execution result meets a self-examination trigger condition, a self-examination driven control mechanism is triggered for re-dynamic arrangement.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence technology, and in particular to a method, apparatus and equipment for full-process management decision-making in aquaculture farms based on AI intelligent agents. Background Technology

[0002] With the deepening of smart agriculture and the digitalization of livestock farming, agricultural production models are evolving towards refinement and intelligence. While automation technology is widely used in current farm operations, most systems still rely on preset logic based on fixed thresholds or simple state machines. These methods lack sufficient flexibility and adaptability when dealing with livestock—biological assets with dynamic growth characteristics, complex physiological responses, and group behaviors—and physical scenarios influenced by multiple factors such as external weather and the microenvironment within the livestock shed. They struggle to cope with unexpected scenarios in actual production. Simultaneously, subsystems such as feeding and environmental control in farms often operate in isolation, lacking deep logical coupling and information sharing, making joint optimization and coordinated scheduling based on overall production goals impossible. Traditional systems struggle to effectively integrate veterinary expertise, farming standards, and real-time environmental data, resulting in only single-dimensional reactive control when dealing with complex scenarios such as heat stress and disease warnings, failing to achieve cross-system autonomous reasoning and dynamic decision-making. Furthermore, existing systems lack verification and correction mechanisms for physical safety constraints when executing control commands generated by artificial intelligence, making it difficult to guarantee the reliability and security of the commands during actual execution. Summary of the Invention

[0003] In view of this, the purpose of this invention is to propose a decision-making method, device and equipment for the whole process management of aquaculture farms based on AI intelligent agents, which aims to solve the problems of insufficient adaptive ability and poor decision reliability caused by the lack of semantic understanding, multi-system collaboration and dynamic planning in the existing aquaculture farm management.

[0004] To achieve the above objectives, this invention provides a decision-making method for the entire process management of aquaculture farms based on AI agents, the method comprising:

[0005] The system receives user input commands, performs semantic parsing and task decomposition on the input commands based on a large language model and in conjunction with a preset long-term breeding strategy, and generates a sub-task tree with temporal dependencies or parallel relationships.

[0006] Each subtask in the subtask tree is distributed to the corresponding agent for thought chain reasoning to generate logical execution intent.

[0007] Based on the dynamic behavior tree orchestration engine, dynamic orchestration is performed according to the logical execution intent and real-time environmental feedback to generate a control behavior tree;

[0008] The control behavior tree is pre-tested and verified in a digital twin model at multiple levels. After the pre-test is passed, the nominal control command corresponding to the control behavior tree is input into a safety filter constructed based on the control barrier function for correction, so as to obtain the actual control command that meets the preset safety constraints. The actual control command is then sent to the corresponding farm physical equipment for execution.

[0009] If the execution result of the actual control command is monitored and the execution result meets the preset introspection triggering condition, then the introspection-driven control mechanism is triggered to perform dynamic re-arrangement.

[0010] To achieve the above objectives, the present invention also provides a decision-making device for the entire process management of aquaculture farms based on an AI intelligent agent, the device comprising:

[0011] The task decomposition unit is used to receive user input instructions, perform semantic parsing and task decomposition on the input instructions based on a large language model and in combination with a preset long-term breeding strategy, and generate a sub-task tree with temporal dependencies or parallel relationships.

[0012] The reasoning unit is used to distribute each subtask in the subtask tree to the corresponding agent intelligence to perform thought chain reasoning and generate logical execution intent.

[0013] The dynamic orchestration unit is used to dynamically orchestrate based on the dynamic behavior tree orchestration engine, according to the logical execution intent and real-time environmental feedback, to generate a control behavior tree.

[0014] The pre-performance unit is used to perform multi-level pre-performance verification of the control behavior tree in the digital twin model. After the pre-performance verification is passed, the nominal control command corresponding to the control behavior tree is input into the safety filter constructed based on the control barrier function for correction to obtain the actual control command that meets the preset safety constraints. The actual control command is then sent to the corresponding farm physical equipment for execution.

[0015] The monitoring unit is used to monitor the execution result of the actual control command. When the execution result meets the preset self-introspection triggering condition, the self-introspection-driven control mechanism is triggered to perform dynamic re-arrangement.

[0016] To achieve the above objectives, the present invention also proposes a farm full-process management decision-making device based on AI intelligent agents, including a processor, a memory, and a computer program stored in the memory. The computer program is executed by the processor to implement the steps of a farm full-process management decision-making method based on AI intelligent agents as described in the above embodiments.

[0017] To achieve the above objectives, the present invention also proposes a computer-readable storage medium storing a computer program that is executed by a processor to implement the steps of a farm management decision-making method based on an AI agent as described in the above embodiments.

[0018] Beneficial effects:

[0019] The above solution, by constructing a complete closed loop of "semantic parsing and task decomposition—multi-agent reasoning—dynamic orchestration—security verification—execution monitoring," achieves a fundamental transformation in farm management, realizing end-to-end intelligentization of the entire process and end-to-end autonomous decision-making from high-level management instructions to low-level equipment control. Firstly, it utilizes a large model combined with long-term farming strategies to transform ambiguous natural language instructions into structured sub-task trees, ensuring accurate understanding and reasonable decomposition of high-level intentions. Secondly, through a dynamic behavior tree orchestration engine, it dynamically generates control logic based on real-time environmental feedback, providing flexible adaptability to unexpected situations. Thirdly, through dual verification using multi-level digital twin pre-simulation and a control barrier function security filter, it fundamentally eliminates the security risks of generative model decision-making in physical execution. Finally, through a self-reflection trigger mechanism, it achieves automatic detection and repair of execution deviations, thereby safely and effectively empowering AI cognitive capabilities in complex aquaculture industrial scenarios, significantly improving the system's robustness and autonomy in complex farming environments.

[0020] By semantically associating input commands with multiple professional dimensions preset in long-term aquaculture strategies, such as the entire life cycle of biological assets, dynamic nutrition, environmental stress, and biosecurity, and using thought chain prompts to guide the large language model to recursively decompose according to stage divisions and response procedures, this ensures that high-level management intentions can be accurately and structurally transformed into sub-task trees with temporal dependencies or parallel relationships. Simultaneously, by clarifying the termination conditions for task recursive decomposition, quantifiable and verifiable stopping criteria are provided for the task decomposition process. This effectively controls the rationality of task granularity, the finiteness of the decomposition process, and the self-consistency of logical relationships between sub-tasks, while ensuring that the decomposition results can be directly executed by the underlying executors. This significantly improves the reliability, termination capability, and logical correctness of task decomposition, avoiding the accumulation of errors due to overly fine decomposition or execution ambiguity due to insufficient decomposition, laying a solid foundation for subsequent multi-agent collaborative scheduling and safe execution.

[0021] By integrating Retrieval Enhanced Generation (RAG) into each agent, their decisions are grounded in a vectorized authoritative aquaculture knowledge base in real time. This ensures the professionalism and scientific rigor of the output strategies and overcomes the "illusion" problem that may exist in large language models, making the decision-making process verifiable. Simultaneously, through unified planning and task distribution by the super agent, collaborative work and state consistency maintenance among multiple agents, such as feeding management, environmental optimization, cleaning and disease prevention, and health inspection, are achieved. This allows macro-management goals to be accurately and professionally decomposed and implemented. Consequently, the professional knowledge support for decision-making and the coherence of cross-task states are significantly enhanced, effectively avoiding decision-making biases caused by information silos.

[0022] By dynamically generating and grafting local behavior tree fragments when execution paths fail, immediate response and logic refactoring for execution failure scenarios are achieved, preventing system shutdowns due to single points of failure. Nodes are evaluated using a utility scoring formula based on success probability and execution cost, and inefficient or failed branches are dynamically pruned accordingly, enabling continuous optimization of control logic and efficient resource utilization. This endows the behavior tree with "self-repair" and "self-simplification" capabilities, significantly improving the system's real-time adaptability and overall operational efficiency in dynamically changing environments.

[0023] A dual physical security defense system was constructed, consisting of digital twin pre-simulation and a security filter based on control barrier functions. Firstly,

[0024] By defining multi-level pre-verification using digital twin verification, a comprehensive assessment of spatial collisions, electrical loads, animal physiological impacts, and compliance with breeding regulations was conducted before commands were issued, effectively identifying and mitigating potential safety risks. By constructing differentiated safety scalar functions for different equipment types and employing a Log-Sum-Exp smoothing operator for composite constraint aggregation in multi-device concurrent scenarios, precise characterization and smooth control of safety boundaries under complex operating conditions were achieved. By solving a quadratic programming problem, the deviation between actual and nominal commands was minimized while satisfying safety constraints, achieving an optimal balance between "intent retention" and "safety enforcement." This fundamentally solves the uncontrollability problem of generative AI decision-making in physical execution, ensuring the system's industrial-grade safety and reliability.

[0025] By establishing a multi-dimensional introspection-triggered evaluation system, the system possesses multi-dimensional, proactive fault perception and self-optimization capabilities. By using any condition as the basis for triggering the introspection-driven control mechanism, the system can automatically initiate a replanning process when execution anomalies, decision conflicts, or potential risks occur. This significantly enhances the system's perception and autonomous repair capabilities for complex anomaly scenarios such as "silent faults," "semantic conflicts," and "implicit violations," achieving a leap from passive fault tolerance to proactive self-healing. It also improves the system's resilience, autonomy, and continuous optimization capabilities in long-term, complex operating environments. Attached Figure Description

[0026] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0027] Figure 1 This is a flowchart illustrating a decision-making method for the entire management process of a farm based on an AI agent, as provided in an embodiment of the present invention.

[0028] Figure 2 This is a schematic diagram of a decision-making device for the whole process management of a farm based on an AI intelligent agent, provided in an embodiment of the present invention.

[0029] The realization of the invention's objective, its functional characteristics, and advantages will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0030] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention. Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to represent selected embodiments of the invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0031] The present invention will be described in detail below with reference to the embodiments.

[0032] Reference Figure 1 The diagram shown is a flowchart illustrating a farm management decision-making method based on an AI agent, according to an embodiment of the present invention. Specifically, the method includes:

[0033] S11: Receive user input instructions, perform semantic parsing and task decomposition on the input instructions based on a large language model and in conjunction with a preset long-term breeding strategy, and generate a sub-task tree with temporal dependencies or parallel relationships.

[0034] Furthermore, in step S11, the semantic parsing and task decomposition of the input instruction based on a large language model and combined with a preset long-term breeding strategy, generating a sub-task tree with temporal dependencies or parallel relationships, includes:

[0035] The input instructions are semantically associated with the corresponding strategy dimensions in the long-term aquaculture strategy. Using thought chain prompts, the large language model is guided to recursively decompose the input instructions according to the stage divisions and response procedures defined by the long-term aquaculture strategy, stopping the decomposition when a preset termination condition is met, resulting in a subtask tree comprising multiple subtasks; wherein,

[0036] The long-term aquaculture strategy includes strategic dimensions such as the whole life cycle procedure of biological assets, dynamic nutrition and precision feeding strategy, environmental comfort and stress intervention standards, and biosecurity and herd health and disease prevention strategy.

[0037] The preset termination conditions include:

[0038] The decomposed subtasks can be mapped to a single atomic action in a predefined set of atomic actions;

[0039] The complexity of each subtask is calculated, and it is determined that the complexity of the subtask is below a complexity threshold.

[0040] The depth of the recursive decomposition has reached the preset depth;

[0041] The subtask tree generated by the decomposition is verified using linear temporal logic.

[0042] In this embodiment, upon receiving a natural language instruction input by the user (such as "to cope with extreme high temperatures and ensure the production performance of fattening pigs"), the system first activates a super agent. The core of this super agent is a large language model fine-tuned from a large-scale agricultural corpus. The super agent semantically associates the natural language instruction with a preset long-term breeding strategy, which includes the following strategy dimensions:

[0043] (1) Biological asset life cycle procedure: For pig farming, this strategy pre-sets a standardized time sequence framework, including standardized time nodes and stage goals for gestation (about 114 days), farrowing and lactation (about 21 days), nursery (6-8 weeks) and growth and fattening stage (16-17 weeks);

[0044] (2) Dynamic nutrition and precision feeding strategy: This strategy includes a diet formulation iteration logic based on growth curves, as well as a feeding rhythm optimization scheme for different growth stages (such as small amounts and multiple times) to maximize feed conversion efficiency.

[0045] (3) Environmental comfort and stress intervention standards: This strategy stores the tolerance limits of different breeds of livestock and poultry to temperature and humidity index (THI), including the response threshold of temperature and humidity index THI (for example, the strategy stipulates that when THI exceeds 72 for a long time, a secondary cooling intervention program must be initiated and the intake of energy feed should be adjusted first). At the same time, it defines the benchmarks for light and air quality, clarifies the influence pathways of ammonia, carbon dioxide concentration and light duration in the barn on growth hormone secretion, and ensures the compliance of the long-term growth environment.

[0046] (4) Biosafety and herd health epidemic prevention strategy: This strategy includes an epidemic prevention calendar and biosafety classification. The epidemic prevention calendar stores the annual immunization plan, deworming plan and conflict avoidance rules with other management tasks (such as population transfer) for specific diseases. The biosafety classification defines the isolation level of different areas and the disinfection frequency requirements of cleaning robots (such as the adjustment of disinfection frequency under high temperature and high humidity conditions).

[0047] The super agent utilizes thought chain prompting technology to semantically associate the four strategy dimensions mentioned above with the input instructions. This guides the large language model to recursively decompose the input instructions according to the phase divisions (e.g., fattening period) and response procedures (e.g., initiating secondary cooling intervention when THI exceeds 72) defined by the long-term aquaculture strategy. During the recursive decomposition process, the super agent invokes the environmental comfort and stress intervention standards from the long-term aquaculture strategy to determine that the current instruction needs to be decomposed into multiple parallel subtasks such as "assessing heat stress status," "retrieving cooling intervention strategies," "linking with the environmental control subsystem," "adjusting feeding strategies," and "coordinating cleaning tasks." Subsequently, each subtask is recursively decomposed. For example, the "linked environmental control subsystem" subtask is further decomposed into finer-grained subtasks such as "calculating the THI index", "determining the stress level", "setting the fan speed", and "controlling the spray system to start". After each level of decomposition, the system verifies the logical consistency of the decomposition results through a reflection mechanism to ensure that the temporal dependencies between subtasks are reasonable (for example, the fan must be turned on first to form airflow before the spray system is started to prevent excessive humidity from causing heat to be unable to dissipate).

[0048] The recursive decomposition continues until a preset termination condition is met, including when a subtask (such as "setting the fan speed to 80%) can be mapped to a single atomic action in a predefined set of atomic actions (i.e., it is completely covered by a single utility function (set_fan_speed or move_to_coordinate) in that set of actions, and is determined to be a leaf node), the branch stops decomposing; using the function c(t iThe complexity of each subtask is calculated (based on inference steps or token load). When the complexity of a subtask is lower than a preset complexity threshold, further decomposition of that branch is stopped. When the depth of recursive decomposition reaches a preset maximum depth (usually 5-6 levels), a rollback and refactoring is triggered to reorganize the task logic from a higher level of abstraction. Simultaneously, the generated subtask tree is subjected to linear temporal logic verification to ensure that the temporal dependencies between subtasks (such as "open the window before turning on the fan") are logically consistent. Only after verification is passed can the decomposition be confirmed as complete. Finally, all the decomposed subtasks are organized into a structured subtask tree according to temporal dependencies or parallel relationships. Each leaf node of this subtask tree is an atomic action that can be directly executed by the underlying executor, thus completing the transformation from high-level natural language instructions to a structured executable task sequence.

[0049] Among them, utilizing Calculate the complexity of each subtask, where t i Indicates a subtask. Indicates the reasoning depth (representing the minimum number of sequential reasoning steps required to complete the corresponding subtask). The capability breadth represents the diversity of heterogeneous domains or tools involved in the subtasks; the utilization of The more domains involved, the better. (The higher the value) The resource load represents the total number of tokens expected to be consumed in executing the corresponding task, including the length of background knowledge injected by RAG, historical dialogue context, and expected inference trajectory; since long context will significantly increase the inference latency of the model and reduce attention quality, this term is smoothed by a logarithmic function. w1, w2, and w3 represent the corresponding weight coefficients (which can be dynamically adjusted according to the performance benchmark of the underlying model to balance logic depth and computational cost).

[0050] When the super agent resolves a task node, it performs the following steps:

[0051] Path prediction: The lightweight routing model is used to scan the task description and predict the number of steps D (i.e., inference depth) and the number of tool libraries W (i.e. capability width) that may be generated under the CoT.

[0052] Contextual evaluation: Calculate the length of the vector database retrieval chunks currently associated with this subtask, and estimate T. load ;

[0053] Calculation and Comparison: Substitute the above parameters into... Formula; if calculated (Complexity threshold) indicates that the subtask exceeds the single-round processing capacity of a single executing agent, and proceeds to the next round of recursive decomposition;

[0054] Atom mapping: if If the task description can be directly mapped to a specific function in the "action primitive set", it is determined to be a leaf node, the decomposition is terminated and it is sent down to the execution layer.

[0055] S12, Distribute each subtask in the subtask tree to the corresponding agent agent for thought chain reasoning to generate logical execution intent.

[0056] Furthermore, in step S12, distributing each subtask in the subtask tree to the corresponding agent agent for thought chain reasoning to generate logical execution intent includes:

[0057] Each of the aforementioned agent intelligent agents utilizes retrieval-enhanced generation technology to retrieve expert strategy knowledge from a vectorized aquaculture knowledge base, and combines it with real-time environmental data and cross-task status information to perform thought chain reasoning to generate the logical execution intent; wherein, the agent intelligent agents include feeding management agent, environmental optimization agent, cleaning and epidemic prevention agent, and health inspection agent, and all the agent intelligent agents are globally planned and task distributed by a super agent intelligent agent.

[0058] The construction process of the vectorized aquaculture knowledge base includes:

[0059] Collect both unstructured and structured data;

[0060] The structured data is transformed into a natural language description through semantic mapping of row records to obtain structured text data;

[0061] The unstructured data is parsed into plain text or Markdown text in a unified format using a large visual model to obtain unstructured text data.

[0062] A hash algorithm is used to globally deduplicate the structured text data and the unstructured text data to obtain a deduplicated text data set.

[0063] The text data set is logically divided into multiple semantically complete text blocks using a title-level semantic segmentation technique.

[0064] Each text block is converted into a dense vector using a domain embedding model, and the dense vectors are stored in a vector database to obtain the vectorized aquaculture knowledge base.

[0065] Simultaneously, a knowledge graph based on domain ontology is constructed, which is used to realize multi-hop semantic reasoning to assist retrieval enhancement generation technology for knowledge retrieval.

[0066] In this embodiment, the super agent distributes each subtask in the subtask tree to the corresponding specialized agent. For example, the subtask of "adjusting feeding strategy" is distributed to the feeding management agent, "assessing heat stress status" and "linking with the environmental control subsystem" are distributed to the environmental optimization agent, "coordinating cleaning tasks" is distributed to the cleaning and epidemic prevention agent, and "monitoring animal status" may be distributed to the health inspection agent. These four types of specialized agent agents together constitute the system's task coordination layer, working collaboratively under the overall coordination of the super agent.

[0067] After receiving the subtask, each specialized agent activates its internal retrieval enhancement generation module (based on retrieval enhancement generation (RAG) technology for thought chain reasoning). Taking the environmental optimization agent as an example, this agent first retrieves expert strategy knowledge related to the current heat stress scenario from the vectorized aquaculture knowledge base. The construction process of this vectorized aquaculture knowledge base is as follows: The system pre-collects unstructured data (such as veterinary literature PDFs, aquaculture manuals, and SOP documents) and structured data (such as SQL production reports and CSV environmental records); the structured data is transformed into natural language descriptions through semantic mapping of row records (e.g., transforming a record "2024-03-01, No. 3, THI=75" into "On March 1, 2024, the temperature and humidity index of No. 3 reached 75, indicating a significant stress state"), resulting in structured text data; the unstructured data is parsed into plain text or Markdown text in a unified format using a large visual model, resulting in unstructured text data; and a hash algorithm is used to classify the two types of data... The text data is globally deduplicated to obtain a deduplicated text data set. A title-level semantic segmentation technique is then used to logically segment the deduplicated text data set, ensuring that each text block contains a complete logical context, resulting in multiple semantically complete text blocks. A domain embedding model (such as Sentence-BERT with agricultural vocabulary fine-tuning) is used to convert each text block into a dense vector, which is then stored in the FAISS vector database to obtain a vectorized aquaculture knowledge base. Simultaneously, a knowledge graph based on the 4D-Health ontology is constructed, mapping "disease-symptom-medication-environmental constraints" to triples for multi-hop semantic reasoning, assisting in knowledge retrieval through enhanced retrieval generation techniques.

[0068] The environmental optimization agent first calculates the THI (Total Hierarchical Intake) based on the current sensor data: dry-bulb temperature T=35℃ and relative humidity RH=65%. The calculated Temperature and Humidity Index (THI) is 82. Based on the preset grading standards (comfort < 68, mild stress 68-72, significant stress 72-78, emergency state > 82), the system determines that the current state is an emergency. Based on this, the environmental optimization agent analyzes the effects of heat stress on animal physiology, including risks such as increased respiratory rate, decreased feed intake, and reduced milk production. It then searches the knowledge base for expert strategies on heat stress intervention, identifying subsystems requiring intervention, including the environmental control system (fans, sprinklers) and the feeding system (adjusting feeding time, increasing water intake). The environmental optimization agent's retrieval enhancement generation module uses the current subtask (e.g., "set fan speed") and real-time environmental data (current temperature 35℃, relative humidity 65%, THI=82) as query conditions. It calculates the cosine similarity between the query and each text block in the knowledge base, recalling the top-K most relevant expert strategy knowledge (e.g., "When THI exceeds 82, an emergency cooling mode should be activated, fan speed increased to 100%, and the sprinkler system turned on for 15 minutes"). Simultaneously, the agent invokes the memory module to obtain cross-task status information (e.g., the No. 1 fan was turned on in the previous cycle, the current speed is 60%, and the equipment is in normal condition; the sprinkler system was last turned on 10 minutes ago and is in standby mode). After obtaining the aforementioned professional knowledge, real-time environmental data, and cross-task status information, the environmental optimization agent uses thought chain reasoning technology to reason according to the logical chain of "current state analysis → professional knowledge matching → historical state reference → execution intent generation," ultimately generating a structured logical execution intent.

[0069] Similarly, the feeding management agent retrieves dynamic nutrition and precision feeding strategies, combines them with the current heat stress state (THI=82), calls upon the daily feed intake data recorded in the memory module, and generates logical execution intentions such as "adjust feeding time to the cooler morning and evening hours" and "increase the daily feed energy concentration by 5%" through thought chain reasoning. The cleaning and epidemic prevention agent retrieves biosafety strategies, combines them with high temperature and humidity environmental conditions, and generates logical execution intentions such as "reduce the frequency of cleaning robot operations to avoid dust." All logical execution intentions generated by the professional agent agents are uniformly aggregated and transmitted to the execution layer after consistency verification by the super agent agent, for use in the next step of dynamic behavior tree orchestration.

[0070] S13, Based on the dynamic behavior tree orchestration engine, dynamically orchestrate according to the logical execution intent and real-time environmental feedback to generate a control behavior tree.

[0071] Furthermore, in step S13, the dynamic behavior tree orchestration engine dynamically orchestrates and generates a control behavior tree based on the logical execution intent and real-time environmental feedback, including:

[0072] S13-1, When the execution path of the control behavior tree fails, a local behavior tree fragment is dynamically generated through the large language model and grafted into the control behavior tree;

[0073] S13-2, calculate the utility score of the node in the control behavior tree using Score(v)=w1·Psuccess(v) - w2·Cost(v), where Psuccess(v) represents the success probability of node v predicted based on the large language model, Cost(v) represents the execution cost of node v, and w1 and w2 are weight coefficients.

[0074] S13-3, Dynamically prune the branch containing the node whose utility score is lower than a predetermined threshold or whose associated physical device is faulty from the control behavior tree.

[0075] In this embodiment, the dynamic behavior tree orchestration engine receives logical execution intentions generated by various specialized agent intelligences and, in conjunction with real-time environmental feedback, orchestrates, organizes, or modifies them into an executable and adaptively adjustable control behavior tree. Taking a heat stress cooling scenario as an example, the environmental optimization agent generates two logical execution intentions: "set the fan speed to 80%" and "turn on the sprinkler system for 10 minutes." The feeding management agent generates a logical execution intention: "adjust the feeding time to the cooler morning and evening hours." The dynamic behavior tree orchestration engine first compiles these logical execution intentions into an initial control behavior tree.

[0076] The system abstracts a series of management operations in the farm into a formalized behavior tree, which is a directed root tree denoted as T=(V,E,r), where V is the set of nodes, E is the set of edges, and r is the root node. Node types are mainly divided into control flow nodes and execution nodes: control flow nodes include sequence nodes (representing child nodes executing sequentially), fallback nodes (representing child nodes trying sequentially until one succeeds), and parallel nodes (representing child nodes executing simultaneously); execution nodes include action nodes (representing specific equipment operations) and condition nodes (representing state judgments). Initially, the engine maps the two logical execution intentions of "setting the fan speed to 80%" and "turning on the sprinkler system for 10 minutes" to action nodes, and maps "adjusting the feeding time to the cooler morning and evening hours" to another action node. Based on the dependencies between intents, the engine uses a parallel node as the root and executes the "environmental cooling" branch and the "feeding adjustment" branch in parallel. The "environmental cooling" branch further includes a sequence node: first, the "set fan speed to 80%" action node is executed, and after it returns successfully, the "turn on the spray system for 10 minutes" action node is executed, thereby generating the initial control behavior tree.

[0077] During behavior tree execution, the system monitors the execution status in real time through a dual-track mechanism of state machine feedback and environmental semantic perception. For example, if the action node "set fan speed to 80%" returns to a Failure state due to overload of the No. 1 fan motor, the current branch is immediately suspended, triggering the introspective reasoning process of the large language model. A textual representation of sensor data extracted globally (e.g., "No. 1 fan status: offline, fault code: motor overload", "current THI index: 82", "ammonia concentration: 18ppm") forms an environmental semantic snapshot. This snapshot is then used to construct a self-healing reasoning prompt that includes a role definition (as a super ranch expert with veterinary and automation control background), failure tracing (task: set fan speed; failure node: set fan speed; cause code: motor overload), system snapshot (list of available actuators: No. 2 fan, spare window, sprinkler system), tool primitive definitions (atomic action set: set_fan_speed, open_window, start_sprinkler, etc.), knowledge enhancement (recalling the "emergency ventilation procedure for motor failure" from the knowledge base), and reasoning logic instructions. After receiving the prompt, the large language model performs a three-hop inference: first, it analyzes the root cause of the fault as the overload of the No. 1 fan motor; second, it predicts that if left untreated, the temperature inside the shed will continue to rise, the ammonia concentration will exceed the standard, and livestock and poultry will face the risk of heat stress; finally, it generates an adjustment plan—dynamically generating a local behavior tree fragment containing a fallback selection node: if the No. 2 fan is available, start the No. 2 fan; otherwise, open the backup window and start the dust suppression spray. The engine grafts this local behavior tree fragment into the original control behavior tree, replacing the invalid "set fan speed to 80%" node, forming an updated control behavior tree.

[0078] During the continuous operation of the behavior tree, dynamic pruning optimization is performed simultaneously. A utility score is calculated for each node in the behavior tree, using the formula: Score(v) = w1·Psuccess(v) w2·Cost(v). Taking the node "turn on the sprinkler system for 10 minutes" as an example, based on the large language model, its successful execution probability Psuccess(v) = 0.95 in the current environment, and the execution cost Cost(v) = 0.3 (considering energy and water consumption), let w1 = 0.6 and w2 = 0.4, then the utility score = 0.6 × 0.95. 0.4 × 0.3 = 0.57 0.12 = 0.45, which is higher than the predetermined threshold of 0.2, so this branch is retained. For the "Open Backup Window" node, the system detected that the sensor associated with the window was damaged, and digital twin verification revealed that the risk of opening it under the current physical constraints was too high. Its utility score was lower than the predetermined threshold, so the engine forcibly pruned the branch containing this node from the control behavior tree. For the "Set Wind Turbine Speed ​​to 100%" node, digital twin simulation revealed that this action would cause grid overload, and the physical device (inverter) associated with this node had a failure risk; similarly, its branch was dynamically pruned. Through the above dynamic grafting and dynamic pruning mechanisms, the system ultimately generates an optimized control behavior tree. This behavior tree not only has the elastic recovery capability to cope with sudden failures, but also eliminates inefficient or high-risk branches through pruning, laying the foundation for subsequent safety verification and command issuance.

[0079] S14, the control behavior tree is pre-verified in a multi-level digital twin model, and after the pre-verification is passed, the nominal control command corresponding to the control behavior tree is input into the safety filter constructed based on the control barrier function for correction, so as to obtain the actual control command that meets the preset safety constraints, and the actual control command is sent to the corresponding farm physical equipment for execution.

[0080] Furthermore, in step S14, the step of performing multi-level pre-visualization verification of the control behavior tree in the digital twin model includes:

[0081] Verify the spatial accessibility and collision risk of device movement at the physical geometry level;

[0082] Verify the electrical load and equipment dynamic constraints of the executed actions at the equipment mechanism level;

[0083] Predict the impact of control actions corresponding to the control behavior tree on the physiological state of livestock and poultry at the biodynamic layer;

[0084] At the logic constraint layer, the control behavior tree is verified based on linear temporal logic to determine whether it violates the preset breeding specifications.

[0085] The step of performing multi-level pre-testing verification of the control behavior tree in the digital twin model further includes: if a security conflict is detected during the pre-testing verification process, the error information is fed back to the large language model through the Validator-Reprompting loop, and the parameters of the behavior tree are corrected until the pre-testing verification is passed.

[0086] Furthermore, in step S14, the step of inputting the nominal control command corresponding to the control behavior tree into a safety filter constructed based on the control barrier function for correction to obtain the actual control command that satisfies the preset safety constraints includes:

[0087] Construct a safety scalar function, which describes the distance from the system state to the boundary of the hazardous area, and satisfies that the system is in a safe state when the safety scalar function is ≥ 0;

[0088] To minimize the optimization variable u and the nominal control command u nom The deviation is the objective, satisfying the differential inequality constraint derived based on the safety scalar function. Given the condition, solve the quadratic programming problem, and use the obtained optimization variable u as the actual control command, where, Let α represent the time derivative of h(x) under the action of the optimization variable u, where h(x) represents the safety scalar function and α is a convergence rate parameter greater than zero.

[0089] Furthermore, the safety scalar function is constructed according to the type of the controlled device, including:

[0090] When the controlled device is an environmental control device, the safety scalar function is constructed as follows: Where I(t) represents the real-time current, I max Indicates the upper limit of the rated current;

[0091] When the controlled device is a mobile work device, the safety scalar function is constructed as follows: , where p robot With p obs Let r represent the coordinates of the device and the obstacle, respectively. safe Indicates the safety radius;

[0092] When the controlled device is a humidifier, the safety scalar function is constructed as follows: Where RH(t) represents the real-time relative humidity, RH crit Indicates the preset critical humidity;

[0093] When multiple controlled devices execute concurrently, a composite security scalar function is constructed by aggregating multiple independent security scalar functions using the Log-Sum-Exp smoothing operator. , where h i (x) represents the i-th security scalar function, β represents a smoothing factor greater than zero, and N represents the number of concurrent controlled devices.

[0094] In this embodiment, taking a heat stress cooling scenario as an example, the control behavior tree includes action nodes such as "setting the No. 2 fan speed to 100%", "turning on the sprinkler system for 15 minutes", and "adjusting the feeding time to the cooler morning and evening periods". First, the control behavior tree is loaded into the digital twin simulator, and multi-level verification is performed sequentially, including:

[0095] In the physical geometry layer validation, validation is based on a pre-built high-precision 3D semantic map of the farm. This map defines the precise three-dimensional coordinates and collision models of facilities such as walls, fences, automatic doors, feed bins, and charging piles. The validator performs accessibility analysis at this layer to assess whether the device movement paths in the control behavior tree (such as the movement trajectory of a cleaning robot) will lead to spatial intervention with fixed facilities or dynamic obstacles (such as live animals).

[0096] In the device mechanism layer verification, the system simulates the physical characteristics of sensors, actuators, and PLCs, including the rated power of the motor, maximum torque constraints, communication delays, and a dynamic model based on remaining energy. The verifier uses a Lyapunov energy stability function to check whether the task sequence will lead to local grid overload or individual robot breakdown due to energy depletion. For example, in this embodiment, it verifies whether the instantaneous power of simultaneously starting a fan and a sprinkler system exceeds the grid capacity.

[0097] In the biodynamic layer validation, the system integrates full life cycle growth curves and a THI stress model to simulate changes in the physiological state of individual livestock and poultry. The validator predicts the potential impact of current control actions (such as turning on the cooling spray for 15 minutes) on animal body temperature, rumination frequency, and feed intake, ensuring that the cooling program does not induce cold stress or feeding disorders.

[0098] In the logical constraint layer verification, the aquaculture specifications are formally verified based on linear temporal logic. For example, it verifies whether the timing between "setting the fan speed" and "starting the spray" meets the procedure of "starting the fan first and then spraying", and at the same time checks whether there is a time conflict with the immunization plan in the disease prevention calendar (such as hard logical constraints such as "high-pressure disinfection is strictly prohibited within 24 hours after immunization").

[0099] If any of the above verification levels detects a security conflict, the system triggers a Validator-Reprompting loop. For example, suppose the device mechanism layer discovers that simultaneously starting the No. 2 fan and the sprinkler system will cause the instantaneous power of the power grid to exceed the limit. The digital twin simulator generates a structured feedback report containing the root cause of the error: "Power load exceeds limit: The total power of the fan + sprinkler reaches 110% of the rated capacity." This report is fed back to the large language model, which, based on the prompts, re-executes the thought chain reasoning, adjusting "set the No. 2 fan speed to 100%" to "set the No. 2 fan speed to 80%" and delaying the sprinkler start-up by 30 seconds, forming new behavior tree parameters. The corrected behavior tree is then re-entered into the digital twin simulator for pre-running until all four layers of verification pass.

[0100] After successful pre-run verification, the system enters the safety filter correction phase. First, nominal control instructions are extracted from the control behavior tree. In each tick cycle, the system traverses execution nodes in the behavior tree that are either running or started, extracting numerical action intensity from the node's structured metadata. For example, the speed value 80% is extracted from the node "Set fan speed 2 to 80%", and this action is mapped to the fan speed dimension in the global operator space using a semantic-physical mapping table; the duration 15 minutes is extracted from the node "Start the sprinkler system for 15 minutes", and mapped to the sprinkler control dimension; for device dimensions not activated by the behavior tree (such as cleaning robots), they are set to their current measured state value (e.g., stationary) using one-hot masking technology. All dimensions are stacked to form a high-dimensional nominal control vector u. nom Next, a safety scalar function h(x) is constructed to describe the distance from the system state to the boundary of the hazardous area, satisfying that the system is in a safe state when h(x) ≥ 0. The safety scalar function is constructed differently for different types of controlled equipment:

[0101] For environmental control equipment (such as fans), the safety scalar function is constructed as follows: Where I(t) represents the real-time current, I max Indicates the upper limit of the rated current;

[0102] For mobile work equipment (such as cleaning robots), the safety scalar function is constructed as follows: , where p robot With p obs Let r represent the coordinates of the device and the obstacle, respectively. safe Indicates the safety radius;

[0103] For humidification devices (such as evaporative cooling pads), the safety scalar function is constructed as follows: Where RH(t) represents the real-time relative humidity, RH crit This indicates the preset critical humidity (e.g., 85%).

[0104] In this embodiment, the fan and the sprinkler system operate concurrently, which is a multi-device concurrent scenario. The system uses the Log-Sum-Exp smoothing operator to perform nonlinear aggregation on two independent safety scalar functions to construct a composite safety scalar function: , where β is a smoothing factor greater than zero (e.g., β=10). This composite function is twice differentiable over the entire domain, which can prevent the control command from oscillating violently at the minimum value switching point.

[0105] Then, a quadratic programming problem is solved to minimize the optimization variable u and the nominal control command u. nom The objective is to satisfy the differential inequality constraints derived from the composite safety scalar function, with the deviation as the target. Let be the condition, where α is a convergence rate parameter greater than zero (e.g., α = 1.0). The solved optimization variable u is the corrected actual control command. If the original nominal command itself is safe, then u and u nom Consistent; if there are potential risks (such as the fan current approaching the upper limit), the filter will correct the instructions to within the safety boundary with minimal deviation.

[0106] Finally, through a function call mechanism, the actual control commands are converted into standardized industrial communication protocol commands according to predefined mapping relationships. For example, "set fan speed of No. 2 to 80%" is mapped to the ISOBUS standard SPN 103 parameter, and "start the spray system for 15 minutes" is mapped to DDI 141 (Work State) and a custom duration field. These commands are sent to the PLC controllers of the corresponding physical devices via the MQTT protocol, driving the fans and spray systems to perform cooling tasks, while simultaneously synchronizing feeding adjustment commands to the automatic feeding line, thus completing a closed loop from high-level decision-making to physical execution.

[0107] S15, monitor the execution result of the actual control command, and if the execution result meets the preset self-introspection triggering condition, trigger the self-introspection-driven control mechanism to perform dynamic re-arrangement.

[0108] Furthermore, in step S15, the preset introspection trigger condition includes at least one of the following:

[0109] The execution node in the control behavior tree returns a failure status or the condition node returns a false value;

[0110] The deviation between the execution result and the expected observation generated based on the control behavior tree does not converge to a safe threshold within a preset lag time.

[0111] The semantic weighted deviation between the decision intent vectors of different agent intelligent agents for the same state exceeds the safety benchmark;

[0112] During the pre-performance verification in the digital twin model, a linear sequential logic violation or a security scalar function less than or equal to zero was detected.

[0113] The triggering of the introspective-driven control mechanism for dynamic re-orchestration includes: the large language model performing reasoning for cause analysis, consequence prediction, and adjustment plans; dynamically generating local behavior tree fragments to graft or prune the control behavior tree; and correcting execution deviations based on the updated control behavior tree.

[0114] In this embodiment, after the control command is issued and executed, a feedback and fault-tolerance phase begins, continuously monitoring the execution results of the physical equipment and the dynamic changes in the breeding environment, forming a closed loop of "observation-reasoning-action". Taking a heat stress cooling scenario as an example, the system has issued actual control commands to "set the No. 2 fan speed to 80%" and "turn on the sprinkler system for 15 minutes," and as expected, the temperature and humidity index (THI) in the shed should be reduced from 82 to below 72 within 15 minutes. The system uses a multi-dimensional self-reflection composite triggering system to evaluate the gap between the execution status and the expected target in real time. The self-reflection-driven control mechanism is triggered when any of the following four conditions are met.

[0115] Condition 1: Deterministic logic failure triggers. The system monitors the running status of execution nodes in the behavior tree through a state machine feedback mechanism. Suppose that when the action node "sets the speed of fan 2 to 80%" is being executed, the node returns to the Failure state due to a communication interruption with the frequency converter of fan 2. The system immediately suspends the current task flow and triggers the introspective reasoning process.

[0116] Condition 2: Triggered by deviation from expected target. Before executing the action, the system generates the expected observation state O based on the control behavior tree. exp For example, "Within 15 minutes of the fan being turned on, the THI dropped from 82 to below 72, and the ammonia concentration dropped from 18 ppm to below 12 ppm." The system collects real-time sensor measured values ​​in vector O. act Calculate the observation residuals The system then starts a timer. If, within the preset lag time τ=15 minutes, the measured THI value only drops from 82 to 78, and the ammonia concentration rises from 18ppm to 20ppm, and the observation residual does not converge to the safety threshold, the system determines it as a "silent fault where the execution intention has not been implemented" and actively triggers self-reflection.

[0117] Condition 3: Multi-agent disagreement triggers. The system simultaneously monitors the decision intentions of different agents regarding the same state. For example, a health inspection agent, through machine vision analysis, determines that the herd is showing signs of increased heat stress, such as increased respiratory rate and decreased feed intake, and generates a decision intention vector v indicating "cooling needs to be strengthened." A1 The environmental optimization agent, based on sensor data, determines that the THI has dropped to 78, deems the current cooling solution effective, and generates a decision intent vector v to "maintain the current settings". A2 Calculate the semantic weighted bias between the two decision intent vectors: , where ε is a very small positive number to prevent division by zero. If D sem If the preset safety threshold is exceeded, the super agent will be triggered to conduct an arbitration-style reflection and re-evaluate the task priorities.

[0118] Condition 4: Preventative Physical Violation Triggering. During pre-simulation verification in the digital twin model, if a linear timing logic violation or a trend of the safety scalar function h(x) ≤ 0 is detected, introspection is also triggered. For example, before issuing the next cycle command, the digital twin simulator pre-simulation might discover that the combination of "setting the wind turbine speed to 100%" and "starting the sprinkler system" will cause the instantaneous power of the power grid to exceed the limit, or the safety scalar function... As the current approaches zero (i.e., the current approaches its upper limit), the system converts the violation results in the simulation into text descriptions and feeds them back to the large language model, forcing the logic to be corrected before execution.

[0119] When any of the above triggering conditions are met, the system immediately activates the introspective-driven control mechanism. First, it submits a self-healing inference prompt containing complete context to the large language model. This prompt includes: role definition (as a super ranch expert with veterinary and automation control background), failure tracing (identifying failure nodes or sources of deviation), system snapshot (current status of all available actuators and real-time environmental parameters), tool primitive definition (a set of callable atomic action functions), knowledge enhancement (emergency handling procedures recalled from the knowledge base), and inference logic instructions. Upon receiving the prompt, the large language model executes a three-hop inference: first, it analyzes the root cause (e.g., fan communication interruption leading to cooling failure, or slow THI reduction due to increased external heat radiation); second, it predicts potential consequences (if left untreated, the indoor temperature will continue to rise, posing a risk of heatstroke to livestock); and third, it generates an adjustment plan (e.g., switching to fan #3, increasing spray frequency, adjusting feeding times, etc.).

[0120] Based on the inference results, the large language model dynamically generates local behavior tree fragments and reconstructs the original control behavior tree through grafting or pruning operations. For example, for the fault "Fan 2 failed", a subtree containing a Fallback selection node is generated: if Fan 3 is available, start Fan 3; otherwise, open the emergency skylight and start the dust suppression spray. This subtree is grafted onto the branch of the failed node in the original behavior tree. Simultaneously, each node in the behavior tree is re-evaluated according to the utility scoring formula, and branches containing nodes with utility scores below the threshold or associated equipment failures are dynamically pruned. After this reconstruction, an updated control behavior tree is obtained, and this tree replaces the original tree for continued execution, thereby achieving automatic correction of execution deviations.

[0121] Through the synergistic operation of the aforementioned multidimensional introspection composite triggering mechanism and introspection-driven control mechanism, the system can automatically sense, diagnose, and repair equipment failures, sudden environmental changes, decision-making conflicts, or potential risks. It can restore the system to steady state without human intervention, significantly improving the robustness and autonomy of the farm management decision-making system.

[0122] Reference Figure 2The diagram shown is a structural schematic of a farm full-process management decision-making device based on an AI intelligent agent provided in an embodiment of the present invention.

[0123] In this embodiment, the device 20 includes:

[0124] Task decomposition unit 21 is used to receive user input instructions, perform semantic parsing and task decomposition on the input instructions based on a large language model and in combination with a preset long-term breeding strategy, and generate a sub-task tree with temporal dependency or parallel relationship.

[0125] Reasoning unit 22 is used to distribute each subtask in the subtask tree to the corresponding agent intelligence to perform thought chain reasoning and generate logical execution intent;

[0126] The dynamic orchestration unit 23 is used to dynamically orchestrate based on the dynamic behavior tree orchestration engine, according to the logical execution intent and real-time environmental feedback, and generate a control behavior tree.

[0127] The pre-performance unit 24 is used to perform multi-level pre-performance verification of the control behavior tree in the digital twin model, and after the pre-performance verification is passed, input the nominal control command corresponding to the control behavior tree into the safety filter constructed based on the control barrier function for correction, so as to obtain the actual control command that meets the preset safety constraints, and send the actual control command to the corresponding farm physical equipment for execution.

[0128] The monitoring unit 25 is used to monitor the execution result of the actual control command. When the execution result meets the preset self-introspection triggering condition, the self-introspection-driven control mechanism is triggered to perform dynamic re-arrangement.

[0129] Each unit module of the device 20 can execute the corresponding steps in the above method embodiment, so the details of each unit module will not be elaborated here. Please refer to the description of the corresponding steps above for details.

[0130] This invention also provides an AI-based intelligent agent-based farm end-to-end management decision-making device. This device includes the AI-based intelligent agent-based farm end-to-end management decision-making apparatus described above. The AI-based intelligent agent-based farm end-to-end management decision-making apparatus can employ… Figure 2 The structure of the embodiment, correspondingly, can be executed Figure 1 The technical solutions of the method embodiments shown are similar in implementation principle and technical effect. For details, please refer to the relevant records in the above embodiments, which will not be repeated here.

[0131] The device includes: a mobile phone, digital camera, or tablet computer, or other device with a camera function; or a device with an image processing function; or a device with an image display function. The device may include components such as a memory, processor, input unit, display unit, and power supply.

[0132] The memory can be used to store software programs and modules. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory. The memory can mainly include a program storage area and a data storage area. The program storage area can store the operating system, applications required for at least one function, etc.; the data storage area can store data created according to the use of the device, etc. In addition, the memory can include high-speed random access memory, and can also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory can also include a memory controller to provide access to the memory for the processor and input units.

[0133] The input unit can be used to receive input numerical, character, or image information, and to generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control. Specifically, in addition to a camera, the input unit of this embodiment may also include a touch-sensitive surface (e.g., a touch screen) and other input devices.

[0134] The display unit can be used to display information input by the user or information provided to the user, as well as various graphical user interfaces of the device. These graphical user interfaces can be composed of graphics, text, icons, video, and any combination thereof. The display unit may include a display panel, optionally configured as an LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), or other similar display panel. Furthermore, a touch-sensitive surface may cover the display panel. When the touch-sensitive surface detects a touch operation on or near it, it transmits the information to the processor to determine the type of touch event. Subsequently, the processor provides corresponding visual output on the display panel based on the type of touch event.

[0135] This invention also provides a computer-readable storage medium, which may be a computer-readable storage medium included in the memory described in the above embodiments; or it may be a standalone computer-readable storage medium not assembled into a device. The computer-readable storage medium stores at least one instruction, which is loaded and executed by a processor to implement... Figure 1 The method for full-process management and decision-making in aquaculture farms based on AI agents is shown. The computer-readable storage medium can be a read-only memory, a hard disk, or an optical disk, etc.

[0136] This invention also provides a computer program product, including a computer program / instructions, which are loaded and executed by a processor to implement... Figure 1This paper presents a decision-making method for the entire process management of aquaculture farms based on AI intelligent agents.

[0137] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the device embodiments, equipment embodiments, and storage medium embodiments, since they are basically similar to the method embodiments, the descriptions are relatively simple, and relevant parts can be referred to the descriptions in the method embodiments.

[0138] Furthermore, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0139] The foregoing description illustrates and describes preferred embodiments of the present invention. It should be understood that the present invention is not limited to the forms disclosed herein and should not be construed as excluding other embodiments. It can be used in various other combinations, modifications, and environments, and can be altered within the scope of the inventive concept by means of the foregoing teachings or techniques or knowledge in related fields. Any modifications and variations made by those skilled in the art that do not depart from the spirit and scope of the present invention should be within the protection scope of the appended claims.

Claims

1. A decision-making method for the entire process management of a livestock farm based on AI intelligent agents, characterized in that, The method includes: The system receives user input commands, performs semantic parsing and task decomposition on the input commands based on a large language model and in conjunction with a preset long-term breeding strategy, and generates a sub-task tree with temporal dependencies or parallel relationships. Each subtask in the subtask tree is distributed to the corresponding agent for thought chain reasoning to generate logical execution intent. Based on the dynamic behavior tree orchestration engine, dynamic orchestration is performed according to the logical execution intent and real-time environmental feedback to generate a control behavior tree; The control behavior tree is pre-tested and verified in a digital twin model at multiple levels. After the pre-test is passed, the nominal control command corresponding to the control behavior tree is input into a safety filter constructed based on the control barrier function for correction, so as to obtain the actual control command that meets the preset safety constraints. The actual control command is then sent to the corresponding farm physical equipment for execution. If the execution result of the actual control command is monitored and the execution result meets the preset introspection triggering condition, then the introspection-driven control mechanism is triggered to perform dynamic re-arrangement.

2. The decision-making method for full-process management of a farm based on AI intelligent agents according to claim 1, characterized in that, The process of semantically parsing and decomposing the input instructions based on a large language model and combined with a preset long-term breeding strategy to generate a sub-task tree with temporal dependencies or parallel relationships includes: The input instructions are semantically associated with the corresponding strategy dimensions in the long-term aquaculture strategy. Using thought chain prompts, the large language model is guided to recursively decompose the input instructions according to the stage divisions and response procedures defined by the long-term aquaculture strategy, stopping the decomposition when a preset termination condition is met, resulting in a subtask tree comprising multiple subtasks; wherein, The long-term aquaculture strategy includes strategic dimensions such as the whole life cycle procedure of biological assets, dynamic nutrition and precision feeding strategy, environmental comfort and stress intervention standards, and biosecurity and herd health and disease prevention strategy. The preset termination conditions include: The decomposed subtasks can be mapped to a single atomic action in a predefined set of atomic actions; The complexity of each subtask is calculated, and it is determined that the complexity of the subtask is below a complexity threshold. The depth of the recursive decomposition has reached the preset depth; The subtask tree generated by the decomposition is verified using linear temporal logic.

3. The decision-making method for full-process management of a farm based on AI intelligent agents according to claim 1, characterized in that, The step of distributing each subtask in the subtask tree to the corresponding agent agent for thought chain reasoning and generating logical execution intent includes: Each of the aforementioned agent intelligent agents utilizes retrieval-enhanced generation technology to retrieve expert strategy knowledge from a vectorized aquaculture knowledge base, and combines it with real-time environmental data and cross-task status information to perform thought chain reasoning to generate the logical execution intent; wherein, the agent intelligent agents include feeding management agent, environmental optimization agent, cleaning and epidemic prevention agent, and health inspection agent, and all the agent intelligent agents are globally planned and task distributed by a super agent intelligent agent.

4. The decision-making method for full-process management of a farm based on AI intelligent agents according to claim 1, characterized in that, The dynamic behavior tree orchestration engine dynamically orchestrates based on the logical execution intent and real-time environmental feedback to generate a control behavior tree, including: When the execution path of the control behavior tree fails, a local behavior tree fragment is dynamically generated through a large language model and grafted into the control behavior tree; The utility score of the node in the control behavior tree is calculated using Score(v) = w1·Psuccess(v) - w2·Cost(v), where Psuccess(v) represents the probability of successful execution of node v based on the large language model, Cost(v) represents the execution cost of node v, and w1 and w2 are weight coefficients. The branch containing a node whose utility score is below a predetermined threshold or whose associated physical device is faulty will be dynamically pruned from the control behavior tree.

5. The decision-making method for full-process management of a farm based on an AI agent as described in claim 1, characterized in that, The step of performing multi-level pre-demonstration verification of the control behavior tree in the digital twin model includes: Verify the spatial accessibility and collision risk of device movement at the physical geometry level; Verify the electrical load and equipment dynamic constraints of the executed actions at the equipment mechanism level; Predict the impact of control actions corresponding to the control behavior tree on the physiological state of livestock and poultry at the biodynamic layer; At the logic constraint layer, the control behavior tree is verified based on linear temporal logic to determine whether it violates the preset breeding specifications.

6. The decision-making method for full-process management of a farm based on an AI agent as described in claim 1, characterized in that, The step of inputting the nominal control command corresponding to the control behavior tree into a safety filter constructed based on a control barrier function for correction to obtain the actual control command that satisfies the preset safety constraints includes: Construct a safety scalar function, which describes the distance from the system state to the boundary of the hazardous area, and satisfies that the system is in a safe state when the safety scalar function is ≥ 0; To minimize the optimization variable u and the nominal control command u nom The deviation is the objective, satisfying the differential inequality constraint derived based on the safety scalar function. Given the condition, solve the quadratic programming problem, and use the obtained optimization variable u as the actual control command, where, Let α represent the time derivative of h(x) under the action of the optimization variable u, where h(x) represents the safety scalar function and α is a convergence rate parameter greater than zero.

7. The decision-making method for full-process management of a livestock farm based on an AI agent as described in claim 6, characterized in that, The security scalar function is constructed according to the type of the controlled device, including: When the controlled device is an environmental control device, the safety scalar function is constructed as follows: Where I(t) represents the real-time current, I max Indicates the upper limit of the rated current; When the controlled device is a mobile work device, the safety scalar function is constructed as follows: , where p robot With p obs Let r represent the coordinates of the device and the obstacle, respectively. safe Indicates the safety radius; When the controlled device is a humidifier, the safety scalar function is constructed as follows: Where RH(t) represents the real-time relative humidity, RH crit Indicates the preset critical humidity; When multiple controlled devices execute concurrently, a composite security scalar function is constructed by aggregating multiple independent security scalar functions using the Log-Sum-Exp smoothing operator. , where h i (x) represents the i-th security scalar function, β represents a smoothing factor greater than zero, and N represents the number of concurrent controlled devices.

8. The decision-making method for full-process management of a farm based on an AI agent according to claim 1, characterized in that, The preset introspection triggering conditions include at least one of the following: The execution node in the control behavior tree returns a failure status or the condition node returns a false value; The deviation between the execution result and the expected observation generated based on the control behavior tree does not converge to a safe threshold within a preset lag time. The semantic weighted deviation between the decision intent vectors of different agent intelligent agents for the same state exceeds the safety benchmark; During the pre-performance verification in the digital twin model, a linear sequential logic violation or a security scalar function less than or equal to zero was detected.

9. A decision-making device for the entire process management of a livestock farm based on an AI intelligent agent, characterized in that, The device includes: The task decomposition unit is used to receive user input instructions, perform semantic parsing and task decomposition on the input instructions based on a large language model and in combination with a preset long-term breeding strategy, and generate a sub-task tree with temporal dependencies or parallel relationships. The reasoning unit is used to distribute each subtask in the subtask tree to the corresponding agent intelligence to perform thought chain reasoning and generate logical execution intent. The dynamic orchestration unit is used to dynamically orchestrate based on the dynamic behavior tree orchestration engine, according to the logical execution intent and real-time environmental feedback, to generate a control behavior tree. The pre-performance unit is used to perform multi-level pre-performance verification of the control behavior tree in the digital twin model. After the pre-performance verification is passed, the nominal control command corresponding to the control behavior tree is input into the safety filter constructed based on the control barrier function for correction to obtain the actual control command that meets the preset safety constraints. The actual control command is then sent to the corresponding farm physical equipment for execution. The monitoring unit is used to monitor the execution result of the actual control command. When the execution result meets the preset self-introspection triggering condition, the self-introspection-driven control mechanism is triggered to perform dynamic re-arrangement.

10. A decision-making device for the entire process management of a livestock farm based on an AI intelligent agent, characterized in that, The system includes a processor, a memory, and a computer program stored in the memory, wherein the computer program, when executed by the processor, implements the steps of a farm management decision-making method based on an AI agent as described in any one of claims 1 to 8.