Network management agent based on natural language intent interaction
Patent Information
- Application Number
- CN202410857819.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-28
- Publication Date
- 2026-09-18
- Estimated Expiration
- 2044-06-28
AI Technical Summary
虽然该方法允许用户通过可视化界面下发其意图,降低了用户使用门槛,但是在意图描述环节,用户需要逐一选择、放置、配置逻辑网络节点,逐一连接逻辑网络节点以构建并配置节点间的逻辑链路
[0036](1) Improved management efficiency: This invention significantly reduces the tedious process of manual configuration and improves management efficiency by automatically parsing user intent and deploying and configuring the network. As the scale of the network to be built and configured increases, the advantages of the intelligent agent proposed in this invention in terms of management efficiency become increasingly prominent.
Smart Images

Figure CN118780267B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of network management technology based on intent networks, and more particularly to a network management intelligent agent based on natural language intent interaction. Background Technology
[0002] To support the rapid development and application of technologies such as general-purpose large models, metaverse, artificial intelligence, and virtual reality, networks are becoming increasingly complex and massive, reaching and connecting geographically distributed, multidimensional, heterogeneous, and spatiotemporally unevenly distributed computing network resources. This requires network management to efficiently utilize these widely and unevenly distributed multidimensional heterogeneous computing network resources, meet the time-varying needs of network applications and users, ensure the deployment of applications such as metaverse and virtual reality, and improve the performance of artificial intelligence and large models.
[0003] The construction, operation, and management of networks all rely on the professional knowledge and manpower of network administrators. Faced with complex and large-scale networks and diverse service requirements, manually constructing complex service topologies is a rigid, cumbersome, time-consuming, and error-prone process. Therefore, there is an urgent need for new methods to help network administrators free themselves from rigid and tedious network configuration tasks, improving network management efficiency and reliability. This requires a method that can perceive complex networks, intelligently analyze the network needs of users or applications, and automatically build and configure networks on demand, without requiring explicit low-level commands from users or network administrators; it should be able to autonomously analyze, plan, and configure the network.
[0004] An intent-based network comprises users, intent interfaces, and a network provisioning system, all relatively independent. Users send their intents to the intent interface, which translates these intents into network configuration commands and sends them to the network provisioning system. The network provisioning system then executes these commands to realize the user's intent. The user's intent only specifies the desired effect without specifying the means or methods to achieve it. In an intent-based network, users do not need to know the information and status of the underlying network provisioning system, nor do they need to concern themselves with the implementation scheme of the intent; the intent interface can parse intents, perceive the underlying network status, and plan the implementation scheme; the network provisioning system then builds and configures the network according to the commands. Building an intent-based network management system enables efficient, flexible, and automated management of large-scale, complex networks with wide geographical distribution and time-varying multidimensional resources. The key to implementing this system lies in the design of the intent interface. The intent interface largely determines the system's ease of use, flexibility, and scalability.
[0005] In existing intent-based network configuration methods, the receiving unit receives user-uploaded intents, the parsing unit extracts the network configuration requirements from the user's intent, and the distribution unit distributes these requirements to the simulation network. The simulation unit then checks the connectivity of the requirements within the simulation network. After passing the connectivity check, the distribution unit distributes the configuration requirements to the network supply system. It's worth noting that in this method, user intents are submitted to the intent interface in the form of an intent collection table. The intent interface provides users with a specific intent collection table template, which users use to fill in their intents and submit the form. This method separates user requirements from intent implementation methods, allowing users to specify only the requirements without considering network conditions and underlying implementation details. While this implementation aligns with the concept of intent networks, its intent parsing relies on a pre-designed intent collection template, using keyword extraction and logical judgment to parse intents, resulting in poor intent scalability and robustness. The intent collection template includes a first intent collection table and a second intent collection table, used to collect basic network configuration and inter-subnet policies, respectively. Since user intents and network configurations are limited by the intent collection template, their scalability is poor. This analytical method is also difficult to flexibly handle users with different levels of expertise, hence its poor robustness.
[0006] Existing (virtual) network orchestration and management systems can efficiently manage virtual networks, enabling virtual network construction, network topology configuration, and network topology lifecycle management. They can distribute virtual network topologies across multiple servers, achieving efficient management of geographically distributed heterogeneous resources. Users or network administrators can design and configure network topologies according to their intentions through a visual interface, generating a topology description file. The front end then transmits the topology description file to the back end. After parsing the topology description file, the back end deploys the desired topology on the physical network as required. Figure 1 This method creates a virtual network. It has a low barrier to entry and a high degree of user freedom, enabling efficient management and control of virtual networks. While this method allows users to submit their intentions through a visual interface, lowering the barrier to entry, the intention description phase requires users to select, place, and configure logical network nodes one by one, and connect these nodes to build and configure logical links between them. However, if users need to build or configure large-scale, complex networks, the process of constructing the intention topology description based on the visual interface becomes extremely cumbersome. Summary of the Invention
[0007] This invention addresses the shortcomings of existing technologies by proposing a network management agent based on natural language intent interaction. This agent serves as the intent interface between users and the network provisioning system in an intent-based network. Based on a large language model, it converts user intents in natural language form into network provisioning system configuration commands. Furthermore, it can be integrated with a network orchestration and management system to achieve an intent-based network management system. After users or network administrators express their intents in natural language, a complete and reliable network can be automatically built, deployed, and configured to realize those intents.
[0008] The technical solution adopted in this invention is as follows:
[0009] A network management intelligent agent based on natural language intent interaction includes: a user interaction module, a toolbox, prompt words, a large language model, and a code interpreter;
[0010] in,
[0011] The user interaction module is used for the visualization of user configuration, user-agent interaction, and network management processes and results;
[0012] The toolbox is a collection of tools that can be invoked by the agent. This collection consists of various tools encapsulated from the application programming interface (API) of the network orchestration management system. It includes general tools, summary tools, and network management tools. The network management tools include various tools encapsulated from the application programming interface (API) of the network orchestration management system, so as to enable the agent to call the corresponding API through the tools. Each tool in the toolbox is a function (e.g., a Python function), and each tool is configured with a tool description.
[0013] The prompt words are the input to the large language model and are used for user configuration and interactive operation prompts. The prompt words include the agent's behavior pattern, toolbox introduction, task examples, user intent, and dialogue history (i.e., the dialogue records between the user and the agent). Among them, the behavior pattern describes the interaction pattern between the user and the agent and the expected agent response specifications; the toolbox introduction is a set of tool descriptions for all the tools included in the toolbox.
[0014] The large language model is a pre-built and trained large language model. It takes prompt words as input and outputs them in a predetermined format. Its output includes intent parsing results (parsing results that describe the user's network intent needs in natural language, thereby obtaining an accurate and specific professional expression of the user's network intent needs) and network configuration instructions (i.e. suggestion codes). The network configuration instructions output by the large language model are sent to the code interpreter.
[0015] The code interpreter extracts keywords from the suggested code, matches and calls the corresponding tools in the toolbox to execute network configuration instructions, and returns the execution results to the user through the user interaction module.
[0016] Furthermore, the tool descriptions explain the function of each tool, its expected input, its returned output, and provide examples of how the function works.
[0017] Furthermore, the tool description includes: tool name, function description (i.e., the function of the corresponding Python function), parameter description (including expected input and returned output), tool output and usage examples.
[0018] Furthermore, the task examples are several complete task cases, each task case including: user intent input, agent output that satisfies behavioral pattern requirements and user intent requirements.
[0019] Furthermore, the tools in the toolbox are divided into three main categories: general tools (“common”), summary tools (“summarize”), and network management tools. The general tools are used to obtain the current time point, such as year, month, day, hour, minute, and second; the summary tools are used to summarize tutorial documents, that is, to extract key information from lengthy and detailed tutorial documents to alleviate the problem of limited context; the network management tools include: image management tools, node management tools, link management tools, command execution tools, and typical topology creation tools.
[0020] Furthermore, the user interaction module's visual interface includes a configuration area, an interaction area, and a command area;
[0021] The configuration area includes network project configuration, agent working mode settings, and large language model settings.
[0022] The interaction area is used for user input of user intent (including but not limited to text, voice, images, etc.), and to display the intent parsing results and network configuration instructions output by the large language model, as well as the execution results output by the code interpreter.
[0023] The command area is used to configure the execution mode of network configuration commands, the upload mode of control files, and the operation mode of commands.
[0024] Furthermore, the command area includes batch command processing functions, file upload to specified nodes, and quick execution of commonly used commands.
[0025] Furthermore, the intelligent agent's working modes include three types, specifically configured as follows:
[0026] In the first working mode, the agent parses the user's intent, formulates and executes a configuration scheme that matches the user's intent (i.e., network configuration instructions output by the agent's large language model), and feeds back the execution result of the configuration scheme to the user.
[0027] Working mode two: The intelligent agent analyzes the user's intent, formulates a configuration scheme that matches the user's intent, and feeds it back to the user;
[0028] The third working mode consists of two phases. In the first phase, the agent parses the user's intent, formulates a configuration scheme that matches the user's intent, and feeds it back to the user. The user confirms that the configuration scheme matches the intent. If it does, the second phase begins. Otherwise, the user proposes modifications to the network configuration scheme, and the agent adjusts the configuration scheme according to the modifications and feeds it back to the user for confirmation, until a configuration scheme that matches the intent is obtained. In the second phase, all the dialogue history from the first phase is used as part of the prompt words to formulate the final configuration scheme through the agent's large language model and execute it to accurately realize the user's intent. The execution result of the second phase is then fed back to the user.
[0029] Furthermore, the network management processing steps based on the network management intelligent agent of the present invention include:
[0030] Step 1, Agent initialization, that is, the agent obtains initial prompts to perceive the callable network management APIs and the current network status; the content of the initial prompts includes a detailed description of the API library, including behavioral patterns, toolbox introductions, task examples and user intent;
[0031] Step 2: The user expresses their intent based on the user interaction module of the intelligent agent, and uses natural language to describe the user's network intent requirements;
[0032] Step 3: The big language model of the intelligent agent parses and processes the user's intent expression to output the network configuration instruction corresponding to the current user intent expression; that is, the big language model generates network configuration instructions that match the intent parsing result of the user intent expression obtained by the big language model based on the predetermined generation rules in the prompt words, according to the network status and the API library of the network orchestration management system.
[0033] Step 4: The agent's code interpreter calls the relevant tools in the toolbox to execute the currently generated network configuration instructions;
[0034] Step 5: The intelligent agent provides feedback on the current processing information to the user through the user interaction module. This processing information includes network configuration instructions, intent parsing results, and / or execution results of configuration instructions.
[0035] The technical solution provided by this invention brings at least the following beneficial effects:
[0036] (1) Improved management efficiency: This invention significantly reduces the tedious process of manual configuration and improves management efficiency by automatically parsing user intent and deploying and configuring the network. As the scale of the network to be built and configured increases, the advantages of the intelligent agent proposed in this invention in terms of management efficiency become increasingly prominent.
[0037] (2) Lowering the user threshold: The intelligent agent and intuitive, user-friendly interface allow users to manage networks without professional networking knowledge, thus lowering the user threshold. Ordinary users can easily build and manage networks through the intelligent agent.
[0038] (3) Enhanced flexibility: Users can describe their intentions in natural language. The intelligent agent of this invention can flexibly build, deploy and configure the network according to user needs, thus meeting the diverse needs of users.
[0039] (4) Reduce costs: Through automated analysis, the intelligent agent can reduce the investment and operation and maintenance costs of physical network infrastructure, while improving the utilization rate of resources. Attached Figure Description
[0040] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0041] Figure 1 This is a schematic diagram of the execution result of the network management system in an embodiment of the present invention;
[0042] Figure 2 This is a schematic diagram of an intent-based network management system (operating mode 1 of an intelligent agent) in an embodiment of the present invention;
[0043] Figure 3 This is an example of a network configuration instruction in an embodiment of the present invention;
[0044] Figure 4 This is an example of the execution result of the network configuration command in an embodiment of the present invention;
[0045] Figure 5 This is a schematic diagram of the framework of the network management intelligent agent according to an embodiment of the present invention;
[0046] Figure 6 This is a schematic diagram of an intent-based network management system (operating mode 2 of an intelligent agent) in an embodiment of the present invention;
[0047] Figure 7 This is a flowchart of the operation of the intent-based network management system in an embodiment of the present invention (operating mode 3 of the intelligent agent).
[0048] Figure 8 This is an example diagram of the intelligent agent visualization interface in an embodiment of the present invention. Detailed Implementation
[0049] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be described in detail and completely below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Generally, the components of the embodiments of the present invention described and shown in the accompanying drawings can be arranged and designed using different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of the present invention.
[0050] This invention provides a network management agent based on natural language intent interaction to achieve the goal of converting straightforward natural language into a complete network system. Specifically, it includes the following two aspects:
[0051] (1) How to parse ambiguous user language and accurately understand the user's needs for the network. Unlike SDN (software-defined network) which is geared towards technical users, the target group of intent-based networks tends to be the end users who use the network. These users usually have varying levels of network knowledge and different expression habits, so there may be ambiguity in the expression of intent.
[0052] (2) How to build and deploy an efficient and stable network system based on users' network needs, so that it can accurately meet users' expectations. The generation of intent networks mainly includes the following five steps: intent expression and collection, translation, automated implementation, network status awareness, assurance, and automatic tuning. Its generation process is highly complex, requiring consideration of various network resource constraints, dependencies between intents, and network security under complex requirements. Therefore, how to transform simple user needs into a complex network system will be a difficult problem that must be solved in the process of intent network generation.
[0053] This invention proposes a network management agent based on natural language intent interaction, which is used as an intent interface in conjunction with a network orchestration management system to implement an intent-based network orchestration management system. Figure 1 , Figure 2As shown, after the agent is initialized, the user describes their intent in natural language and submits it to the agent. Upon receiving the user's intent, the agent first parses it into an accurate network requirement intent. Then, based on the network requirement intent and network status, it formulates an implementation plan for the intent and generates a set of network configuration instructions, which are then sent to the instruction executor. The instruction executor calls relevant tools in the toolbox to execute the received instructions, completes the network configuration to realize the user's intent, and finally delivers the instruction execution result to the user through the agent. The tools in the toolbox include: general tools, summarizing tools, and network management tools. The network management tools include various tools encapsulated by the application programming interface (API) of the network orchestration management system. The specific operation flow of the agent-based intent-based network management system provided by this embodiment is as follows:
[0054] Step 1: Agent Initialization. The agent acquires initial prompts (the prompts include a detailed description of the API library) and perceives the callable network management APIs and the current network status.
[0055] Step 2: User expresses intent. The user describes their network intent requirements in natural language, such as "Deploy a star network consisting of 3 server nodes and 1 switch".
[0056] Step 3: The agent parses the user's intent. The agent parses the user's intent into an accurate and detailed network intent, thereby obtaining an accurate and specific professional expression of the user's network intent requirements;
[0057] For example, for the input intent: "Deploy a star network consisting of 3 server nodes and 1 switch," the corresponding parsed result is: "Generate 1 switch using the OVS (Open vSwitch) image, generate 3 server nodes using the Ubuntu image, with server IPs of 10.0.0.2 / 24, 10.0.0.3 / 24, and 10.0.0.4 / 24 respectively, connect each server node to the switch, and deploy the network."
[0058] Step 4: The agent formulates a network configuration plan. Based on the network status and in conjunction with the API library of the network orchestration and management system, it generates network configuration instructions that meet the intent requirements, such as... Figure 3 As shown.
[0059] Step 5: Execute configuration instructions. The agent uses the interpreter to call the relevant tools in the toolbox to execute the network configuration instructions generated in Step 4.
[0060] Step Six: Return Execution Results. After executing all network configuration commands, return the "Execution Results" to the user. Simultaneously, the agent will feed back the "Accurate Intent" generated in Step Two and the "Configuration Commands" generated in Step Four to the user. The execution results are as follows: Figure 4 As shown.
[0061] As one possible implementation, this embodiment of the invention provides a network management agent based on natural language intent interaction, comprising: a toolbox, prompt words, a large language model, and a Python code interpreter, such as... Figure 5 As shown.
[0062] The toolbox is a collection of tools that an agent can invoke. Each tool is a Python function with a description explaining its purpose, expected input, return output, and examples of how to use it. The network orchestration and management system API is encapsulated as these tools. Therefore, tools can be used to invoke the API.
[0063] The prompts are the input to the large language model, including behavioral patterns, toolbox descriptions, task examples, and the user's intent. The toolbox descriptions are a collection of explanations for all the tools.
[0064] Large language models are pre-trained, large-scale language models. They take prompt words as input and output in a predetermined format: intent explanation (intent resolution result) and suggested codes (configuration instructions), then hand the codes over to a code interpreter. The large language models supported by this invention include, but are not limited to: GPT series models (including "gpt-3.5-turbo", "gpt-3.5-turbo-16k", and "gpt-4"), Starcoder models, and Code... The Llama series models ("codellama-13b-hf", "codeLlama-34b-instruct-hf", and "phind-codellama-34b-v2"), the ChatGLM series models ("chatglm_pro", "chatglm_std", "chatglm_lite", and "chatglm_lite_32k"), the Wenxin Yiyan series models ("ernie-bot" and "ernie-bot-turbo"), the Tongyi Qianwen series models ("qwen-turbo" and "qwen-plus"), and the Xunfei Xinghuo Cognitive Large Model SparkDesk can be selected as the neural network model for the intelligent agent. Furthermore, this embodiment of the invention also supports users downloading models from the large model website Huggingface to their local machine for local intelligent agent deployment.
[0065] The Python code interpreter calls relevant tools from its toolbox to execute suggested code output by the large language model. The general Python code interpreter is python.org.
[0066] Preferably, the specific design of the prompt words and toolbox in the embodiments of the present invention is as follows:
[0067] (1) Prompt word design
[0068] Prompt words are crucial for applying general-purpose large language models to specialized domains. They constrain the output of standardized and compliant responses from the large language model, thereby improving its effectiveness in specialized applications. Prompt word design principles include clarity, specificity, consistency, and control over the generation scope. In this embodiment, the initial content of the prompt words includes four parts: behavioral pattern, toolbox introduction, task example, and the current user intent, all described in natural language. As the number of interactions between the user and the agent increases, the dialogue history between the user and the agent accumulates. In new dialogue interactions, the prompt word content includes the above four parts and the dialogue history.
[0069] (1-1) Behavioral Patterns: This section describes the interaction patterns between the user and the agent and the expected agent responses. For example: "I will ask you to perform a task. Your task is to devise a series of simple commands in Python to complete the task. To help you, I will provide you with a set of tools. Each tool is a Python function with a description explaining its function, expected input, returned output, and usage examples. First, you should explain which tool you will use to perform the task and why, and then write the code in Python. Each instruction in Python should be a simple assignment. ListComp and BinOp are not allowed; Python code should be written line by line. Intermediate results can be printed if necessary."
[0070] (1-2) Toolbox Introduction: This section introduces all the tools in the toolbox. The toolbox includes general tools and network management tools, which can be used to call corresponding APIs to achieve their respective functions. The introduction of each tool includes the tool name, function description, parameter description, tool output, and usage examples.
[0071] (1-3) Task Examples: Multiple complete task cases. Each case includes user intent input, agent output that satisfies the "behavioral pattern" requirement and the user intent requirement.
[0072] For example:
[0073] "Task: Set the bandwidth and latency between node h1 (server) and node s1 (switch) to 5 Mbps and 10 μs, respectively."
[0074] To set the bandwidth and latency between h1 and s1, I will use the 'configure_link' tool.
[0075] The code representation of this task is as follows:
[0076] ```
[0077] py
[0078] configure_link(link_name="l1",node_name="h1",bandwidth=5000,delay=10)
[0079] ```
[0080] (1-4) User intent: The user intent entered by the user this time.
[0081] (2) Toolbox Design
[0082] The "tools" in this invention can be divided into three main categories: "common" class, "summarize" class, and network management class. The "common" class is used to obtain the current time, including year, month, day, hour, minute, and second. The "summarize" class is used to summarize tutorial documents, that is, to extract key information from lengthy and detailed tutorial documents, alleviating the problem of limited context. The network management class is the design focus of this invention, and it is used to build networks. Based on usage, the network management class can be divided into the following five categories:
[0083] 1) Obtain the image class
[0084] These tools are used to obtain available images from the current network management system for subsequent network node creation. The process of building a virtual network requires virtual machine images or container images to construct virtual nodes; an image is a complete copy containing the operating system, software applications, and configuration settings.
[0085] 2) Node Management Class
[0086] These tools enable users to manage nodes in a network topology. Their functions include: adding nodes to an intended network to form a topology; adding or deleting nodes in an existing network topology to dynamically modify the topology; assigning IP addresses to existing nodes; displaying the IP addresses and port mappings of specified nodes; and uploading local files to customize node types.
[0087] 3) Link Management Class
[0088] These tools are used to manage links in a network topology. Their functions include: adding links to an intended network to form a topology; adding or deleting links in an existing network topology to dynamically modify the topology; configuring existing links (such as setting link bandwidth, latency, packet loss rate, etc.); viewing link configurations; and resetting link configurations.
[0089] 4) Command execution class
[0090] The purpose of this type of tool is to execute a series of specific instructions on a single or multiple specified nodes, such as entering a specified folder, displaying files in the current directory, or displaying the current file path.
[0091] 5) Create a typical topology class
[0092] These tools allow users to quickly create several typical network topologies, such as tree topologies, star topologies, fat-tree topologies, and linear topologies. Tree topologies allow the simulation of networks with hierarchical structures; star topologies are suitable for data centers or local area networks; fat-tree topologies are suitable for high-performance computing and large-scale data centers; and linear topologies are commonly found in simple or small-scale networks.
[0093] In this embodiment of the invention, the commonly used network management tools deployed in the intelligent agent are described in detail below:
[0094] (1)get_all_images:
[0095] Function: To obtain currently available images for use by subsequent commands (such as adding nodes).
[0096] Parameters: None
[0097] (2)add_node(name,image,x,y,cpu_limit,men_limit):
[0098] Function: Adds a node named "name" to the network topology in the network management system. Its type is "image," and its location is at the (x, y) coordinates of the foreground canvas. It allows selective setting of "cpu_limit" and "men_limit" to determine whether and how to limit the node's CPU utilization and memory usage.
[0099] parameter:
[0100] name(parameter type: string): The name of this node, which cannot be the same as an existing node.
[0101] image(parameter type: string): The Docker image used by this node. You need to use the API "get_all_images" to get the currently available images first.
[0102] x (parameter type: integer), y (parameter type: integer): The position coordinates of this node on the front canvas, ranging from 0 to 700, and cannot overlap with existing nodes.
[0103] cpu_limit (parameter type: integer, optional): CPU utilization limit for this node, in percentage.
[0104] men_limit(parameter type: integer, optional): The memory limit of this node, in Mbytes.
[0105] For example:
[0106] add_node("h1","ubuntu",x=100,y=100)
[0107] Add an Ubuntu host named h1, positioned at (100, 100) on the front-end canvas. There are no limits on CPU utilization or memory size. (This is because "cpu_limit" and "men_limit" are not set.)
[0108] (3)add_link(src_node,dst_node,link_name,src_ip,dst_ip):
[0109] Function: Add a link connecting the source node "src_node" and the destination node "dst_node" in the network management system, assign IP addresses "src_ip" and "dst_ip" to the two nodes respectively, and finally name the link "link_name".
[0110] parameter:
[0111] src_node(parameter type: string): The name of the source node, which must be an existing node.
[0112] dst_node(parameter type: string): The name of the destination node, which must be an existing node.
[0113] link_name(parameter type: string): The name of this link, which cannot be the same as an existing link.
[0114] src_ip (parameter type: string): The IP address of the source node, such as "192.168.1.1 / 24".
[0115] dst_ip (parameter type: string): The IP address of the destination node, such as "192.168.1.2 / 24".
[0116] For example:
[0117] add_link("h1","s1","l1","192.168.1.1 / 24","192.168.1.2 / 24")
[0118] Add a link named "l1" between nodes "h1" and "s1". The IP addresses of "h1" and "s1" are "192.168.1.1 / 24" and "192.168.1.2 / 24" respectively.
[0119] (4)batch_command_exec(node_list,node_type,command):
[0120] Function: To execute a specific command "command" in batches on all nodes in a node list "node_list".
[0121] parameter:
[0122] node_list(parameter type: list): The list contains the names of multiple nodes, which are the nodes to be executed.
[0123] node_type(parameter type: string): This parameter has three states:
[0124] 1) "all": In this case, the command will be executed on all nodes, and the parameter "node_list" can only be empty in this state, that is, no node name can be written in "node_list".
[0125] 2) "specified_ctn_type": At this time, only the parameter type of the node can be written in "node_list". The node types include "hosts", "controller", "routers" and "switches", etc. The command will be executed on the nodes of the type specified in "node_list".
[0126] 3) "specified_ctn_list": At this time, only the names of nodes can be written in "node_list", and the command will be executed on the node with the name specified in "node_list".
[0127] command(parameter type: string): The specific command to be executed on the specified node. If there are multiple commands, they can be separated by ";" and will be executed sequentially.
[0128] For example:
[0129] 1)batch_command_exec([],"all","ifconfig")
[0130] Execute the command "Display active network card information" on all existing nodes.
[0131] 2)batch_command_exec(["hosts"], "specified_ctn_type", "ifconfig")
[0132] Execute the command "Display active network interface information" on all nodes of type "hosts".
[0133] 3)batch_command_exec(["h1","s1"],"specified_ctn_list","ifconfig")
[0134] Execute the command "Display active network card information" on nodes named "h1" and "s1".
[0135] (5)configure_link(link_name,node_name,bandwidth,delay,delay_dist,jitter,correlation,loss,queue_size):
[0136] Function: Customize network link settings for a specific link "link_name", including bandwidth, delay, jitter, correlation, packet loss, and queue size to simulate various network conditions.
[0137] parameter:
[0138] link_name(parameter type: string): The name of the link you want to configure.
[0139] node_name(parameter type: string): The name of the node to which this link is connected.
[0140] bandwidth (parameter type: integer, optional): The bandwidth of this link, in kbps.
[0141] delay(parameter type: integer, optional): The delay of this link, in milliseconds.
[0142] delay_dist(parameter type: string, optional): the distribution of delay variation.
[0143] jitter (parameter type: integer, optional): The jitter of this link, in milliseconds.
[0144] correlation (parameter type: integer, optional): correlation of jitter, in percentage.
[0145] loss (parameter type: integer, optional): Packet loss rate of this link, in percentage.
[0146] queue_size(parameter type: integer, optional): The size of the queue for this link, in bytes.
[0147] For example:
[0148] configure_link('l1','h1',bandwidth=1000,delay=30,delay_dist='normal',jitter=100,correlation=1,loss=1,queue_size=200000)
[0149] Set link L1 to: bandwidth 1000kbps, latency 30ms, jitter 100ms, packet loss rate and jitter correlation both 1%, and queue size 200000 bytes.
[0150] (6)port_mapping(node_name,container_port,host_port):
[0151] Purpose: Configure port mapping for the node named "node_name" in the network management system so that the host machine can access the service port "container_port" inside the container through the port number "host_port".
[0152] parameter:
[0153] node_name(parameter type: string): The name of the node whose port you want to map.
[0154] container_port(parameter type: integer): The port number inside the container, the container port that needs to be mapped.
[0155] host_port(parameter type: integer): The port number on the host machine. The container port needs to be mapped to this port on the host. The host port should be between 9200 and 40000.
[0156] For example:
[0157] port_mapping("h1",80,8080)
[0158] Map container port "80" on node "h1" to host port "8080".
[0159] (7) get_ip(node_name):
[0160] Function: Retrieves and outputs the IP address of a node by its name "node_name", which is used for communication between nodes within the network.
[0161] parameter:
[0162] node_name(parameter type: string): The name of the node whose IP address you want to get.
[0163] For example:
[0164] ip_address = get_ip("h1")
[0165] Get the IP address of node "h1" and pass it to ip_address.
[0166] (8)file_upload(node_name,src_filepath,tgt_filepath):
[0167] Function: Upload any type of file you create from the local path "src_filepath" to customize the network node "node_name".
[0168] parameter:
[0169] node_name(parameter type: string): The name of the target node to be created.
[0170] src_filepath(parameter type: string): The local storage path of the source file to be uploaded, which is the file used to generate the target node.
[0171] tgt_filepath(parameter type: string, optional): The storage location of the target node to be generated (if not specified, it will be stored in the default path " / home". If a folder named "tgt_filepath" does not exist, it will be created automatically).
[0172] For example:
[0173] file_upload(" / PathTo / main.py","h1"," / root")
[0174] Upload the source file "main.py" from the path " / PathTo / ", use it to generate the node "h1", and store the generated node in the path " / root".
[0175] (9)manage_worker(woker_ip,delete_worker):
[0176] Function: Register or deregister a physical host with the IP address "woker_ip".
[0177] parameter:
[0178] worker_ip (parameter type: string): The IP address of the host on which you want to register or deregister the worker.
[0179] delete_worker(parameter type: boolean, optional): When this parameter is "True", the physical host will be deregistered; when this parameter is "False", the physical host will be registered.
[0180] For example:
[0181] manage_worker("10.1.1.16",delete_worker=False)
[0182] Register the physical host with the IP address "10.1.1.16".
[0183] manage_worker("10.1.1.16",delete_worker=True)
[0184] Cancel the physical host with IP address "10.1.1.16".
[0185] (10)star_topo_template(subnet,nstar):
[0186] Function: To deploy a star topology in a network environment.
[0187] parameter:
[0188] subnet(parameter type: string): The subnet of the topology to be deployed.
[0189] nstar(parameter type: string, optional): The number of hosts in this star topology.
[0190] For example:
[0191] star_topo_template("192.168.1.0 / 24",nstar=3)
[0192] Deploy a star topology with 3 hosts and a subnet of 192.168.1.0 / 24.
[0193] The network management agent provided in this embodiment of the invention has multiple working modes. This embodiment configures three working modes. In working mode one, the agent parses the user's intent into an accurate network intent, then formulates and executes a configuration scheme, and finally feeds back the execution result to the user, such as... Figure 2 As shown. In Mode 2, the agent interprets the user's intent as an accurate network intent, then formulates a configuration plan but does not execute it; instead, it directly feeds back the configuration instructions to the user, such as... Figure 6 As shown. The execution flow of the intelligent agent's working mode three is as follows. Figure 7 As shown in the diagram. In Mode 3, the first stage is similar to Mode 2. After the user inputs their intention described in natural language, the agent parses the user's intention into an accurate network intention, then formulates a network configuration plan and feeds it back to the user. The user confirms whether the network configuration plan formulated by the agent meets their intention. If it does, the process proceeds to the second stage; otherwise, the user further proposes modifications to the network configuration plan. The agent adjusts the network configuration plan based on the user's feedback and feeds it back to the user. This continuous "feedback-opinion-fine-tuning" process between the user and the agent continues until the user approves the network configuration plan formulated by the agent and confirms that it meets their intention. In the second stage, all the dialogue history from Stage 1 is used as prompts to help the agent formulate and execute a feasible configuration plan to achieve the user's intention. Similar to Mode 1, the user expresses their intention, and the agent can formulate and execute a network configuration plan that meets the user's intention based on the communication information from the first stage, and return the execution result to the user. Mode 3 combines Modes 1 and 2 to improve the success rate of the agent in achieving user intentions and enhance the reliability of the intention-based network management system.
[0194] The intelligent agent provided in this embodiment of the invention is also configured with a corresponding visual interface for convenient user operation. This visual interface includes a configuration area, an interaction area, and a command area. The configuration area includes network project configuration (including project name, user name, backend host IP, port, etc.), intelligent agent working mode settings, and large language model settings, supporting models such as Tsinghua Zhipu, Baidu Wenxin, iFlytek Xinghuo, and Alibaba Tongyi. The interaction area is where the user and the intelligent agent interact. The user inputs their intent here. User intent input methods include, but are not limited to, text, voice, and images. The intelligent agent displays intent parsing results, configuration commands, and execution results here. The command area includes batch command processing, uploading files to specified nodes, and quick execution of commonly used commands. Batch command processing allows specified category nodes (servers, routers, switches, etc.) to execute set commands; batch file upload uploads specified files to specified category nodes (servers, routers, switches, etc.) or all nodes. For example, distributed machine learning development requires large-scale parallel triggering; quick execution of commonly used commands allows for quick execution of commands such as dialogue reset, clearing, and mode switching.
[0195] The network management agent provided in this embodiment of the invention is highly user-friendly, has low requirements for the deployment environment (only requiring a stable network or sufficient computing power), and is applicable to any network orchestration system. The agent only needs to run using a Python interpreter of version 3.7 or higher, which must include the third-party library "requests" for interacting with the network orchestration system through a standard interface.
[0196] The user flow of the network orchestration management system based on the network management intelligent agent provided in this embodiment of the invention includes:
[0197] (1) Complete registration on the network orchestration management system. Before using agents to build network topology, you need to create an account on the network orchestration management system and obtain the IP address of the backend host for subsequent use.
[0198] (2) Establishing a connection between the agent and the network orchestration management system. Taking Klonet (a virtual network orchestration management system) as an example, the agent can establish a connection and interact with the network orchestration management system through the HTTP (Hypertext Transfer Protocol) interface. When establishing a connection, the following information needs to be provided: the project name (if there is no project with this name, a new project with this name will be automatically created), username, backend host IP, port, etc.
[0199] (3) Select the large language model to use for the intelligent agent. Currently supported large language models include: OpenAI's ChatGPT, Tsinghua Zhipu's ChatGLM, Baidu's Wenxin Yiyan, Alibaba's Tongyi Qianwen, iFlytek's Xinghuo Cognition, and Huggingface's CodeLlama. All of these models require a key obtained from their respective official websites to use. In addition, users can also obtain and download models from Huggingface to support local model inference; these models do not require a key.
[0200] (4) Utilize the agent to interact with the network management system. Users can type their ideas for network deployment in the dialog box. The agent can then call the API in the toolbox based on the user's intent and send the instructions to the network management system via the HTTP interface, thereby deploying the network topology on the network management system. For more accurate results, users can switch the agent to mode two. In this mode, the agent will not interact with the network management system. By communicating with the agent, it can learn and better understand the user's intent.
[0201] (5) Using extended functions. In addition to basic dialogue and interaction functions, the intelligent agent provided in this embodiment of the invention also provides some additional functions, including: speech-to-text conversion, batch management of nodes, and uploading of any type of file to a specified node to achieve node customization. Users can use these extended functions according to their own needs.
[0202] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention 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; and these 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 the present invention.
[0203] The above descriptions are merely some embodiments of the present invention. For those skilled in the art, various modifications and improvements can be made without departing from the inventive concept of the present invention, and these all fall within the protection scope of the present invention.
Claims
1. A network management intelligent agent based on natural language intent interaction, characterized in that, include: User interaction module, toolbox, prompt words, large language model, and code interpreter; in, The user interaction module is used for the visualization of user configuration, user-agent interaction, and network management processes and results; The toolbox is a collection of tools that intelligent agents can invoke. This toolbox consists of various tools encapsulated from the application programming interface (API) of the network orchestration management system. It includes general tools, summary tools, and network management tools. The network management tools are the various tools encapsulated from the network orchestration management system's API. Each tool in the toolbox is a function, and each tool is configured with a tool description. The tool description explains the function's purpose, expected input, return output, and operation examples. The tools in the toolbox are divided into three main categories: general tools, summary tools, and network management tools. General tools are used to obtain the current time point; summary tools are used to summarize tutorial documents; and network management tools include: image management, node management, link management, command execution, and typical topology creation tools, specifically... The image management class is used to obtain the images available in the current network management system for creating network nodes; The node management class is used by users to manage nodes in a network topology. Its functions include: adding nodes to an intended network to form a topology, adding or deleting nodes in an existing network topology to dynamically modify the network topology, assigning IP addresses to existing nodes, displaying the IP address and port mapping of a specified node, and uploading local files to customize node types. The Link Management class is used to manage links in a network topology. Its functions include: adding links to an intended network to form a topology, adding or deleting links in an existing network topology to dynamically modify the network topology, configuring existing links, viewing link configurations, and resetting link configurations. Command execution classes are used to execute a series of specific instructions on a single or multiple specified nodes, including: entering a specified folder, displaying files in the current directory, and displaying the current file path; Create typical topology classes to allow users to quickly create various typical network topologies, including tree topology, star topology, fat tree topology, and linear topology; The prompts are the input to the large language model and are used for user configuration and interactive operation prompts. The prompts include the agent's behavior pattern, toolbox introduction, task examples, user intent, and dialogue history. Among them, the behavior pattern describes the interaction pattern between the user and the agent and the expected agent response specifications. The toolbox introduction is a collection of tool descriptions for all the tools included in the toolbox. The task examples are several complete task cases, each of which includes: user intent input, agent output that meets the behavior pattern requirements and user intent requirements. The large language model is a pre-built and trained large language model that takes prompt words as input and outputs them in a predetermined format. Its output includes intent parsing results and network configuration instructions. The network configuration instructions output by the large language model are then sent to the code interpreter. The code interpreter extracts keywords from the suggested code, matches and calls the corresponding tools in the toolbox to execute network configuration instructions, and returns the execution results to the user through the user interaction module. The intelligent agent operates in three modes, specifically configured as follows: In the first working mode, the intelligent agent parses the user's intent, formulates and executes a configuration scheme that matches the user's intent, and provides feedback to the user on the execution result of the configuration scheme. Working mode two: The intelligent agent analyzes the user's intent, formulates a configuration scheme that matches the user's intent, and feeds it back to the user; The third working mode consists of two phases. In the first phase, the agent parses the user's intent, formulates a configuration scheme that matches the user's intent, and feeds it back to the user. The user confirms that the configuration scheme matches the intent. If it does, the second phase begins. Otherwise, the user proposes modifications to the network configuration scheme, and the agent adjusts the configuration scheme according to the modifications and feeds it back to the user for confirmation, until a configuration scheme that matches the intent is obtained. In the second phase, all the dialogue history from the first phase is used as part of the prompt words to formulate the final configuration scheme through the agent's large language model and execute it to accurately realize the user's intent. The execution result of the second phase is then fed back to the user.
2. The network management intelligent agent as described in claim 1, characterized in that, The tool description includes: tool name, function description, parameter introduction, tool output and usage examples.
3. The network management intelligent agent as described in claim 1, characterized in that, The user interaction module's visual interface includes a configuration area, an interaction area, and a command area; The configuration area includes network project configuration, agent working mode settings, and large language model settings. The interaction area is used for users to input their intentions, and to display the intention parsing results and network configuration instructions output by the large language model, as well as the execution results output by the code interpreter. The command area is used to configure the execution mode of network configuration commands, the upload mode of control files, and the operation mode of commands.
4. The network management intelligent agent as described in claim 3, characterized in that, The command area includes batch command processing, file upload to a specified node, and quick execution of commonly used commands.
5. A network management method based on the network management agent according to any one of claims 1 to 4, comprising the following steps: Step 1, agent initialization, involves the agent acquiring initial prompts to perceive the callable network management APIs and the current network status; among which, The initial prompts include behavioral patterns, toolbox introductions, task examples, and user intent; Step 2: The user expresses their intent based on the user interaction module of the intelligent agent, and uses natural language to describe the user's network intent requirements; Step 3: The agent's large language model parses and processes the user's intent expression to output the network configuration instructions corresponding to the current user intent expression; Step 4: The agent's code interpreter calls the relevant tools in the toolbox to execute the currently generated network configuration instructions; Step 5: The intelligent agent provides feedback on the current processing information to the user through the user interaction module. This processing information includes network configuration instructions, intent parsing results, and / or execution results of configuration instructions.
Citation Information
Patent Citations
Task processing method, device, system and equipment and readable storage medium
CN117094376A
Method, system and device for generating intent network based on GPT
CN117857354A