System operation and maintenance method and device, nonvolatile storage medium and electronic equipment
By automatically generating and executing operation and maintenance scripts, the problems of low operation and maintenance efficiency and poor adaptability caused by manual writing in the existing technology are solved, and efficient and automated operation and maintenance management are achieved.
Patent Information
- Application Number
- CN202510280583.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-10
- Publication Date
- 2025-06-24
AI Technical Summary
In the prior art, the generation of operation and maintenance scripts relies on manual writing, which leads to low operation and maintenance efficiency and difficulty in adapting to rapidly changing business needs. Operation and maintenance personnel often face data overload when processing large amounts of logs and performance data.
By collecting the system's operation data, if the user input text is not received, the operation and maintenance script is generated and executed based on the operation data and the script template in the script template library; when the user input text is received, the script template matching the user input text is selected from the script template library based on the user input text, and the operation and maintenance script is generated based on the user input text and script template, and the operation and maintenance script is executed based on the operation data.
It realizes automated operation and maintenance without manual writing of operation and maintenance scripts, improves operation and maintenance efficiency, is highly adaptable, can quickly respond to business changes, and reduces decision-making delays for operation and maintenance personnel when processing data.
Smart Images

Figure CN120196352A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of operation and maintenance, and more particularly, to a system operation and maintenance method, apparatus, non-volatile storage medium, and electronic device. Background Art
[0002] In the related art, when generating operation and maintenance scripts, the method of manually writing scripts by staff is usually adopted. The problem with this method is that it is time-consuming and laborious, and it is also difficult to adapt to rapidly changing business requirements. In addition, when operation and maintenance personnel process a large amount of logs and performance data, they often face the problem of data overload and cannot process it in time, resulting in delayed decision-making. Moreover, this method of manually writing scripts has relatively high requirements for the knowledge reserve of the staff themselves.
[0003] In response to the above problems, no effective solution has been proposed yet. Summary of the Invention
[0004] Embodiments of this application provide a system operation and maintenance method, apparatus, non-volatile storage medium, and electronic device to at least solve the technical problem of low operation and maintenance efficiency and inadaptability to rapidly changing business requirements caused by the method of manually writing operation and maintenance scripts in the related art.
[0005] According to one aspect of the embodiments of this application, a system operation and maintenance method is provided, including: collecting operation data of the system; in the case of not receiving user input text, generating and executing an operation and maintenance script based on the operation data and a script template in a script template library; in the case of receiving user input text, selecting a script template matching the user input text from the script template library, generating an operation and maintenance script based on the user input text and the script template, and executing the operation and maintenance script based on the operation data.
[0006] Optionally, generating and executing an operation and maintenance script based on the operation data and a script template in a script template library includes: processing the operation data through a script generation model to obtain data feature information and operation and maintenance scenario information, where the script generation model includes two parts: a convolutional model and a long short-term memory network model, and the input of the long short-term memory network model is the output of the convolutional model; determining a script template matching the operation and maintenance scenario information from the script template library according to the operation and maintenance scenario information; determining operation and maintenance parameters corresponding to placeholders in the script template according to the script template and the data feature information, and replacing the placeholders with the operation and maintenance parameters to obtain a candidate operation and maintenance script; determining and executing an operation and maintenance script based on the candidate operation and maintenance script.
[0007] Optionally, determining and executing an operation and maintenance script based on candidate operation and maintenance scripts includes: when the number of candidate operation and maintenance scripts is one, determining the candidate operation and maintenance script as the operation and maintenance script and executing it; when the number of candidate operation and maintenance scripts is multiple, determining the selection probability of each candidate operation and maintenance script through an evaluation model, and using the candidate operation and maintenance script with the highest selection probability as the operation and maintenance script and executing it.
[0008] Optionally, selecting a script template that matches the user input text from a script template library based on the user input text includes: determining user intent information based on the user input text; determining an operation and maintenance scenario corresponding to the input text based on the user intent information; and selecting a script template that matches the user input text from the script template library based on the operation and maintenance scenario.
[0009] Optionally, determining user intent information based on the user input text includes: converting the user input text into structured data; determining keywords in the structured data and increasing the weights of the keywords; and determining user intent information based on the structured data with adjusted weights.
[0010] Optionally, the script template includes placeholders; generating an operation and maintenance script based on the running data and the script template includes: generating operation and maintenance script parameters based on the user intent information; determining placeholders corresponding to each operation and maintenance script parameter in the script template, and replacing the placeholders with the corresponding operation and maintenance script parameters to obtain the operation and maintenance script.
[0011] Optionally, the method further includes: using a multi-round dialogue method to sequentially display multiple question texts to the user and obtaining a reply text input by the user for each question text; and using the reply text input by the user for each question text as the user input text.
[0012] Optionally, collecting the running data of the system includes: collecting running data through multiple data collection modules, where each data collection module collects one type of running data; and integrating the running data collected by each data collection module through a data stream processing framework.
[0013] According to another aspect of the embodiments of the present application, there is also provided a system operation and maintenance device, including: a first processing module for collecting the running data of the system; a second processing module for generating and executing an operation and maintenance script based on the running data and the script template in the script template library when no user input text is received; and a third processing module for selecting a script template that matches the user input text from the script template library based on the user input text, generating an operation and maintenance script based on the user input text and the script template, and executing the operation and maintenance script based on the running data.
[0014] According to another aspect of the embodiments of the present application, a non-volatile storage medium is further provided. A program is stored in the non-volatile storage medium. When the program runs, it controls the device where the non-volatile storage medium is located to execute the system operation and maintenance method.
[0015] According to another aspect of the embodiments of the present application, an electronic device is further provided, including a memory and a processor. The processor is used to run the program stored in the memory. When the program runs, it executes the system operation and maintenance method.
[0016] According to another aspect of the embodiments of the present application, a computer program product is further provided, including a computer program. When the computer program is executed by a processor, it implements the system operation and maintenance method.
[0017] In the embodiments of the present application, the operation data of the acquisition system is collected; in the case where no user input text is received, an operation and maintenance script is generated and executed based on the operation data and the script templates in the script template library; in the case where user input text is received, a script template matching the user input text is selected from the script template library according to the user input text, and an operation and maintenance script is generated based on the user input text and the script template, and the operation and maintenance script is executed based on the operation data. By automatically generating and executing the operation and maintenance script, the purpose of eliminating the need for staff to manually write operation scripts is achieved, thereby realizing the technical effect of improving the operation and maintenance efficiency, and further solving the technical problems of low operation and maintenance efficiency and inadaptability to rapidly changing business requirements caused by the method of manually writing operation and maintenance scripts in the related art. Description of the Drawings
[0018] The drawings described herein are used to provide a further understanding of the present application, and constitute a part of the present application. The schematic embodiments of the present application and their descriptions are used to explain the present application, and do not constitute an improper limitation to the present application. In the drawings:
[0019] Figure 1 is a schematic structural diagram of a computer terminal (mobile terminal) provided according to an embodiment of the present application;
[0020] Figure 2 is a schematic flowchart of a system operation and maintenance method provided according to an embodiment of the present application;
[0021] Figure 3 is a schematic flowchart of an operation and maintenance script generation and management process provided according to an embodiment of the present application;
[0022] Figure 4 is a schematic structural diagram of a system operation and maintenance device provided according to an embodiment of the present application. Detailed Embodiments
[0023] To enable those skilled in the art to better understand the solution of this application, the technical solutions in the embodiments of this application will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of this application. Obviously, the described embodiments are only a part of the embodiments of this application, rather than all the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of this application.
[0024] It should be noted that the terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily need to be used to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of this application described here can be implemented in an order other than those illustrated or described here. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0025] To better understand the embodiments of this application, the technical terms involved in the embodiments of this application are explained as follows:
[0026] NLP (Natural Language Processing): Natural Language Processing is an artificial intelligence technology aimed at enabling computers to understand, interpret, and generate human language. This technology involves processing natural language text and speech data so that computers can interact with humans in natural language.
[0027] NLU (Natural Language Understanding): It is a technology in the field of artificial intelligence aimed at enabling computers to understand and process human language.
[0028] In a modern IT environment, system operation and maintenance management faces increasing complexity and challenges. With the popularization of cloud computing and big data technologies, enterprises' demand for efficient and reliable operation and maintenance solutions is constantly increasing. Traditional operation and maintenance management methods often rely on manual operations, which are not only inefficient but also prone to human errors, leading to system failures or service interruptions.
[0029] Currently, in related technologies, manual scripting is mostly used for daily operation and maintenance tasks, such as system backup, resource monitoring, and fault troubleshooting. This method not only consumes time and effort but also has difficulty adapting to rapidly changing business requirements. In addition, when dealing with a large amount of log and performance data, operation and maintenance personnel often face the problem of data overload, resulting in delayed decision-making.
[0030] To solve the problems existing in manual scripting, automated operation and maintenance have become an industry trend. Automated tools can significantly improve operation and maintenance efficiency and reduce the need for manual intervention. However, the automated tools in related technologies often lack flexibility and cannot be dynamically adjusted according to real-time data and user requirements.
[0031] In addition, with the rapid increase in data volume, how to effectively collect, clean, and analyze data has become a key issue. Traditional data processing methods cannot handle large-scale data streams in real time, resulting in difficult-to-guarantee data quality. In addition, operation and maintenance personnel need to quickly identify system anomalies and potential faults, which places higher requirements on the real-time and accuracy of data processing.
[0032] In recent years, the progress of natural language processing technology has provided new solutions for operation and maintenance management. Through intent recognition and slot filling technologies, users can express their requirements in natural language, thus simplifying the operation process. However, the existing NLP technologies still have limited applications in operation and maintenance scenarios and are difficult to achieve accurate requirement parsing and script generation.
[0033] In addition, it should be noted that in the management of operation and maintenance scripts, version control and update mechanisms are equally important. Existing systems often lack effective version management functions, resulting in difficult-to-trace historical records and change information of operation and maintenance scripts, affecting the stability and reliability of the system.
[0034] In summary, there are many challenges in the current field of system operation and maintenance management, and there is an urgent need for a solution that integrates multiple advanced technologies to achieve intelligent and automated operation and maintenance management and improve the efficiency and quality of system management.
[0035] To solve the above problems, relevant solutions are provided in the embodiments of the present application, which are described in detail below.
[0036] According to the embodiments of the present application, a method embodiment of a system operation and maintenance method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order from here.
[0037] The method embodiments provided by the embodiments of the present application can be executed on a mobile terminal, a computer terminal, or a similar computing device. Figure 1A hardware structure block diagram of a computer terminal (or mobile device) for implementing a system operation and maintenance method is shown. As Figure 1 shown, the computer terminal 10 (or mobile device 10) may include one or more processors 102 (shown as 102a, 102b, ……, 102n in the figure) (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may further include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the BUS bus), a network interface, a power supply, and / or a camera. Those of ordinary skill in the art can understand that Figure 1 the structure shown is only schematic and does not limit the structure of the above-mentioned electronic device. For example, the computer terminal 10 may further include more or fewer components than Figure 1 shown in Figure 1 or have a different configuration from
[0038] It should be noted that the above one or more processors 102 and / or other data processing circuits are generally referred to as "data processing circuits" in this article. The data processing circuit may be embodied in software, hardware, firmware, or any combination thereof, in whole or in part. In addition, the data processing circuit may be a single independent processing module, or be incorporated in whole or in part into any one of the other elements in the computer terminal 10 (or mobile device). As involved in the embodiments of the present application, the data processing circuit is used for processor control (such as the selection of a variable resistor terminal path connected to an interface).
[0039] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the system operation and maintenance method in the embodiments of the present application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, implements the above-mentioned system operation and maintenance method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some instances, the memory 104 may further include a memory remotely set with respect to the processor 102, and these remote memories can be connected to the computer terminal 10 through a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an enterprise internal network, a local area network, a mobile communication network, and combinations thereof.
[0040] The transmission device 106 is used to receive or send data via a network. Specific examples of the above network may include a wireless network provided by the communication provider of the computer terminal 10. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station and thus communicate with the Internet. In one example, the transmission device 106 can be a Radio Frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0041] The display can be, for example, a touch-screen Liquid Crystal Display (LCD), which enables the user to interact with the user interface of the computer terminal 10 (or mobile device).
[0042] Under the above operating environment, the embodiments of the present application provide a system operation and maintenance method, as Figure 2 shown, the method includes the following steps:
[0043] Step S202, collect the operation data of the system;
[0044] In the technical solution provided in step S202, the step of collecting the operation data of the system includes: collecting the operation data through multiple data collection modules, where each data collection module collects a type of operation data; integrating the operation data collected by each data collection module through a data stream processing framework.
[0045] As an alternative implementation, multiple independent modules can be created to be responsible for collecting different types of data (system status, resource usage, logs, etc.). Then, the data data sources can be identified, and a stream processing framework (such as Apache Kafka) can be used to achieve real-time collection and transmission of data. The data sources include server performance metrics, application logs, and user operation records, etc.
[0046] In some embodiments of the present application, the collected data can be further cleaned to remove noise and duplicate information, thereby ensuring data quality.
[0047] Step S204, in the case where no user input text is received, generate and execute an operation and maintenance script based on the operation data and the script templates in the script template library;
[0048] In the technical solution provided in step S204, the steps of generating and executing an operation and maintenance script based on the operation data and the script templates in the script template library include: processing the operation data through a script generation model to obtain data feature information and operation and maintenance scenario information, where the script generation model includes two parts, a convolutional model and a long short-term memory network model, and the input of the long short-term memory network model is the output of the convolutional model; determining a script template matching the operation and maintenance scenario information from the script template library according to the operation and maintenance scenario information; determining the operation and maintenance parameters corresponding to the placeholders in the script template according to the script template and the data feature information, and replacing the placeholders with the operation and maintenance parameters to obtain a candidate operation and maintenance script; determining and executing the operation and maintenance script according to the candidate operation and maintenance script.
[0049] The above data feature information contains various dimensional information crucial for understanding the operation and maintenance scenario. The data feature information may include: System status data: such as CPU usage rate, memory occupancy, disk space, network traffic, etc. These data reflect the current operating conditions and resource usage of the system, and are crucial for predicting system requirements and possible fault points.
[0050] Resource usage trend: By analyzing historical data, extracting the change trends of resource usage, such as the periodic fluctuations of CPU usage rate, the peak time of memory occupancy, etc. This helps to predict future resource requirements and optimize resource allocation strategies.
[0051] Log analysis results: including anomaly detection results of system logs, application logs, security logs, etc., as well as the frequency and patterns of key events. These information can help identify potential operation and maintenance problems and risks. User operation records: Record the operation and maintenance requests initiated by users in the past, such as backups, restarts, configuration changes, etc., as well as the frequency and time of these operations. This helps to understand the operation and maintenance habits and preferences of users.
[0052] Performance metrics: such as response time, throughput, error rate, etc. These metrics reflect the operating efficiency and stability of the system, and are very important for evaluating the impact and effect of operation and maintenance operations.
[0053] Environmental information: including operating system version, software stack configuration, network topology, etc. These information are crucial for selecting the correct script template and parameters. Different environments may require different operation and maintenance strategies.
[0054] The data feature information is processed and extracted through a convolutional model (CNN) and a long short-term memory network model (LSTM). The CNN processes spatial data to identify resource distribution patterns, while the LSTM processes temporal data to capture time series features. The information obtained after processing will be used to guide the selection of script templates and parameter determination.
[0055] As an alternative implementation, determine the parameters corresponding to the placeholder according to the data feature information and the template:
[0056] Template matching: The system that executes the operation and maintenance method provided in the embodiments of the present application first selects a set of templates that may be suitable for the current scenario from the script template library according to the operation and maintenance scenario information. For example, if the system detects that the CPU usage rate is abnormally high, templates such as "optimize CPU usage" or "restart overloaded service" may be matched.
[0057] Parameter identification: Once the template is determined, the system will identify and determine the operation and maintenance parameters corresponding to the placeholder in the template according to the previously extracted data feature information. For example, if the template contains an instruction to "restart service X", the system will identify which services (such as service X) are currently in a high-load state according to the resource usage data, so as to determine the specific service that needs to be restarted.
[0058] Parameter filling: After determining the operation and maintenance parameters, the system fills these parameters into the placeholder of the template to generate a candidate operation and maintenance script. For example, if the template has "backup the database to path Y", the system will identify the most frequently used database and the safest storage path according to the log analysis and user operation records, and fill this information into the template.
[0059] Parameter optimization: After the candidate script is generated, the system can further optimize the parameters through an evaluation model to ensure that the execution effect of the script is optimized in the current scenario. For example, if multiple candidate scripts involve different backup frequencies, the evaluation model will consider the system load and the data change speed to determine the most appropriate backup frequency.
[0060] This process ensures that the intelligent operation and maintenance script generation system can generate operation and maintenance scripts that not only meet the requirements of the current scenario but also optimize the system performance based on rich operation and maintenance data and advanced machine learning models. Through the comprehensive analysis of data feature information and intelligent parameter filling, the system can not only automate the operation and maintenance operations, but also realize the dynamic adjustment and optimization of operation and maintenance strategies, thereby improving the operation and maintenance efficiency and system reliability.
[0061] As an alternative implementation, the steps of determining and executing the operation and maintenance script according to the candidate operation and maintenance script include: when the number of candidate operation and maintenance scripts is one, determining the candidate operation and maintenance script as the operation and maintenance script and executing it; when the number of candidate operation and maintenance scripts is multiple, determining the selection probability of each candidate operation and maintenance script through an evaluation model, and using the candidate operation and maintenance script with the highest selection probability as the operation and maintenance script and executing it.
[0062] In some embodiments of the present application, by adopting a deep learning model composed of a CNN (Convolutional Neural Network) and an LSTM (Long Short-Term Memory), the temporal features and spatial features in the operation and maintenance data of various systems (such as Linux, etc.) can be efficiently processed. Among them, the CNN is responsible for extracting spatial features from the input data, and the LSTM is used to process time series features, and finally generate accurate operation and maintenance scripts.
[0063] As an alternative implementation, the CNN performs a convolution operation on the input data (such as system performance metrics, logs, etc.) through a convolution kernel to extract local features. These features can reflect the correlations or patterns in the data, such as the usage of system resources and error patterns in the logs. The CNN includes an input layer, a convolutional layer, a pooling layer, and a fully connected layer, and the functions of each layer in the data processing process are as follows:
[0064] Input layer: Receives high-dimensional data and converts it into a two-dimensional matrix representation to adapt to the convolution operation.
[0065] Convolutional layer: Extracts the spatial features of the data through the convolution kernel. For example, it captures the local changes in resource consumption.
[0066] Pooling layer: Uses max pooling or average pooling to reduce the data dimension, retaining important features while reducing the computational amount.
[0067] Fully connected layer: Converts the features processed by convolution into vectors as the input of the LSTM.
[0068] For the LSTM model, this model is good at processing time series data and can model the temporal relationship through "memory units". The input of the LSTM includes continuous time series data such as system performance metrics, historical operation and maintenance data, and user operation records. The LSTM model includes an input layer, a memory unit, and an output layer. The functions of each layer are as follows:
[0069] Input layer: Receives the spatial features extracted by the CNN as input and processes them in combination with the time dimension.
[0070] Memory unit (Cell State): Includes an input gate, a forget gate, and an output gate, which are used to control the transmission and retention of information, where:
[0071] Forget gate: Selectively forgets outdated information according to the current input.
[0072] Input gate: Stores the newly input data in the memory unit.
[0073] Output gate: Generate an output, predict future operations, and pass them to the next time step.
[0074] Output layer: Generate data feature information and operation and maintenance scenario information.
[0075] As an alternative implementation, the operation and maintenance scenario information can be used to select a template that matches the operation and maintenance scenario information from the script template library, and replace the placeholders in the matching template with the corresponding data feature information, thereby obtaining an operation and maintenance script.
[0076] As an alternative implementation, there may be multiple script templates that match the operation and maintenance scenario. In this case, multiple candidate operation and maintenance scripts will be generated. At this time, an evaluation model can be used to determine the selection probability of each operation and maintenance script, and determine the candidate operation and maintenance script with the highest selection probability as the operation and maintenance script. Additionally, a candidate operation and maintenance script can be randomly selected as the operation and maintenance script according to the selection probability of each operation and maintenance script.
[0077] In some embodiments of the present application, the above evaluation model can evaluate the execution effect score of each candidate script in the scenario indicated by the operation and maintenance scenario information, and determine the selection probability of each candidate operation and maintenance script according to the execution effect score. Among them, the higher the score of the candidate script model, the higher its selection probability. In this way, the priority of script execution can be dynamically allocated according to task requirements, avoiding errors caused by a single decision, and being able to better adapt to various operation and maintenance requirements in complex scenarios.
[0078] As an alternative implementation, the evaluation model can be a deep neural network, with the input being the operation and maintenance scenario information and the features of the candidate script, and the output being the execution effect score of the candidate script. The evaluation model can be a multi-way tree model, which evaluates the performance of the candidate script under multiple sub-items in this scenario.
[0079] In some embodiments of the present application, before inputting the data into the script generation model, the data also needs to be preprocessed, including extracting system metrics and historical operation records useful for script generation, and normalizing the data to ensure that data in different dimensions has the same range, etc. Additionally, data for continuous time periods can be segmented into training samples and input into an LSTM for processing.
[0080] In some embodiments of the present application, the number of hidden layers of the LSTM can be determined according to the complexity of the data to effectively handle long-term and short-term dependencies. Additionally, the time window length of the input data can be determined to adjust the ability of the LSTM to capture time-dependent relationships. The learning rate of the model can also be adjusted to achieve a balanced convergence speed and accuracy during training.
[0081] As an alternative implementation, an attention mechanism can also be introduced into the script generation model to guide the model to focus on key data features and improve the sensitivity of the script generation model to important information.
[0082] In addition, a reward mechanism can be set during the selection process to enable the script generation model to adaptively adjust the generation strategy according to the execution effect of the generated script.
[0083] Optionally, for a script generation model combined with a convolutional model (CNN) and a long short-term memory network model (LSTM), the following process can be used to extract data feature information:
[0084] Multi-dimensional data fusion: At the beginning of model operation, the model receives data from multi-level data acquisition modules, including system status, resource usage, log analysis, and user operation records. These data are first preprocessed and standardized to adapt to the input format of the model.
[0085] Spatial feature extraction: The CNN model extracts spatial distribution features through multiple convolutional layers and pooling layers. For example, it can identify the distribution pattern of CPU usage among different servers or the hotspots of network traffic at different time periods. These spatial features are obtained by sliding the convolutional kernel over the data, extracting local correlations, and gradually constructing high-level feature representations.
[0086] Time series feature extraction: The LSTM model focuses on processing time series data. It can learn the patterns of data changes over time, such as the periodic changes in resource usage or the time series features of abnormal behaviors. The LSTM controls the flow of information through its internal gating mechanisms (input gate, forget gate, and output gate) to capture long-term dependencies, which is crucial for understanding the dynamic changes in the operation and maintenance scenarios.
[0087] Feature fusion and encoding: The features extracted by CNN and LSTM are further fused and encoded to generate a comprehensive feature vector. This vector contains multi-dimensional and multi-modal information of the operation and maintenance scenarios, providing a basis for subsequent script template selection and parameter determination.
[0088] In addition, the model can determine parameters that may be abnormal or have abnormal risks based on the data feature information, and then determine the operation and maintenance scenarios of the operation and maintenance scripts. For example, when the parameter determined to be at risk is the relevant parameter of a database in a certain area, the database in that area can be monitored and backed up through the operation and maintenance script.
[0089] Step S206, when receiving the user input text, select a script template that matches the user input text from the script template library, generate an operation and maintenance script based on the user input text and the script template, and execute the operation and maintenance script based on the operation data.
[0090] In the technical solution provided in step S206, the steps of selecting a script template matching the user input text from the script template library according to the user input text include: determining user intention information according to the user input text; determining the operation and maintenance scenario corresponding to the input text according to the user intention information; and selecting a script template matching the user input text from the script template library according to the operation and maintenance scenario.
[0091] As an optional implementation manner, in order to ensure that a suitable template can be selected, this application provides template selection methods such as rule-based scenario recognition, event-driven scenario judgment, and historical operation mode matching. Among them, in the rule-based scenario recognition method, the system presets multiple scenario recognition rules, including scheduled tasks, event triggers, user manual operations, etc. Each rule corresponds to different template selection logics. For example, when the user selects a scheduled task, the system recognizes this scenario and automatically calls the template related to the scheduled task and generates a script containing the scheduled task logic.
[0092] In the event-driven scenario judgment method, for event-triggered operations, the system monitors system logs, performance data, etc. in real time. When an event (such as the CPU usage rate reaches the threshold) occurs, the system automatically recognizes the scenario triggered by this event and calls the corresponding operation and maintenance template. The system ensures that the event is accurately captured through a data monitoring and real-time feedback mechanism.
[0093] In the historical operation mode matching method, the system can predict possible future operation scenarios by analyzing the user's historical operation behaviors. For example, if the user often performs a certain type of operation and maintenance task, the system will automatically recommend related templates to improve the generation efficiency.
[0094] In some embodiments of this application, the steps of determining user intention information according to the user input text include: converting the user input text into structured data; determining the keywords in the structured data and increasing the weights of the keywords; and determining the user intention information according to the structured data with adjusted weights.
[0095] As an optional implementation manner, the script template includes placeholders; the steps of generating an operation and maintenance script according to the operation data and the script template include: generating operation and maintenance script parameters according to the user intention information; determining the placeholders corresponding to each operation and maintenance script parameter in the script template, and replacing the placeholders with the corresponding operation and maintenance script parameters to obtain the operation and maintenance script.
[0096] Optionally, the operation and maintenance script template also supports dynamic parameter substitution. In the script template, parameter placeholders can be predefined. For example, placeholders such as {{path}} and {{time}} are used to represent the specific paths or times specified by the user. When the user inputs parameters through the front-end interface or natural language, the system parses these input data and matches the corresponding placeholders. The parsed parameters are mapped to the placeholder positions in the template, and a personalized operation and maintenance script is generated through dynamic substitution.
[0097] In addition, to improve the efficiency of parameter substitution, the system implementing the method provided in the embodiments of the present application can perform preprocessing and cache management on common templates. When the template is loaded, the static part is solidified, and the dynamic parameter part waits to be replaced immediately after the user input. This mechanism greatly improves the speed of parameter substitution and the template response ability.
[0098] To ensure that the generated operation and maintenance script can be executed normally, after receiving the parameters directly input by the user or the parameters generated according to the user's intention, these parameters can be verified to ensure that the format of the input parameters is correct. For example, the path parameter needs to conform to the path rules of the file system, and the time parameter needs to conform to the date and time format. If the verified parameters do not meet the requirements, feedback will be given to the user for adjustment. Once the parameter verification passes, the system uses the mapping mechanism to match the user input with the placeholders in the template. After the mapping is completed, the system performs a substitution operation on all the parameters through the data processing module to ensure that each dynamic parameter is correctly mapped to the corresponding position in the template. After the parameter substitution is completed, the system generates the final operation and maintenance script and optimizes it according to historical data or user feedback to ensure that the generated script meets the actual requirements.
[0099] In some embodiments of the present application, the method further includes: presenting multiple question texts to the user in turn in a multi-round dialogue manner, and obtaining the response text input by the user for each question text; using the response text input by the user for each question text as the user input text.
[0100] As an optional implementation manner, an NLU model can be used to identify the user's needs, such as whether backup or monitoring is required. And slot filling technology is adopted to extract key information (such as time, frequency, target, etc.), so as to form structured request information for further processing.
[0101] In some embodiments of the present application, dialogue state tracking (DST) can be adopted to maintain dynamic tracking of the user's requests. The DST technology can record the state of each user input and update the user's current intention at any time. In a multi-round dialogue scenario, DST can ensure the coherence of the user's requests and dynamically adjust the recommended operation and maintenance tasks of the system according to the previous input.
[0102] In addition, in some embodiments of the present application, an attention mechanism is also used. The attention mechanism can be used to focus on key information and historical requests in multi-turn conversations. Through this mechanism, the system running the operation and maintenance method provided by the present application can make accurate responses according to the key content of the context conversation. For example, when the user frequently mentions a specific operation and maintenance operation, the system will give a higher weight to this operation to ensure that the generated script better meets the user's needs.
[0103] By introducing these technologies, the system running the operation and maintenance method provided by the present application can more intelligently manage context information, effectively track changes in user needs, and improve the generation efficiency and accuracy of operation and maintenance scripts.
[0104] As an alternative implementation, when parsing the user's needs and mapping the operation and maintenance task templates, the following mechanisms can be adopted:
[0105] Dual mapping mechanism based on rules and machine learning: The user input is parsed into structured requirement data (such as operation type, target system, execution frequency, etc.) through natural language processing. Based on this structured data, the system uses rule matching combined with machine learning algorithms to dynamically select the most suitable template from a predefined operation and maintenance task template library. Through the feedback of historical data, the system can continuously optimize the mapping rules and improve the accuracy of template selection.
[0106] Multi-template support and dynamic switching: When dealing with complex requirements, the system supports mapping multiple templates simultaneously. For example, when the user proposes multiple tasks (such as monitoring and backup), the system can simultaneously select the corresponding task templates from the template library and sort them according to task priorities. In addition, the system can dynamically switch operation and maintenance templates during the task execution process according to real-time feedback to ensure the flexibility and adaptability of the tasks.
[0107] In some embodiments of the present application, in order to effectively handle requirement mapping in complex scenarios, the complex user requirements can also be hierarchically processed according to different operation scenarios. For example, when the user requirements involve multiple steps of operations or depend on a specific time window, the system will divide these requirements into subtasks and complete them step by step. In addition, by analyzing the execution history of different scenarios, the system can identify different operation and maintenance modes and automatically recommend the most suitable operation and maintenance task template for the current scenario.
[0108] In addition, in a complex operation and maintenance environment, the system can dynamically switch scenarios according to user requirements and system feedback. Through real-time monitoring and feedback mechanisms, the system can identify changes in requirements and adjust task templates in a timely manner to ensure that the system still maintains high response capabilities in a changing operation and maintenance environment.
[0109] As an alternative implementation, after converting the user's requirement text into structured data, it can be input into the script generation model provided by the embodiments of the present application together with the system operation data, so that the system can be flexibly adjusted and responded according to the user's requirements to generate personalized operation and maintenance scripts.
[0110] In some embodiments of the present application, a script generation engine can also be used to manage the script templates in the script template library. For example, when the natural language understanding module recognizes "backup database", the script generation engine will find the corresponding database backup script template from the template library and dynamically adjust the script content according to the user's specific requirements (such as database type, backup time). The data filled in the above slots will be passed to the intelligent script generation engine, which will replace the placeholders in the template according to these parameters to generate a personalized script. For example, when the user inputs "backup the database every morning at 2 o'clock", the natural language module will parse key information such as "backup" and "every morning at 2 o'clock", and the script generation engine will use this data to fill in the backup script template.
[0111] In some embodiments of the present application, a condition judgment module can also be integrated inside the system to perform logical judgments by parsing the user's input requirements or the monitored system status (such as CPU occupancy, disk space, etc.). For example, when the user requests to generate a script that "automatically clears the log when the disk usage rate exceeds 80%", the system first judges whether the disk usage rate reaches this threshold, and then generates the corresponding clearing script according to the condition.
[0112] In addition, the system can also combine complex conditions. For example, the user can request "backup the database at 2 o'clock every morning and send a warning when it fails". The system combines condition judgment and scenario recognition to generate an operation and maintenance script that meets all conditions. The execution path of each condition is clearly reflected in the script to ensure that the script can be correctly executed under multiple conditions.
[0113] Through the condition judgment module, the system can not only improve the matching degree between the generated template and the actual requirements, but also determine the execution method and execution time of the operation and maintenance script according to the collected operation data. For example, it is executed after meeting certain conditions or according to a preset cycle.
[0114] As an alternative implementation, during the execution of the operation and maintenance script, it is also necessary to monitor the execution status of the script in real time, including success rate, execution time, and system performance changes. And the monitoring results can be visualized to facilitate the user to understand the script execution situation.
[0115] In addition, the system can also automatically collect user feedback, continuously optimize the script generation strategy based on the execution effect, and form a data-driven closed-loop optimization mechanism. And the script generation model can be adjusted according to the feedback.
[0116] To facilitate users in determining the update status of the script, it is also possible to record script version information, including recording the generation and modification history of the script each time, and supporting the version comparison function. Users can also choose to roll back to a specific historical version of the script to ensure the reliability and stability of the script. The system can also regularly check the validity of the script, automatically update the script or remind the user to update the script.
[0117] According to an embodiment of the present application, there is also provided an operation and maintenance script generation and execution process as shown in Figure 3 and includes the following steps:
[0118] Step S302, data collection;
[0119] Step S304, generate an operation and maintenance script through a script generation model, or generate an operation and maintenance script through a natural language understanding model and an intelligent script generation engine;
[0120] Step S306, monitor the running status of the script in real time during the execution of the script, and adjust the intelligent script generation engine and the script generation model according to the running status;
[0121] Step S308, perform version management on the operation and maintenance script.
[0122] By adopting the operation data of the acquisition system; in the case of not receiving user input text, generate and execute an operation and maintenance script based on the operation data and the script templates in the script template library; in the case of receiving user input text, select a script template matching the user input text from the script template library according to the user input text, and generate an operation and maintenance script based on the user input text and the script template, and execute the operation and maintenance script based on the operation data. By automatically generating and executing the operation and maintenance script, the purpose of eliminating the need for staff to manually write operation scripts is achieved, thereby realizing the technical effect of improving operation and maintenance efficiency, and further solving the technical problems of low operation and maintenance efficiency and inadaptability to rapidly changing business requirements caused by the method of manually writing operation and maintenance scripts in related technologies.
[0123] An embodiment of the present application provides a system operation and maintenance device, Figure 4 which is a schematic structural diagram of the device. As can be seen from Figure 4 it, the device includes a first processing module 40 for collecting the operation data of the system; a second processing module 42 for generating and executing an operation and maintenance script based on the operation data and the script templates in the script template library in the case of not receiving user input text; and a third processing module 44 for selecting a script template matching the user input text from the script template library according to the user input text in the case of receiving user input text, generating an operation and maintenance script based on the user input text and the script template, and executing the operation and maintenance script based on the operation data.
[0124] In some embodiments of the present application, the steps for the first processing module 40 to collect the operation data of the system include: collecting the operation data through a plurality of data collection modules, where each data collection module collects one type of operation data; integrating the operation data collected by each data collection module through a data stream processing framework.
[0125] In some embodiments of the present application, the steps for the second processing module 42 to generate and execute an operation and maintenance script based on the operation data and the script templates in the script template library include: processing the operation data through a script generation model to obtain data feature information and operation and maintenance scenario information, where the script generation model includes two parts, a convolutional model and a long short-term memory network model, and the input of the long short-term memory network model is the output of the convolutional model; determining a script template that matches the operation and maintenance scenario information from the script template library according to the operation and maintenance scenario information; determining the operation and maintenance parameters corresponding to the placeholders in the script template according to the script template and the data feature information, and replacing the placeholders with the operation and maintenance parameters to obtain a candidate operation and maintenance script; determining and executing an operation and maintenance script based on the candidate operation and maintenance script.
[0126] In some embodiments of the present application, the steps for the second processing module 42 to determine and execute an operation and maintenance script based on the candidate operation and maintenance script include: in the case where the number of candidate operation and maintenance scripts is one, determining the candidate operation and maintenance script as the operation and maintenance script and executing it; in the case where the number of candidate operation and maintenance scripts is multiple, determining the selection probability of each candidate operation and maintenance script through an evaluation model, and using the candidate operation and maintenance script with the highest selection probability as the operation and maintenance script and executing it.
[0127] In some embodiments of the present application, the steps for the third processing module 44 to select a script template that matches the user input text from the script template library include: determining user intention information based on the user input text; determining the operation and maintenance scenario corresponding to the input text according to the user intention information; selecting a script template that matches the user input text from the script template library according to the operation and maintenance scenario.
[0128] In some embodiments of the present application, the steps for the third processing module 44 to determine user intention information based on the user input text include: converting the user input text into structured data; determining the keywords in the structured data and increasing the weights of the keywords; determining user intention information based on the structured data with adjusted weights.
[0129] In some embodiments of the present application, the script template includes placeholders; the steps for the third processing module 44 to generate an operation and maintenance script based on the operation data and the script template include: generating operation and maintenance script parameters according to the user intention information; determining the placeholders corresponding to each operation and maintenance script parameter in the script template, and replacing the placeholders with the corresponding operation and maintenance script parameters to obtain an operation and maintenance script.
[0130] In some embodiments of the present application, the third processing module 44 is further configured to sequentially display multiple question texts to the user in a multi-round dialogue manner, and obtain the response text input by the user for each question text; and use the response text input by the user for each question text as the user input text.
[0131] It should be noted that each module in the above system operation and maintenance device may be a program module (for example, a set of program instructions for implementing a specific function), or a hardware module. For the latter, it may be presented in the following forms, but not limited thereto: the manifestation form of each of the above modules is a processor, or the functions of each of the above modules are implemented by a processor.
[0132] According to an embodiment of the present application, there is also provided a non-volatile storage medium in which a program is stored. When the program runs, it controls the device where the non-volatile storage medium is located to execute the following system operation and maintenance method: collect the operation data of the system; when no user input text is received, generate and execute an operation and maintenance script based on the operation data and the script templates in the script template library; when user input text is received, select a script template matching the user input text from the script template library according to the user input text, generate an operation and maintenance script based on the user input text and the script template, and execute the operation and maintenance script based on the operation data.
[0133] According to an embodiment of the present application, there is also provided an electronic device, including a memory and a processor. The processor is used to run the program stored in the memory. When the program runs, it executes the following system operation and maintenance method: collect the operation data of the system; when no user input text is received, generate and execute an operation and maintenance script based on the operation data and the script templates in the script template library; when user input text is received, select a script template matching the user input text from the script template library according to the user input text, generate an operation and maintenance script based on the user input text and the script template, and execute the operation and maintenance script based on the operation data.
[0134] According to an embodiment of the present application, there is also provided a computer program product, including a computer program. When the computer program is executed by a processor, it implements the following system operation and maintenance method: collect the operation data of the system; when no user input text is received, generate and execute an operation and maintenance script based on the operation data and the script templates in the script template library; when user input text is received, select a script template matching the user input text from the script template library according to the user input text, generate an operation and maintenance script based on the user input text and the script template, and execute the operation and maintenance script based on the operation data.
[0135] In the above embodiments of the present application, the descriptions of the various embodiments each have their own focuses. For parts not detailed in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.
[0136] In several embodiments provided by the present application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are merely illustrative. For example, the division of the units can be a logical function division. In actual implementation, there can be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection between each other can be through some interfaces. The indirect coupling or communication connection of the units or modules can be in an electrical or other form.
[0137] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they can be located in one place or distributed to multiple units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0138] In addition, in each embodiment of the present application, the functional units can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated units can be implemented in the form of hardware or in the form of software functional units.
[0139] If the above integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the relevant technology, or all or part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to enable a computer device (which can be a personal computer, a server or a network device, etc.) to execute all or part of the steps of the methods described in each embodiment of the present application. The foregoing storage medium includes: USB flash drives, read-only memories (ROMs), random access memories (RAMs), mobile hard disks, magnetic disks or optical discs and other various media that can store program codes.
[0140] The above are only the preferred embodiments of the present application. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present application, several improvements and refinements can still be made, and these improvements and refinements should also be regarded as the protection scope of the present application.
Claims
1. A system operation and maintenance method, characterized in that: include: Collect system operation data; In the case where no user input text is received, generating and executing an operation and maintenance script according to the operation data and a script template in a script template library; When user input text is received, a script template matching the user input text is selected from the script template library based on the user input text, the operation and maintenance script is generated based on the user input text and the script template, and the operation and maintenance script is executed based on the operation data.
2. The system operation and maintenance method according to claim 1, characterized in that: Generating the operation and maintenance script according to the operation data and the script template in the script template library and executing the script includes: Processing the operation data through a script generation model to obtain data feature information and operation and maintenance scenario information, wherein the script generation model includes two parts: a convolution model and a long short-term memory network model, and the input of the long short-term memory network model is the output of the convolution model; Determining a script template matching the operation and maintenance scenario information from the script template library according to the operation and maintenance scenario information; Determine the operation and maintenance parameters corresponding to the placeholders in the script template according to the script template and the data feature information, and replace the placeholders with the operation and maintenance parameters to obtain a candidate operation and maintenance script; The operation and maintenance script is determined based on the candidate operation and maintenance script and executed.
3. The system operation and maintenance method according to claim 2, characterized in that: Determining the operation and maintenance script according to the candidate operation and maintenance script and executing it includes: When the number of the candidate operation and maintenance script is one, determining the candidate operation and maintenance script as the operation and maintenance script and executing it; When there are multiple candidate operation and maintenance scripts, the selection probability of each candidate operation and maintenance script is determined through an evaluation model, and the candidate operation and maintenance script with the highest selection probability is used as the operation and maintenance script and executed.
4. The system operation and maintenance method according to claim 1, characterized in that: Selecting a script template matching the user input text from a script template library according to the user input text includes: Determining user intention information based on the user input text; Determining an operation and maintenance scenario corresponding to the input text according to the user intention information; A script template matching the user input text is selected from the script template library according to the operation and maintenance scenario.
5. The system operation and maintenance method according to claim 4, characterized in that: Determining user intention information according to the user input text includes: Convert the user input text into structured data; Determining keywords in the structured data and increasing the weight of the keywords; The user intention information is determined based on the weight-adjusted structured data.
6. The system operation and maintenance method according to claim 4, characterized in that: The script template includes placeholders; Generating the operation and maintenance script according to the operation data and the script template includes: Generate operation and maintenance script parameters according to the user intention information; In the script template, placeholders corresponding to the various operation and maintenance script parameters are determined, and the placeholders are replaced with the corresponding operation and maintenance script parameters to obtain the operation and maintenance script.
7. The system operation and maintenance method according to claim 1, characterized in that: The method further comprises: Using a multi-round dialogue method, multiple question texts are sequentially displayed to the user, and a reply text input by the user for each of the question texts is obtained; The answer text input by the user for each of the question texts is used as the user input text.
8. The system operation and maintenance method according to claim 1, characterized in that: The operating data of the acquisition system includes: Collecting the operation data through a plurality of data collection modules, wherein each data collection module collects a type of the operation data; The operation data collected by each of the data collection modules are integrated through a data stream processing framework.
9. A system operation and maintenance device, characterized in that: include: A first processing module is used to collect operating data of the system; A second processing module is used to generate and execute an operation and maintenance script according to the operation data and a script template in a script template library when no user input text is received; The third processing module is used to, when receiving user input text, select a script template matching the user input text from the script template library based on the user input text, generate the operation and maintenance script based on the user input text and the script template, and execute the operation and maintenance script based on the operation data.
10. A non-volatile storage medium, characterized in that: The non-volatile storage medium stores a program, wherein when the program is running, the device where the non-volatile storage medium is located is controlled to execute the system operation and maintenance method according to any one of claims 1 to 8.
11. An electronic device, characterized in that: include: A memory and a processor, wherein the processor is used to run a program stored in the memory, wherein the program executes the system operation and maintenance method described in any one of claims 1 to 8 when running.
12. A computer program product, characterized in that It comprises a computer program, which, when executed by a processor, implements the system operation and maintenance method according to any one of claims 1 to 8.