Script generation and management method and device for automatic operation and maintenance and medium
Through the automated operation and maintenance script generation and management method, the natural language processing model is used to generate operation and maintenance scripts, which solves the problem of low intelligent level of automated operation and maintenance, improves operation and maintenance efficiency and accuracy, and reduces manual intervention and error risks.
Patent Information
- Application Number
- CN202411302274.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-18
- Publication Date
- 2025-01-21
AI Technical Summary
The current level of intelligent automation of automation operation and maintenance is low, and complex operation and maintenance work requires excessive manual intervention, which increases the risk of human error and has low operation and maintenance efficiency.
Provide a script generation and management method for automated operation and maintenance. By obtaining the user's operation and maintenance needs describing text, the pre -training natural language processing model is used to determine the key information of the operation and maintenance, and the corresponding operation and maintenance script is generated based on this. This method also includes the execution, monitoring and audit report generation of scripts, as well as abnormal processing and code review.
It improves the intelligence level of automated operation and maintenance, reduces the number of manual interventions required in complex operation and maintenance work, reduces the risk of human error, and improves operation and maintenance efficiency and accuracy.
Smart Images

Figure CN119336625A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a script generation and management method, device and medium for automated operation and maintenance. Background Art
[0002] With the increasing complexity of enterprise business and the expansion of Internet Technology (IT) resources, the traditional operation and maintenance management model has been unable to meet the needs of efficient, safe and low-cost operation and maintenance. Automated operation and maintenance has become an important development direction of IT operation and maintenance management, and is gradually becoming a key support for enterprise digital transformation.
[0003] However, the current level of intelligence in automated operation and maintenance is low. Automated operation and maintenance is not completely independent of human intervention. On the contrary, in complex operation and maintenance scenarios, operation and maintenance work requires excessive human intervention. For example, the generation and management of automated scripts requires a lot of effort from operation and maintenance personnel. This increases the risk of human error in operation and maintenance work, while limiting the improvement of operation and maintenance efficiency. Summary of the invention
[0004] The embodiments of the present application provide a script generation and management method, device and medium for automated operation and maintenance, which are used to solve the problems that the current automated operation and maintenance has a low level of intelligence, complex operation and maintenance work requires excessive manual intervention, increases the risk of human error, and has low operation and maintenance efficiency.
[0005] On the one hand, an embodiment of the present application provides a script generation and management method for automated operation and maintenance, the method being applied to a pre-built automated operation and maintenance script management system, the method comprising:
[0006] Obtaining the operation and maintenance requirement description text from the user terminal;
[0007] Input the operation and maintenance requirement description text into a pre-trained natural language processing model to determine corresponding operation and maintenance key information according to the model output result; wherein the operation and maintenance key information at least includes the operation object, operation type, and operation parameters of the operation and maintenance task corresponding to the preset operation and maintenance intention;
[0008] Generate a corresponding operation and maintenance script based on the key operation and maintenance information and the preset operation and maintenance script template library;
[0009] Sending the operation and maintenance script to a corresponding script execution engine for execution, and obtaining operation monitoring information of executing the operation and maintenance script;
[0010] An operation and maintenance audit report is generated according to the operation monitoring information, and the operation and maintenance audit report is sent to the user terminal.
[0011] In one implementation of the present application, before inputting the operation and maintenance requirement description text into a pre-trained natural language processing model to determine the corresponding operation and maintenance key information according to the model output result, the method further includes:
[0012] Acquire a number of operation and maintenance task samples pre-marked with operation and maintenance intentions; wherein the operation and maintenance task samples at least include the operation object, operation type, and operation parameters of the corresponding operation and maintenance task described by historical users;
[0013] Each of the operation and maintenance task samples is input into the natural language processing model to be trained to train the natural language processing model until the corresponding model output accuracy is greater than a first preset threshold, thereby obtaining the pre-trained natural language processing model.
[0014] In one implementation of the present application, based on the key operation and maintenance information and the preset operation and maintenance script template library, a corresponding operation and maintenance script is generated, specifically including:
[0015] Matching the key operation and maintenance information with the attributes of each script template in the preset operation and maintenance script module library;
[0016] Determine one or more corresponding script templates to be recommended according to the matching results;
[0017] Determining the user's historical operation habits corresponding to the user terminal; wherein the user's historical operation habits represent the user's preference for each script template;
[0018] Determine the recommendation score of the corresponding script template to be recommended according to the user's historical operation habits and each script template to be recommended;
[0019] When the recommendation score is greater than a second preset threshold, the to-be-recommended script template is used as a recommended script template, and each parameter of the key operation and maintenance information is added to the recommended script template to generate the operation and maintenance script.
[0020] In one implementation of the present application, before generating a corresponding operation and maintenance script based on the key operation and maintenance information and the preset operation and maintenance script template library, the method further includes:
[0021] Obtaining user information from a preset database; the user information includes script access permission and script modification permission;
[0022] The user information is used as a grouping attribute to divide each script template in the preset operation and maintenance script template library into a corresponding user permission set.
[0023] In one implementation of the present application, based on the key operation and maintenance information and the preset operation and maintenance script template library, a corresponding operation and maintenance script is generated, specifically including:
[0024] Determine the script templates corresponding to the same preset operation and maintenance intention, and generate a multi-version script template; wherein the multi-version script template corresponds to the same preset operation and maintenance intention;
[0025] Determine each operation and maintenance user in the preset database, and determine the recommendation score corresponding to each operation and maintenance user and each version of the script template in the multiple versions of the script template;
[0026] In the order of the recommendation scores from large to small, a multi-version script template sequence corresponding to each operation and maintenance user is generated and stored in the preset database, so as to generate the operation and maintenance script of the corresponding operation and maintenance user based on the first version script template in the multi-version script template sequence.
[0027] In one implementation of the present application, sending the operation and maintenance script to a corresponding script execution engine for execution specifically includes:
[0028] Based on a preset code review tool, code review is performed on the operation and maintenance script; wherein the code review at least includes preset code standard review and preset sensitive data review through the preset code review tool;
[0029] If the result of the code review is passed, the operation and maintenance script is sent to the corresponding script execution engine for execution;
[0030] Otherwise, a prompt message is generated and sent to the management terminal.
[0031] In one implementation of the present application, the method further includes:
[0032] Determine the exception type corresponding to the operation and maintenance script according to the preset exception type list;
[0033] Determine the captured exception when the operation and maintenance script is executed according to the exception capture mechanism corresponding to the exception type;
[0034] According to the exception handling strategy corresponding to the captured exception, the operation and maintenance script is subjected to corresponding exception handling operations until the captured exception is eliminated; wherein the exception handling strategy includes at least one or more of the following: a pre-storage strategy and an expert system feedback strategy.
[0035] In one implementation of the present application, the method further includes:
[0036] Adding the preset operation and maintenance script template library to the container image of the preset target platform respectively;
[0037] Based on the calling instructions from each platform, the corresponding container image is matched, and a connection between the matched container image and the corresponding calling platform is established, so that the calling platform calls the corresponding preset operation and maintenance script template library.
[0038] On the other hand, the embodiment of the present application further provides a script generation and management device for automated operation and maintenance, characterized in that the device includes:
[0039] At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute a script generation and management method for automated operation and maintenance as described above.
[0040] On the other hand, an embodiment of the present application further provides a non-volatile computer storage medium storing computer executable instructions, wherein the computer executable instructions can execute a script generation and management method for automated operation and maintenance as described above.
[0041] Compared with the prior art, the present invention has the following significant effects:
[0042] Through the above scheme, this application can provide operation and maintenance personnel with an automated operation and maintenance tool that can input natural language instructions, and intelligently and flexibly provide operation and maintenance scripts according to operation and maintenance tasks, so as to conveniently execute operation and maintenance tasks. At the same time, through the technical solution of this application, operation and maintenance personnel can conveniently manage and maintain operation and maintenance scripts, improve the efficiency and accuracy of operation and maintenance work. This improves the intelligence level of automated operation and maintenance, reduces the need for excessive manual intervention in complex operation and maintenance work, and reduces the risk of human errors in operation and maintenance work. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0044] Figure 1 A flowchart of a script generation and management method for automated operation and maintenance in an embodiment of the present application;
[0045] Figure 2 This is a structural diagram of a script generation and management device for automated operation and maintenance in an embodiment of the present application. DETAILED DESCRIPTION
[0046] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.
[0047] There are many automated operation and maintenance tools on the market, such as Ansible, Puppet, SaltStack, etc. These tools have their own characteristics and can meet the operation and maintenance needs of different enterprises and scenarios. These tools usually support functions such as batch system configuration, program deployment, command execution, and simplify operation and maintenance operations through modularization and scripting. On the basis of automated operation and maintenance, intelligent operation and maintenance has become a new trend in the development of the industry. Intelligent operation and maintenance realizes intelligent analysis and processing of operation and maintenance data by introducing technologies such as artificial intelligence and big data, thereby providing early warning and rapid location of problems. Intelligent operation and maintenance not only improves the accuracy and efficiency of operation and maintenance, but also reduces operation and maintenance costs and the risk of human errors.
[0048] Although there are many automated operation and maintenance tools on the market, the integration between these tools is low, making it difficult to achieve unified management and operation and maintenance across platforms and systems. Although automated operation and maintenance has made certain progress, there is still a problem of insufficient automation in actual applications. The operation and maintenance work of many companies still relies on a large amount of manual operation and judgment, resulting in low operation and maintenance efficiency and prone to errors. This is mainly due to the limited functions and performance of existing automated operation and maintenance tools, which are difficult to meet the complex and changing operation and maintenance needs of enterprises. Compared with automation, the development of intelligent operation and maintenance is still in its infancy. Most of the intelligent operation and maintenance products on the market currently remain at the data analysis and early warning level, lacking in-depth intelligent decision-making and automated processing capabilities. This means that when faced with complex operation and maintenance problems, companies still need to rely on manual experience and judgment to solve problems.
[0049] Based on this, the embodiments of the present application provide a script generation and management method, device and medium for automated operation and maintenance, which are used to solve the current low level of intelligence in automated operation and maintenance, complex operation and maintenance work requires excessive manual intervention, increases the risk of human error, and has low operation and maintenance efficiency.
[0050] The following describes in detail various embodiments of the present application in conjunction with the accompanying drawings.
[0051] The present application embodiment provides a script generation and management method for automated operation and maintenance, which is applied to a pre-built automated operation and maintenance script management system. Figure 1 As shown, the method may include steps S101-S105:
[0052] S101, the server obtains an operation and maintenance requirement description text from a user terminal.
[0053] It should be noted that the server, as the executor of the script generation and management method for automated operation and maintenance, is only an example. The executor is not limited to the server, and this application does not make any specific limitations on this.
[0054] The user terminal can be understood as the mobile phone, computer and other devices used by the operation and maintenance personnel, and this application does not make specific restrictions on this. The operation and maintenance personnel (i.e., the operation and maintenance users of the automated operation and maintenance script management system) can send the operation and maintenance requirements description text to the server through the user terminal. The operation and maintenance requirements description text can be understood as one or more natural language texts in which the operation and maintenance user describes the operation and maintenance tasks he wants to perform.
[0055] In addition, the operation and maintenance requirement description text can be obtained by the user through dragging operations in the user interface.
[0056] S102, the server inputs the operation and maintenance requirement description text into a pre-trained natural language processing model to determine corresponding operation and maintenance key information according to the model output result.
[0057] Among them, the key operation and maintenance information at least includes the operation object, operation type, and operation parameters of the operation and maintenance task corresponding to the preset operation and maintenance intention.
[0058] In an embodiment of the present application, before inputting the operation and maintenance requirement description text into a pre-trained natural language processing model to determine the corresponding operation and maintenance key information according to the model output result, the method further includes:
[0059] The server obtains a number of operation and maintenance task samples pre-marked with operation and maintenance intentions. The operation and maintenance task samples at least include the operation object, operation type, and operation parameters of the corresponding operation and maintenance task described by historical users. Each operation and maintenance task sample is input into the natural language processing model to be trained to train the natural language processing model until the accuracy of the corresponding model output is greater than a first preset threshold, thereby obtaining a pre-trained natural language processing model.
[0060] That is to say, the natural language processing model pre-trained in this application is trained by operation and maintenance task samples marked with operation and maintenance intentions. During the training process, the natural language processing model can identify multiple attribute parameters corresponding to the operation and maintenance tasks in the natural sentences described by historical users in the operation and maintenance task samples, including operation objects, operation types, and operation parameters. At the same time, the correspondence between the multiple attribute information and the operation and maintenance intentions can be determined. During the training process, the server calculates the model output accuracy based on the model output results, and when the model output accuracy is greater than the first preset threshold, it determines that the model training is completed and obtains the pre-trained natural language processing model. Among them, the first preset threshold is set by the user according to the actual usage scenario, and this application does not make specific limitations on this.
[0061] The server inputs the operation and maintenance demand description text obtained in real time into the trained natural language processing model to identify the operation object, operation type, and operation parameters contained in the operation and maintenance demand description text, and determine the corresponding preset operation and maintenance intention. Thus, the key operation and maintenance information is formed according to the output results of the model.
[0062] S103, the server generates a corresponding operation and maintenance script based on the key operation and maintenance information and a preset operation and maintenance script template library.
[0063] In the embodiments of the present application, the existing automated operation and maintenance integration is not high, and the present application provides the following embodiments, including:
[0064] The server adds the preset operation and maintenance script template library to the container image of the preset target platform respectively. Based on the call instructions from each platform, the corresponding container image is matched, and a connection between the matching container image and the corresponding calling platform is established so that the calling platform calls the corresponding preset operation and maintenance script template library.
[0065] In other words, this application is suitable for automated operation and maintenance of multiple target platforms, without the need for manual adjustment of scripts for different platforms. It expands the support scope of the preset operation and maintenance script template library, making it compatible with multiple platforms, and introduces containerization technology to achieve cross-platform script generation and execution.
[0066] In the embodiment of the present application, based on the key operation and maintenance information and the preset operation and maintenance script template library, a corresponding operation and maintenance script is generated, specifically including:
[0067] The server matches the key operation and maintenance information with the attributes of each script template in the preset operation and maintenance script module library. Based on the matching results, one or more corresponding script templates to be recommended are determined. The user's historical operation habits corresponding to the user terminal are determined. Among them, the user's historical operation habits represent the user's preference for each script template. Based on the user's historical operation habits and each script template to be recommended, the recommendation score of the corresponding script template to be recommended is determined. When the recommendation score is greater than the second preset threshold, the script template to be recommended is used as a recommended script template, and the parameters of the key operation and maintenance information are added to the recommended script template to generate an operation and maintenance script.
[0068] Among them, the script template attribute can be information related to each attribute parameter of the key operation and maintenance information. The present application can generate a first vector corresponding to the key operation and maintenance information, a second vector corresponding to the script template attribute, calculate the cosine similarity between the first vector and the second vector, and use the script template corresponding to the script template attribute whose cosine similarity is greater than a predetermined value as the matching result to obtain the recommended script template for the corresponding key operation and maintenance information. The first vector and the second vector can also calculate the inverse of the Euclidean distance, and the matching result is obtained based on the inverse of the Euclidean distance and the predetermined value. The specific selection of cosine similarity or the inverse of the Euclidean distance is not specifically limited in the present application. The predetermined value is set by the user according to actual use, and the present application does not make specific limitations on this.
[0069] The present application also records the user's historical operating habits of the operation and maintenance user corresponding to the user terminal. The user's historical operating habits represent the degree of preference for the script template, and the degree of preference can be represented by a score from 0 to 100. The user's historical operating habits are calculated based on the frequency of the operation and maintenance user's historical selection of each script template. The higher the frequency of use, the higher the degree of preference. The server calculates the recommendation score of each script template to be recommended corresponding to the user terminal based on the user's historical operating habits, compares the recommendation score with the second preset threshold, and recommends the script template to be recommended corresponding to the recommendation score greater than the second preset threshold to the user terminal. The second preset threshold is set by the user according to the actual usage scenario, and the present application does not make specific restrictions on this.
[0070] In the embodiment of the present application, before generating the corresponding operation and maintenance script based on the key operation and maintenance information and the preset operation and maintenance script template library, the method further includes:
[0071] Get user information from the preset database. User information includes script access rights and script modification rights. Use user information as a grouping attribute to divide each script template in the preset operation and maintenance script template library into corresponding user permission sets.
[0072] That is to say, this application can pre-classify each script template in the preset operation and maintenance script template library into different user permission sets according to the script access rights and script modification rights corresponding to different users or user groups. When matching script templates, the server can match script templates according to the user permission set, improve the script template matching efficiency, and improve the execution efficiency of automated operation and maintenance.
[0073] In the embodiment of the present application, based on the key operation and maintenance information and the preset operation and maintenance script template library, a corresponding operation and maintenance script is generated, specifically including:
[0074] Determine the script templates corresponding to the same preset operation and maintenance intention, and generate a multi-version script template. Among them, the multi-version script template corresponds to the same preset operation and maintenance intention. Determine each operation and maintenance user in the preset database, and determine the recommendation score corresponding to each operation and maintenance user and each version of the script template in the multi-version script template. In descending order of the recommendation score, generate a multi-version script template sequence corresponding to each operation and maintenance user and store it in the preset database, so as to generate the operation and maintenance script of the corresponding operation and maintenance user based on the first version script template in the multi-version script template sequence.
[0075] In other words, when the server determines that there are multiple script templates for the same preset operation and maintenance intention, it can obtain multiple versions of script templates, and the multiple versions of script templates all correspond to the same preset operation and maintenance intention. The server can generate a sequence of multiple versions of script templates based on the recommended scores of the operation and maintenance users for each script template in the multiple versions of script templates, and thus provide the script template with the highest recommendation score to the operation and maintenance user.
[0076] In addition, when the same preset operation and maintenance intention corresponds to multiple versions of script templates, in order to improve the accuracy of the script template recommended by the server, the present application also provides the following embodiments:
[0077] Determine the basic description text and supplementary text corresponding to each version of the template script; wherein the basic description text is the same text in the operation and maintenance requirement description text between each version of the template script used to represent the same preset operation and maintenance intention; the supplementary text is other texts between each version of the template script, except the basic description text. The server screens one or more version script templates in the multi-version script template according to the text similarity between the supplementary text corresponding to the different version script templates and the operation and maintenance requirement description text; the text similarity can be a pre-similarity. If multiple version script templates are screened, the server will generate multiple difference text groups according to the supplementary texts corresponding to the multiple version script templates, and the difference text groups record the different supplementary texts between each version script template, and send the difference text groups to the user terminal for the user to select, so as to obtain the corresponding version script template according to the difference text group selected by the user, so as to generate the operation and maintenance script through the selected version script template; if a version script template is screened, the operation and maintenance script is generated through the version script template.
[0078] Through the above solution, multiple versions of script templates can be accurately and individually differentiated, allowing users to select different versions of script templates according to actual complex usage scenarios, thereby speeding up the efficiency of automated operation and maintenance.
[0079] In one embodiment of the present application, the preset operation and maintenance script template library can be dynamically expanded to cover script templates in various operation and maintenance task scenarios. In addition, the script management layer of the automated operation and maintenance script management system can store generated script templates and version information, manage script revision history and version rollback, assign script access and modification permissions to different users or user groups, and set script execution plans and automatic scheduling.
[0080] S104, the server sends the operation and maintenance script to the corresponding script execution engine for execution, and obtains operation monitoring information of the execution of the operation and maintenance script.
[0081] In the embodiment of the present application, the operation and maintenance script is sent to the corresponding script execution engine for execution, which specifically includes:
[0082] Based on the preset code review tool, the operation and maintenance script is code reviewed. The code review at least includes the preset code standard review and the preset sensitive data review through the preset code review tool. If the result of the code review is passed, the operation and maintenance script is sent to the corresponding script execution engine for execution. Otherwise, a prompt message is generated and sent to the management terminal.
[0083] In other words, this application can integrate secure coding specifications and code review tools to ensure that the generated scripts meet security standards and compliance requirements. At the same time, it strengthens the management of sensitive data and operating permissions to prevent unauthorized access and data leakage.
[0084] S105, the server generates an operation and maintenance audit report according to the operation monitoring information, and sends the operation and maintenance audit report to the user terminal.
[0085] In the embodiment of the present application, the server can execute the operation and maintenance script through the script execution engine to complete the operation and maintenance tasks assigned by the operation and maintenance user. At the same time, the server collects the operation monitoring information when the operation and maintenance script is executed, and generates an operation and maintenance audit report after the operation and maintenance script is executed. When an error is reported during the operation and maintenance script execution, the server can return to the step of modifying the script or rolling back the version, or return to the step of regenerating the operation and maintenance script according to the operation and maintenance user's selection operation.
[0086] The operation and maintenance audit report can provide a visual report that displays key information such as script execution effects, performance bottlenecks, security issues, etc. This application does not make specific limitations on this.
[0087] In an embodiment of the present application, the method further includes:
[0088] According to the preset exception type list, determine the exception type corresponding to the operation and maintenance script. According to the exception capture mechanism corresponding to the exception type, determine the captured exception when the operation and maintenance script is executed. According to the exception handling strategy corresponding to the captured exception, perform corresponding exception handling operations on the operation and maintenance script until the captured exception is eliminated. Among them, the exception handling strategy includes at least one or more of the following: pre-storage strategy, expert system feedback strategy.
[0089] That is to say, during the execution of the operation and maintenance script, the server can use a pre-set exception capture mechanism to monitor operation exceptions. If the exception of the operation and maintenance script is captured, and the exception type of the captured exception is determined according to the exception capture mechanism, the server can determine the exception handling strategy according to the exception type and perform exception handling. Among them, the pre-stored strategy in the exception handling strategy can be understood as the processing strategy pre-stored by the operation and maintenance user or developer, and the expert system feedback strategy can be understood as the feedback strategy obtained by sending the exception to the expert system. The elimination of the captured exception can be understood as the exception error corresponding to the captured exception no longer appears when the operation and maintenance script is executed after being processed by the exception handling strategy.
[0090] By introducing the above-mentioned intelligent exception handling mechanism, common execution errors and abnormal situations are automatically identified and handled. This helps reduce the need for manual intervention and improves the stability and reliability of the system.
[0091] In addition, this application can also add script performance testing functions, allowing users to directly perform performance testing and tuning after generating the script. This helps ensure that the script can meet performance requirements before actual deployment.
[0092] Through the above scheme, this application can provide operation and maintenance personnel with an automated operation and maintenance tool that can input natural language instructions, and intelligently and flexibly provide operation and maintenance scripts according to operation and maintenance tasks, so as to conveniently execute operation and maintenance tasks. At the same time, through the technical solution of this application, operation and maintenance personnel can conveniently manage and maintain operation and maintenance scripts, improve the efficiency and accuracy of operation and maintenance work. This improves the intelligence level of automated operation and maintenance, reduces the need for excessive manual intervention in complex operation and maintenance work, and reduces the risk of human error in operation and maintenance work.
[0093] Figure 2 A schematic diagram of a structure of a script generation and management device for automated operation and maintenance provided in an embodiment of the present application, such as Figure 2 As shown, the device includes:
[0094] At least one processor; and a memory in communication with the at least one processor. The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to:
[0095] Obtain the operation and maintenance requirement description text from the user terminal. Input the operation and maintenance requirement description text into the pre-trained natural language processing model to determine the corresponding operation and maintenance key information according to the model output result. Among them, the operation and maintenance key information at least includes the operation object, operation type, and operation parameter of the operation and maintenance task corresponding to the preset operation and maintenance intention. Generate the corresponding operation and maintenance script based on the operation and maintenance key information and the preset operation and maintenance script template library. Send the operation and maintenance script to the corresponding script execution engine for execution, and obtain the operation monitoring information of the execution of the operation and maintenance script. Generate an operation and maintenance audit report based on the operation monitoring information, and send the operation and maintenance audit report to the user terminal.
[0096] The embodiment of the present application further provides a non-volatile computer storage medium storing computer executable instructions, wherein the computer executable instructions are configured as follows:
[0097] Obtain the operation and maintenance requirement description text from the user terminal. Input the operation and maintenance requirement description text into the pre-trained natural language processing model to determine the corresponding operation and maintenance key information according to the model output result. Among them, the operation and maintenance key information at least includes the operation object, operation type, and operation parameter of the operation and maintenance task corresponding to the preset operation and maintenance intention. Generate the corresponding operation and maintenance script based on the operation and maintenance key information and the preset operation and maintenance script template library. Send the operation and maintenance script to the corresponding script execution engine for execution, and obtain the operation monitoring information of the execution of the operation and maintenance script. Generate an operation and maintenance audit report based on the operation monitoring information, and send the operation and maintenance audit report to the user terminal.
[0098] Each embodiment in this application is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device and medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0099] The devices and media provided in the embodiments of the present application correspond one-to-one to the methods. Therefore, the devices and media also have similar beneficial technical effects as the corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the devices and media will not be repeated here.
[0100] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0101] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.
Claims
1. A script generation and management method for automated operation and maintenance, characterized in that: The method is applied to a pre-built automated operation and maintenance script management system; the method comprises: Obtaining the operation and maintenance requirement description text from the user terminal; Input the operation and maintenance requirement description text into a pre-trained natural language processing model to determine corresponding operation and maintenance key information according to the model output result; wherein the operation and maintenance key information at least includes the operation object, operation type, and operation parameters of the operation and maintenance task corresponding to the preset operation and maintenance intention; Generate a corresponding operation and maintenance script based on the key operation and maintenance information and the preset operation and maintenance script template library; Sending the operation and maintenance script to a corresponding script execution engine for execution, and obtaining operation monitoring information of executing the operation and maintenance script; An operation and maintenance audit report is generated according to the operation monitoring information, and the operation and maintenance audit report is sent to the user terminal.
2. A script generation and management method for automated operation and maintenance according to claim 1, characterized in that: Before inputting the operation and maintenance requirement description text into a pre-trained natural language processing model to determine corresponding operation and maintenance key information according to the model output result, the method further includes: Acquire a number of operation and maintenance task samples pre-marked with operation and maintenance intentions; wherein the operation and maintenance task samples at least include the operation object, operation type, and operation parameters of the corresponding operation and maintenance task described by historical users; Each of the operation and maintenance task samples is input into the natural language processing model to be trained to train the natural language processing model until the corresponding model output accuracy is greater than a first preset threshold, thereby obtaining the pre-trained natural language processing model.
3. A script generation and management method for automated operation and maintenance according to claim 1, characterized in that: Based on the key operation and maintenance information and the preset operation and maintenance script template library, a corresponding operation and maintenance script is generated, specifically including: Matching the key operation and maintenance information with the attributes of each script template in the preset operation and maintenance script module library; Determine one or more corresponding script templates to be recommended according to the matching results; Determining the user's historical operation habits corresponding to the user terminal; wherein the user's historical operation habits represent the user's preference for each script template; Determine the recommendation score of the corresponding script template to be recommended according to the user's historical operation habits and each script template to be recommended; When the recommendation score is greater than a second preset threshold, the to-be-recommended script template is used as a recommended script template, and each parameter of the key operation and maintenance information is added to the recommended script template to generate the operation and maintenance script.
4. A script generation and management method for automated operation and maintenance according to claim 3, characterized in that: Before generating a corresponding operation and maintenance script based on the key operation and maintenance information and the preset operation and maintenance script template library, the method further includes: Obtaining user information from a preset database; the user information includes script access permission and script modification permission; The user information is used as a grouping attribute to divide each script template in the preset operation and maintenance script template library into a corresponding user permission set.
5. A script generation and management method for automated operation and maintenance according to claim 4, characterized in that: Based on the key operation and maintenance information and the preset operation and maintenance script template library, a corresponding operation and maintenance script is generated, specifically including: Determine the script templates corresponding to the same preset operation and maintenance intention, and generate a multi-version script template; wherein the multi-version script template corresponds to the same preset operation and maintenance intention; Determine each operation and maintenance user in the preset database, and determine the recommendation score corresponding to each operation and maintenance user and each version of the script template in the multiple versions of the script template; In the order of the recommendation scores from large to small, a multi-version script template sequence corresponding to each operation and maintenance user is generated and stored in the preset database, so as to generate the operation and maintenance script of the corresponding operation and maintenance user based on the first version script template in the multi-version script template sequence.
6. A script generation and management method for automated operation and maintenance according to claim 1, characterized in that: Sending the operation and maintenance script to the corresponding script execution engine for execution, specifically includes: Based on a preset code review tool, code review is performed on the operation and maintenance script; wherein the code review at least includes preset code standard review and preset sensitive data review through the preset code review tool; If the result of the code review is passed, the operation and maintenance script is sent to the corresponding script execution engine for execution; Otherwise, a prompt message is generated and sent to the management terminal.
7. A script generation and management method for automated operation and maintenance according to claim 1, characterized in that: The method further comprises: Determine the exception type corresponding to the operation and maintenance script according to the preset exception type list; Determine the captured exception when the operation and maintenance script is executed according to the exception capture mechanism corresponding to the exception type; According to the exception handling strategy corresponding to the captured exception, the operation and maintenance script is subjected to corresponding exception handling operations until the captured exception is eliminated; wherein the exception handling strategy includes at least one or more of the following: a pre-storage strategy and an expert system feedback strategy.
8. A script generation and management method for automated operation and maintenance according to claim 1, characterized in that: The method further comprises: Adding the preset operation and maintenance script template library to the container image of the preset target platform respectively; Based on the calling instructions from each platform, the corresponding container image is matched, and a connection between the matched container image and the corresponding calling platform is established, so that the calling platform calls the corresponding preset operation and maintenance script template library.
9. A script generation and management device for automated operation and maintenance, characterized in that: The device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute a script generation and management method for automated operation and maintenance as described in any one of claims 1 to 8 above.
10. A non-volatile computer storage medium storing computer executable instructions, characterized in that: The computer executable instructions can execute a script generation and management method for automated operation and maintenance as described in any one of claims 1 to 8 above.
Citation Information
Cited By
Cloud resource management method and device based on large model knowledge base, equipment and storage medium
CN120631547A
Hybrid cloud resource operation and maintenance scheduling method and device based on large model, equipment and storage medium
CN120631593A
A large model-based hybrid cloud resource operation and maintenance scheduling method, device, equipment and storage medium
CN120631593B
Industrial internet abnormal permission behavior detection method and system
CN121356838A