Multi-agent-based equipment analysis method and system, equipment and storage medium

Through the multi-agent-based device analysis method, the supervisory agent and task agent architecture is used to solve the problem of insufficient flexibility in equipment analysis in the existing technology, natural language interaction and multi-task analysis are realized, and the flexibility of equipment analysis is improved. Sex and efficiency.

CN119226078AActive Publication Date: 2024-12-31广州市申迪计算机系统有限公司

Patent Information

Application Number
CN202411157702.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-22
Publication Date
2024-12-31
Estimated Expiration
2044-08-22

AI Technical Summary

Technical Problem

The prior art has insufficient flexibility in equipment performance analysis and cannot flexibly perform multitasking analysis, and additional configuration or changes to the program are required to increase analysis metrics or tasks.

Method used

Using the multi-agent device analysis method, the task planning of the user's question text through the supervisor agent, determine the target subtask and call the application program interface of the task agent, generate the device analysis results, and use the large language model to realize task disassembly and Planning to support natural language interaction.

Benefits of technology

Improve the flexibility of device analysis, and users can complete various device analysis tasks through natural language interaction, simplifying the device analysis process, making it easier to expand and deal with a variety of analysis needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119226078A_ABST
    Figure CN119226078A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a multi-agent-based equipment analysis method and system, equipment and a storage medium, and belongs to the technical field of artificial intelligence. The method comprises the following steps: firstly, acquiring a user question text about equipment analysis, and performing task splitting and planning on the user question text through a large language model of a supervisor agent to determine a target sub-task and a task agent corresponding to the target sub-task; and calling an application program interface of the task agent through the supervisor agent to execute the target subtask to obtain task feedback, and generating an equipment analysis result by the large language model according to the task feedback and feeding back the equipment analysis result to a user. Various equipment analysis tasks are completed through cooperation of multiple agents, the equipment analysis tasks can be conveniently expanded through the supervisor agent-task agent architecture, and the equipment analysis requirements of a user are flexibly processed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a multi-agent based device analysis method, system, device and storage medium. Background Art

[0002] In the related art, when analyzing the performance or status of devices such as computers and servers, it is usually necessary to log in to the device to obtain the device indicator value, and then perform data analysis through an automated program based on the obtained indicator data to achieve the corresponding analysis task. If it is necessary to increase the device analysis indicator or analysis task, it is necessary to additionally configure and deploy a new program or change the program, which makes it impossible to flexibly perform multi-task analysis on the device. Summary of the invention

[0003] The main purpose of the embodiments of the present application is to propose a multi-agent-based device analysis method, system, device and storage medium, aiming to improve the flexibility of device analysis.

[0004] To achieve the above object, one aspect of an embodiment of the present application proposes a multi-agent-based device analysis method, comprising the following steps:

[0005] Get the user's question text;

[0006] Performing task planning on the user question text by a supervisor agent to determine a target subtask and a task agent corresponding to the target subtask, wherein the supervisor agent is implemented based on a large language model;

[0007] The supervisor agent calls the application program interface of the task agent to execute the target subtask and obtain task feedback;

[0008] A device analysis result is generated according to the task feedback.

[0009] In some embodiments, the step of performing task planning on the user question text by the supervisor agent to determine the target subtask and the task agent corresponding to the target subtask includes the following steps:

[0010] Extracting keywords from the user's question text;

[0011] Determine a corresponding prompt word template according to the keyword, and write the keyword into the prompt word variable of the prompt word template to obtain a device task analysis instruction;

[0012] Determine a target subtask and a task agent corresponding to the target subtask according to the device task analysis instruction.

[0013] In some embodiments, the step of performing task planning on the user question text by the supervisor agent to determine the target subtask and the task agent corresponding to the target subtask further includes the following steps:

[0014] Determining the identity of the questioner in response to the user question text;

[0015] The user authority description is determined according to the identity of the questioner, and the user authority description is written into the authority variable of the prompt word template to obtain a device task analysis instruction.

[0016] In some embodiments, the step of determining a target subtask and a task agent corresponding to the target subtask according to the device task analysis instruction comprises the following steps:

[0017] Determine the target analysis device, agent information and subtask requirements according to the device task analysis instruction;

[0018] Determine the query scope and analysis scope of the target analysis device according to the user authority description in the device task analysis instruction;

[0019] Determine a target subtask according to the agent information, the subtask requirements, the target analysis device and its query scope and analysis scope;

[0020] Determine the corresponding task agent according to the agent information in the target subtask.

[0021] In some embodiments, the task agent performs the target subtask by the following steps:

[0022] Determine an operation command according to the subtask requirements in the target subtask, the query scope and analysis scope of the target analysis device;

[0023] Using a sensitive instruction tool, judging whether the operation command includes a sensitive operation according to the command level list, and if the operation command includes a sensitive operation, reviewing the operation command;

[0024] According to the operation command that has passed the review, select and call the database connection tool, device information tool or device interaction tool to perform task processing to complete the target subtask.

[0025] In some embodiments, judging whether the operation command includes a sensitive operation according to the command level list includes the following steps:

[0026] Determining the level of each operation type in the operation command according to the command level list;

[0027] When the level of the operation type is greater than a preset level, it is determined that the operation command contains a sensitive operation.

[0028] In some embodiments, the reviewing of the operation command comprises the following steps:

[0029] Displaying the sensitive operation of the operation command and the query scope and analysis scope of the target analysis device on the audit terminal to obtain the audit instruction;

[0030] The operation command is operated according to the audit instruction so that the operation command passes the audit, wherein the audit instruction includes at least one of deleting the sensitive operation or ignoring the sensitive operation.

[0031] To achieve the above purpose, another aspect of the embodiment of the present application proposes a multi-agent-based equipment analysis system, including:

[0032] The first module is used to obtain the user's question text;

[0033] The second module is used to perform task planning on the user question text through a supervisor agent to determine a target subtask and a task agent corresponding to the target subtask, wherein the supervisor agent is implemented based on a large language model;

[0034] The third module is used to call the application program interface of the task agent through the supervisor agent to execute the target subtask and obtain task feedback;

[0035] The fourth module is used to generate equipment analysis results according to the task feedback.

[0036] To achieve the above-mentioned purpose, another aspect of an embodiment of the present application proposes an electronic device, which includes a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for realizing connection and communication between the processor and the memory, and the program implements the method described in the above embodiment when executed by the processor.

[0037] To achieve the above-mentioned purpose, another aspect of an embodiment of the present application proposes a storage medium, which is a computer-readable storage medium used for computer-readable storage, and the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the method described in the above embodiment.

[0038] The multi-agent-based device analysis method, system, device and storage medium proposed in this application first obtains the user's question text about device analysis, and uses the large language model of the supervisor agent to perform task decomposition and planning on the user's question text to determine the target subtask and the task agent corresponding to the target subtask, and then uses the supervisor agent to call the application program interface of the task agent to execute the target subtask to obtain task feedback. The large language model generates the device analysis results based on the task feedback and feeds them back to the user. This application completes various device analysis tasks through the cooperation of multiple agents. The supervisor agent-task agent architecture can easily expand device analysis tasks and flexibly handle users' device analysis needs. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 is a flow chart of a multi-agent-based device analysis method provided in an embodiment of the present application;

[0040] Figure 2 It is a schematic diagram of the supervisor agent-task agent architecture provided in an embodiment of the present application;

[0041] Figure 3 is a schematic diagram of the application architecture of the multi-agent-based device analysis method provided in an embodiment of the present application;

[0042] Figure 4 It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION

[0043] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0044] It should be noted that, although the functional modules are divided in the system and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the system or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0045] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0046] First, some nouns involved in this application are analyzed:

[0047] Artificial intelligence (AI) is a new technical science that studies and develops theories, methods, technologies and application systems for simulating, extending and expanding human intelligence. AI is a branch of computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Research in this field includes robots, language recognition, image recognition, natural language processing and expert systems. AI can simulate the information process of human consciousness and thinking. AI is also a theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0048] Natural language processing (NLP): NLP uses computers to process, understand and apply human languages ​​(such as Chinese and English). NLP is a branch of artificial intelligence and an interdisciplinary subject between computer science and linguistics. It is often referred to as computational linguistics. Natural language processing includes grammatical analysis, semantic analysis, and text comprehension. Natural language processing is often used in technical fields such as machine translation, handwritten and printed character recognition, speech recognition and text-to-speech conversion, information intent recognition, information extraction and filtering, text classification and clustering, and opinion mining. It involves data mining related to language processing, machine learning, knowledge acquisition, knowledge engineering, artificial intelligence research, and linguistic research related to language computing.

[0049] Large Language Models (LLMs) refer to deep learning models trained with large amounts of text data. These models learn language patterns, grammar, and semantics by processing massive amounts of text data, so that they can understand and generate human language. They use deep neural networks, especially the Transformer architecture, to capture complex relationships and structures in language.

[0050] An agent is an intelligent entity that can perceive the environment, make decisions, and perform actions. Unlike traditional artificial intelligence, an agent has the ability to gradually complete a given goal by actively thinking and calling tools. The interaction between the big model and humans is based on prompts. Whether the user prompt is clear and unambiguous will affect the effect of the big model's answer. In this process, humans actively ask questions, and the big model answers "passively". The work of the agent only requires a given goal, and it can think independently and take actions based on the goal. From the perspective of the big model, the agent is an agent based on the semantic understanding and reasoning ability of the big model, which enables the agent to have the ability to plan tasks when solving complex problems, call external tools to perform various tasks, and use the vector database to retain "memory".

[0051] Device analysis requires evaluating the device status from various indicators to understand the performance of the system under different loads. For Linux and Windows operating systems, although the specific commands and tools may be different, the basic principles of analysis are similar. The main device analysis method at present is to log in to the device and execute instructions to obtain characteristic indicator values, such as CPU usage, memory usage, disk I / O, network traffic, etc., and then analyze and detect faults based on the indicator values, and evaluate the current health status of the device. In related technologies, obtaining device indicator values ​​by logging into the device generally requires the use of automated programs. If additional analysis indicators (such as device status prediction, fault detection, etc.) need to be added, additional manual configuration or program changes are required, and the flexibility is relatively general.

[0052] Based on this, the embodiments of the present application provide a multi-agent-based device analysis method, system, device and storage medium, aiming to improve the flexibility of device analysis.

[0053] The multi-agent-based device analysis method, system, device and storage medium provided in the embodiments of the present application are specifically illustrated through the following embodiments. First, the multi-agent-based device analysis method in the embodiments of the present application is described.

[0054] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0055] The multi-agent-based device analysis method provided in the embodiment of the present application relates to the field of artificial intelligence technology. The multi-agent-based device analysis method provided in the embodiment of the present application can be applied to a terminal, can be applied to a server side, or can be software running in a terminal or a server side. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc.; the server side can be configured as an independent physical server, or a server cluster or a distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application that implements a multi-agent-based device analysis method, etc., but is not limited to the above forms.

[0056] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

[0057] Figure 1 is an optional flow chart of a multi-agent-based device analysis method provided in an embodiment of the present application. Figure 1 The method may include but is not limited to steps S101 to S104.

[0058] Step S101, obtaining the user's question text;

[0059] Step S102, performing task planning on the user's question text by a supervisor agent to determine a target subtask and a task agent corresponding to the target subtask, wherein the supervisor agent is implemented based on a large language model;

[0060] Step S103, calling the application program interface of the task agent through the supervisor agent to execute the target subtask and obtain task feedback;

[0061] Step S104: Generate equipment analysis results based on task feedback.

[0062] Steps S101 to S104 shown in the embodiment of the present application, first, obtain the user question text about the equipment analysis, and perform task decomposition and planning on the user question text through the large language model of the supervisor agent to determine the target subtask and the task agent corresponding to the target subtask. Further, the supervisor agent calls the application program interface of the task agent to execute the target subtask to obtain task feedback, and the large language model generates the equipment analysis results based on the task feedback and feeds them back to the user. The embodiment of the present application completes various equipment analysis tasks through the cooperation of multiple agents. The supervisor agent-task agent architecture can conveniently expand the equipment analysis tasks. Users only need to interact with natural language to complete various equipment analysis tasks.

[0063] In step S101 of some embodiments, the user can initiate any question about device analysis to the large language model through the front-end interactive interface. For example, the question initiated by the user can be "Please analyze whether the xxx device is currently faulty." After the background obtains the user's question text, the large language model is used to perform subsequent task processing to feedback the fault analysis result of the xxx device to the user.

[0064] In step S102 of some embodiments, the background uses the framework of supervisor agent-task agent to perform task processing on the user's question text. Specifically, refer to Figure 2 The supervisor agent-task agent architecture adopts the concept of "divide and conquer", creating a dedicated task agent for each task or domain, and an agent supervisor to help delegate tasks. The supervisor agent is implemented based on a large language model, responsible for receiving user input, and routing tasks to corresponding task agents for processing based on the understanding of the language. In some embodiments, the supervisor agent-task agent architecture can be built and developed through the open source agent framework LangGraph.

[0065] The supervisor agent uses a large language model to understand the user's question text, and decomposes the user's question text into one or more target subtasks based on the task domain of each task agent. For example, each task agent includes an equipment indicator analysis agent, a fault analysis agent, and an equipment health analysis agent. The task domain of the equipment indicator analysis agent is defined as collecting, processing, and analyzing the performance indicator data of the equipment, monitoring the key performance indicators of the equipment, and analyzing the data through artificial intelligence algorithms to predict the performance trend of the equipment; the task domain of the fault analysis agent is to identify and diagnose equipment failures, and by analyzing equipment logs, indicator data, and historical failure cases, identify failure modes and causes, predict potential failure risks, provide fault diagnosis suggestions, and assist in formulating fault handling plans; the task domain of the equipment health analysis agent evaluates the overall health status of the equipment, comprehensively considers the multi-dimensional information such as the equipment's operating data, maintenance records, and environmental logs, evaluates the health status of the equipment, and can provide equipment health reports to reduce maintenance costs. It can be understood that the task domain of each task agent can be defined according to its function, and the function of the task agent can be freely developed according to development needs, and the embodiments of this application are not specifically limited.

[0066] The supervisor agent performs semantic understanding on the user's question text, identifies keywords in the text, and matches the keywords with the task domains of each task agent, so as to extract and plan one or more target subtasks from the user's question text. For example, the user's question text is "A batch of devices to be analyzed are now provided, and the device addresses are [……]. Please analyze the health status of this batch of devices and predict the CPU occupancy trend in the future period of time." The supervisor agent performs keyword recognition on the user's question text, and performs task domain matching based on keywords such as "health status" and "prediction", "CPU occupancy (belonging to device performance)", and can determine that there are two tasks of task agents, namely "perform health analysis on the device to be analyzed [……]" (corresponding to the device health analysis agent) and "predict the CPU occupancy of the device to be analyzed [……]" (corresponding to the device indicator analysis agent).

[0067] In some embodiments, step S102 may include but is not limited to steps S201 to S203:

[0068] Step S201, extracting keywords from the user's question text;

[0069] Step S202, determining a corresponding prompt word template according to the keyword, and writing the content in the user's question text into the prompt word variable of the prompt word template to obtain a device task analysis instruction;

[0070] Step S203, determining the target subtask and the task agent corresponding to the target subtask according to the device task analysis instruction.

[0071] In this embodiment, the background system provides a prompt word management function for unified management of prompt words used by the agent, including but not limited to various prompt word templates, roles, prompt word classifications, usage scenarios and specific prompt word content. The supervisor agent can extract the corresponding prompt word template content based on the corresponding scenario of the keyword, replace the variables in the template in combination with the user's question text, and form the final prompt word and pass it to the large language model for processing. For example, assuming that the user's question text is "I want to know the reason why the device xxx fails", the supervisor agent matches the prompt word template corresponding to the fault cause analysis based on the prompt word management function according to the keywords such as "fault" and "cause" in the text. For example, the prompt word template is "Please analyze the fault cause of [device address variable / device number variable], and provide the equipment monitoring data that caused the fault, and give a solution to the fault cause", and write the "device xxx" content in the user's question text into [device address variable / device number variable] to obtain the device task analysis instruction. By converting the user's question text into device task analysis instructions based on prompt words, the supervisor agent then performs task planning based on the device task analysis instructions to determine the target subtasks and sends the target subtasks to the corresponding task agents. This can guide the large language model to provide answers that better meet user needs and improve the user's device analysis experience.

[0072] In some embodiments, step S102 may also include but is not limited to steps S301 to S302:

[0073] Step S301, determining the identity of the questioner in response to the user's question text;

[0074] Step S302, determining the user authority description according to the identity of the questioner, and writing the user authority description into the authority variable of the prompt word template to obtain the device task analysis instruction.

[0075] In this embodiment, after the user logs in to the system, the user asks a question to the large language model and carries the identity information. The background system determines the identity of the questioner in response to the user's question text, queries the user's authority description in the system according to the identity of the questioner, and writes the user's authority description into the authority variable of the prompt word template to obtain the device task analysis instruction. In this embodiment, the user's authority description is added to the device task analysis instruction by means of prompt words. In the subsequent task processing process, the user's authority to query data, analyze functions, and operate equipment can be restricted, thereby improving the security of the system and equipment data.

[0076] In some embodiments, step S203 may include but is not limited to steps S401 to S404:

[0077] Step S401, determining the target analysis device, agent information and subtask requirements according to the device task analysis instruction;

[0078] Step S402, determining the query scope and analysis scope of the target analysis device according to the user authority description in the device task analysis instruction;

[0079] Step S403, determining the target subtask according to the agent information, subtask requirements, target analysis equipment and its query scope and analysis scope;

[0080] Step S404, determining the corresponding task agent according to the agent information in the target subtask.

[0081] In this embodiment, the device task analysis instruction is optimized from the user's question text. The device task analysis instruction is also a text input into the large language model. Generally, the device task analysis instruction contains information on the target analysis device, agent information and subtask requirements. The target analysis device refers to information such as the number or address of the device to be analyzed; the agent information refers to information related to the task agent that can realize the task requirements in the device task analysis instruction, including but not limited to the name of the task agent, the calling interface, etc., for example, relevant information of the device indicator analysis agent; subtask requirement refers to the device analysis requirement belonging to a certain task agent contained in the device task analysis instruction, for example, the subtask requirements include monitoring device performance indicators and predicting performance trends, which are all realized by the device indicator analysis agent.

[0082] In this embodiment, the device task analysis instruction also includes a user authority description. The supervisor agent can determine the user's query scope and analysis scope for the target analysis device based on the user authority description, and then determine the target subtask based on the agent information, subtask requirements, target analysis device and its query scope and analysis scope. The target subtask is the parameter input into the corresponding task agent.

[0083] In step S103 of some embodiments, the supervisor agent calls the application program interface of the task agent according to the agent information in the target subtask, and inputs the target subtask as a calling parameter to the task agent. The task agent can build corresponding functional modules based on the large language model. The functional modules can be implemented using neural network algorithms, artificial intelligence algorithms, or other algorithms that can realize corresponding functions. For example, the performance prediction module of the task agent can be implemented based on the long short-term memory network algorithm. The task agent selects the corresponding functional module to analyze the target analysis device according to the subtask requirements, and controls the authority of the analysis process according to the user's query scope and analysis scope, thereby improving the security of the device data. After the task agent completes the target subtask, it returns the obtained task feedback to the supervisor agent.

[0084] In some embodiments, the task agent in step S103 performs the target subtask by including but not limited to steps S501 to S503:

[0085] Step S501, determining an operation command according to the subtask requirements in the target subtask, the query range and analysis range of the target analysis device;

[0086] Step S502, using a sensitive instruction tool, judging whether the operation command includes a sensitive operation according to the command level list, and if the operation command includes a sensitive operation, reviewing the operation command;

[0087] Step S503, according to the approved operation command, select and call the database connection tool, device information tool or device interaction tool to perform task processing to complete the target subtask.

[0088] In this embodiment, each task agent needs to interact with the physical world when executing the target subtask, such as interacting with the device / database to obtain the data of the device / database, etc. Therefore, the system of this embodiment can provide various tools for the agent in the form of tool API, such as calculator, search tool, code executor, database query tool, etc. The agent can interact with the physical world to solve practical problems. Please refer to Figure 2 The system's tool collection includes but is not limited to sensitive instruction tools, database connection tools, device information tools, and device interaction tools. The database connection tool is used to interact with the business database; the device information tool is used to obtain information including device IP, connection protocol, connection account and password; the device interaction tool is used to connect to the device, execute instructions, and obtain instruction execution results; the sensitive instruction tool is used to verify sensitive operations in instructions.

[0089] In this embodiment, when the intelligent agent interacts with entities such as devices / databases, it will generate corresponding operation instructions, such as query instructions, data writing instructions, etc. Before executing the operation instructions, it will first use the sensitive instruction tool to determine whether the operation command includes sensitive operations. If the operation command includes sensitive operations, the operation command will be reviewed, and then the database connection tool, device information tool or device interaction tool will be called to perform task processing based on the operation command that passes the review to complete the target subtask.

[0090] In some embodiments, the step of determining whether the operation command includes a sensitive operation according to the command level list in step S502 includes, but is not limited to, steps S601 to S602:

[0091] Step S601, determining the level of each operation type in the operation command according to the command level list;

[0092] Step S602: When the level of the operation type is greater than a preset level, it is determined that the operation command contains a sensitive operation.

[0093] In this embodiment, the sensitive instruction tool determines sensitive operations by obtaining a preset command level list, which defines the levels of various operations. The higher the level, the more sensitive or dangerous the operation. The level of each operation type (such as device CPU query operation, device remote control operation, device sensitive address block read operation, etc.) included in the operation command is determined by querying the command level list. When the level of the operation type is greater than the preset level, it can be determined that the operation command contains a sensitive operation.

[0094] In some embodiments, the step of reviewing the operation command in step S502 may include but is not limited to steps S701 to S702:

[0095] Step S701, displaying the sensitive operation of the operation command and the query range and analysis range of the target analysis device on the audit terminal to obtain the audit instruction;

[0096] Step S702: operating the operation command according to the audit instruction so that the operation command passes the audit, wherein the audit instruction includes at least one of deleting the sensitive operation or ignoring the sensitive operation.

[0097] In this embodiment, when the operation command includes sensitive operations, the sensitive operations of the operation command and the query scope and analysis scope of the target analysis device can be further displayed on the core terminal, so that the relevant reviewers can refer to the query scope and analysis scope of the target analysis device by the questioner to delete the sensitive operations in the operation command or determine that the sensitive operations can be executed (i.e., ignore the sensitive operations). After the reviewer inputs the review instructions on deleting or ignoring sensitive operations to the system, the system deletes the operation command after the sensitive operation based on the review instruction task or the original operation command passes the review, thereby continuing to execute the target subtask.

[0098] According to some embodiments of the present application, referring to Figure 3 , the application architecture of the multi-agent-based device analysis method of the embodiment of the present application is described, and the layers of the application architecture are as follows from bottom to top:

[0099] Large language model (LLM) and operating environment: A large language model is required to support the operation of the intelligent agent. In this embodiment, a private large language model can be built separately on the GPU server.

[0100] Service application layer: including assistant applications and multi-agent applications built on the basis of the supervisor agent; the assistant application is mainly responsible for accepting user input, docking and calling the multi-agent application, and managing the basic information of the agent. The multi-agent application is the core module of the system, built on the multi-agent architecture, including multiple task agents, which are responsible for reasoning the input from the assistant application and outputting the reasoning results.

[0101] Operation support layer: provides communication channels such as HTTP / DNS between the front-end and back-end.

[0102] Client: responsible for providing an interface to interact with users.

[0103] The construction process of the application architecture is as follows:

[0104] Deploy a private large language model (LLM): This embodiment can choose the open source large model Qwen2-72B-I nstruct of Tongyi Qianwen. The large language model used in this example, Qwen2, generally surpasses most open source models in a series of benchmarks for language understanding, language generation, multilingual ability, coding, mathematics, reasoning, etc. Qwen2 increases the context length support, up to 128K tokens (Qwen2-72B-I nstruct), and can handle a large amount of input. The computing power of the GPU server can be: minimum configuration: graphics card A800*4; recommended configuration: graphics card A800*8.

[0105] Building the service application layer (i.e., supervisor agent-task agent architecture): This embodiment can use the open source LangGraph agent framework to build the service application layer. LangGraph is a library for building stateful, multi-participant applications using LLM, which is used to create agents and multi-agent workflows. The multi-agent architecture used in this embodiment has the following core advantages: looping, controllability, and persistence.

[0106] Loops and Branching: Implement loops and conditionals in your application.

[0107] Persistence: Automatically save the state after each step in the graph. The execution of the graph can be paused and resumed at any time to support error recovery, manual intervention in the workflow, task backtracking, etc.

[0108] Human intervention: interrupting the graph's execution to approve or edit the next action planned by the agent.

[0109] Streaming support: Stream the output generated by each node (including token streaming).

[0110] Among them, the introduction of human intervention is to improve the controllability of the intelligent agent. By binding account permissions, the scope of device query and analysis permissions is limited from the source. By emphasizing in the prompt words which operations require human intervention, operation restrictions are imposed from a macro perspective, and a list is set up to classify different commands to prevent them from executing sensitive commands on the device without permission.

[0111] Please refer to Figure 2 The supervisor agent-task agent architecture creates a dedicated agent for each task or domain, and has an agent supervisor to help delegate tasks. The agent supervisor is responsible for receiving user input and routing tasks to corresponding agents for processing based on the understanding of the language. The relevant descriptions of each agent have been explained in the above embodiments and will not be repeated here.

[0112] The multi-agent framework is equipped with a system tool API, including sensitive instruction tools, database connection tools, device information tools, and device interaction tools, etc. The tool-related instructions have been explained in the above embodiments and will not be repeated here.

[0113] Build an assistant application: The assistant application can be developed using a web framework. The main function is to provide an interactive interface for users and have the ability to interact with intelligent applications. Specifically, the functions of the assistant application include but are not limited to assistant Q&A and agent management. Assistant Q&A is used to provide users with pages for natural language Q&A interactions. Agent management includes basic information management, interface management, and prompt word management. Basic information management refers to the management of the basic information of each agent, such as name, role, usage scenario, etc.; interface management refers to the management of the interface address and parameter description provided by the intelligent application to facilitate the invocation of the capabilities of the intelligent side; prompt word management refers to the management of all prompt words of the intelligent application, including prompt word templates, roles, prompt word classifications, usage scenarios, and specific prompt word content. The supervisor agent can extract the corresponding prompt word template content according to the corresponding scenario, replace the variables in the template in combination with the user's question, and form the final prompt word, which is then passed to the large language model for processing.

[0114] The testing process of the application architecture is as follows:

[0115] First, prepare the test machine. The equipment types include host, firewall, switch, and router. The main operating systems used are Linux and Windows.

[0116] Second, enter the device information into the database. The information includes IP, device type, manufacturer, operating system, login protocol, connection port number, account password, etc.

[0117] Third, design test questions. You can design several common questions, as follows:

[0118] Index capture: such as batch query of disk utilization of several devices;

[0119] Trend analysis and prediction of device indicators: For example, analyze and predict the CPU utilization of a device to determine whether it is likely to exceed the threshold recently.

[0120] Fault location: If a server fails, we will help analyze the problem and find out whether there are other hidden dangers.

[0121] Equipment health analysis report: For example, a server health analysis report is given. The report content consists of several parts. The flexibility of the agent can be tested by flexibly specifying the report format.

[0122] Other more comprehensive questions: In addition to manually designing questions, you can also use the big language model to generate more questions for specific scenarios. For example, you can ask the big language model to generate questions by asking questions directly. The following is a question example:

[0123] You are a test engineer and you need to test the agent application. Your task is to generate test questions about Linux and Windows system indicator queries (indicators include CPU usage, content usage, etc.). The test device IP is xxxx and is output in natural language. A sample question is "Check the CPU and memory utilization of 192.168.11.11". 20 questions are given first.

[0124] By letting the big model design test questions, the workload of manually designing test cases can be greatly reduced.

[0125] Fourth, after designing the problem, conduct intelligent agent testing. After the test is completed, evaluate and optimize the intelligent agent application based on the specific test results.

[0126] The evaluation method can be through the assistant feedback function, which supports users to like or dislike the current answer to the question. The assistant background automatically collects the feedback results and evaluates whether to optimize the intelligent application based on the specific situation. In addition, the conversation records can be saved and the user's concerns can be analyzed regularly to optimize the assistant and intelligent application.

[0127] Intelligent agent application optimization includes prompt word optimization and tool optimization. Prompt word optimization allows the large language model to output a specific format by adjusting the prompt words. For example, when outputting CPU utilization, the corresponding process with the highest occupancy needs to be output together. Tool optimization can provide the intelligent agent with more complete and richer tools according to optimization needs. For example, when generating health reports, more and richer report templates are provided.

[0128] The device analysis assistant application in the embodiment of the present application has the following capabilities:

[0129] Flexible indicator capture: You can give instructions to the assistant through natural language, such as: "Help me check the current CPU and memory usage of certain servers, and display them in reverse order by usage." The assistant automatically calls up relevant capabilities according to user needs.

[0130] Device indicator trend analysis and prediction: You can give instructions to the assistant through natural language, such as analyzing and predicting the current CPU utilization of a certain device. The assistant automatically captures and analyzes indicators and makes data predictions.

[0131] Fault location: You can give instructions to the assistant through natural language, such as whether a server has high resource usage and what is the cause. The assistant automatically captures relevant indicators that may cause the fault, analyzes it, locates it, and gives preliminary handling suggestions.

[0132] Equipment health analysis report: You can give instructions to the assistant through natural language, such as giving a health analysis report for a server. The assistant automatically captures relevant health indicators for analysis and makes an analysis report on the current health status of the device.

[0133] The embodiment of the present application also provides a multi-agent based equipment analysis system, including:

[0134] The first module is used to obtain the user's question text;

[0135] The second module is used to perform task planning on the user's question text through the supervisor agent to determine the target subtask and the task agent corresponding to the target subtask, wherein the supervisor agent is implemented based on the large language model;

[0136] The third module is used to call the application program interface of the task agent through the supervisor agent to execute the target subtask and obtain task feedback;

[0137] The fourth module is used to generate equipment analysis results based on task feedback.

[0138] It can be understood that the contents of the above-mentioned multi-agent-based device analysis method embodiment are all applicable to the present system embodiment, the functions specifically implemented by the present system embodiment are the same as those in the above-mentioned multi-agent-based device analysis method embodiment, and the beneficial effects achieved are also the same as those achieved by the above-mentioned multi-agent-based device analysis method embodiment.

[0139] The embodiment of the present application also provides an electronic device, the electronic device comprising: a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for realizing connection and communication between the processor and the memory, and the program is executed by the processor to realize the above-mentioned multi-agent-based device analysis method. The electronic device can be any intelligent terminal including a tablet computer, a car computer, etc.

[0140] See also Figure 4 , Figure 4 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:

[0141] The processor 401 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application.

[0142] The memory 402 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 402 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 402, and the processor 401 calls and executes the multi-agent-based device analysis method of the embodiment of this application;

[0143] Input / output interface 403, used to implement information input and output;

[0144] Communication interface 404, used to realize communication interaction between the device and other devices, which can be realized through wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WI FI, Bluetooth, etc.);

[0145] Bus 405 , which transmits information between various components of the device (e.g., processor 401 , memory 402 , input / output interface 403 , and communication interface 404 );

[0146] The processor 401 , the memory 402 , the input / output interface 403 and the communication interface 404 are connected to each other in communication within the device via the bus 405 .

[0147] An embodiment of the present application also provides a storage medium, which is a computer-readable storage medium used for computer-readable storage. The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the above-mentioned multi-agent-based device analysis method.

[0148] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0149] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0150] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.

[0151] The system embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment.

[0152] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.

[0153] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0154] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0155] In the several embodiments provided in the present application, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of systems or units, which can be electrical, mechanical or other forms.

[0156] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0157] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0158] If the integrated unit is implemented in the form of 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, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.

[0159] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.

Claims

1. A multi-agent based equipment analysis method, characterized in that: The following steps are involved: Get the user's question text; Performing task planning on the user question text by a supervisor agent to determine a target subtask and a task agent corresponding to the target subtask, wherein the supervisor agent is implemented based on a large language model; The supervisor agent calls the application program interface of the task agent to execute the target subtask and obtain task feedback; A device analysis result is generated according to the task feedback.

2. The multi-agent-based equipment analysis method according to claim 1, characterized in that: The step of performing task planning on the user question text by the supervisor agent to determine the target subtask and the task agent corresponding to the target subtask includes the following steps: Extracting keywords from the user's question text; Determine a corresponding prompt word template according to the keyword, and write the keyword into the prompt word variable of the prompt word template to obtain a device task analysis instruction; Determine a target subtask and a task agent corresponding to the target subtask according to the device task analysis instruction.

3. The multi-agent-based equipment analysis method according to claim 2, characterized in that: The step of performing task planning on the user question text by the supervisor agent to determine the target subtask and the task agent corresponding to the target subtask also includes the following steps: Determining the identity of the questioner in response to the user question text; The user authority description is determined according to the identity of the questioner, and the user authority description is written into the authority variable of the prompt word template to obtain a device task analysis instruction.

4. The multi-agent-based equipment analysis method according to claim 3 is characterized in that: The step of determining a target subtask and a task agent corresponding to the target subtask according to the device task analysis instruction comprises the following steps: Determine the target analysis device, agent information and subtask requirements according to the device task analysis instruction; Determine the query scope and analysis scope of the target analysis device according to the user authority description in the device task analysis instruction; Determine a target subtask according to the agent information, the subtask requirements, the target analysis device and its query scope and analysis scope; Determine the corresponding task agent according to the agent information in the target subtask.

5. The multi-agent-based equipment analysis method according to claim 4, characterized in that: The task agent performs the target subtask by the following steps: Determine an operation command according to the subtask requirements in the target subtask, the query scope and analysis scope of the target analysis device; Using a sensitive instruction tool, judging whether the operation command includes a sensitive operation according to the command level list, and if the operation command includes a sensitive operation, reviewing the operation command; According to the operation command that has passed the review, select and call the database connection tool, device information tool or device interaction tool to perform task processing to complete the target subtask.

6. The multi-agent-based equipment analysis method according to claim 5, characterized in that: The step of judging whether the operation command includes a sensitive operation according to the command level list comprises the following steps: Determining the level of each operation type in the operation command according to the command level list; When the level of the operation type is greater than a preset level, it is determined that the operation command contains a sensitive operation.

7. The multi-agent-based equipment analysis method according to claim 5, characterized in that: The review of the operation command comprises the following steps: Displaying the sensitive operation of the operation command and the query scope and analysis scope of the target analysis device on the audit terminal to obtain the audit instruction; The operation command is operated according to the audit instruction so that the operation command passes the audit, wherein the audit instruction includes at least one of deleting the sensitive operation or ignoring the sensitive operation.

8. A multi-agent based equipment analysis system, characterized in that: include: The first module is used to obtain the user's question text; The second module is used to perform task planning on the user question text through a supervisor agent to determine a target subtask and a task agent corresponding to the target subtask, wherein the supervisor agent is implemented based on a large language model; The third module is used to call the application program interface of the task agent through the supervisor agent to execute the target subtask and obtain task feedback; The fourth module is used to generate equipment analysis results according to the task feedback.

9. An electronic device, characterized in that: The electronic device includes a memory, a processor, a program stored in the memory and executable on the processor, and a data bus for realizing connection and communication between the processor and the memory. When the program is executed by the processor, the steps of the method described in any one of claims 1 to 7 are realized.

10. A storage medium, the storage medium being a computer-readable storage medium, used for computer-readable storage, characterized in that: The storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of any one of claims 1 to 7.

Citation Information

Patent Citations

  • Spatial data integration system based on multiple Agents

    CN110019615A

  • Multi-agent cooperation system and strategy method suitable for industrial digitization

    CN117649129A

  • Software engineering agent platform

    CN117850860A

  • Virtual expert analysis method and device based on big language model intention recognition

    CN117931834A

  • Cognitive method, device and equipment based on large language model and storage medium

    CN118036721A

Cited By

  • Intelligent agent evaluation method and device, electronic equipment, storage medium and program

    CN119621588A

  • Multi-agent system conformity diagnosis and elimination method, product, medium and equipment

    CN119990174A

  • Methods, products, media and equipment for diagnosing and eliminating herd mentality in multi-agent systems

    CN119990174B

  • Intelligent agent interaction method and device, medium, equipment and computer program product

    CN120066353A

  • Task assistance method and device, electronic equipment and storage medium

    CN120068918A