A water plant cluster management method and device based on a large language model and an agent, equipment, and a storage medium
By using asynchronous calls between the main intelligent agent and domain expert sub-intelligent agents, and containerized isolation sandbox technology, the problems of low efficiency, high security risks, and system integration of large language models in water plant management are solved, achieving efficient and secure water plant cluster management.
Patent Information
- Application Number
- CN202610758276.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-29
- Publication Date
- 2026-06-26
AI Technical Summary
Existing industrial applications based on large language models suffer from low execution efficiency, high security risks, frequent calculation errors, and system integration challenges in water plant management, failing to meet real-time and security requirements.
An asynchronous invocation mechanism between the main intelligent agent and domain expert sub-intelligent agents is adopted. By utilizing a containerized physical isolation sandbox and an access control module, combined with an ACP proxy encapsulation module, parallel task processing and deterministic computation are achieved, ensuring security and accuracy.
It improves the efficiency and security of water plant cluster management, reduces the risk of computational errors, enables secure interaction with legacy systems, and meets the real-time requirements of industrial control.
Smart Images

Figure CN122287690A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, and in particular to a method, apparatus, equipment and storage medium for water plant cluster management based on a large language model and intelligent agents. Background Technology
[0002] Currently, with the rapid development of artificial intelligence technology, Large Language Models (LLMs) are gradually penetrating the field of industrial control (such as water plants and power plant manufacturing). However, existing industrial application solutions based on large models still face the following major technical bottlenecks: 1. Low execution efficiency: Traditional large language model agents often employ a single-agent serial reasoning mode of "Chain of Thought." When faced with concurrent complex events in industrial settings (e.g., abnormal vibration at a pumping station simultaneously triggering changes in water supply pressure and a surge in energy consumption), single-agent models cannot simultaneously handle parallel analysis of multiple dimensions such as electromechanical, process, and energy consumption, resulting in excessively long diagnostic times and failing to meet the real-time requirements of industrial control. Although existing technologies have proposed multi-agent system control, they are based on traditional control theory rather than LLM-driven semantic routing.
[0003] 2. Safety Risks and Unauthorized Access Hazards: Industrial scenarios (such as pump and valve control and chemical dosing settings in water plants) have extremely high safety requirements. Existing large-scale model-generated content is unpredictable; directly granting it control permissions can easily lead to erroneous operations caused by "AI illusions" (such as mistakenly opening a vent valve). Although existing technologies describe the parallel safety boundaries between AI and local control systems, they lack physical isolation and constraint mechanisms at the underlying level of the AI's operating environment and skill permissions.
[0004] 3. Computational Errors Caused by "Theoretical Science Fiction": Large language models are essentially probabilistic language models. When performing complex industrial simulations, calculus calculations, or overall planning (such as optimal scheduling based on peak-valley electricity prices), they are prone to generating so-called "theoretical science fiction," that is, outputting seemingly reasonable but completely erroneous conclusions. Although existing technologies use LLM to generate PLC code, they are limited to offline generation and cannot solve the accuracy problem of online real-time calculations.
[0005] 4. System Integration Gap: Many outdated heavy industrial systems (such as WinCC configuration software and EAM enterprise asset management systems) exist in industrial settings. These systems often lack modern API interfaces, making it difficult for emerging AI agents to interact with them securely and in a standardized manner across physical boundaries. Existing technologies lack standardized proxy encapsulation protocols similar to ACP (Agent Context Protocol).
[0006] As can be seen from the above, how to improve the efficiency of water plant cluster management based on large language models and intelligent agents is an urgent problem to be solved. Summary of the Invention
[0007] In view of this, the purpose of this invention is to provide a water plant cluster management method, apparatus, equipment, and storage medium based on a large language model and intelligent agents, which can improve the efficiency of water plant cluster management in the process of water plant cluster management based on a large language model and intelligent agents. The specific solution is as follows: Firstly, this application provides a water plant cluster management method based on a large language model and intelligent agents, including: The main intelligent agent receives the tasks to be processed corresponding to the water plant cluster and sends out the corresponding asynchronous call messages including load data to the domain expert sub-intelligent agents. Then, the current context is determined by the domain expert sub-intelligent agents, the asynchronous call messages, the preset YAML metadata dictionary and the industrial specification. Using the large language model in the domain expert sub-agent and based on the current context, determine whether the task to be processed involves industrial simulation. If so, call the local code script corresponding to the task to be processed. The local code script is scheduled to a container created using a containerized physical isolation sandbox, and the permission control module compares the local code script with a preset tool whitelist. When the comparison passes, the calculation result is determined based on the local code script and the load data, and the calculation result is set as the task execution result. The execution results of each task are then sent to the main intelligent agent. The main intelligent agent and the execution results of each task are used to determine a multi-source dataset, so as to call the ACP proxy encapsulation module and construct JSON semantic instructions based on the multi-source dataset. Then, the JSON semantic instructions are used to manage the water plant cluster.
[0008] Optionally, determining the current context using the domain expert sub-agents, the asynchronous call message, the preset YAML metadata dictionary, and the industry specification includes: The main intelligent agent receives the tasks to be processed corresponding to the water plant cluster, and uses a non-blocking star-shaped multidimensional command network to send asynchronous call messages corresponding to the tasks to be processed to the expert sub-intelligent agents in various fields; the asynchronous call messages include event type identifiers and load data; The asynchronous call message is sent to a pre-interceptor by each of the domain expert sub-agents. The pre-interceptor then reads the boundary constraint ontology file stored in memory to determine whether the load data is within the capability boundary of the domain expert sub-agent. The boundary constraint ontology file includes a capability boundary list. The capability boundary list is used to record the professional domain types that the domain expert sub-agent prohibits from responding to and the keywords of the prohibited operations. If the load data is not within the capability boundary of the domain expert sub-agent, then the pre-interceptor is used to refuse to respond to the asynchronous call message and terminate the task execution; If the load data is within the capability boundary of the domain expert sub-agent, then the load data is allowed to pass using the pre-interceptor.
[0009] Optionally, determining the current context using the domain expert sub-agents, the asynchronous call message, the preset YAML metadata dictionary, and the industry specification includes: The intent keyword matching results are obtained by using the domain expert sub-agents and based on a preset YAML metadata dictionary to perform intent keyword matching on the payload data. If the intent keyword matching result indicates that an intent keyword is matched, then the industrial manual storage path corresponding to the preset YAML metadata dictionary is determined, and the dynamic loader is called to store the corresponding industrial manual in the current context based on the industrial manual storage path. The preset YAML metadata dictionary includes skill names, trigger intent keywords, and the corresponding industrial instruction manual storage path.
[0010] Optionally, the step of utilizing the large language model in the domain expert sub-agent and determining whether the task to be processed involves industrial simulation based on the current context, and if so, invoking the local code script corresponding to the task to be processed, includes: The large language model in the domain expert sub-agent is used to read the corresponding industrial instruction manual text segment and the load data in the current context; Identify whether the load data includes industrial simulation intent features with requirements for numerical calculation, curve prediction, and parameter optimization; If the load data includes industrial simulation intent features, it is determined that the task to be processed involves industrial simulation, and sensor values in the load data are extracted. Then, based on the sensor values, the local code script corresponding to the task to be processed is determined. If the load data does not include the industrial simulation intent feature, it is determined that the task to be processed does not involve industrial simulation, and a corresponding natural language inference result is generated based on the current context. Then, the natural language inference result is set as the task execution result.
[0011] Optionally, the step of scheduling the local code script to a container created using a containerized physical isolation sandbox, comparing the local code script with a preset tool whitelist using an access control module, determining the calculation result based on the local code script and the load data when the comparison passes, setting the calculation result as the task execution result, and sending each task execution result to the main intelligent agent includes: A container with an isolated execution environment is created using a containerized physical isolation sandbox and Docker API requests; the container does not have external network access. The local code script and its corresponding dependent environment are scheduled into the container, so that the tool permission interceptor in the permission control module can be used in the container to compare the local code script with the preset tool whitelist and obtain the comparison result. If the comparison result indicates that the comparison is successful, the deterministic calculation result is determined using the local code script and based on the sensor values in the load data, and the deterministic calculation result is set as the model inference result corresponding to the large language model; The model inference result is set as the task execution result corresponding to the domain expert sub-agent, and each task execution result is sent back to the main agent asynchronously, and then the container is automatically destroyed.
[0012] Optionally, the step of comparing the local code script with a preset tool whitelist using the tool permission interceptor in the permission control module within the container to obtain the comparison result includes: Determine the engine skill configuration file for each of the domain expert sub-agents, and extract the corresponding preset tool whitelist from the engine skill configuration file; the preset tool whitelist records a set of tool names that are allowed to be called by the domain expert sub-agents. The asynchronous call message is parsed using the parsing engine in the domain expert sub-agent to obtain the tool name corresponding to the local code script; The tool name is compared with the preset tool whitelist. If the comparison result indicates that the tool name exists in the preset tool whitelist, the execution of the local code script is allowed; if the tool name does not exist in the preset tool whitelist, the execution of the local code script is refused, and the corresponding unauthorized behavior log is recorded.
[0013] Optionally, the step of determining a multi-source dataset using the main intelligent agent and the execution results of each task, invoking the ACP proxy encapsulation module and constructing JSON semantic instructions based on the multi-source dataset, and then using the JSON semantic instructions to manage the water plant cluster includes: The main intelligent agent aligns the execution results of each task with timestamps and event types to obtain a structured multi-source dataset. Then, a preset decision fusion model is used to process the multi-source dataset to obtain a comprehensive decision result. The comprehensive decision result includes action fields and action parameters. When the overall decision result includes the action of issuing standard instructions to a remote industrial control network, the main intelligent agent calls the ACP proxy encapsulation module to construct JSON semantic instructions that conform to the intelligent agent calling specification based on the action fields and parameters in the overall decision result; The JSON semantic instructions are passed to the protocol conversion proxy object corresponding to the target industrial control system. Then, the protocol conversion proxy object is used to convert the JSON semantic instructions into industrial control system protocol fields based on a preset instruction and protocol field mapping table to obtain the converted protocol data. The protocol data is encapsulated into a protocol stack and a session is established using a preset adapter to obtain corresponding standard instructions, which are then used to manage the water plant cluster.
[0014] Secondly, this application provides a water plant cluster management device based on a large language model and intelligent agents, comprising: The current context determination module is used to receive the pending tasks corresponding to the water plant cluster using the main intelligent agent, and send the corresponding asynchronous call messages including load data to each domain expert sub-intelligent agent. Then, the current context is determined using each domain expert sub-intelligent agent, the asynchronous call messages, the preset YAML metadata dictionary and the industrial specification. The code script determination module is used to determine whether the task to be processed involves industrial simulation based on the large language model in the domain expert sub-agent and the current context. If so, the local code script corresponding to the task to be processed is called. The task execution result generation module is used to schedule the local code script to a container created using a containerized physical isolation sandbox, and use the permission control module to compare the local code script with a preset tool whitelist. When the comparison is successful, the calculation result is determined based on the local code script and the load data, and the calculation result is set as the task execution result. The task execution results are then sent to the main intelligent agent. The semantic instruction generation module is used to determine a multi-source dataset using the main intelligent agent and the execution results of each task, to call the ACP proxy encapsulation module and construct JSON semantic instructions based on the multi-source dataset, and then use the JSON semantic instructions to manage the water plant cluster.
[0015] Thirdly, this application provides an electronic device, comprising: Memory, used to store computer programs; A processor is used to execute the computer program to implement the aforementioned water plant cluster management method based on a large language model and intelligent agents.
[0016] Fourthly, this application provides a computer-readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the aforementioned water plant cluster management method based on a large language model and intelligent agents.
[0017] As can be seen from the above, before performing water plant cluster management based on a large language model and intelligent agents, this application needs to use the main intelligent agent to receive the tasks to be processed corresponding to the water plant cluster and send the corresponding asynchronous call messages, including load data, to the domain expert sub-intelligent agents. Then, the current context is determined by the domain expert sub-intelligent agents, the asynchronous call messages, the preset YAML metadata dictionary, and the industrial specification. The large language model in the domain expert sub-intelligent agents is used to determine whether the tasks to be processed involve industrial simulation based on the current context. If so, the local code script corresponding to the tasks to be processed is called. The local code script is scheduled to a container created using a containerized physical isolation sandbox, and the permission control module is used to compare the local code script with the preset tool whitelist. When the comparison is successful, the calculation result is determined based on the local code script and the load data, and the calculation result is set as the task execution result. The execution results of each task are then sent to the main intelligent agent. The main intelligent agent and the execution results of each task are used to determine the multi-source dataset, so as to call the ACP proxy encapsulation module and construct JSON semantic instructions based on the multi-source dataset. Then, the JSON semantic instructions are used to manage the water plant cluster.
[0018] Therefore, this application first requires the main intelligent agent to receive the tasks to be processed corresponding to the water plant cluster and to send corresponding asynchronous call messages, including load data, to the domain expert sub-intelligent agents. Then, the current context is determined by the domain expert sub-intelligent agents, the asynchronous call messages, the preset YAML metadata dictionary, and the industrial specification. Second, the large language model in the domain expert sub-intelligent agents is used to determine whether the tasks to be processed involve industrial simulation based on the current context. If so, the local code script corresponding to the tasks to be processed is called. Then, the local code script is scheduled to a container created using a containerized physical isolation sandbox, and the permission control module is used to compare the local code script with the preset tool whitelist. When the comparison is successful, the calculation result is determined based on the local code script and the load data, and the calculation result is set as the task execution result. The execution results of each task are then sent to the main intelligent agent. Finally, the multi-source dataset is determined by the main intelligent agent and the execution results of each task. The ACP proxy encapsulation module is called to construct JSON semantic instructions based on the multi-source dataset, and then the JSON semantic instructions are used to manage the water plant cluster. This improves the efficiency of water plant cluster management based on large language models and intelligent agents, thereby enhancing the user experience. Attached Figure Description
[0019] 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 embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0020] Figure 1 This application discloses a flowchart of a water plant cluster management method based on a large language model and intelligent agents. Figure 2 This is a schematic diagram of a specific multi-agent architecture based on a star-shaped multidimensional command network disclosed in this application; Figure 3 This application discloses a flowchart of a specific physical isolation sandbox and permission stripping mechanism. Figure 4 This is a schematic diagram illustrating a specific progressive skill pack loading and execution sequence disclosed in this application; Figure 5 This is a schematic diagram of a water plant cluster management device based on a large language model and intelligent agents disclosed in this application. Figure 6 This is a structural diagram of an electronic device disclosed in this application. Detailed Implementation
[0021] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0022] The design and training of large models aim to provide more powerful and accurate model performance to handle more complex and massive datasets or tasks. High-quality labeled data is essential for achieving this, and improving the accuracy of the labeled data provided for large models is a pressing issue. To address this, this application provides a water plant cluster management method based on a large language model and intelligent agents. This method improves the accuracy of labeled data through two data labeling processes and consistency rate calculations, allowing the large model to be trained on more accurate labeled data, thereby increasing the accuracy of the trained large model's output.
[0023] See Figure 1 As shown in the figure, this invention discloses a water plant cluster management method based on a large language model and intelligent agents, including: Step S11: The main intelligent agent receives the tasks to be processed corresponding to the water plant cluster and sends the corresponding asynchronous call messages including load data to each domain expert sub-intelligent agent. Then, the current context is determined by each domain expert sub-intelligent agent, the asynchronous call messages, the preset YAML metadata dictionary and the industrial specification.
[0024] In this embodiment, the system corresponding to this application includes: a coordinator and multiple domain expert sub-agents; wherein, the coordinator is configured as an event routing and decision-making hub, and when it receives a complex physical event, it concurrently calls multiple domain expert sub-agents through a non-blocking star-shaped multidimensional command network; and the domain expert sub-agents are configured to concurrently execute diagnostic or decision-making tasks in their respective professional domains and return the execution results to the coordinator. Subsequently, the coordinator is further configured to listen to the return messages of each sub-node and then perform result weaving and overall decision-making.
[0025] Furthermore, the embodiments of this application also include a dual-defense security module: First, a containerized physical isolation sandbox: configured to force the script to be allocated to an independent sandbox that is completely cut off from network outreach and server file system when the sub-agent needs to execute complex prediction or calculation scripts; Second, an access control module: configured to strip unauthorized operations in the skill configuration of the underlying engine by using role-based access control (RBAC) to prevent unauthorized control from the physical and interface levels.
[0026] In addition, each domain expert sub-agent is configured with a boundary constraint ontology based on the SOUL specification. This ontology includes hard constraint configurations in four dimensions: CoreTruths, Boundaries, Vibe, and Continuity. These constraints enforce that the sub-agents only respond and work within their highly convergent domain of expertise.
[0027] It is worth mentioning that the domain expert sub-agent adopts a progressive skill package loading and deterministic execution architecture: a lightweight YAML metadata description is resident in memory. When a specific intent condition is triggered, this embodiment needs to dynamically load the complete industrial specification and manufacturer manual. When the large language model triggers an intent involving industrial inference and precise calculation, this embodiment can directly call the deterministic local code script in the skill package to execute, and replace the calculation output of the language model with the code execution result.
[0028] This application embodiment also includes an ACP (AgentContextProtocol) proxy encapsulation module, used to encapsulate external or legacy industrial control systems into proxy objects conforming to the intelligent agent invocation specification, enabling the main intelligent agent to dispatch standard commands to remote industrial control networks across physical boundaries. Figure 2 This is a schematic diagram of a multi-agent architecture based on a star-shaped multidimensional command network. It is used to illustrate the star topology structure in which the main agent (Coordinator) concurrently schedules multiple domain expert sub-agents. After the SCADA system reports a complex physical event, the main agent can simultaneously distribute tasks to sub-agents such as process, electromechanical, and finance through a non-blocking call mechanism. Each sub-agent executes the task in parallel and returns the results. Then, the main agent is used to weave the results and make overall decisions.
[0029] Specifically, determining the current context using domain expert sub-agents, asynchronous call messages, a pre-defined YAML metadata dictionary, and industry specifications can include: The main agent receives the tasks to be processed corresponding to the water plant cluster and uses a non-blocking star-shaped multidimensional command network to send asynchronous call messages corresponding to the tasks to be processed to the domain expert sub-agents; the asynchronous call messages include event type identifiers and load data; the domain expert sub-agents send the asynchronous call messages to a pre-interceptor, which then reads the boundary constraint ontology file stored in memory to determine whether the load data is within the capability boundaries of the domain expert sub-agents; the boundary constraint ontology file includes a capability boundary list; the capability boundary list records the professional domain types that the domain expert sub-agents are prohibited from responding to and the keywords for prohibited operations; if the load data is not within the capability boundaries of the domain expert sub-agents, the pre-interceptor refuses to respond to the asynchronous call message and terminates task execution; if the load data is within the capability boundaries of the domain expert sub-agents, the pre-interceptor allows the load data to proceed.
[0030] In one specific implementation, within a typical smart water plant environment, this embodiment deploys a central control room coordinator as the brain, with subordinate process agents, electromechanical agents, financial agents, etc. When the water plant's SCADA system reports the complex event of "excessive vibration and reduced flow rate of pumps at secondary pump station No. 2," the coordinator no longer performs sequential, step-by-step processing but instead initiates a non-blocking call using the AgentSend mechanism: At the same time, a command is sent to the electromechanical intelligent agent: "Analyze the vibration spectrum of the water pump and the historical wear data of the bearing."
[0031] At the same time, a command is sent to the process intelligence agent: "Analyze the subsequent impact of the reduced flow rate on the water level in the clear water tank and the resistance of the pipeline network."
[0032] At the same time, a command is sent to the financial intelligence agent: "Estimate the change in energy consumption cost when switching to the standby pump if the pump is shut down for maintenance."
[0033] Each sub-agent can work in parallel and summarize the report to the main agent in a very short time. The main agent then formulates the decision: "It is recommended to immediately shut down pump No. 2 and start standby pump No. 3. This solution can guarantee the water supply pressure in terms of process, and the increase in energy consumption cost is within the allowable range."
[0034] In this embodiment, the present application adopts a hybrid execution scheme and boundary constraints to eliminate illusions. That is, this embodiment demonstrates how the SOUL specification and deterministic execution can be combined. First, by defining the SOUL.md of the electromechanical agent, its "Boundaries" are hard-coded as "only handling electrical, mechanical, and equipment maintenance issues. Absolutely prohibiting any operational advice on water quality indicators (such as turbidity and residual chlorine)".
[0035] Furthermore, when a user or the main intelligent agent inquires about water quality, the electromechanical intelligent agent immediately triggers an interception strategy, responds, and redirects the question back. Secondly, the system employs a progressive disclosure architecture. Normally, the electromechanical intelligent agent only retains a YAML directory dictionary with very low tokens in the context. However, upon confirming a pump surge, this embodiment of the application needs to instantly inject the complete anti-surge manufacturer's manual for the corresponding pump model into the context.
[0036] Specifically, determining the current context using domain expert sub-agents, asynchronous call messages, a preset YAML metadata dictionary, and industry manuals can include: using domain expert sub-agents and based on the preset YAML metadata dictionary to perform intent keyword matching on the load data, obtaining intent keyword matching results; if the intent keyword matching result indicates a match with an intent keyword, then determining the storage path of the industry manual corresponding to the preset YAML metadata dictionary, and calling the dynamic loader to store the corresponding industry manual in the current context based on the industry manual storage path; wherein, the preset YAML metadata dictionary includes skill names, trigger intent keywords, and corresponding industry manual storage paths.
[0037] Step S12: Utilize the large language model in the domain expert sub-agent and determine, based on the current context, whether the task to be processed involves industrial simulation. If so, call the local code script corresponding to the task to be processed.
[0038] It is worth mentioning that when deriving specific anti-surge intervention curves, the agent does not directly answer the derivation results in natural language. Instead, after recognizing the calculation intention, it invokes the mounted local anti_surge_calc.py script to pass in sensor data as input parameters. Then, it uses deterministic calculus and linear programming equations to obtain the control parameters and feeds the results back to the user, thereby completely eliminating the risk of AI miscalculating.
[0039] Specifically, the large language model in the domain expert sub-agent is used to determine whether the task to be processed involves industrial simulation based on the current context. If so, the local code script corresponding to the task to be processed is invoked. This may include: using the large language model in the domain expert sub-agent to read the corresponding industrial instruction manual text segment and load data in the current context; identifying whether the load data includes industrial simulation intent features with numerical calculation, curve prediction, and parameter optimization requirements; if the load data includes industrial simulation intent features, it is determined that the task to be processed involves industrial simulation, and sensor values in the load data are extracted, and then the local code script corresponding to the task to be processed is determined based on the sensor values; if the load data does not include industrial simulation intent features, it is determined that the task to be processed does not involve industrial simulation, and the corresponding natural language inference result is generated based on the current context, and then the natural language inference result is set as the task execution result.
[0040] Step S13: Schedule the local code script to a container created using a containerized physical isolation sandbox, and use the permission control module to compare the local code script with the preset tool whitelist. When the comparison passes, determine the calculation result based on the local code script and the load data, set the calculation result as the task execution result, and send each task execution result to the main intelligent agent.
[0041] In this embodiment, Figure 3 The flowchart shows the physical isolation sandbox and the permission separation mechanism. Figure 3 The mechanism for implementing the dual security defenses was demonstrated, in which, Figure 3 It details the entire process from the agent calling a complex script, through RBAC permission checks, code analysis, physical isolation of Docker containers, disconnection from the network and file system, script execution, to the final return of a secure result, as well as the security protection path of permission interception and malicious code rejection.
[0042] It is worth mentioning that in industrial control, it is extremely dangerous for AI to directly generate and run code. Therefore, this system employs two lines of defense: the first line of defense is RBAC permission isolation. In the skill configuration file (SkillConfig) of the process intelligence agent, this embodiment only configures the SCADA_READ_ONLY tool permission. In this way, even if the large model generates a JSON call instruction for "closing the water inlet valve" due to illusion, the underlying engine will directly intercept and report an error when parsing the tool permission. The second line of defense is a containerized physical isolation sandbox (Multi-Agent Sandbox).
[0043] Furthermore, when the financial intelligence agent needs to predict peak and off-peak electricity prices and water consumption for the water plant over the next 24 hours and run a complex scheduling optimization Python script, this script needs to be deployed to a temporarily generated Docker container for execution. It's worth noting that this container uses Linux namespace technology to cut off external network access and mounts (or isolates) the host machine's core file system in read-only mode. After calculating the scheduling timetable, this embodiment of the application needs to destroy the container and only return the calculation result string to the intelligence agent.
[0044] Specifically, the local code script is scheduled into a container created using a containerized physical isolation sandbox. The permission control module compares the local code script with a pre-defined tool whitelist. If the comparison passes, the calculation result is determined based on the local code script and load data, and this result is set as the task execution result. The execution results of each task are then sent to the main agent. This process can include: creating a container with an isolated execution environment using a containerized physical isolation sandbox and Docker API requests; the container must not have external network access; scheduling the local code script and its corresponding dependencies into the container; comparing the local code script with the pre-defined tool whitelist using the tool permission interceptor in the permission control module; if the comparison result indicates a successful comparison, determining a deterministic calculation result using the local code script and sensor values from the load data, and setting this deterministic calculation result as the model inference result corresponding to the large language model; setting the model inference result as the task execution result corresponding to the domain expert sub-agent; and asynchronously sending the execution results of each task back to the main agent, then automatically destroying the container.
[0045] Furthermore, in this embodiment of the application, the tool permission interceptor in the permission control module is used in the container to compare the local code script with the preset tool whitelist to obtain the comparison result. The specific technical means are as follows: determine the engine skill configuration file of each domain expert sub-agent, and extract the corresponding preset tool whitelist from the engine skill configuration file; the preset tool whitelist records the set of tool names that are allowed to be called by the domain expert sub-agent; use the parsing engine in the domain expert sub-agent to parse the asynchronous call message to obtain the tool name corresponding to the local code script; compare the tool name with the preset tool whitelist. If the comparison result indicates that the tool name exists in the preset tool whitelist, the execution of the local code script is allowed; if the tool name does not exist in the preset tool whitelist, the execution of the local code script is refused, and the corresponding unauthorized behavior log is recorded.
[0046] Step S14: Use the main intelligent agent and the execution results of each task to determine the multi-source dataset, call the ACP proxy encapsulation module and construct JSON semantic instructions based on the multi-source dataset, and then use the JSON semantic instructions to manage the water plant cluster.
[0047] In this embodiment, Figure 4 This is a schematic diagram illustrating the loading and execution sequence of progressive skill packs, and Figure 4 This application demonstrates a hybrid execution architecture that eliminates the "idealistic fantasy" of traditional science fiction. Specifically, the embodiments of this application describe the complete temporal flow from user request, large language model intent recognition, YAML metadata query, progressive skill pack loading, deterministic code script invocation to the return of precise calculation results in the form of sequence diagrams, thereby reflecting the innovative architecture of "large model responsible for intent triggering, and deterministic script taking over core computation".
[0048] Furthermore, when deciding to overhaul Pump No. 2, this embodiment of the application can combine the above architecture with the main intelligent agent to issue work orders. Since the water plant uses an outdated EAM (Enterprise Asset Management) system, the main intelligent agent calls a proxy component that conforms to the ACP (Agent Context Protocol). This component internally converts the intelligent agent's JSON semantic instructions into an old version of SOAP protocol or database write operations that the EAM system can recognize, thereby successfully achieving secure instruction issuance across systems and physical networks.
[0049] Specifically, the process involves using the main intelligent agent and the execution results of each task to determine a multi-source dataset. This is followed by invoking the ACP proxy encapsulation module to construct JSON semantic instructions based on the multi-source dataset. The JSON semantic instructions are then used to manage the water plant cluster. This process includes: aligning the execution results of each task with timestamps and event types using the main intelligent agent to obtain a structured multi-source dataset; processing the multi-source dataset using a pre-defined decision fusion model to obtain a comprehensive decision result; the comprehensive decision result includes action fields and action parameters; when the comprehensive decision result includes actions to issue standard instructions to a remote industrial control network, the main intelligent agent invokes the ACP proxy encapsulation module to construct JSON semantic instructions conforming to the agent invocation specification based on the action fields and parameters in the comprehensive decision result; passing the JSON semantic instructions to a protocol conversion proxy object corresponding to the target industrial control system; converting the JSON semantic instructions into industrial control system protocol fields using the protocol conversion proxy object and a pre-defined instruction-protocol field mapping table to obtain converted protocol data; and encapsulating the protocol data using a pre-defined adapter to establish a protocol stack and obtain corresponding standard instructions for managing the water plant cluster.
[0050] As can be seen from the above, the embodiments of this application first require the main intelligent agent to receive the tasks to be processed corresponding to the water plant cluster and send the corresponding asynchronous call messages including load data to the domain expert sub-intelligent agents. Then, the current context is determined by the domain expert sub-intelligent agents, the asynchronous call messages, the preset YAML metadata dictionary, and the industrial specification. Second, the large language model in the domain expert sub-intelligent agents is used to determine whether the tasks to be processed involve industrial simulation based on the current context. If so, the local code script corresponding to the tasks to be processed is called. Then, the local code script is scheduled to a container created using a containerized physical isolation sandbox, and the permission control module is used to compare the local code script with the preset tool whitelist. When the comparison is successful, the calculation result is determined based on the local code script and the load data, and the calculation result is set as the task execution result. The execution results of each task are then sent to the main intelligent agent. Finally, the multi-source dataset is determined by the main intelligent agent and the execution results of each task. The ACP proxy encapsulation module is called to construct JSON semantic instructions based on the multi-source dataset. Then, the JSON semantic instructions are used to manage the water plant cluster. This improves the efficiency of water plant cluster management based on large language models and intelligent agents, thereby enhancing the user experience.
[0051] Accordingly, see Figure 5 As shown, this application also provides a water plant cluster management device based on a large language model and intelligent agents, including: The current context determination module 11 is used to receive the pending tasks corresponding to the water plant cluster using the main intelligent agent, and send the corresponding asynchronous call messages including load data to each domain expert sub-intelligent agent. Then, the current context is determined using each domain expert sub-intelligent agent, the asynchronous call messages, the preset YAML metadata dictionary and the industrial specification. The code script determination module 12 is used to determine whether the task to be processed involves industrial simulation based on the large language model in the domain expert sub-agent and the current context. If so, the local code script corresponding to the task to be processed is called. The task execution result generation module 13 is used to schedule the local code script to a container created using a containerized physical isolation sandbox, and use the permission control module to compare the local code script with a preset tool whitelist. When the comparison is successful, the calculation result is determined based on the local code script and the load data, and the calculation result is set as the task execution result. The task execution results are then sent to the main intelligent agent. The semantic instruction generation module 14 is used to determine a multi-source dataset using the main intelligent agent and the execution results of each task, to call the ACP proxy encapsulation module and construct JSON semantic instructions based on the multi-source dataset, and then use the JSON semantic instructions to manage the water plant cluster.
[0052] In some specific embodiments, the current context determination module 11 may specifically include: An asynchronous call message generation unit is used to receive the pending tasks corresponding to the water plant cluster using the main intelligent agent, and to issue asynchronous call messages corresponding to the pending tasks to the expert sub-intelligent agents in various domains using a non-blocking star-shaped multidimensional command network; the asynchronous call message includes an event type identifier and load data; An asynchronous call message delivery unit is used to deliver the asynchronous call message to a pre-interceptor using each of the domain expert sub-agents. The pre-interceptor then reads a boundary constraint ontology file stored in memory to determine whether the load data is within the capability boundary of the domain expert sub-agent. The boundary constraint ontology file includes a capability boundary list. The capability boundary list records the professional domain types and keywords that the domain expert sub-agents prohibit from responding to. The task execution termination unit is used to refuse to respond to the asynchronous call message and terminate task execution by using the pre-interceptor if the load data is not within the capability boundary of the domain expert sub-agent. The load data release unit is used to release the load data using the pre-interceptor if the load data is located within the capability boundary of the domain expert sub-agent.
[0053] In some specific embodiments, the current context determination module 11 may specifically include: The intent keyword matching result determination unit is used to perform intent keyword matching on the load data using each of the domain expert sub-agents and based on a preset YAML metadata dictionary, and obtain intent keyword matching results. An industrial instruction manual storage unit is used to determine the industrial instruction manual storage path corresponding to the preset YAML metadata dictionary if the intent keyword matching result indicates that the intent keyword is matched, and to call the dynamic loader to store the corresponding industrial instruction manual in the current context based on the industrial instruction manual storage path; wherein, the preset YAML metadata dictionary includes skill name, trigger intent keyword and corresponding industrial instruction manual storage path.
[0054] In some specific embodiments, the code script determination module 12 may specifically include: The current context reading unit is used to read the corresponding industrial instruction manual text segment and the load data in the current context using the large language model in the domain expert sub-agent; An industrial simulation intent feature identification unit is used to identify whether the load data includes industrial simulation intent features with requirements for numerical calculation, curve prediction, and parameter optimization. The local code script determination unit is used to determine that the task to be processed involves industrial simulation if the load data includes industrial simulation intent features, extract sensor values from the load data, and then determine the local code script corresponding to the task to be processed based on the sensor values. The natural language reasoning result generation unit is used to determine that the task to be processed does not involve industrial inference if the load data does not include the industrial inference intent feature, and to generate a corresponding natural language reasoning result based on the current context, and then set the natural language reasoning result as the task execution result.
[0055] In some specific embodiments, the task execution result generation module 13 may specifically include: A container creation unit is used to create containers, including isolated execution environments, using a containerized physical isolation sandbox and Docker API requests; the containers do not have external network access permissions. The comparison result generation unit is used to schedule the local code script and its corresponding dependent environment to the container, so that the local code script can be compared with the preset tool whitelist by the tool permission interceptor in the permission control module in the container to obtain the comparison result; The model inference result generation unit is used to determine a deterministic calculation result based on the sensor values in the load data using the local code script if the comparison result characterization comparison passes, and set the deterministic calculation result as the model inference result corresponding to the large language model; The task execution result generation unit is used to set the model inference result as the task execution result corresponding to the domain expert sub-agent, and send each task execution result to the main agent asynchronously, and then automatically destroy the container.
[0056] In some specific embodiments, the task execution result generation module 13 may specifically include: The preset tool whitelist extraction unit is used to determine the engine skill configuration file of each domain expert sub-agent and extract the corresponding preset tool whitelist from the engine skill configuration file; the preset tool whitelist records a set of tool names that are allowed to be called by the domain expert sub-agent. An asynchronous call message parsing unit is used to parse the asynchronous call message using the parsing engine in the domain expert sub-agent to obtain the tool name corresponding to the local code script; The whitelist comparison unit is used to compare the tool name with the preset tool whitelist. If the comparison result indicates that the tool name exists in the preset tool whitelist, the execution of the local code script is allowed; if the tool name does not exist in the preset tool whitelist, the execution of the local code script is refused, and the corresponding unauthorized behavior log is recorded.
[0057] In some specific embodiments, the semantic instruction generation module 14 may specifically include: A multi-source dataset generation unit is used to align the timestamps and event types of the execution results of each task using the main intelligent agent to obtain a structured multi-source dataset. Then, a preset decision fusion model is used to process the multi-source dataset to obtain a comprehensive decision result. The comprehensive decision result includes action fields and action parameters. The JSON semantic instruction construction unit is used to construct JSON semantic instructions that conform to the agent calling specification based on the action fields and parameters in the overall decision result when the overall decision result includes the action of issuing standard instructions to the remote industrial control network. The protocol conversion proxy object determination unit is used to pass the JSON semantic instruction to the protocol conversion proxy object corresponding to the target industrial control system, and then use the protocol conversion proxy object and a preset instruction and protocol field mapping table to convert the JSON semantic instruction into industrial control system protocol fields to obtain the converted protocol data. The standard instruction generation unit is used to encapsulate the protocol data into a protocol stack and establish a session using a preset adapter to obtain corresponding standard instructions, so as to manage the water plant cluster based on the standard instructions.
[0058] Furthermore, embodiments of this application also disclose an electronic device, Figure 6 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of this application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the water plant cluster management method based on a large language model and intelligent agents disclosed in any of the foregoing embodiments. Furthermore, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0059] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.
[0060] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored thereon can include operating system 221, computer program 222, etc., and the storage method can be temporary storage or permanent storage.
[0061] The operating system 221 is used to manage and control the various hardware devices on the electronic device 20 and the computer program 222, which may be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program capable of performing the water plant cluster management method based on a large language model and intelligent agents, which is executed by the electronic device 20 according to any of the foregoing embodiments, the computer program 222 may further include computer programs capable of performing other specific tasks.
[0062] Furthermore, this application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned water plant cluster management method based on a large language model and intelligent agents. Specific steps of this method can be found in the corresponding content disclosed in the foregoing embodiments, and will not be repeated here.
[0063] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.
[0064] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0065] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0066] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, 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 limitations, 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.
[0067] The technical solutions provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A water plant cluster management method based on a large language model and intelligent agents, characterized in that, include: The main intelligent agent receives the tasks to be processed corresponding to the water plant cluster and sends out the corresponding asynchronous call messages including load data to the domain expert sub-intelligent agents. Then, the current context is determined by the domain expert sub-intelligent agents, the asynchronous call messages, the preset YAML metadata dictionary and the industrial specification. Using the large language model in the domain expert sub-agent and based on the current context, determine whether the task to be processed involves industrial simulation. If so, call the local code script corresponding to the task to be processed. The local code script is scheduled to a container created using a containerized physical isolation sandbox, and the permission control module compares the local code script with a preset tool whitelist. When the comparison passes, the calculation result is determined based on the local code script and the load data, and the calculation result is set as the task execution result. The execution results of each task are then sent to the main intelligent agent. The main intelligent agent and the execution results of each task are used to determine a multi-source dataset, so as to call the ACP proxy encapsulation module and construct JSON semantic instructions based on the multi-source dataset. Then, the JSON semantic instructions are used to manage the water plant cluster.
2. The water plant cluster management method based on a large language model and intelligent agents according to claim 1, characterized in that, The process of determining the current context using the aforementioned domain expert sub-agents, the asynchronous call messages, the preset YAML metadata dictionary, and the industry specification includes: The main intelligent agent receives the tasks to be processed corresponding to the water plant cluster, and uses a non-blocking star-shaped multidimensional command network to send asynchronous call messages corresponding to the tasks to be processed to the expert sub-intelligent agents in various fields; the asynchronous call messages include event type identifiers and load data; The asynchronous call message is sent to a pre-interceptor by each of the domain expert sub-agents. The pre-interceptor then reads the boundary constraint ontology file stored in memory to determine whether the load data is within the capability boundary of the domain expert sub-agent. The boundary constraint ontology file includes a capability boundary list. The capability boundary list is used to record the professional domain types that the domain expert sub-agent prohibits from responding to and the keywords of the prohibited operations. If the load data is not within the capability boundary of the domain expert sub-agent, then the pre-interceptor is used to refuse to respond to the asynchronous call message and terminate the task execution; If the load data is within the capability boundary of the domain expert sub-agent, then the load data is allowed to pass using the pre-interceptor.
3. The water plant cluster management method based on a large language model and intelligent agents according to claim 1, characterized in that, The process of determining the current context using the aforementioned domain expert sub-agents, the asynchronous call messages, the preset YAML metadata dictionary, and the industry specification includes: The intent keyword matching results are obtained by using the domain expert sub-agents and based on a preset YAML metadata dictionary to perform intent keyword matching on the payload data. If the intent keyword matching result indicates that an intent keyword is matched, then the industrial manual storage path corresponding to the preset YAML metadata dictionary is determined, and the dynamic loader is called to store the corresponding industrial manual in the current context based on the industrial manual storage path. The preset YAML metadata dictionary includes skill names, trigger intent keywords, and the corresponding industrial instruction manual storage path.
4. The water plant cluster management method based on a large language model and intelligent agents according to claim 1, characterized in that, The process of utilizing the large language model in the domain expert sub-agent and determining whether the task to be processed involves industrial simulation based on the current context, and if so, invoking the local code script corresponding to the task to be processed, includes: The large language model in the domain expert sub-agent is used to read the corresponding industrial instruction manual text segment and the load data in the current context; Identify whether the load data includes industrial simulation intent features with requirements for numerical calculation, curve prediction, and parameter optimization; If the load data includes industrial simulation intent features, it is determined that the task to be processed involves industrial simulation, and sensor values in the load data are extracted. Then, based on the sensor values, the local code script corresponding to the task to be processed is determined. If the load data does not include the industrial simulation intent feature, it is determined that the task to be processed does not involve industrial simulation, and a corresponding natural language inference result is generated based on the current context. Then, the natural language inference result is set as the task execution result.
5. The water plant cluster management method based on a large language model and intelligent agents according to claim 1, characterized in that, The process of scheduling the local code script into a container created using a containerized physical isolation sandbox, comparing the local code script with a preset tool whitelist using an access control module, determining the calculation result based on the local code script and the load data when the comparison passes, setting the calculation result as the task execution result, and sending each task execution result to the main intelligent agent includes: A container with an isolated execution environment is created using a containerized physical isolation sandbox and Docker API requests; the container does not have external network access. The local code script and its corresponding dependent environment are scheduled into the container, so that the tool permission interceptor in the permission control module can be used in the container to compare the local code script with the preset tool whitelist and obtain the comparison result. If the comparison result indicates that the comparison is successful, the deterministic calculation result is determined using the local code script and based on the sensor values in the load data, and the deterministic calculation result is set as the model inference result corresponding to the large language model; The model inference result is set as the task execution result corresponding to the domain expert sub-agent, and each task execution result is sent back to the main agent asynchronously, and then the container is automatically destroyed.
6. The water plant cluster management method based on a large language model and intelligent agents according to claim 5, characterized in that, The local code script is compared with a preset tool whitelist using the tool permission interceptor in the permission control module within the container, and the comparison results are obtained, including: Determine the engine skill configuration file for each of the domain expert sub-agents, and extract the corresponding preset tool whitelist from the engine skill configuration file; the preset tool whitelist records a set of tool names that are allowed to be called by the domain expert sub-agents. The asynchronous call message is parsed using the parsing engine in the domain expert sub-agent to obtain the tool name corresponding to the local code script; The tool name is compared with the preset tool whitelist. If the comparison result indicates that the tool name exists in the preset tool whitelist, the execution of the local code script is allowed; if the tool name does not exist in the preset tool whitelist, the execution of the local code script is refused, and the corresponding unauthorized behavior log is recorded.
7. The water plant cluster management method based on large language models and intelligent agents according to any one of claims 1 to 6, characterized in that, The process involves determining a multi-source dataset using the main intelligent agent and the execution results of each task, invoking the ACP proxy encapsulation module to construct JSON semantic instructions based on the multi-source dataset, and then using the JSON semantic instructions to manage the water plant cluster, including: The main intelligent agent aligns the execution results of each task with timestamps and event types to obtain a structured multi-source dataset. Then, a preset decision fusion model is used to process the multi-source dataset to obtain a comprehensive decision result. The comprehensive decision result includes action fields and action parameters. When the overall decision result includes the action of issuing standard instructions to a remote industrial control network, the main intelligent agent calls the ACP proxy encapsulation module to construct JSON semantic instructions that conform to the intelligent agent calling specification based on the action fields and parameters in the overall decision result; The JSON semantic instructions are passed to the protocol conversion proxy object corresponding to the target industrial control system. Then, the protocol conversion proxy object is used to convert the JSON semantic instructions into industrial control system protocol fields based on a preset instruction and protocol field mapping table to obtain the converted protocol data. The protocol data is encapsulated into a protocol stack and a session is established using a preset adapter to obtain corresponding standard instructions, which are then used to manage the water plant cluster.
8. A water plant cluster management device based on a large language model and intelligent agents, characterized in that, include: The current context determination module is used to receive the pending tasks corresponding to the water plant cluster using the main intelligent agent, and send the corresponding asynchronous call messages including load data to each domain expert sub-intelligent agent. Then, the current context is determined using each domain expert sub-intelligent agent, the asynchronous call messages, the preset YAML metadata dictionary and the industrial specification. The code script determination module is used to determine whether the task to be processed involves industrial simulation based on the large language model in the domain expert sub-agent and the current context. If so, the local code script corresponding to the task to be processed is called. The task execution result generation module is used to schedule the local code script to a container created using a containerized physical isolation sandbox, and use the permission control module to compare the local code script with a preset tool whitelist. When the comparison is successful, the calculation result is determined based on the local code script and the load data, and the calculation result is set as the task execution result. The task execution results are then sent to the main intelligent agent. The semantic instruction generation module is used to determine a multi-source dataset using the main intelligent agent and the execution results of each task, to call the ACP proxy encapsulation module and construct JSON semantic instructions based on the multi-source dataset, and then use the JSON semantic instructions to manage the water plant cluster.
9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor is configured to execute the computer program to implement the water plant cluster management method based on a large language model and intelligent agents as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, Used to store computer programs, wherein the computer programs, when executed by a processor, implement the water plant cluster management method based on a large language model and intelligent agents as described in any one of claims 1 to 7.