Block chain operation and maintenance task processing method and system, central control equipment and management equipment
By introducing AI agents and an operations and maintenance knowledge base, the system automatically decomposes and executes the operations and maintenance tasks of the blockchain system, solving the problems of high barriers to entry and high labor costs in operations and maintenance, and realizing intelligent operations and maintenance and dynamic fault tolerance capabilities.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HANGZHOU HIGH-TECH ZONE (BINJIANG) INSTITUTE OF BLOCKCHAIN & DATA SECURITY
- Filing Date
- 2025-12-05
- Publication Date
- 2026-04-21
AI Technical Summary
When blockchain systems face maintenance tasks such as starting and stopping nodes, upgrading nodes, or updating configurations, maintenance personnel need to manually write and maintain complex script files, resulting in high maintenance thresholds and high labor costs.
By introducing AI agents and an operations and maintenance knowledge base, operations and maintenance tasks can be automatically decomposed and executed through AI agents, thereby reducing the barriers to entry and labor costs for operations and maintenance.
Maintenance personnel do not need to write complex script files; they can simply issue tasks using natural language. The maintenance control equipment and node management equipment automatically execute maintenance tasks through artificial intelligence agents, reducing the maintenance threshold and labor costs, and possessing dynamic fault tolerance and self-healing capabilities.
Smart Images

Figure CN121907663A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of blockchain technology, and in particular to a blockchain operation and maintenance task processing method, system, operation and maintenance control equipment, and node management equipment. Background Technology
[0002] Currently, when blockchain systems face operational tasks such as node startup / shutdown, node upgrades, or node configuration updates, operations and maintenance personnel typically need to manually compose and execute script files using automated tools like Ansible and SaltStack, or self-developed Shell / Python script libraries, based on task requirements. This process requires operations and maintenance personnel to manually break down a high-level natural language task into a long series of specific atomic commands and write and maintain the corresponding script files. This places high demands on the professional knowledge of operations and maintenance personnel, leading to high operational and maintenance barriers and high labor costs in blockchain systems. Summary of the Invention
[0003] In view of this, embodiments of this application provide a blockchain operation and maintenance task processing method, system, operation and maintenance central control equipment, and node management equipment. By introducing artificial intelligence agents and operation and maintenance knowledge bases, operation and maintenance tasks can be automatically decomposed and executed, thereby reducing the operation and maintenance threshold and labor costs of blockchain systems.
[0004] A first aspect of this application provides a blockchain operation and maintenance task processing method, which is applied to an operation and maintenance central control device with deployed artificial intelligence agents. The method includes: When an operation and maintenance task is received for a target blockchain node, an AI agent loads an operation and maintenance knowledge base that includes system prompts; the system prompts contain information on various blockchain node operation and maintenance procedures that have been collected. Through an AI agent, the communication channel between the established operation and maintenance control equipment and the target node management equipment that deploys the target blockchain node is utilized to execute operation and maintenance tasks by interacting with the target node management equipment under the guidance of system prompts.
[0005] The technical solution of this application embodiment sets up an operation and maintenance control device with an deployed artificial intelligence agent (AI agent). When receiving an operation and maintenance task for a target blockchain node, the control device loads an operation and maintenance knowledge base, including system prompts, through the AI agent. These prompts contain various blockchain node operation and maintenance process information. Then, through the AI agent, using the established communication channel between the control device and the target node management device, guided by the system prompts, the operation and maintenance task is executed by interacting with the target node management device. In this process, the AI agent automatically decomposes high-level natural language tasks into specific atomic commands using the operation and maintenance knowledge base and automatically executes these atomic commands through interaction with the node management device. Therefore, operation and maintenance personnel do not need to write complex script files; they only need to issue the required operation and maintenance tasks using natural language, which greatly reduces the operation and maintenance threshold and labor costs of blockchain systems.
[0006] In one implementation of this application, the operation and maintenance control device is deployed in a public network, the target node management device is deployed in a private network, and the target node management device has an agent program deployed on it; the communication channel is established in the following way: Upon receiving a connection request sent by the target node management device through an agent program, a communication channel is established based on the connection request.
[0007] In one implementation of this application, the system prompt further includes tool invocation instructions; through an artificial intelligence agent, utilizing the established communication channel between the central maintenance control equipment and the target node management equipment where the target blockchain node is deployed, maintenance tasks are executed by interacting with the target node management equipment under the guidance of the system prompt, including: Through an AI agent, the operation and maintenance tasks are broken down into task operation processes in various rounds based on the ReAct loop, and each round of task operation processes is executed sequentially to complete the operation and maintenance tasks. Each round of task operation processes includes a thinking process, an action process, and an observation process. In the thinking process of the current round, the AI agent determines the operation actions to be performed in the current round of task operation processes, guided by the operation and maintenance process information of the blockchain node, or guided by the operation and maintenance process information of the blockchain node and the execution results of the instructions from the previous round. In the action process of the current round, the AI agent generates tool call instructions based on the operation actions, guided by tool call description information, and sends the tool call instructions to the agent program deployed on the target node management device through the communication channel. In the observation process of the current round, the AI agent receives the instruction execution results of the current round, obtained by executing the tool call instructions, returned by the agent program through the communication channel.
[0008] In one implementation of this application, the system prompt further includes information on resolving operational errors; during the process of sequentially executing each round of task operation procedures to complete the operational task, the method further includes: If an error occurs in the execution result of the instruction received by the AI agent during the observation process included in any round of task operation, the AI agent, guided by the operation and maintenance error resolution information and the instruction execution result of that round, will generate task error correction processes for each round based on ReAct, and execute the task error correction processes for each round in sequence.
[0009] In one implementation of this application, the operation and maintenance central control device is connected to multiple node management devices. The operation and maintenance knowledge base also includes node deployment configuration information, which records the blockchain nodes deployed by each node management device. Before executing operation and maintenance tasks by interacting with the target node management device under the guidance of system prompts, using the established communication channel between the operation and maintenance central control device and the target node management device that deploys the target blockchain node through an artificial intelligence agent, the method further includes: Using an AI agent, the target node management device for deploying the target blockchain node is determined from multiple node management devices based on the node deployment configuration information.
[0010] A second aspect of this application provides a blockchain operation and maintenance task processing method, which is applied to a node management device with deployed blockchain nodes, and includes: By utilizing the established communication channel between the node management device and the operation and maintenance control device with deployed artificial intelligence agents, operation and maintenance tasks for blockchain nodes are executed through interaction with the operation and maintenance control device. The operation and maintenance tasks are received by the operation and maintenance control device. When the operation and maintenance control device receives the operation and maintenance task, it loads an operation and maintenance knowledge base including system prompts through the artificial intelligence agent, and executes the operation and maintenance task through interaction with the node management device under the guidance of the system prompts. The system prompts contain information on various blockchain node operation and maintenance procedures that have been collected.
[0011] In one implementation of this application, the node management device is deployed in a private network, the operation and maintenance control device is deployed in a public network, and the node management device has an agent program deployed; the communication channel is established in the following way: Once the agent program starts, it sends a connection request to the operation and maintenance control equipment to instruct the operation and maintenance control equipment to establish a communication channel based on the connection request.
[0012] A third aspect of this application provides a blockchain operation and maintenance task processing device, which is applied to an operation and maintenance central control device with deployed artificial intelligence agents. The device includes: The operation and maintenance knowledge base loading module is used to load an operation and maintenance knowledge base, including system prompts, through an artificial intelligence agent when an operation and maintenance task for a target blockchain node is received. The system prompts contain various blockchain node operation and maintenance process information that has been collected. The operation and maintenance task execution module is used to execute operation and maintenance tasks by interacting with the target node management device under the guidance of system prompts, through the communication channel between the established operation and maintenance central control equipment and the target node management device where the target blockchain node is deployed, using an artificial intelligence agent.
[0013] A fourth aspect of this application provides another blockchain operation and maintenance task processing device, which is applied to a node management device with deployed blockchain nodes, and the device includes: The task interaction execution module is used to execute operation and maintenance tasks for blockchain nodes by interacting with the operation and maintenance control device through the established communication channel between the node management device and the operation and maintenance control device with deployed artificial intelligence agents. The operation and maintenance task is received by the operation and maintenance control device. When the operation and maintenance control device receives the operation and maintenance task, it loads the operation and maintenance knowledge base including system prompt words through the artificial intelligence agent, and executes the operation and maintenance task by interacting with the node management device under the guidance of the system prompt words. The system prompt words contain various blockchain node operation and maintenance process information that have been collected.
[0014] The fifth aspect of this application provides an operation and maintenance central control device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the blockchain operation and maintenance task processing method provided in the first aspect of this application.
[0015] A sixth aspect of this application provides a node management device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the blockchain operation and maintenance task processing method provided in the second aspect of this application.
[0016] The seventh aspect of this application provides a blockchain operation and maintenance task processing system, which includes an operation and maintenance central control device as provided in the fifth aspect of this application and at least one node management device as provided in the sixth aspect of this application.
[0017] The eighth aspect of this application provides a computer program product that, when running on an operation and maintenance control device, causes the operation and maintenance control device to execute the blockchain operation and maintenance task processing method provided in the first aspect of this application; and when running on a node management device, causes the node management device to execute the blockchain operation and maintenance task processing method provided in the second aspect of this application.
[0018] A ninth aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the blockchain operation and maintenance task processing method provided in the first aspect of this application, or implements the blockchain operation and maintenance task processing method provided in the second aspect of this application.
[0019] It is understood that the beneficial effects of aspects two through nine above can be found in the relevant descriptions in aspect one above, and will not be repeated here. Attached Figure Description
[0020] Figure 1 This is a schematic diagram of a blockchain operation and maintenance task processing system provided in an embodiment of this application; Figure 2 This is a flowchart of a blockchain operation and maintenance task processing method provided in an embodiment of this application; Figure 3 This is a schematic diagram of a technical architecture used in the blockchain operation and maintenance task processing method provided in the embodiments of this application; Figure 4 This is a schematic diagram illustrating the operational principle of using an artificial intelligence agent and recursively disassembling maintenance tasks based on ReAct, as provided in an embodiment of this application. Figure 5 This is a schematic diagram of the structure of a blockchain operation and maintenance task processing device provided in an embodiment of this application; Figure 6 This is a schematic diagram of another blockchain operation and maintenance task processing device provided in the embodiments of this application; Figure 7 This is a schematic diagram of an operation and maintenance control device / node management device provided in an embodiment of this application. Detailed Implementation
[0021] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application can also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail. Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only for distinguishing descriptions and should not be construed as indicating or implying relative importance.
[0022] Traditional blockchain system operation and maintenance heavily relies on human experience and pre-written rigid script files. When faced with complex operation and maintenance tasks such as cluster rolling upgrades or new node deployments, operation and maintenance personnel need to rely on expert experience to manually break down the task into a long series of specific atomic commands and write and maintain the corresponding script files. Therefore, current blockchain systems suffer from high operation and maintenance barriers and high labor costs.
[0023] To address the aforementioned technical issues, this application proposes a blockchain operation and maintenance task processing method, system, operation and maintenance central control equipment, and node management equipment. By introducing artificial intelligence agents and an operation and maintenance knowledge base, operation and maintenance tasks can be automatically decomposed and executed, thereby reducing the operation and maintenance threshold and labor costs of blockchain systems. For more specific technical implementation details of this application's embodiments, please refer to the various embodiments described below.
[0024] like Figure 1The diagram illustrates a blockchain operation and maintenance task processing system provided in this application embodiment. The system includes an operation and maintenance central control device and at least one node management device. Each node management device can establish a communication connection with the operation and maintenance central control device via a network or other means. The operation and maintenance central control device, as the central control node of the blockchain operation and maintenance system, is responsible for managing all node management devices. The central control device has deployed an AI Agent driven by a large language model, which loads a rich operation and maintenance knowledge base. It can automatically decompose received high-level, natural language operation and maintenance tasks into specific atomic commands and automatically execute these atomic commands through interaction with the node management devices. Each node management device can deploy one or more blockchain nodes and manage its respective deployed blockchain nodes. When executing operation and maintenance tasks, the node management device can use the established communication channel to receive control commands issued by the operation and maintenance central control device through the AI Agent, and return the corresponding command execution results to the AI Agent of the operation and maintenance central control device through the same communication channel. Additionally, each node management device can deploy an agent program to interact with the AI Agent of the operation and maintenance central control device. Figure 1 Each device shown can be a mobile phone, tablet, wearable device, augmented reality (AR) / virtual reality (VR) device, laptop, desktop computer, ultra-mobile personal computer (UMPC), netbook, and personal digital assistant (PDA), etc., and various other types of electronic devices. The embodiments of this application... Figure 1 There are no restrictions on the specific type of each device shown. Regarding... Figure 1 For the specific working principle of the system shown, please refer to the method embodiment described below.
[0025] Please see Figure 2 This application illustrates a blockchain operation and maintenance task processing method provided in an embodiment, comprising: 201. When the operation and maintenance control equipment receives an operation and maintenance task for the target blockchain node, it loads the operation and maintenance knowledge base, including system prompts, through an artificial intelligence agent. The central control equipment for operations and maintenance (O&M) has deployed an AI Agent, driven by a large language model, responsible for highly intelligent thinking and decision-making. Upon startup, the AI Agent loads a rich O&M knowledge base, which includes system prompts and node deployment configuration information. The system prompts may contain various blockchain node O&M operation procedures, tool call instructions, and error resolution information. The node deployment configuration information includes the blockchain nodes deployed on each node management device, the IP address of each node management device, and the storage path of the node configuration files. The blockchain node O&M operation procedures can be pre-defined based on expert experience, recording the specific steps for various commonly used blockchain node O&M operations, such as steps for blockchain node version upgrades and blockchain node start / stop operations. The tool call instructions provide detailed descriptions of available tool calls. Tool calls are mechanisms in AI applications that allow extending capabilities by calling external tools or functions, commonly used to access real-time data, perform operations, or enhance functionality. The operation and maintenance error resolution information is developed based on the troubleshooting experience of experts and can record the investigation and solutions for various common errors in the field of blockchain system operation and maintenance.
[0026] Each node management device can deploy a lightweight agent. Upon startup, the agent proactively initiates a connection request to the AI Agent or BaaS platform of the central control device to establish a communication channel between the central control device and the node management device. Once the communication channel is established, the agent can use it to wait for control commands from the AI Agent of the central control device and return the results obtained after responding to these commands to the AI Agent of the central control device, thus enabling data interaction between the AI Agent of the central control device and the agent of the node management device. Additionally, the agent provides a set of underlying atomic capabilities (Tools), such as Command (execute shell commands), File-Transfer (file upload / download), Grep (text search), and Blockchain-Query (query chain status), which can be responsible for managing specific blockchain nodes on the node management device.
[0027] As an example. Figure 3 This is a schematic diagram of a technical architecture used in the blockchain operation and maintenance task processing method provided in this application embodiment. Figure 3In this architecture, the central control device deploys an AI Agent driven by a Large Language Model (LLM) as the intelligent brain, while the agent programs deployed on each node management device (host 1 + host 2 + host 3) act as nerve endings. The AI Agent is responsible for high-level "thinking and decision-making," while the host agents are responsible for low-level "perception and execution." The overall architecture adopts a two-tier intelligent operation and maintenance structure. Upon startup, the AI Agent loads a system prompt and node deployment configuration information (DB). The system prompt may include configuration templates, commonly used operation and maintenance operations and their implementation processes, descriptions of available operation and maintenance tools, and solutions to common problems. The node deployment configuration information may contain detailed blockchain node deployment and configuration information. Each node management device is responsible for managing its own blockchain nodes. For example, host 1 manages blockchain nodes node1 and node2, host 2 manages blockchain node3, and host 3 manages blockchain node4. When an operation and maintenance task needs to be performed, the AI Agent interacts with the agent program of the corresponding node management device under the guidance of system prompts through the established communication channel between the operation and maintenance central control device and the corresponding node management device to complete the operation and maintenance task. Please refer to the following text for the specific operation and maintenance task processing process.
[0028] When maintenance operations such as upgrading, starting, stopping, or updating the configuration of a target blockchain node deployed on any node management device are required, maintenance personnel can directly issue high-level, natural language maintenance tasks, such as "Please upgrade the target blockchain node on a certain node management device to version v1.2". When the maintenance control device receives the above maintenance task for the target blockchain node, it starts the AI Agent and loads the aforementioned maintenance knowledge base.
[0029] 202. The operation and maintenance control equipment, through an artificial intelligence agent, utilizes the established communication channel between the operation and maintenance control equipment and the target node management equipment that deploys the target blockchain node to execute operation and maintenance tasks by interacting with the target node management equipment under the guidance of system prompts.
[0030] By analyzing the received maintenance tasks and system prompts in the aforementioned maintenance knowledge base, the AI Agent can determine the routine operation process of the task. After identifying the target node management device for the deployed blockchain node, the AI Agent of the maintenance control device and the agent program of the target node management device interact through the established communication channel as follows: The AI Agent issues corresponding control commands to the agent program according to the determined operation process; the agent program executes the control commands, obtains the corresponding execution results, and returns them to the AI Agent; the AI Agent considers the next control command to be issued based on the received execution results… and so on. Through multiple rounds of cyclical interaction between the AI Agent and the agent program, various basic atomic functions can be combined, such as executing shell commands, uploading / downloading files, text searching, and querying chain status. By combining these atomic functions, various complex maintenance and management operations can be achieved, such as starting, stopping, upgrading, updating configurations, updating certificates, and viewing logs of blockchain nodes, ultimately automating the aforementioned maintenance tasks. As can be seen, the entire process of handling maintenance tasks is completely handled by the AI Agent and the agent program. Maintenance personnel only need to issue the required maintenance tasks using natural language, which greatly reduces the difficulty of operation.
[0031] In one implementation of this application, the operation and maintenance central control device is connected to multiple node management devices. The operation and maintenance knowledge base also includes node deployment configuration information, which records the blockchain nodes deployed by each node management device. Before executing operation and maintenance tasks by interacting with the target node management device under the guidance of system prompts, using the established communication channel between the operation and maintenance central control device and the target node management device that deploys the target blockchain node through an artificial intelligence agent, the method further includes: The operation and maintenance control equipment uses an artificial intelligence agent to determine the target node management device for deploying the target blockchain node from multiple node management devices based on the node deployment configuration information.
[0032] Since the central control and maintenance (O&M) device can connect to multiple node management devices, and different node management devices are used to manage different blockchain nodes, it is necessary to determine which node management device the target blockchain node is deployed on before executing O&M tasks. Specifically, the O&M central control device's AI Agent analyzes the node deployment configuration information in the O&M knowledge base to determine which blockchain nodes are deployed on each node management device, thus identifying the target node management device where the target blockchain node is deployed. Afterward, the O&M central control device's AI Agent can interact with the target node management device's agent program (Agent) through the communication channel to execute the aforementioned O&M tasks.
[0033] In one implementation of this application, the operation and maintenance control device is deployed in a public network, the target node management device is deployed in a private network, and the target node management device has an agent program deployed on it; the communication channel is established in the following way: After receiving a connection request sent by the target node management device through an agent program, the operation and maintenance control equipment establishes a communication channel based on the connection request.
[0034] Typically, the central control and maintenance (O&M) equipment is deployed on a public network, while the individual node management devices are deployed on private networks. Once started, the agent program on the target node management device automatically sends a connection request (e.g., a long-lived connection like WSS or gRPC) from the private network to the AI Agent or BaaS platform on the public network. Upon receiving this connection request, the O&M control and maintenance device's AI Agent establishes a communication channel between the O&M control and maintenance device and the target node management device. This configuration, where the connection request is proactively established from the inside out by the agent program, eliminates the need to open any inbound ports on the firewall for the node management devices on the private network, significantly improving network transmission security.
[0035] When the AI Agent of the operation and maintenance control device and the Agent program of the target node management device collaborate to execute operation and maintenance tasks, they do not generate all the scripts required to complete the operation and maintenance tasks at once. Instead, they use the ReAct (Reasoning and Acting) loop to break down the operation and maintenance tasks into task operation processes of each round, and dynamically and step by step execute all rounds of task operation processes to complete the operation and maintenance tasks. For a detailed description of the operation process, please refer to the following text.
[0036] In one implementation of this application, the system prompt further includes tool invocation instructions; through an artificial intelligence agent, utilizing the established communication channel between the central maintenance control equipment and the target node management equipment where the target blockchain node is deployed, maintenance tasks are executed by interacting with the target node management equipment under the guidance of the system prompt, including: The operation and maintenance control equipment uses an AI agent to break down operation and maintenance tasks into various rounds of task operation processes based on the ReAct loop, and executes each round of task operation processes sequentially to complete the operation and maintenance tasks. Each round of task operation processes includes a thinking process, an action process, and an observation process. In the thinking process of the current round, the AI agent determines the operation actions to be performed in the current round of task operation processes, guided by the operation and maintenance operation process information of the blockchain node, or guided by the operation and maintenance operation process information of the blockchain node and the instruction execution results of the previous round. In the action process of the current round, the AI agent generates tool call instructions based on the operation actions, guided by tool call description information, and sends the tool call instructions to the agent program deployed on the target node management device through the communication channel. In the observation process of the current round, the AI agent receives the instruction execution results of the current round, obtained by executing the tool call instructions, returned by the agent program through the communication channel.
[0037] The AI Agent for the operation and maintenance control equipment adopts the ReAct loop principle, which breaks down operation and maintenance tasks into task operation processes in various rounds. The operation and maintenance task can be completed by executing the task operation processes in each round in sequence. Referring to the ReAct loop principle, each round of task operation process includes a thought process, an action process, and an observation process. For the thought process of the current round, the AI Agent uses the blockchain node operation and maintenance operation process information described above as a guide, or uses the blockchain node operation and maintenance operation process information and the instruction execution result of the previous round as a guide (specifically, if the current round is the first round, only the blockchain node operation and maintenance operation process information is used as a guide; if the current round is not the first round, the blockchain node operation and maintenance operation process information and the instruction execution result of the previous round are used as a guide) to determine the operation actions that need to be performed in the task operation process of the current round. For the current round of action flow, the AI Agent, guided by the tool call instructions described earlier, generates a tool call command corresponding to the operation and sends it to the agent program of the target node management device via a communication channel. Upon receiving the tool call command, the agent program of the target node management device executes the command to obtain the command execution result for the current round and returns the result to the AI Agent via the communication channel. For the current round of observation flow, the AI Agent receives and observes the command execution result via the communication channel. Then, it proceeds to the next round's thought process: guided by the blockchain node operation and maintenance process information and the command execution result of the current round, the AI Agent determines the operations required for the next round's task operation flow… and so on, until all rounds of task operation flows are completed.
[0038] As an example, Figure 4 This is a schematic diagram illustrating the operational principle of an operation and maintenance task that uses an artificial intelligence agent and is based on ReAct to cyclically disassemble and decompose operations and maintenance tasks, as provided in an embodiment of this application. Figure 4The thought, action, and observation processes depicted constitute a ReAct loop. In the thought process, the AI Agent considers the operational task plan, the execution results from the previous observation process, and blockchain node operational information (such as the system's maintenance manual) to determine the necessary actions for the current task. In the action process, the AI Agent generates corresponding tool calls based on the required actions and sends them to the node management device's agent (host agent) for execution via a communication channel. In the observation process, the agent executes the tool calls, obtains the execution results, and feeds them back to the AI Agent, before entering the next ReAct loop, and so on.
[0039] The following is an example of a real-world operation and maintenance task: upgrading the blockchain node1 on host 1. The specific process for this example is as follows: The first round of thought process: The AI Agent begins to think, "Having received a blockchain node upgrade task, according to the blockchain node operation and maintenance process information, the first step of the standard upgrade process is to stop the old node, and I need to execute a stop command first."
[0040] The first round of action flow: The AI Agent generates a tool call command (Tool Call1) to stop node1, which is command(host='host1', cmd='supervisorctl stop node1'). The tool call command is then sent to the agent program of host1 through the established communication channel.
[0041] The first round of observation: The agent program of host 1 executes the Tool Call1 command, obtains the execution result (stdout, stderr, exit_code=0), and feeds the execution result back to the AI agent.
[0042] The second round of thought process: The AI Agent observes that the return code of the previous round is 0, which means that node1 has stopped successfully. The second step of the standard upgrade process is to replace the binary file. I need to use the File-Transfer tool.
[0043] The second round of action: The AI Agent generates a tool call instruction Tool Call2 for using the File-Transfer tool: File-Transfer(host='host1', src='... / new_binary', dest=' / opt / node1 / bin / '), and sends the Tool Call2 instruction Tool Call2 to the agent program of host1 through the established communication channel.
[0044] In the second round of observation: the agent program of host 1 executed the Tool Call2 command, obtained the execution result "file replacement transmission successful", and fed back the execution result to the AI Agent.
[0045] The third round of thought process: The AI Agent thinks, "The file has been replaced. The third step of the standard upgrade process is to start a new node, which requires executing the node start command."
[0046] The third round of action: The AI Agent generates a tool call command (Tool Call3) to start node1: Command(host='host1', cmd='supervisorctl start node1'), and sends the tool call command to the agent program of host1 through the established communication channel.
[0047] The third round of observation: The agent program of host 1 executed the Tool Call3 command, obtained the execution result "blockchain node1 has been successfully started", and fed back the execution result to the AI Agent.
[0048] The fourth round of the thought process: The AI Agent thinks, "The file has been replaced and node1 has been successfully started, which means that node1 has successfully completed the upgrade and the operation and maintenance task is over." At this point, the task operation process of all rounds of this operation and maintenance task has been completed.
[0049] As can be seen, through the closed-loop processing flow of "thinking -> action -> observation" described above, the AI Agent can automatically decompose complex operation and maintenance tasks into multiple rounds of task operation processes and execute them sequentially, just like a senior operation and maintenance expert, until the operation and maintenance task is finally completed.
[0050] In existing technologies, the execution flow of scripts manually written by operations and maintenance personnel is fixed. They cannot dynamically adjust subsequent steps based on real-time execution feedback. If an out-of-band error occurs during execution (e.g., blockchain node 1 upgrades successfully, but blockchain node 2 fails to start due to configuration errors), the entire operations and maintenance process will be interrupted, requiring manual intervention for troubleshooting and recovery. In other words, traditional scripts are mostly "open-loop," meaning they only handle execution and do not analyze the results or dynamically correct them in real time. In contrast, the technical solution in this application possesses dynamic fault tolerance and self-healing capabilities. When an unexpected error occurs during execution, the AI Agent, guided by the operations and maintenance knowledge base, can autonomously attempt to perform error correction operations. See below for details.
[0051] In one implementation of this application, the system prompt further includes information on resolving operational errors; during the process of sequentially executing each round of task operation procedures to complete the operational task, the method further includes: If an error occurs in the execution result of the instruction received by the AI agent during the observation process included in any round of task operation, the AI agent, guided by the operation and maintenance error resolution information and the instruction execution result of that round, will generate task error correction processes for each round based on ReAct, and execute the task error correction processes for each round in sequence.
[0052] During the sequential execution of task operation processes in each round to complete the maintenance task, if an error occurs in the instruction execution result received by the AI Agent in any round of observation, the AI Agent can use the maintenance operation error resolution information and specific error information described above as guidance to think about the problem. Based on ReAct, iteratively generate task error correction processes for each round and execute each round of task error correction processes sequentially until the task error correction is successfully completed. Each round of task error correction processes also includes a thought process, an action process, and an observation process.
[0053] For example, in the above example of "upgrading blockchain node1 on host 1", assuming the third round of observation is as follows: the agent program of host 1 executes the Tool Call3 instruction, obtains the execution result "blockchain node1 failed to start, exit_code=1, stderr="Error: port 30303 already in use"", and feeds this execution result back to the AI agent, then the fourth round of thought begins the task error correction process. The specific error correction process is as follows: The fourth round of thinking process (Thought): The AI Agent observes that node1 failed to start with the error "port 30303 is already in use". Based on the knowledge of troubleshooting operation and maintenance errors, the problem may be that the node1 process is stuck and has not completely exited, or that another program is using the port. We should first use Grep (or lsof) to check the port usage.
[0054] The fourth round of action: The AI Agent generates a tool call command (Tool Call4: Command(host='Host1', cmd='lsof -i:30303')) to check port occupancy, and sends the tool call command to the Agent program on Host1 through the established communication channel.
[0055] The fourth round of observation: The agent program of host 1 executed the Tool Call4 command and obtained the execution result "showing that a zombie process node1 (PID 12345) is occupying the port", and fed back the execution result to the AI Agent.
[0056] The fifth round of thought process: The AI Agent observes that the zombie process with PID 12345 is the cause, and this process must be forcibly closed before retrying the node startup command.
[0057] The fifth round of action: The AI Agent generates a tool call command (Tool Call5) to forcibly shut down the process: Command(host='Host1', cmd='kill -9 12345&&supervisorctl startnode1'), and sends the tool call command (Tool Call5) to the agent program of Host1 through the established communication channel.
[0058] Following this pattern, once the zombie process is forcibly shut down, all rounds of task error correction are completed. Then, the task operation process of starting blockchain node1 is executed again, and blockchain node1 is successfully started, thus completing the entire operation and maintenance task.
[0059] As can be seen, guided by the operations and maintenance knowledge base, the AI Agent can analyze the causes of errors, autonomously attempt to perform error correction operations, and dynamically handle anomalies based on real-time feedback until the operations and maintenance task is finally completed, demonstrating strong dynamic fault tolerance and self-healing capabilities. Furthermore, the experience of operations and maintenance experts (such as operations and maintenance manuals and troubleshooting solutions) can be continuously updated into the AI Agent's operations and maintenance knowledge base, enabling the system to continuously learn and evolve, thus continuously improving the AI Agent's operations and maintenance task processing capabilities.
[0060] The technical solution of this application embodiment sets up an operation and maintenance control device with an deployed artificial intelligence agent (AI Agent). When receiving an operation and maintenance task for a target blockchain node, the control device loads a preset operation and maintenance knowledge base, including system prompts, through the AI Agent. These prompts contain various blockchain node operation and maintenance process information. Then, through the AI Agent, using the established communication channel between the control device and the target node management device, guided by the system prompts, the operation and maintenance task is executed by interacting with the target node management device. In this process, the AI Agent automatically decomposes high-level natural language tasks into specific atomic commands using the operation and maintenance knowledge base and automatically executes these atomic commands through interaction with the node management device. Therefore, operation and maintenance personnel do not need to write complex script files; they only need to issue the required operation and maintenance tasks using natural language, which greatly reduces the operation and maintenance threshold and labor costs of blockchain systems.
[0061] In summary, this application proposes an intelligent operation and maintenance technology solution based on AI Agent and Agent program, which realizes the intelligence and dynamic adaptability of the operation and maintenance process, and has the advantages of low operation and maintenance threshold and strong dynamic fault tolerance and self-healing capabilities.
[0062] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0063] The above mainly describes a method for processing blockchain operation and maintenance tasks. The following will describe a device for processing blockchain operation and maintenance tasks.
[0064] Please see Figure 5This application illustrates a blockchain operation and maintenance task processing device provided in an embodiment of the present application. The device is applied to an operation and maintenance control device with an deployed artificial intelligence agent. The device includes: The operation and maintenance knowledge base loading module 501 is used to load an operation and maintenance knowledge base including system prompt words through an artificial intelligence agent when an operation and maintenance task for a target blockchain node is received; wherein, the system prompt words contain various blockchain node operation and maintenance process information that has been collected. The operation and maintenance task execution module 502 is used to execute operation and maintenance tasks by interacting with the target node management device under the guidance of system prompts, through the communication channel between the established operation and maintenance central control device and the target node management device where the target blockchain node is deployed, via an artificial intelligence agent.
[0065] In one implementation of this application, the operation and maintenance control device is deployed in a public network, the target node management device is deployed in a private network, and the target node management device has an agent program deployed on it; the blockchain operation and maintenance task processing device further includes: The communication channel establishment module is used to establish a communication channel based on the connection request after receiving a connection request sent by the target node management device through an agent program.
[0066] In one implementation of this application, the system prompt further includes tool call instructions; the operation and maintenance task execution module includes: The task execution unit is used to break down the operation and maintenance task into various rounds of task operation processes based on the ReAct loop through an artificial intelligence agent, and execute each round of task operation processes sequentially to complete the operation and maintenance task. Each round of task operation processes includes a thinking process, an action process, and an observation process. In the thinking process of the current round, the artificial intelligence agent determines the operation actions to be performed in the current round of task operation processes under the guidance of the blockchain node's operation and maintenance operation process information, or under the guidance of the blockchain node's operation and maintenance operation process information and the instruction execution results of the previous round. In the action process of the current round, the artificial intelligence agent generates tool call instructions based on the operation actions under the guidance of tool call instructions, and sends the tool call instructions to the agent program deployed on the target node management device through the communication channel. In the observation process of the current round, the artificial intelligence agent receives the instruction execution results of the current round, obtained by executing the tool call instructions, returned by the agent program through the communication channel.
[0067] In one implementation of this application, the system prompt further includes information on resolving operational errors; the operational task execution module further includes: The task error correction unit is used to generate task error correction processes for each round based on ReAct if an error occurs in the execution result of the instruction received by the AI agent in the observation process included in any round of task operation. Guided by the operation and maintenance error resolution information and the execution result of the instruction in that round, the AI agent executes the task error correction processes for each round in sequence.
[0068] In one implementation of this application, the operation and maintenance central control device is connected to multiple node management devices, and the operation and maintenance knowledge base also includes node deployment configuration information, which records the blockchain nodes deployed by each node management device; the blockchain operation and maintenance task processing device also includes: The node management device determination module is used to determine the target node management device for deploying the target blockchain node from multiple node management devices based on node deployment configuration information through an artificial intelligence agent.
[0069] Please see Figure 6 This application illustrates another blockchain operation and maintenance task processing device provided in an embodiment of the present application. This device is applied to a node management device with deployed blockchain nodes, and includes: The task interaction execution module 601 is used to execute operation and maintenance tasks for blockchain nodes by interacting with the operation and maintenance control device through the communication channel between the established node management device and the operation and maintenance control device with the deployed artificial intelligence agent. The operation and maintenance task is received by the operation and maintenance control device. When the operation and maintenance control device receives the operation and maintenance task, it loads the operation and maintenance knowledge base including system prompt words through the artificial intelligence agent, and executes the operation and maintenance task by interacting with the node management device under the guidance of the system prompt words. The system prompt words contain various blockchain node operation and maintenance process information that have been collected.
[0070] In one implementation of this application, the node management device is deployed in a private network, the operation and maintenance control device is deployed in a public network, and the node management device has an agent program deployed; the blockchain operation and maintenance task processing device further includes: The connection request sending module is used to send a connection request to the operation and maintenance control equipment through the agent program after the agent program starts, so as to instruct the operation and maintenance control equipment to establish a communication channel based on the connection request.
[0071] This application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the blockchain operation and maintenance task processing method described in any of the above embodiments.
[0072] This application also provides a computer program product that, when running on an operation and maintenance control device / node management device, causes the operation and maintenance control device / node management device to execute the blockchain operation and maintenance task processing method described in any of the above embodiments.
[0073] Figure 7 This is a schematic diagram of an operation and maintenance control device / node management device provided in one embodiment of this application. For example... Figure 7 As shown, the operation and maintenance control device / node management device 7 of this embodiment includes: a processor 70, a memory 71, and a computer program 72 stored in the memory 71 and executable on the processor 70. When the processor 70 executes the computer program 72, it implements the steps in the embodiments of the various blockchain operation and maintenance task processing methods described above. Alternatively, when the processor 70 executes the computer program 72, it implements the functions of each module / unit in the embodiments of the various devices described above, for example, implementing... Figure 5 The functions of modules 501-502 of the device shown, or their implementation Figure 6 The function of module 601 of the device shown.
[0074] The computer program 72 can be divided into one or more modules / units, which are stored in the memory 71 and executed by the processor 70 to complete this application. The one or more modules / units can be a series of computer program instruction segments capable of performing specific functions, which describe the execution process of the computer program 72 in the operation and maintenance control equipment / node management equipment 7.
[0075] The processor 70 may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.
[0076] The memory 71 can be an internal storage unit of the operation and maintenance control equipment / node management equipment 7, such as a hard disk or memory of the operation and maintenance control equipment / node management equipment 7. The memory 71 can also be an external storage device of the operation and maintenance control equipment / node management equipment 7, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the operation and maintenance control equipment / node management equipment 7. Furthermore, the memory 71 can include both internal storage units and external storage devices of the operation and maintenance control equipment / node management equipment 7. The memory 71 is used to store the computer program and other programs and data required by the operation and maintenance control equipment / node management equipment. The memory 71 can also be used to temporarily store data that has been output or will be output.
[0077] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0078] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0079] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0080] Those skilled in the art will 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, or a combination of computer software and electronic hardware. 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.
[0081] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the system embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection between devices or units through some interfaces, and may be electrical, mechanical, or other forms.
[0082] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of the embodiments of this application, depending on actual needs.
[0083] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0084] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electrical carrier signals and telecommunication signals.
[0085] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A method for processing blockchain operation and maintenance tasks, characterized in that, The method, applied to central control equipment for operation and maintenance with deployed artificial intelligence agents, includes: When an operation and maintenance task is received for a target blockchain node, the operation and maintenance knowledge base, including system prompts, is loaded through the artificial intelligence agent; wherein, the system prompts contain various blockchain node operation and maintenance process information that has been collected. Through the artificial intelligence agent, the operation and maintenance tasks are executed by interacting with the target node management device under the guidance of the system prompts, utilizing the established communication channel between the operation and maintenance control device and the target node management device where the target blockchain node is deployed.
2. The method as described in claim 1, characterized in that, The operation and maintenance control equipment is deployed on a public network, and the target node management equipment is deployed on a private network. The target node management equipment has an agent program deployed on it. The communication channel is established in the following way: Upon receiving a connection request sent by the target node management device through the agent program, the communication channel is established based on the connection request.
3. The method as described in claim 2, characterized in that, The system prompt also includes tool call instructions; the operation and maintenance task is executed by interacting with the target node management device under the guidance of the system prompt, using the established communication channel between the established operation and maintenance control device and the target node management device where the target blockchain node is deployed, through the artificial intelligence agent, including: The AI agent, based on the ReAct loop, breaks down the maintenance task into task operation processes in various rounds and executes these rounds sequentially to complete the maintenance task. Each round's task operation process includes a thinking process, an action process, and an observation process. In the thinking process of the current round, the AI agent, guided by the blockchain node maintenance operation process information, determines the action to be performed in the current round, or, guided by the blockchain node maintenance operation process information and the execution result of the instruction from the previous round. In the action process of the current round, guided by the tool call instructions, the AI agent generates a tool call instruction based on the action and sends it to the agent program deployed on the target node management device via the communication channel. In the observation process of the current round, the AI agent receives the instruction execution result of the current round, obtained by executing the tool call instruction, returned by the agent program via the communication channel.
4. The method as described in claim 3, characterized in that, The system prompts also include information on resolving operational errors; during the process of sequentially executing the task operation procedures of each round to complete the operational task, the method further includes: If an error occurs in the execution result of the instruction received by the AI agent during the observation process included in any round of task operation, the AI agent, guided by the operation and maintenance error resolution information and the execution result of the instruction in any round, generates task error correction processes for each round based on ReAct loop, and executes the task error correction processes for each round in sequence.
5. The method according to any one of claims 1 to 4, characterized in that, The operation and maintenance control device is connected to multiple node management devices, and the operation and maintenance knowledge base also includes node deployment configuration information, which records the blockchain nodes deployed by each of the node management devices. Before executing the maintenance task by interacting with the target node management device under the guidance of the system prompts, using the established communication channel between the maintenance control device and the target node management device that deploys the target blockchain node through the artificial intelligence agent, the method further includes: The AI agent determines the target node management device from among the multiple node management devices that will deploy the target blockchain node, based on the node deployment configuration information.
6. A method for handling operation and maintenance tasks in a blockchain system, characterized in that, The method, applied to a node management device for deployed blockchain nodes, includes: Utilizing the established communication channel between the node management device and the operation and maintenance control device with deployed artificial intelligence agents, operation and maintenance tasks for the blockchain node are executed through interaction with the operation and maintenance control device. The operation and maintenance tasks are received by the operation and maintenance control device. Upon receiving the task, the operation and maintenance control device loads an operation and maintenance knowledge base including system prompts through the artificial intelligence agent, and executes the task through interaction with the node management device under the guidance of the system prompts. The system prompts contain various blockchain node operation and maintenance process information that has been collected.
7. The method as described in claim 6, characterized in that, The node management device is deployed in a private network, the operation and maintenance control device is deployed in a public network, and the node management device has an agent program deployed; the communication channel is established in the following way: Once the agent program is started, it sends a connection request to the operation and maintenance control device to instruct the operation and maintenance control device to establish the communication channel based on the connection request.
8. A central control device for operation and maintenance, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the blockchain operation and maintenance task processing method as described in any one of claims 1 to 5.
9. A node management device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the blockchain operation and maintenance task processing method as described in claim 6 or 7.
10. A blockchain operation and maintenance task processing system, characterized in that, It includes the operation and maintenance control equipment as described in claim 8 and at least one node management equipment as described in claim 9.