An LLM-driven natural language AI-powered automated operation and maintenance method and apparatus
By using an LLM-driven natural language AI-powered intelligent operation and maintenance method, the problems of high skill requirements for operation and maintenance personnel and difficulty in cross-scenario adaptation in traditional operation and maintenance models have been solved. This has enabled automated operation and maintenance for various architectures, improving operation and maintenance efficiency and security.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUANGZHOU HANZHISOFT CO LTD
- Filing Date
- 2026-01-04
- Publication Date
- 2026-06-02
AI Technical Summary
Traditional operation and maintenance models require operation and maintenance personnel to master multi-language scripts and server interface protocols. Manual execution of processes leads to high delays in fault response, difficulty in cross-scenario adaptation, and inability for non-professionals to operate.
It adopts an LLM-driven natural language AI intelligent operation and maintenance method, which preprocesses and verifies fuzzy instructions to generate operation and maintenance scripts, and automatically executes them according to the target architecture by selecting the API protocol. It supports multiple architectures such as cloud servers, physical machines and containers.
It reduces the failure rate and response delay of operations and maintenance, improves the security of operations and maintenance and the ability to adapt to different scenarios, and reduces the difficulty of operations and maintenance.
Smart Images

Figure CN122132201A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent operation and maintenance technology, and in particular to an LLM-driven natural language AI intelligent operation and maintenance automatic execution method and device. Background Technology
[0002] Modern enterprises may build various operational architectures, such as cloud servers, physical machines, and containers. Cloud servers can enable dynamic resource management, application deployment and development, as well as data and security services. Physical machines refer to hardware computer equipment that can provide a high-performance and highly controllable computing environment. Containers are the smallest executable unit containing application code, dependencies, and libraries.
[0003] Traditional operation and maintenance models have the following problems: (1) Operation and maintenance personnel need to master multi-language scripts and server interface protocols, which non-professionals cannot operate. (2) Manually executing processes under the premise of manually writing scripts results in high fault response delays and long batch operation times. (3) In some application scenarios, it is necessary to call multiple architectures such as cloud servers, physical machines and containers to perform operation and maintenance operations, which makes cross-scenario adaptation difficult.
[0004] In summary, there is an urgent need for a natural language-based operation and maintenance (O&M) method to reduce the difficulty of O&M, automatically generate O&M scripts with a verification mechanism to reduce the failure rate of O&M, and adapt to various O&M architectures. Summary of the Invention
[0005] To overcome the problems existing in related technologies, the purpose of this invention is to provide an LLM-driven natural language AI intelligent operation and maintenance automatic execution method and device. The method is based on natural language operation and maintenance, and has a verification mechanism on the basis of automatically generating operation and maintenance scripts to reduce the operation and maintenance failure rate. At the same time, it can be adapted to various operation and maintenance architectures.
[0006] An LLM-driven natural language AI-powered automated operation and maintenance method includes: Acquire fuzzy instructions, which include speech and text in natural language form; The fuzzy instructions are preprocessed to obtain preprocessed instructions; The preprocessed instructions are input into the LLM model to generate an operation and maintenance script; The operation and maintenance script is automatically validated to obtain the execution risk level; wherein, the automatic validation includes script syntax validation and permission validation; If the execution risk level is low risk, then select the API protocol according to the type of the target operation and maintenance architecture; Convert the operation and maintenance script into operation and maintenance instructions according to the type of the API protocol; The operation and maintenance instructions are sent to the target operation and maintenance architecture, and the execution results returned by the target operation and maintenance architecture are received.
[0007] In a preferred embodiment of the present invention, before inputting the preprocessed instructions into the LLM model to generate the operation and maintenance script, the method further includes: The unlabeled text was used as the first training set, and the unlabeled samples included web page language and book language. The training set is input into the model to be trained for self-supervised training to obtain a preliminary trained model. The labeled text is used as the second training set, and the labeled text includes question-answer data and classification data. The LLM model is obtained by adjusting some parameters of the initial training model using the second training set.
[0008] In a preferred embodiment of the present invention, the step of inputting the preprocessed instructions into the LLM model to generate an operation and maintenance script includes: First sample prompt generated; The preprocessed instructions and the first sample prompt are input into the LLM model. Under the guidance of the first sample prompt, the LLM model is controlled to generate an operation and maintenance script that conforms to the expectations of the preprocessed instructions.
[0009] In a preferred embodiment of the present invention, the step of automatically verifying the operation and maintenance script to obtain the execution risk level includes: The system detects whether the operation and maintenance script contains syntax errors and logical errors, and determines the first risk level based on the number of syntax errors and logical errors; the number of syntax errors and logical errors is positively correlated with the first risk level. The total number of permission types of the operation and maintenance script is detected, and a second risk level is determined according to the total number of permission types; wherein, the permission types include file management permissions, sudo permissions, ACL permissions, and RBAC permissions; the total number of permission types is negatively correlated with the second risk level; The system detects whether the operation and maintenance script contains high-risk commands and determines the third risk level; the third risk level is positively correlated with the number of high-risk commands. The execution risk level is obtained by adding the first risk level, the second risk level, and the third risk level together.
[0010] In a preferred embodiment of the present invention, the step of selecting the API protocol according to the type of the target operation and maintenance architecture includes: If the target operation and maintenance framework is a cloud server, then select RESTful or SOAP as the API protocol. If the target operation and maintenance architecture is a physical machine, then select SSH, IPMI or Redfish as the API protocol; If the target operational architecture is a container, then select the Docker Engine or Kubernetes protocol as the API protocol.
[0011] In a preferred embodiment of the present invention, before sending the operation and maintenance instructions to the target operation and maintenance architecture, the method further includes: Read the knowledge graph of server operation and maintenance, which is used to represent the semantic relationships between different entities and concepts; Parse the entity relationships between different entities in the operation and maintenance script; The entity relationships are adjusted using the semantic relationships described above.
[0012] In a preferred embodiment of the present invention, the preprocessing of the fuzzy instruction to obtain a preprocessed instruction includes: The fuzzy instructions are cleaned to obtain cleaned instructions. The text cleaning includes removing spaces, punctuation, special characters and HTML tags. The cleaned instructions are divided into multiple words; Part-of-speech tagging is performed on all the segmented words to obtain preprocessed instructions.
[0013] In a preferred embodiment of the present invention, after converting the operation and maintenance script into operation and maintenance instructions according to the type of the API protocol, the method further includes: Control the target operation and maintenance architecture to receive operation and maintenance instructions; The target operation and maintenance architecture is controlled to extract the target API interface according to the operation and maintenance instructions; Control the target operation and maintenance architecture to call the target API interface and obtain the execution result.
[0014] In a preferred embodiment of the present invention, generating the first sample prompt includes: Define the language scenario corresponding to the preprocessed instructions; M constraint terms are determined based on the language scenario. The constraint terms are used to constrain the operation of the preprocessed instructions, where M≥1. N prompt words are generated by combining M constraint terms, where N ≤ M; The first sample prompt is composed of N prompt words.
[0015] This invention also provides an LLM-driven natural language AI intelligent operation and maintenance automatic execution device for executing an LLM-driven natural language AI intelligent operation and maintenance automatic execution method, the device comprising: A fuzzy instruction acquisition unit is used to acquire fuzzy instructions, which include speech and text in natural language form; The preprocessing unit is used to preprocess the fuzzy instructions to obtain preprocessed instructions; The operation and maintenance script generation unit is used to input the preprocessed instructions into the LLM model and generate an operation and maintenance script. An automatic verification unit is used to automatically verify the operation and maintenance script to obtain the execution risk level; wherein, the automatic verification includes script syntax verification and permission verification; The API protocol selection unit is used to select the API protocol according to the type of the target operation and maintenance architecture if the execution risk level is low risk level. The instruction conversion unit is used to convert the operation and maintenance script into operation and maintenance instructions according to the type of the API protocol; The operation and maintenance instruction sending unit is used to send the operation and maintenance instructions to the target operation and maintenance architecture and receive the execution results returned by the target operation and maintenance architecture.
[0016] The beneficial effects of this invention are as follows: The LLM-driven natural language AI-powered intelligent operation and maintenance automatic execution method provided by this invention includes obtaining fuzzy instructions, which include speech and text in natural language form. The fuzzy instructions are preprocessed to obtain preprocessed instructions, which are then subjected to text cleaning and part-of-speech tagging to improve the accuracy of instruction parsing. The preprocessed instructions are input into the LLM model to generate an operation and maintenance script. The operation and maintenance script is automatically validated to obtain an execution risk level; wherein, the automatic validation includes script syntax validation and permission validation. Based on the automatically generated operation and maintenance script, a validation mechanism is implemented to perform multiple validations on the operation and maintenance script, including syntax, logic, permissions, and high-risk commands, thereby reducing the operation and maintenance failure rate and failure response delay. If the execution risk level is low, an API protocol is selected according to the type of the target operation and maintenance architecture. The operation and maintenance script is converted into operation and maintenance instructions according to the type of the API protocol, and the operation and maintenance instructions are sent to the target operation and maintenance architecture, receiving the execution result returned by the target operation and maintenance architecture. The above methods, while improving operational security and reducing operational difficulty, can support operational operations on various architectures such as cloud servers, physical machines, and containers, achieving cross-scenario adaptation. Attached Figure Description
[0017] Figure 1 This is a flowchart of the LLM-driven natural language AI intelligent operation and maintenance automatic execution method of the present invention; Figure 2 This is a flowchart of the automatic verification of operation and maintenance scripts according to the present invention; Figure 3 This is a schematic diagram of the knowledge graph for server operation and maintenance according to the present invention. Detailed Implementation
[0018] Preferred embodiments of the invention will now be described in more detail with reference to the accompanying drawings. While preferred embodiments of the invention are shown in the drawings, it should be understood that the invention can be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that the invention will be thorough and complete, and will fully convey the scope of the invention to those skilled in the art.
[0019] Example 1 like Figure 1 As shown, this embodiment provides an LLM-driven natural language AI-powered automated operation and maintenance method, including: S1: Obtain fuzzy instructions, which include speech and text in natural language form; S2: Preprocess the fuzzy instruction to obtain the preprocessed instruction; S3: Input the preprocessed instructions into the LLM model to generate an operation and maintenance script; S4: Perform automatic verification on the operation and maintenance script to obtain the execution risk level; wherein, the automatic verification includes script syntax verification and permission verification; S5: If the execution risk level is low risk, then select the API protocol according to the type of the target operation and maintenance architecture; S6: Convert the operation and maintenance script into operation and maintenance instructions according to the type of the API protocol; S7: Send the operation and maintenance instructions to the target operation and maintenance architecture and receive the execution result returned by the target operation and maintenance architecture.
[0020] Non-professional system administrators can input text or voice commands in natural language into the system to issue commands such as server startup, shutdown, troubleshooting, and resource expansion. For example, a user can click the option to input ambiguous commands in the system's interactive interface, select voice input, and then speak into the microphone to indicate that the server is experiencing lag.
[0021] like Figure 2 As shown, the automatic verification of the operation and maintenance script to obtain the execution risk level includes: S41: Detect whether the operation and maintenance script has syntax errors and logical errors, and determine the first risk level according to the number of syntax errors and logical errors; the number of syntax errors and logical errors is positively correlated with the first risk level; S42: Detect the total number of permission types of the operation and maintenance script, and determine the second risk level according to the total number of permission types; wherein, permission types include file management permissions, sudo permissions, ACL permissions and RBAC permissions; the total number of permission types is negatively correlated with the second risk level; S43: Detect whether the operation and maintenance script contains high-risk commands and determine the third risk level; the third risk level is positively correlated with the number of high-risk commands. S44: Add the first risk level, the second risk level, and the third risk level to obtain the execution risk level.
[0022] Syntax errors refer to mistakes made when writing or running operation and maintenance scripts due to non-compliance with the rules of the programming language, such as unclosed parentheses and / or quotation marks, missing semicolons, and misspelled keywords and / or parameter names. Logical errors refer to situations where the operation and maintenance script can run, but due to design flaws such as incorrect conditional statements, loop errors, and incorrect variable usage, the results do not meet expectations.
[0023] The more syntax and logic errors a maintenance script contains, the higher its risk level. The number of syntax and logic errors is counted and divided into intervals. For example, if the total number of syntax and logic errors is less than 3, the risk level is 1; if the total number is greater than or equal to 3 but less than or equal to 6, the risk level is 2; and if the total number is greater than 6, the risk level is 3. Validating the syntax and logic of maintenance scripts can reduce the high latency in fault response caused by ambiguity in natural language.
[0024] File management permissions refer to the permissions to delete, modify, and create files; sudo permissions refer to the permissions that authorize a user to execute commands as another user; ACL permissions refer to the permissions that set differentiated access functions for multiple users / groups based on the data directory; RBAC permissions refer to the permissions that are implemented by associating permissions with roles and users with roles.
[0025] The more permission types a user possesses, the more operations they can perform, and the lower the second risk level, which characterizes the execution risk. For example, if the total number of permission types is less than 2, the second risk level is 3; if the total number of permission types is greater than or equal to 2 and less than or equal to 4, the second risk level is 2; and if the total number of permission types is greater than 4, the second risk level is 1. Using the total number of permission types to measure the second risk level can prevent operations that do not meet permissions. For example, a user without administrator privileges might generate an operation and maintenance script to shut down the server, send the script to the operations and maintenance architecture, and have the architecture execute the script.
[0026] The step of selecting the API protocol based on the type of the target operation and maintenance architecture includes: S52: If the target operation and maintenance framework is a cloud server, then select RESTful or SOAP as the API protocol. S53: If the target operation and maintenance architecture is a physical machine, then select SSH, IPMI or Redfish protocol as the API protocol; S54: If the target operational architecture is a container, then select the Docker Engine or Kubernetes protocol as the API protocol.
[0027] Step S52 is preceded by step S51: the execution risk level is low. Steps S52-S54 are three parallel steps. The RESTful API protocol is based on the HTTP protocol for data transmission, which allows operations on resources using standard HTTP methods such as GET, POST, PUT, and DELETE. The SSH protocol, or Secure Shell protocol, is used to solve problems such as authentication, data encryption, and integrity protection for remote operations. The SSH protocol includes a low-level transport layer protocol, a mid-level user authentication protocol, and an upper-level connection protocol. The Kubernetes protocol is an API protocol used by the open-source container orchestration platform Kubernetes for the deployment, scaling, and management of containerized applications.
[0028] The LLM-driven natural language AI-powered intelligent operation and maintenance automatic execution method provided in this embodiment includes obtaining fuzzy instructions, which include speech and text in natural language form. The fuzzy instructions are preprocessed to obtain preprocessed instructions, which are then cleaned and part-of-speech tagged to improve the accuracy of instruction parsing. The preprocessed instructions are input into the LLM model to generate an operation and maintenance script. The operation and maintenance script is automatically validated to obtain an execution risk level; the automatic validation includes script syntax validation and permission validation. Based on the automatically generated operation and maintenance script, a validation mechanism is implemented to perform multiple validations on the script, including syntax, logic, permissions, and high-risk commands, thereby reducing the operation and maintenance failure rate and failure response delay. If the execution risk level is low, an API protocol is selected according to the type of the target operation and maintenance architecture. The operation and maintenance script is converted into operation and maintenance instructions according to the type of the API protocol, and the operation and maintenance instructions are sent to the target operation and maintenance architecture, receiving the execution result returned by the target operation and maintenance architecture. The above methods, while improving operational security and reducing operational difficulty, can support operational operations on various architectures such as cloud servers, physical machines, and containers, achieving cross-scenario adaptation.
[0029] Example 2:
[0030] like Figure 1 As shown, this embodiment provides an LLM-driven natural language AI intelligent operation and maintenance automatic execution method. This embodiment describes the differences from Embodiment 1, based on Embodiment 1. The method includes: S1: Obtain fuzzy instructions, which include speech and text in natural language form; S2: Preprocess the fuzzy instruction to obtain the preprocessed instruction; S3: Input the preprocessed instructions into the LLM model to generate an operation and maintenance script; S4: Perform automatic verification on the operation and maintenance script to obtain the execution risk level; wherein, the automatic verification includes script syntax verification and permission verification; S5: If the execution risk level is low risk, then select the API protocol according to the type of the target operation and maintenance architecture; S6: Convert the operation and maintenance script into operation and maintenance instructions according to the type of the API protocol; S7: Send the operation and maintenance instructions to the target operation and maintenance architecture and receive the execution result returned by the target operation and maintenance architecture.
[0031] The preprocessing of the fuzzy instruction to obtain the preprocessed instruction includes: S21: Perform text cleaning on the fuzzy instruction to obtain a cleaned instruction. The text cleaning includes removing spaces, punctuation, special characters and HTML tags. S22: Divide the cleaned instructions into multiple words; S23: Perform part-of-speech tagging on all the segmented words to obtain preprocessed instructions.
[0032] Design regular expressions to remove spaces, punctuation, special characters, and HTML tags from ambiguous instructions. This embodiment uses a bidirectional long short-term memory network or a conditional random field to segment the cleaning instructions into multiple words. The bidirectional long short-term memory network can simultaneously capture forward and backward information of the text. The word segmentation algorithm based on the conditional random field determines the optimal word segmentation result based on contextual features and has a high F1 score when handling nested words and ambiguous words. The F1 score is the harmonic mean of precision and recall.
[0033] Each word segment is assigned a part-of-speech tag, resulting in a preprocessed instruction. Part-of-speech tags include nouns, verbs, quantifiers, and adjectives. For example, the cleaned instruction could be "expand memory on 3 medium-performance cloud servers." Part-of-speech tagging of this instruction would assign "3" as a quantifier, "medium performance" as an adjective, "cloud servers" as a noun, and "expand memory" as a verb. Using part-of-speech tagging clarifies the relationships between entities, associating the executed operation with the object, thereby reducing the probability of instruction execution errors.
[0034] The step of inputting the preprocessed instructions into the LLM model to generate an operation and maintenance script includes: S31: Generate the first sample prompt; S32: Input the preprocessed instructions and the first sample prompt into the LLM model, and under the guidance of the first sample prompt, control the LLM model to generate an operation and maintenance script that conforms to the expectations of the preprocessed instructions.
[0035] The generation of the first sample prompt includes: S311: Define the language scenario corresponding to the preprocessed instructions; S312: Determine M constraint terms based on the language scenario. The constraint terms are used to constrain the operation of the preprocessed instruction, where M≥1. S313: Generate N prompt words based on M constraint terms, where M≤N; S314: Combine N prompt words to form the first sample prompt.
[0036] Each preprocessed instruction corresponds to a language scenario, which includes improving performance, reducing resource utilization, and maintaining the current operating mode. If the language scenario is to reduce resource utilization, constraints are generated according to combinations of nouns, verbs, quantifiers, and adjectives. For example, if the cleaned instruction is to expand the memory of three medium-performance cloud servers, the corresponding constraint is to reduce the current resource utilization from 85% to 40%. The constraint consists of five words: resource utilization (noun), current (adjective), 85% and 40% (quantifiers), and reduce to. These five words form the first sample prompt.
[0037] Example 3:
[0038] like Figure 1 As shown, this embodiment provides an LLM-driven natural language AI intelligent operation and maintenance automatic execution method. This embodiment describes the differences from Embodiment 1, based on Embodiment 1. The method includes: S1: Obtain fuzzy instructions, which include speech and text in natural language form; S2: Preprocess the fuzzy instruction to obtain the preprocessed instruction; S3: Input the preprocessed instructions into the LLM model to generate an operation and maintenance script; S4: Perform automatic verification on the operation and maintenance script to obtain the execution risk level; wherein, the automatic verification includes script syntax verification and permission verification; S5: If the execution risk level is low risk, then select the API protocol according to the type of the target operation and maintenance architecture; S6: Convert the operation and maintenance script into operation and maintenance instructions according to the type of the API protocol; S7: Send the operation and maintenance instructions to the target operation and maintenance architecture and receive the execution result returned by the target operation and maintenance architecture.
[0039] Before inputting the preprocessed instructions into the LLM model to generate the operation and maintenance script, the process also includes: S21': Use unlabeled text as the first training set, where the unlabeled samples include web page language and book language; S22': Input the training set into the model to be trained for self-supervised training to obtain a preliminary trained model; S23': Use the labeled text as the second training set, wherein the labeled text includes question-answer data and classification data; S24': Adjust some parameters of the preliminary trained model using the second training set to obtain the LLM model.
[0040] The model to be trained is an untrained LLM model. Self-supervised training is the core paradigm of current LLM (Large Language Model) training, and its core idea is to automatically generate supervision signals using unlabeled text. This invention inputs the training set into the model to be trained for masked language modeling, causal language modeling, and next-sentence prediction. Masked language modeling involves randomly masking some words, and the model predicts the masked content, thereby learning contextual dependencies. Causal language modeling predicts the next word based on the preceding context, suitable for generative models. Next-sentence prediction determines whether two sentences are consecutive, enhancing semantic coherence understanding.
[0041] Adjusting some parameters of the initially trained model using a second training set is a secondary training process. This combines supervised fine-tuning and parameter optimization strategies. Building upon the self-supervised training in the first stage, it enables the model to more accurately understand user commands and generate expected responses. For high performance, full parameter fine-tuning is chosen; for high training efficiency, LoRA parameter fine-tuning is selected.
[0042] The parameter optimization strategies of this invention include dynamic learning rate scheduling, adaptive batch adjustment, and parameter fine-tuning. Dynamic learning rate scheduling employs OneCycleLR, a strategy that dynamically adjusts the learning rate and momentum during training, first rapidly increasing to a large learning rate and then gradually decreasing it. This achieves rapid convergence in the early stages of training and fine-tuning in the later stages, avoiding oscillations or getting stuck in local optima. Adaptive batch adjustment is a technique for dynamically adjusting batch size, aiming to balance training speed, memory usage, and convergence stability, and is used for distributed training in memory-constrained scenarios. Parameter fine-tuning in this invention employs LoRA, a parameter-efficient model adaptation technique that trains only a small number of parameters through low-rank matrix factorization, significantly reducing computational and storage costs while maintaining the performance of the pre-trained model.
[0043] Before sending the operation and maintenance instructions to the target operation and maintenance architecture, the method further includes: S61': Read the knowledge graph of server operation and maintenance, which is used to represent the semantic relationships between different entities and concepts; S62': Parse the entity relationships between different entities in the operation and maintenance script; S63': Adjust the entity relationship using the semantic relationship.
[0044] This invention employs an LLM (Limited Language Management) model to construct a knowledge graph for server operations and maintenance. Specifically, it uses an LLM model to extract entity-relationship-entity structures from a large amount of correctly executed text. This invention uses GPT or Qwen as examples of LLM models. Entities are treated as nodes in the knowledge graph, and relationships are treated as edges connecting different nodes. The entity relationships between different entities in the operations and maintenance script are parsed, and it is checked whether the entity relationships conform to the semantic relationships in the knowledge graph. If they do not conform, the semantic relationships in the knowledge graph take precedence, and one or more entities in the entity relationship are modified, or the relationships themselves are modified. For example, instead of expanding the external storage of three cloud servers, the code is changed to expanding the memory of the three cloud servers.
[0045] like Figure 3 As shown, the nodes in the knowledge graph of this invention are nouns, quantifiers, or adjectives. An edge connecting two noun nodes represents an inclusion relationship; an edge connecting a noun node and a quantifier node, or a noun node and a quantifier node, represents a quantity modification relationship; and an edge connecting a noun node and an adjective node represents a type modification relationship. The edges in the knowledge graph are directed edges, pointing from the subject of the operation to be performed to the specific operation, quantity, or adjective.
[0046] After converting the operation and maintenance script into operation and maintenance instructions according to the type of the API protocol, the method further includes: S71': Control the target operation and maintenance architecture to receive operation and maintenance instructions; S72': Control the target operation and maintenance architecture to extract the target API interface according to the operation and maintenance instructions; S73': Control the target operation and maintenance architecture to call the target API interface and obtain the execution result.
[0047] The target operations and maintenance architecture extracts fields from the operations and maintenance instructions, including the target API's address and API protocol type, and queries the target API interface corresponding to the target API's address. The target operations and maintenance architecture sends a call instruction to the target API interface, the target API executes the call instruction, and the target API returns the execution result.
[0048] This embodiment also provides an LLM-driven natural language AI intelligent operation and maintenance automatic execution device, used to execute the LLM-driven natural language AI intelligent operation and maintenance automatic execution method of any one of embodiments 1-3, the device comprising: A fuzzy instruction acquisition unit is used to acquire fuzzy instructions, which include speech and text in natural language form; The preprocessing unit is used to preprocess the fuzzy instructions to obtain preprocessed instructions; The operation and maintenance script generation unit is used to input the preprocessed instructions into the LLM model and generate an operation and maintenance script. An automatic verification unit is used to automatically verify the operation and maintenance script to obtain the execution risk level; wherein, the automatic verification includes script syntax verification and permission verification; The API protocol selection unit is used to select the API protocol according to the type of the target operation and maintenance architecture if the execution risk level is low risk level. The instruction conversion unit is used to convert the operation and maintenance script into operation and maintenance instructions according to the type of the API protocol; The operation and maintenance instruction sending unit is used to send the operation and maintenance instructions to the target operation and maintenance architecture and receive the execution results returned by the target operation and maintenance architecture.
[0049] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, apparatus, article, or method. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, apparatus, article, or method that includes that element.
[0050] The above description is only a preferred embodiment of this application and does not limit the patent scope of this application. Any equivalent structural or procedural changes made based on the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
Claims
1. An LLM-driven natural language AI-powered automatic operation and maintenance method, characterized in that, include: Acquire fuzzy instructions, which include speech and text in natural language form; The fuzzy instructions are preprocessed to obtain preprocessed instructions; The preprocessed instructions are input into the LLM model to generate an operation and maintenance script; The operation and maintenance script is automatically validated to obtain the execution risk level; wherein, the automatic validation includes script syntax validation and permission validation; If the execution risk level is low risk, then select the API protocol according to the type of the target operation and maintenance architecture; Convert the operation and maintenance script into operation and maintenance instructions according to the type of the API protocol; The operation and maintenance instructions are sent to the target operation and maintenance architecture, and the execution results returned by the target operation and maintenance architecture are received.
2. The LLM-driven natural language AI intelligent operation and maintenance automatic execution method according to claim 1, characterized in that, Before inputting the preprocessed instructions into the LLM model to generate the operation and maintenance script, the process also includes: The unlabeled text was used as the first training set, and the unlabeled samples included web page language and book language. The training set is input into the model to be trained for self-supervised training to obtain a preliminary trained model. The labeled text is used as the second training set, and the labeled text includes question-answer data and classification data. The LLM model is obtained by adjusting some parameters of the initial training model using the second training set.
3. The LLM-driven natural language AI intelligent operation and maintenance automatic execution method according to claim 1, characterized in that, The step of inputting the preprocessed instructions into the LLM model to generate an operation and maintenance script includes: First sample prompt generated; The preprocessed instructions and the first sample prompt are input into the LLM model. Under the guidance of the first sample prompt, the LLM model is controlled to generate an operation and maintenance script that conforms to the expectations of the preprocessed instructions.
4. The LLM-driven natural language AI intelligent operation and maintenance automatic execution method according to claim 1, characterized in that, The automatic verification of the operation and maintenance script to obtain the execution risk level includes: The system detects whether the operation and maintenance script contains syntax errors and logical errors, and determines the first risk level based on the number of syntax errors and logical errors; the number of syntax errors and logical errors is positively correlated with the first risk level. The total number of permission types of the operation and maintenance script is detected, and a second risk level is determined according to the total number of permission types; wherein, the permission types include file management permissions, sudo permissions, ACL permissions and RBAC permissions; the total number of permission types is negatively correlated with the second risk level; The system detects whether the operation and maintenance script contains high-risk commands and determines the third risk level; the third risk level is positively correlated with the number of high-risk commands. The execution risk level is obtained by adding the first risk level, the second risk level, and the third risk level together.
5. The LLM-driven natural language AI intelligent operation and maintenance automatic execution method according to claim 1, characterized in that, The step of selecting the API protocol based on the type of the target operation and maintenance architecture includes: If the target operation and maintenance framework is a cloud server, then select RESTful or SOAP as the API protocol. If the target operation and maintenance architecture is a physical machine, then select SSH, IPMI or Redfish as the API protocol; If the target operational architecture is a container, then select the Docker Engine or Kubernetes protocol as the API protocol.
6. The LLM-driven natural language AI intelligent operation and maintenance automatic execution method according to claim 1, characterized in that, Before sending the operation and maintenance instructions to the target operation and maintenance architecture, the method further includes: Read the knowledge graph of server operation and maintenance, which is used to represent the semantic relationships between different entities and concepts; Parse the entity relationships between different entities in the operation and maintenance script; The entity relationships are adjusted using the semantic relationships described above.
7. The LLM-driven natural language AI intelligent operation and maintenance automatic execution method according to claim 1, characterized in that, The preprocessing of the fuzzy instruction to obtain the preprocessed instruction includes: The fuzzy instructions are cleaned to obtain cleaned instructions. The text cleaning includes removing spaces, punctuation, special characters and HTML tags. The cleaned instructions are divided into multiple words; Part-of-speech tagging is performed on all the segmented words to obtain preprocessed instructions.
8. The LLM-driven natural language AI intelligent operation and maintenance automatic execution method according to claim 1, characterized in that, After converting the operation and maintenance script into operation and maintenance instructions according to the type of the API protocol, the method further includes: Control the target operation and maintenance architecture to receive operation and maintenance instructions; The target operation and maintenance architecture is controlled to extract the target API interface according to the operation and maintenance instructions; Control the target operation and maintenance architecture to call the target API interface and obtain the execution result.
9. The LLM-driven natural language AI intelligent operation and maintenance automatic execution method according to claim 3, characterized in that, The generation of the first sample prompt includes: Define the language scenario corresponding to the preprocessed instructions; M constraint terms are determined based on the language scenario. The constraint terms are used to constrain the operation of the preprocessed instructions, where M≥1. N prompt words are generated by combining M constraint terms, where N ≤ M; The first sample prompt is composed of N prompt words.
10. An LLM-driven natural language AI intelligent operation and maintenance automatic execution device, characterized in that, The apparatus for performing the method of claim 1, comprising: A fuzzy instruction acquisition unit is used to acquire fuzzy instructions, which include speech and text in natural language form; The preprocessing unit is used to preprocess the fuzzy instructions to obtain preprocessed instructions; The operation and maintenance script generation unit is used to input the preprocessed instructions into the LLM model and generate an operation and maintenance script. An automatic verification unit is used to automatically verify the operation and maintenance script to obtain the execution risk level; wherein, the automatic verification includes script syntax verification and permission verification; The API protocol selection unit is used to select the API protocol according to the type of the target operation and maintenance architecture if the execution risk level is low risk level. The instruction conversion unit is used to convert the operation and maintenance script into operation and maintenance instructions according to the type of the API protocol; The operation and maintenance instruction sending unit is used to send the operation and maintenance instructions to the target operation and maintenance architecture and receive the execution results returned by the target operation and maintenance architecture.