Network management agent based on natural language intention interaction
The network management agent that interacts with natural language intentions automatically parses user intentions and generates network configuration instructions, which solves the problems of insufficient scalability and robustness in the existing technology, achieves efficient and flexible network management and resource utilization, and reduces The user threshold and operation and maintenance costs are reduced.
Patent Information
- Application Number
- CN202410857819.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-28
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2044-06-28
AI Technical Summary
Existing intent-based network configuration methods have deficiencies in scalability and robustness, making it difficult to flexibly respond to the needs of users with different professional levels. Moreover, the process of manually building complex networks is cumbersome and error-prone, and cannot efficiently utilize multi-dimensional heterogeneous computing network resources.
Using a network management agent based on natural language intent interaction, through user interaction modules, toolboxes, large language models and code interpreters, it automatically parses user intent and generates network configuration instructions to achieve automated network construction and configuration.
It significantly improves the efficiency of network management, lowers the user threshold, enhances the flexibility and scalability of the system, reduces the investment and operation and maintenance costs of physical network infrastructure, and improves resource utilization.
Smart Images

Figure CN118780267A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of network management based on intent-based networks, and in particular to a network management intelligent agent based on natural language intent interaction. Background Art
[0002] In order to support the rapid development and application of technologies such as general large models, metaverse, artificial intelligence, and virtual reality, the network is becoming more complex and large, in order to reach and connect computing network resources that are widely distributed, multi-dimensionally heterogeneous, and unevenly distributed in time and space. However, this requires network management and control to be able to efficiently utilize the widely and unevenly distributed multi-dimensional heterogeneous computing network resources to 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, maintenance, and control of networks all rely on the expertise and manpower of network managers. Faced with complex and large networks and a wide variety of service requirements, manually building complex service topologies is a rigid, cumbersome, time-consuming, labor-intensive, and error-prone process. Therefore, new methods are urgently needed to help network managers free themselves from rigid and cumbersome network configuration tasks and improve network management efficiency and network reliability. This requires that the method be able to perceive complex networks, intelligently analyze the network needs of users or applications, and automatically build and configure networks on demand without requiring users or network managers to provide explicit low-level instructions, so that the network can be analyzed, planned, and configured completely autonomously.
[0004] The intent network includes users, intent interfaces, and network provisioning systems, which are relatively independent. Users send their intents to the intent interface, which converts the intent into network configuration instructions and sends them to the network provisioning system. The network provisioning system executes the instructions to realize the user's intent. Among them, the user's intent only includes the effect required by the user without specifying the way and method to achieve the effect. In the intent network, users do not need to master the information and status of the underlying network provisioning system, let alone care about the implementation plan of the intent; the intent interface can parse the intent, perceive the underlying network status, and plan the implementation plan; the network provisioning system builds and configures the network according to the instructions. Building an intent-based network management system can achieve efficient, flexible, and automated management and control of large-scale complex networks with wide geographical distribution and multi-dimensional resources that change over time. The key to realizing this system lies in the design of the intent interface. The intent interface largely determines the ease of use, flexibility, and scalability of the system.
[0005] In the existing intent-based network configuration method, the receiving unit receives the intent uploaded by the user, and the network configuration requirements in the user's intent are parsed by the parsing unit. The configuration requirements are sent by the sending unit to the simulation network, and the connectivity of the development requirements in the simulation network is detected by the simulation unit. After passing the connectivity test, the configuration requirements are sent by the sending unit to the network supply system. It is worth noting that in this method, the user's intent is submitted to the intent interface in the form of an intent collection table, that is, the intent interface provides a specific intent collection table template to the user, and the user fills in the intent according to the template and submits the intent collection table. This method separates the user's demand goals and the intent implementation method, allowing the user to only propose demand goals without considering the network status and underlying implementation details. Although this implementation method conforms to the concept of intent network, its intent parsing relies on the pre-designed specific intent collection template to parse the intent by keyword extraction and logical judgment, resulting in poor extensibility and robustness of the intent. The intent collection template includes a first intent collection table and a second intent collection table, which are used to collect basic network configuration and inter-subnet policy respectively. User intent and network configuration are limited by the intent collection template, so its extensibility is poor. This analytical method is also difficult to flexibly cope with users of different professional levels, so its robustness is poor.
[0006] The existing (virtual) network orchestration management system can efficiently manage virtual networks, realize virtual network construction, network topology configuration and network topology lifecycle management. It can distribute the virtual network topology on multiple servers to achieve efficient management and control of heterogeneous resources distributed across geographies. Users or network managers can use its visual interface to design and configure the network topology according to their intentions, forming a topology description file of the intention. The front end then transmits the topology description file to the back end. After the back end parses the topology description file, it deploys the intended topology on the physical network as required. Figure 1 This method has a low threshold for use and a high degree of user freedom, and can achieve efficient management and control of virtual networks. Although this method allows users to issue their intentions through a visual interface, which lowers the threshold for user use, in the intention description stage, users need to select, place, and configure logical network nodes one by one, and connect logical network nodes one by one to build and configure logical links between nodes. However, if users need to build or configure a large-scale complex network, the process of building an intention topology description based on a visual interface will be extremely cumbersome. Summary of the invention
[0007] In view of the shortcomings of the prior art, the present invention proposes a network management agent based on natural language intention interaction, which can serve as the intention interface between the user of the intention network and the network provisioning system, and realize the conversion from "user intention in natural language form" to "network provisioning system configuration instructions" based on the large language model, and then can be combined with the network orchestration management system to realize the intention-based network management system. After the user or network administrator expresses the intention in natural language, a complete and reliable network can be automatically built, deployed, and configured to realize the user's intention.
[0008] The technical solution adopted by the present invention is:
[0009] A network management agent based on natural language intention interaction, comprising: 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 visual display of the process and results of user configuration, user-agent interaction, and network management;
[0012] The toolbox is a tool collection that can be called by the agent. The tool collection is various tools encapsulated by the application programming interface API of the network orchestration management system, including general tools, summary tools and network management tools. Among them, the network management tool includes various tools encapsulated by the application programming interface API of the network orchestration management system, so as to realize the purpose of calling the corresponding API through the tool of the agent; each tool in the toolbox is a function (such as a Python function), and a tool description is configured for each tool;
[0013] The prompt words are the input of 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 intentions, and conversation history records (i.e., the conversation records between the agent and the user). The behavior pattern is used to describe the interaction pattern between the user and the agent and the expected agent response specification. The toolbox introduction is a collection of tool descriptions of all tools included in the toolbox.
[0014] The large language model is a preset and trained large language model, which takes prompt words as input and outputs in a predetermined format, and its output content includes intent parsing results (the parsing results of the user's network intent requirements are described in natural language, so as to obtain an accurate, specific and professional expression of the user's network intent requirements) and network configuration instructions (i.e., suggested codes); and 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 the network configuration instructions and returns the execution results to the user through the user interaction module.
[0016] Furthermore, the tool description is used to explain the function of each tool, the expected input, the returned output, and the operation examples of the function.
[0017] Furthermore, the tool description includes: tool name, function description (i.e., the function of the Python function corresponding to the tool), parameter introduction (including expected input and returned output), tool output and its usage examples.
[0018] Furthermore, the task examples are several complete task cases, each of which includes: user intention input, and agent output that meets the behavior pattern requirements and user intention requirements.
[0019] Furthermore, the tools in the toolbox include three categories: general class ("common" class), summary class ("summarize" class) and network management class. Among them, the general class is used to obtain the current time point, such as year, month, day, hour, minute, second, etc.; the summary class is used to summarize the tutorial document, that is, to extract key information from the lengthy and detailed tutorial document to alleviate the problem of context limitation; the network management class includes: image management class, node management class, link management class, command execution class and creation of typical topology class.
[0020] Further, the visual interface of the user interaction module includes a configuration area, an interaction area, and a command area;
[0021] Among them, the configuration area includes network project configuration, agent working mode settings and large language model settings;
[0022] The interactive area is used for users to input user intent (including but not limited to text, voice, pictures, 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 to the user;
[0023] The command area is used for 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 functions for batch processing of commands, uploading files to designated nodes, and quick execution of commonly used commands.
[0025] Furthermore, there are three working modes of the agent, which are specifically set as follows:
[0026] Working mode 1: The agent analyzes the user's intention, formulates and executes a configuration plan that matches the user's intention (i.e., the network configuration instructions output by the agent's large language model), and feeds back the execution result of the configuration plan to the user;
[0027] Working mode 2: The agent analyzes the user's intention, formulates a configuration plan that matches the user's intention, and feeds it back to the user;
[0028] Working mode three includes two stages. In the first stage, the intelligent agent analyzes the user's intention, formulates a configuration plan that matches the user's intention and feeds it back to the user; the user confirms that the fed-back configuration plan is consistent with the intention, and if it is consistent, it enters the second stage; otherwise, the user proposes modification suggestions for the network configuration plan, and the intelligent agent adjusts the configuration plan based on the modification suggestions and then feeds it back to the user for confirmation until a configuration plan that meets the intention is obtained; in the second stage, all the dialogue history of the first stage is used as part of the prompt words to formulate the final configuration plan and execute it through the large language model of the intelligent agent to accurately realize the user's intention, and then the execution results of the second stage are fed back to the user.
[0029] Further, the network management processing steps based on the network management agent of the present invention include:
[0030] Step 1: Agent initialization, i.e., the agent obtains the initial prompt words to perceive the callable network management API and the current network status; the content of the initial prompt words includes a detailed description of the API library, i.e., including behavior patterns, toolbox introduction, task examples, and user intentions;
[0031] Step 2: The user expresses the user intention based on the user interaction module of the intelligent agent, and uses natural language to describe the user's network intention requirements;
[0032] Step 3: The large language model of the intelligent agent parses the user's intention expression to output a network configuration instruction corresponding to the current user's intention expression; that is, the large language model generates a network configuration instruction that matches the intention parsing result of the user's intention expression obtained by the large language model based on the generation rules established in the prompt word, the network status and the API library of the network orchestration management system;
[0033] Step 4: The code interpreter of the agent calls the relevant tools in the toolbox to execute the currently generated network configuration instructions;
[0034] Step 5: The intelligent agent feeds back the current processing information to the user through the user interaction module. The processing information includes network configuration instructions, intent parsing results and / or execution results of configuration instructions.
[0035] The technical solution provided by the present invention brings at least the following beneficial effects:
[0036] (1) Improve management efficiency: The present invention significantly reduces the tedious process of manual configuration by automatically analyzing user intentions and deploying and configuring the network, thereby improving management efficiency. As the scale of the network to be built and configured increases, the advantages of the intelligent agent proposed in the present invention in terms of management efficiency become more prominent.
[0037] (2) Lowering the user threshold: The intelligent agent and intuitive, friendly interface allow users to manage the network without professional network knowledge, which lowers the user threshold. Ordinary users can also easily build and manage the network through the intelligent agent.
[0038] (3) Enhanced flexibility: Users can describe their intentions through natural language, and the intelligent agent of the present invention can flexibly build, deploy and configure the network according to user needs, thus meeting the diverse needs of users.
[0039] (4) Reducing costs: Through automated analysis, the intelligent agent of the present invention can reduce the investment and operation and maintenance costs of physical network infrastructure, while improving resource utilization. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[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 Schematic diagram of an intent-based network management system in an embodiment of the present invention (agent working mode 1);
[0043] Figure 3 is an example of a network configuration instruction in an embodiment of the present invention;
[0044] Figure 4 An example of the execution result of the network configuration instruction in the embodiment of the present invention;
[0045] Figure 5 A schematic diagram of a framework of a network management agent according to an embodiment of the present invention;
[0046] Figure 6 Schematic diagram of an intent-based network management system in an embodiment of the present invention (agent working mode 2);
[0047] Figure 7 This is a flowchart of the operation of the intent-based network management system in an embodiment of the present invention (working mode three of the intelligent agent).
[0048] Figure 8 This is an example diagram of the agent visualization interface in an embodiment of the present invention. DETAILED DESCRIPTION
[0049] To make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be described in detail and completely in conjunction with the drawings in the implementation of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings can be arranged and designed using different configurations. Therefore, the following detailed description of the embodiments of the present invention provided in the drawings is not intended to limit the scope of the present application for protection, but merely represents selected embodiments of the present invention.
[0050] The embodiment of the present invention provides a network management agent based on natural language intention interaction to achieve the goal of converting straightforward natural language into a complete network system, which specifically 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 aimed at technical users, the target group of intent-based networks is more inclined to be the end users who apply the network. However, such users usually have different levels of network knowledge and different expression habits, so there may be unclear expressions in the process of expressing intent.
[0052] (2) How to build and deploy an efficient and stable network system based on the user's network needs so that it can accurately meet the user's expectations. The generation of an intent network mainly includes the following five steps: intent expression and collection, translation, automated implementation, network status perception, assurance, and automatic tuning. The generation process is very complex and needs to consider the constraints of various network resources, the dependencies between intents, and network security under complex requirements. Therefore, how to convert simple user needs into a complex network system will be a difficult problem that must be solved in the generation process of an intent network.
[0053] The embodiment of the present invention proposes a network management agent based on natural language intention interaction, which can be used as an intention interface in combination with a network orchestration management system to implement an intention-based network orchestration management system, such as Figure 1 , Figure 2As shown, after the agent is initialized, the user describes his intention in natural language and submits the intention to the agent; after receiving the user's intention, the agent first parses the user's intention into an accurate network demand intention; then formulates an implementation plan for the intention based on the network demand intention and the network status and generates a set of network configuration instructions, and sends the configuration instructions to the instruction executor; the instruction executor calls the relevant tools in the toolbox to execute the received instructions, completes the network configuration to realize the user's intention, and finally delivers the instruction execution results to the user through the agent. Among them, the tools in the toolbox include: general tools, summary tools and network management tools, and the network management tools include various tools encapsulated by the application programming interface API (application programming interface) of the network orchestration management system. The operation process of the intent-based network management system based on the agent provided in the embodiment of the present invention is as follows:
[0054] Step 1: Agent initialization: The agent obtains the initial prompt word (the prompt word content includes a detailed description of the API library) to perceive the callable network management API and the current network status.
[0055] Step 2: The user expresses his / her intention. The user uses natural language to describe his / her network intention requirements, such as "deploy a star network consisting of 3 server nodes and 1 switch."
[0056] Step 3: Agent parses intent. The agent parses the user's intent into accurate and detailed network intent, thereby obtaining an accurate, specific and professional expression of the user's network intent needs;
[0057] For example, for the input intent: "Deploy a star network consisting of 3 server nodes and 1 switch.", the corresponding parsing result is: "Use the ovs (Open vSwitch) image to generate a switch, use the ubuntu image to generate 3 server nodes, the server IPs are 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 the API library of the network orchestration management system, it generates network configuration instructions that meet the intent requirements, such as Figure 3 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 6: Return the execution result. After executing all network configuration instructions, the "execution result" is returned to the user. At the same time, the agent feeds back the "accurate intention" generated in step 2 and the "configuration instruction" generated in step 4 to the user. The execution result is as follows: Figure 4 shown.
[0061] As a possible implementation method, a network management agent based on natural language intention interaction provided by an embodiment of the present invention includes: a toolbox, a prompt word, a large language model (Large Language Model) and a Python code interpreter, such as Figure 5 shown.
[0062] The toolbox is a collection of tools that can be called by the agent. Each tool is a Python function with a description that explains what the function does, the expected input, the returned output, and examples of how to use them. The network orchestration management system API is encapsulated into individual tools. Therefore, the API can be called using tools.
[0063] The prompt words are the input of the large language model, including behavior patterns, toolbox introduction, task examples, and the user's intention. The toolbox introduction is the collection of all tool descriptions.
[0064] The large language model is a trained large-scale language model. The large language model takes the prompt word as input and outputs in a predetermined format: intent interpretation (intent parsing result), suggested code (configuration instruction), and hands the code over to the code interpreter. The large language models supported by the embodiments of the present invention include but are not limited to: GPT series models (including "gpt-3.5-turbo", "gpt-3.5-turbo-16k" and "gpt-4"), Starcoder model, Code Llama series models ("codellama-13b-hf", "codeLlama-34b-instruct-hf" and "phind-codellama-34b-v2"), ChatGLM series models ("chatglm_pro", "chatglm_std", "chatglm_lite" and "chatglm_lite_32k"), Wenxin Yiyan series models ("ernie-bot" and "ernie-bot-turbo"), Tongyi Qianwen series models ("qwen-turbo" and "qwen-plus"), and iFlytek Spark cognitive large model SparkDesk. One of the supported large language models can be selected as the neural network model of the agent. At the same time, the embodiment of the present invention also supports users to download models from the large model website huggingface to local for local agent deployment.
[0065] The Python code interpreter calls the relevant tools in the toolbox to execute the recommended 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 embodiment of the present invention is as follows:
[0067] (1) Prompt word design
[0068] Prompt words are the key to applying general large language models to professional fields. They can constrain large language models to output standardized and compliant responses, thereby improving the effectiveness of large language models in professional fields. Prompt word design principles include clarity, specificity, consistency, and control of generation range. In the embodiment of the present invention, the initial content of the prompt word includes four parts: behavior pattern, toolbox introduction, task example, and user intention, all of which are natural language descriptions. As the number of dialogue interactions between users and agents increases, the dialogue history records between users and agents continue to accumulate. In a new dialogue interaction, the prompt word content includes the above four parts and the dialogue history record.
[0069] (1-1) Behavior pattern: This section describes the interaction pattern between the user and the agent and the expected agent response specifications. For example: "I will ask you to perform a task. Your task is to come up with a series of simple commands in Python to complete the task. To help you, I will provide you with a set of tools for you to use. Each tool is a Python function with a description that explains what it does, the expected input, the output it returns, and an example of its use. First, you should state 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. Instead, write the Python code line by line. If necessary, print the intermediate results."
[0070] (1-2) Toolbox introduction: Introduces all the tools in the toolbox one by one. The toolbox includes general tools and network management tools, which can be used to call corresponding APIs to implement corresponding functions. The introduction of each tool includes the tool name, function description, parameter introduction, tool output and its usage example.
[0071] (1-3) Task examples: multiple complete task cases. Each case includes user intent input, agent output that meets the "behavior pattern" requirements and user intent requirements.
[0072] For example:
[0073] "Assignment: 'Set the bandwidth and latency between node h1 (server) and node s1 (switch) to 5 Mbps and 10 us.'
[0074] To set the bandwidth and latency between h1 and s1, I will use the 'configure_link' tool.
[0075] The code corresponding to this task is expressed as:
[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 input by the user this time.
[0081] (2) Toolbox design
[0082] The "tools" of the embodiment of the present invention can be divided into three major categories: "common" class, "summarize" class and network management class. The "common" class is used to obtain the current time point, including year, month, day, hour, minute and second. The "summarize" class is used to summarize the tutorial document, that is, to extract key information from the lengthy and detailed tutorial document to alleviate the problem of limited context. The network management class is the design focus of the present invention, which is used to build a network. According to the usage, the network management class can be divided into the following five categories:
[0083] 1) Get the image class
[0084] This type of tool is used to obtain the images available in the current network management system so as to create network nodes later. In the process of building a virtual network, a virtual machine image or a container image is required to build a virtual node. The image is a complete copy file that includes the operating system, software applications, and configuration settings.
[0085] 2) Node management class
[0086] Through this type of tool, users can manage nodes in the network topology. Its functions include: adding nodes to the intent network to form a topology, adding or deleting nodes in an already formed 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, uploading local files to customize node types, etc.
[0087] 3) Link management
[0088] The purpose of this type of tool is to manage links in the network topology. Its functions include: adding links to the intended network to form a topology, adding or deleting links in an already formed network topology to dynamically modify the network topology, configuring existing links (such as setting link bandwidth, latency, packet loss rate, etc.), viewing link configurations, resetting link configurations, etc.
[0089] 4) Command execution class
[0090] The function of this type of tool is to execute a series of specific instructions on a specified single node or multiple nodes, such as entering a specified folder, displaying files in the current directory, displaying the current file path, etc.
[0091] 5) Create a typical topology class
[0092] With this type of tool, users can quickly create several typical network topologies, such as tree topology, star topology, fat tree topology, linear topology, etc. Tree topology allows simulation of hierarchical networks; star topology is suitable for data centers or local area networks; fat tree topology is suitable for high-performance computing and large-scale data centers; linear topology is common in simple or small-scale networks.
[0093] In the embodiment of the present invention, the commonly used network management tools deployed in the intelligent agent are introduced in detail as follows:
[0094] (1) get_all_images:
[0095] Purpose: Get the currently available image for use in subsequent instructions (such as adding nodes).
[0096] Parameters: None
[0097] (2)add_node(name,image,x,y,cpu_limit,men_limit):
[0098] Function: Add a node named "name" to the network topology in the network management system, whose type is "image" mirror and whose position is at the (x, y) coordinate of the front-end canvas. You can selectively set "cpu_limit" and "men_limit" to decide whether and how to limit the cpu utilization and memory of the node.
[0099] parameter:
[0100] name (parameter type: string): the name of the node. It cannot be the same as the name of an existing node.
[0101] image (parameter type: string): the Docker image used by the node. You need to use the API "get_all_images" to obtain the currently available images.
[0102] x (parameter type: integer), y (parameter type: integer): the position coordinates of the node on the front-end canvas, ranging from 0 to 700, and cannot overlap with existing nodes.
[0103] cpu_limit (parameter type: integer, optional): The cpu utilization limit of the node, in %.
[0104] men_limit (parameter type: integer, optional): memory limit of the node, in Mbytes.
[0105] For example:
[0106] add_node("h1","ubuntu",x=100,y=100)
[0107] Add a ubuntu host and name it h1. Its position on the front-end canvas is (100,100). There is no limit on the CPU utilization and memory size. (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 the line. It cannot be the same as the name of an existing link.
[0114] src_ip (parameter type: string): IP address of the source node, for example "192.168.1.1 / 24".
[0115] dst_ip (parameter type: string): IP address of the destination node, for example "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: Batch execute a specific command "command" for all nodes in a node list "node_list".
[0121] parameter:
[0122] node_list (parameter type: list): The contents of the list are the names of multiple nodes, which are the nodes on which the command will be executed.
[0123] node_type (parameter type: string): This parameter has three states:
[0124] 1) "all": 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 into "node_list". The node types include: "hosts", "controller", "routers" and "switches", etc. The command will be executed on the node of the type specified in "node_list".
[0126] 3) "specified_ctn_list": At this time, only the name of the node can be written in "node_list", and the command will be executed on the node with the specified name in "node_list".
[0127] command (parameter type: string): the specific command to be executed on the specified node. If there are multiple commands, ";" can be used to separate the commands, and they 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 activated network card 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 the nodes named "h1" and "s1".
[0135] (5)configure_link(link_name,node_name,bandwidth,delay,delay_dist,jitter,correlation,loss,queue_size):
[0136] Purpose: Customize the network link settings of a specific link "link_name", including bandwidth "bandwidth", delay "delay", jitter "jitter", jitter correlation "correlation", packet loss rate "loss" and queue size "queue_size" to simulate various network conditions.
[0137] parameter:
[0138] link_name (parameter type: string): The name of the link you want to set.
[0139] node_name (parameter type: string): the name of the node to which the link is connected.
[0140] bandwidth (parameter type: integer, optional): the bandwidth of the link, in kbps.
[0141] delay (parameter type: integer, optional): the delay of the link, in ms.
[0142] delay_dist (parameter type: string, optional): delay change distribution.
[0143] jitter (parameter type: integer, optional): the jitter of the link, in ms.
[0144] correlation (parameter type: integer, optional): correlation of jitter, in %.
[0145] loss (parameter type: integer, optional): packet loss rate of the link, in %.
[0146] queue_size (parameter type: integer, optional): the queue size of the 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] The link l1 is set to: bandwidth 1000 kbps, delay 30 ms, jitter 100 ms, packet loss rate and jitter correlation are both 1% and queue size is 200000 bytes.
[0150] (6)port_mapping(node_name,container_port,host_port):
[0151] Function: Configure port mapping for the node named "node_name" in the network management system so that the host can access the service port "container_port" in the container through the port number "host_port".
[0152] parameter:
[0153] node_name (parameter type: string): The name of the node to which you want to map the port.
[0154] container_port (parameter type: integer): the port number in the container, which 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: Get the IP address of the node through the node name "node_name" and output it for communication between nodes in the network.
[0161] parameter:
[0162] node_name (parameter type: string): The name of the node whose IP address you want to obtain.
[0163] For example:
[0164] ip_address = get_ip("h1")
[0165] Get the IP address of the 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 created 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 used to generate the file of the target node.
[0171] tgt_filepath (parameter type: string, optional): the storage location of the target node to be generated (if not entered, it will be stored in the default path " / home". If there is no folder named "tgt_filepath", 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 " / root" path.
[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 unregister.
[0179] delete_worker (parameter type: Boolean, optional): When this parameter is "True", the physical host will be unregistered; 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 IP address "10.1.1.16".
[0183] manage_worker("10.1.1.16",delete_worker=True)
[0184] Deregister the physical host with the IP address "10.1.1.16".
[0185] (10)star_topo_template(subnet,nstar):
[0186] Purpose: 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 the 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 the embodiment of the present invention has multiple working modes. In the embodiment of the present invention, three working modes are configured. In working mode 1, the agent interprets the user's intention as an accurate network intention, then formulates and executes a configuration plan, and finally feeds back the execution result to the user. Figure 2 In mode 2, the agent interprets the user's intention as the accurate network intention, and then formulates a configuration plan but does not execute it, but directly feeds back the configuration instructions to the user, as shown in Figure 6 The execution process of the agent working mode 3 is as follows Figure 7 As shown in Figure 2. In mode 3, in the first stage, similar to mode 2, after the user inputs the 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 his intention. If it does, it enters the second stage; otherwise, the user further proposes modification opinions on the network configuration plan, and the agent adjusts the network configuration plan according to the user's opinions and feeds it back to the user. The user and the agent continue to "feedback-opinion-fine-tuning" until the user recognizes the network configuration plan formulated by the agent and confirms that it meets the user's intention. Entering the second stage, all the dialogue history of stage 1 will be used as part of the prompt words to help the agent formulate and execute feasible configuration plans to achieve the user's intention. Similar to mode 1, the user proposes the user's intention, and the agent can formulate and execute a network configuration plan that meets the user's intention according to the communication information in the first stage, and return the execution result to the user. The working mode 3 of the agent combines mode 1 and mode 2 to improve the success rate of the agent in achieving user intentions and improve the reliability of the intent-based network management system.
[0194] The agent provided by the embodiment of the present invention is also configured with a corresponding visual interface for convenient use by users. The visual interface includes a configuration area, an interaction area, and an instruction area. Among them, the configuration area includes network project configuration (including project name, user name, backend host IP, port and other information settings), agent working mode settings, large language model settings, etc., and can support models such as Tsinghua Zhipu, Baidu Wenxin, iFlytek Spark, and Ali Tongyi. The interaction area is the area where users and agents interact. The user enters the user's intention here. The user's intention input method includes but is not limited to text, voice, pictures, etc. The agent displays the intention analysis results, configuration instructions, and execution results here. The instruction area includes instruction batch processing functions, uploading files to designated nodes, and quick execution of common instructions. Among them, instruction batch processing, specifying category nodes (servers, routers, switches, etc.) or all nodes to execute the set instructions; batch uploading files, uploading the specified files to the specified category nodes (servers, routers, switches, etc.) or all nodes. For example, distributed machine learning development requires large-scale parallel triggering; common instructions are quickly executed, and instructions such as dialogue reset, clearing, and switching modes can be quickly executed.
[0195] The network management agent provided by the embodiment of the present invention has high usability and low requirements for the deployment environment, requiring only a deployment environment with smooth network or sufficient computing power, and is applicable to any network orchestration system. The agent only needs to rely on a Python interpreter above version 3.7 to run, and the Python interpreter needs to contain a third-party library "requests" for interacting with the network orchestration system through a standard interface.
[0196] The user usage process of the network orchestration management system based on the network management agent provided by the embodiment of the present invention includes:
[0197] (1) Complete registration on the network orchestration management system. Before using the agent to build a 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) Establish a connection between the agent and the network orchestration management system. Taking the virtual network management platform Klonet (a virtual network orchestration management system) as an example, the HTTP (Hypertext Transfer Protocol) interface enables the agent to establish a connection with the network orchestration management system and interact with it. When establishing a connection, you need to provide the name of the project (if there is no project with this name, a new project will be automatically created with this name), user name, backend host IP, port, and other information.
[0199] (3) Select the large language model used by the agent. Currently supported large language models include: ChatGPT from OpenAI, ChatGLM from Tsinghua Zhipu, Wenxin Yiyan from Baidu, Tongyi Qianwen from Alibaba, Spark Cognition from iFlytek, and CodeLlama from huggingface. The above models all require the corresponding keys to be obtained from their official websites before they can be used. In addition, users can also obtain and download models from huggingface to support local model reasoning. Such models do not require the use of keys.
[0200] (4) Use the agent to interact with the network management system. The user can type in his or her ideas about network deployment in the dialog box. The agent can call the API in the toolbox according to the user's intention and send the instructions to the network management system using the HTTP interface, thereby deploying the network topology on the network management system. If the result is to be more accurate, the user can first switch the agent to mode 2. At this time, the agent will not interact with the network management system. By communicating with the agent, it can learn and better understand the user's intention.
[0201] (5) Use extended functions. In addition to basic dialogue and interaction functions, the intelligent agent provided by the embodiment of the present invention also provides some additional functions, including: voice-to-text conversion, batch management of nodes, and uploading 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, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
[0203] The above are only some embodiments of the present invention. For those skilled in the art, several modifications and improvements can be made without departing from the creative concept of the present invention, which all belong to the protection scope of the present invention.
Claims
1. A network management agent based on natural language intention interaction, characterized in that: include: User interaction modules, toolboxes, prompt words, large language models, and code interpreters; in, The user interaction module is used for visual display of the process and results of user configuration, user-agent interaction, and network management; The toolbox is a collection of tools that can be called by the agent. The toolbox is a collection of tools that encapsulate the application programming interface (API) of the network orchestration management system, including general tools, summary 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. Each tool in the toolbox is a function, and a tool description is configured for each tool. The prompt words are the input of 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 intentions, and conversation history records. The behavior pattern is used to describe the interaction pattern between the user and the agent and the expected agent response specification. The toolbox introduction is a collection of tool descriptions of all tools included in the toolbox. The large language model is a preset and trained large language model, which takes prompt words as input and outputs in a predetermined format, and its output content includes intent parsing results and network configuration instructions; and the network configuration instructions output by the large language model are 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 the network configuration instructions and returns the execution results to the user through the user interaction module.
2. The network management agent according to claim 1, characterized in that: The tool description explains the function of each tool, the expected input, the returned output, and an example of the function's operation.
3. The network management agent according to claim 1, characterized in that: The tool description includes: tool name, function description, parameter introduction, tool output and usage examples.
4. The network management agent according to claim 1, characterized in that: The task examples are several complete task cases, each of which includes: user intention input, agent output that meets the behavior pattern requirements and user intention requirements.
5. The network management agent according to claim 1, characterized in that: The tools in the toolbox include three categories: general class, summary class and network management class. The general class is used to obtain the current time point; the summary class is used to summarize the tutorial document; the network management class includes: image management class, node management class, link management class, command execution class and typical topology creation class.
6. The network management agent according to claim 1, characterized in that: The visual interface of the user interaction module includes a configuration area, an interaction area, and a command area; Among them, the configuration area includes network project configuration, agent working mode settings and large language model settings; The interactive area is used for users to input user intent, and to display intent parsing results and network configuration instructions output by the large language model, as well as execution results output by the code interpreter to users; The command area is used for the execution mode of network configuration commands, the upload mode of control files, and the operation mode of commands.
7. The network management agent according to claim 6, characterized in that: The command area includes command batch processing functions, uploading files to specified nodes, and quick execution of commonly used commands.
8. The network management agent according to claim 1, characterized in that: There are three agent working modes, which are as follows: Working mode 1: The agent analyzes the user's intention, formulates and executes a configuration plan that matches the user's intention, and feeds back the execution result of the configuration plan to the user; Working mode 2: The agent analyzes the user's intention, formulates a configuration plan that matches the user's intention, and feeds it back to the user; Working mode three includes two stages. In the first stage, the agent analyzes the user's intention, formulates a configuration plan that matches the user's intention, and feeds it back to the user. The user confirms the feedback configuration plan is consistent with the intention. If it is consistent, it enters the second stage; otherwise, the user proposes a modification suggestion for the network configuration plan, and the intelligent agent adjusts the configuration plan according to the modification suggestion and then feeds it back to the user for confirmation until a configuration plan that meets the intention is obtained; In the second stage, all the dialogue history of the first stage is used as part of the prompt words to formulate and execute the final configuration plan through the large language model of the intelligent agent to accurately realize the user's intention, and then the execution results of the second stage are fed back to the user.
9. A network management method based on the network management agent according to any one of claims 1 to 8 comprises the following steps: Step 1: Agent initialization, that is, the agent obtains the initial prompt words to perceive the callable network management API and the current network status; The content of the initial prompt words includes behavior patterns, toolbox introduction, task examples, and user intentions; Step 2: The user expresses the user intention based on the user interaction module of the intelligent agent, and uses natural language to describe the user's network intention requirements; Step 3: The large language model of the intelligent agent parses the user's intention expression to output a network configuration instruction corresponding to the current user's intention expression; Step 4: The code interpreter of the agent calls the relevant tools in the toolbox to execute the currently generated network configuration instructions; Step 5: The intelligent agent feeds back the current processing information to the user through the user interaction module. The processing information includes network configuration instructions, intent parsing results and / or execution results of configuration instructions.
Citation Information
Patent Citations
Network management and control interaction method and device based on natural language
CN116306684A
Task processing method, device, system and equipment and readable storage medium
CN117094376A
Method, system and device for generating intent network based on GPT
CN117857354A
Network configuration intention analysis method based on large language model
CN118175031A
Code injection from natural language derived intent
US20220350574A1
Cited By
Artificial intelligence platform interaction method based on large language model and intelligent agent
CN119645373A
Construction method of generative heterogeneous graph model, agent distribution method and related device
CN119760244A
Intention-driven network management method and system based on large language model
CN120768781A
An intent-driven network management method and system based on a large language model
CN120768781B
Data backup management method and device based on natural language
CN122309236A
