Automatic operation and maintenance method, device and equipment and storage medium

By introducing trigger services and trigger structures into the cloud platform, and automatically determining and executing operation and maintenance scripts, the problems of complex and costly operation and maintenance script changes in the existing technology are solved, and higher operation and maintenance maintainability and flexibility are achieved.

CN120371380APending Publication Date: 2025-07-25BEIJING QINGYUN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510449795.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-10
Publication Date
2025-07-25

AI Technical Summary

Technical Problem

In the existing cloud platform operation and maintenance methods, newly added operation and maintenance scripts require configuration information to be changed, which has poor maintenance and high personnel costs.

Method used

A trigger service and trigger structure are introduced. By scanning the pre-created trigger set, the execution conditions of the operation and maintenance script are determined according to the configuration file, and the operation and maintenance scripts are automatically executed at the set time.

Benefits of technology

It reduces the operation complexity added by the new operation and maintenance script, improves the maintainability and flexibility of operation and maintenance, and reduces labor costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120371380A_ABST
    Figure CN120371380A_ABST
Patent Text Reader

Abstract

The invention discloses an automatic operation and maintenance method and device, equipment and a storage medium. The method comprises the steps that pre-created triggers are scanned through a trigger service started to run, a trigger set is formed, and the triggers comprise configuration files and operation and maintenance scripts corresponding to the triggers; for each trigger in the trigger set, determining an execution judgment result of the operation and maintenance script in the trigger according to the configuration file in the trigger; if the execution judgment result is that the operation and maintenance script meets the execution condition, the operation and maintenance script is operated when the set script execution moment is reached, and a corresponding operation and maintenance result is obtained. By means of the method, a trigger structure is introduced to set corresponding configuration information for different operation and maintenance scripts, triggering decision making of the execution opportunity of the operation and maintenance scripts is achieved through the configuration information, the maintainability and the operation and maintenance iteration speed are better improved, the operation and maintenance cost is effectively reduced, and the operation and maintenance efficiency is improved. And the flexibility and expansibility of operation and maintenance can be realized more easily through the setting of the trigger structure.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of computer applications, and in particular, to an automatic operation and maintenance method, device, equipment and storage medium. Background Art

[0002] In the application of cloud platforms, as computing nodes in cloud platforms, operation and maintenance capabilities are required to solve problems caused by complex factors or to respond to related problems. The problems may involve memory, processors, disks, and node disasters, etc.

[0003] Existing methods often implement automatic operation and maintenance in the form of directly writing operation and maintenance scripts. The problem with this method is that when adding new operation and maintenance scripts, it is also necessary to modify the configuration information involved in the execution of the scripts. At the same time, technicians also need to consider the acquisition configuration of the data involved in operation and maintenance during the script writing stage. The existing method has problems of poor maintainability and high personnel cost investment. Summary of the Invention

[0004] The present invention provides an automatic operation and maintenance method, device, equipment and storage medium to solve the problems of high operation and maintenance costs and poor maintainability.

[0005] According to the first aspect of the present invention, an automatic operation and maintenance method is provided, including:

[0006] Scanning, through a triggered service that is started and run, pre-created triggers to form a trigger set, where each trigger includes a configuration file corresponding to the trigger and an operation and maintenance script;

[0007] For each trigger in the trigger set, determining an execution determination result of the operation and maintenance script in the trigger according to the configuration file in the trigger;

[0008] If the execution determination result is that the operation and maintenance script meets the execution condition, then run the operation and maintenance script at a set script execution time to obtain a corresponding operation and maintenance result.

[0009] According to the second aspect of the present invention, an automatic operation and maintenance device is provided, including:

[0010] A trigger scanning module, configured to scan pre-created triggers through a triggered service that is started and run to form a trigger set, where each trigger includes a configuration file corresponding to the trigger and an operation and maintenance script;

[0011] A trigger determination module, configured to determine an execution determination result of the operation and maintenance script in each trigger in the trigger set according to the configuration file in the trigger;

[0012] A script execution module, configured to run the operation and maintenance script when the execution determination result is that the operation and maintenance script meets the execution condition and reaches the set script execution time, and obtain the corresponding operation and maintenance result.

[0013] According to a third aspect of the present invention, there is provided an electronic device, including:

[0014] At least one processor; and a memory communicatively connected to the at least one processor;

[0015] Wherein, the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor, so that the at least one processor can execute the automatic operation and maintenance method according to any embodiment of the present invention.

[0016] According to another aspect of the present invention, there is provided a computer-readable storage medium storing computer instructions for causing a processor to implement the automatic operation and maintenance method according to any embodiment of the present invention when executed.

[0017] The technical solution of the embodiment of the present invention first scans the pre-created triggers through the started trigger service to form a trigger set, where the trigger includes a configuration file corresponding to the trigger and an operation and maintenance script; for each trigger in the trigger set, according to the configuration file in the trigger, determine the execution determination result of the operation and maintenance script in the trigger; if the execution determination result is that the operation and maintenance script meets the execution condition, then run the operation and maintenance script at the set script execution time to obtain the corresponding operation and maintenance result. In the above technical solution of this embodiment, an independent trigger service and a trigger structure are introduced to implement automatic operation and maintenance. The trigger can be regarded as a plug-in, and as long as it is created and installed, it can be scanned by the trigger service to participate in the trigger determination and execution of the included operation and maintenance script. In the implementation of this execution scheme, technicians only need to consider the design of operation and maintenance functions and corresponding configuration files during the design stage of the triggers involved in operation and maintenance, without modifying the trigger service, which greatly reduces the operation complexity of adding new operation and maintenance scripts. Compared with the prior art, this technical solution better improves the maintainability of operation and maintenance, ensures the flexibility and scalability of operation and maintenance implementation, and also greatly reduces the investment in operation and maintenance human costs.

[0018] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present invention, nor is it used to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. Description of the Drawings

[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the accompanying drawings required for the description of the embodiments. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can also be obtained based on these drawings.

[0020] Figure 1 is a flowchart of an automatic operation and maintenance method provided in Embodiment 1 of the present invention;

[0021] Figure 2 is a flowchart of an automatic operation and maintenance method provided in Embodiment 2 of the present invention;

[0022] Figure 3 is a schematic structural diagram of an automatic operation and maintenance device provided in Embodiment 3 of the present invention;

[0023] Figure 4 is a schematic structural diagram of an electronic device for implementing the automatic operation and maintenance method of the embodiments of the present invention. Specific Embodiments

[0024] In order to enable those skilled in the art to better understand the solutions of the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, rather than all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0025] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above accompanying drawings are used to distinguish similar objects, and do not necessarily need 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 the present invention described here can be implemented in an order other than those illustrated or described here. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units does not necessarily have to be limited to those clearly listed steps or units, but may include other steps or units not clearly listed or inherent to these processes, methods, products, or devices.

[0026] Embodiment 1

[0027] Figure 1It is a flowchart of an automatic operation and maintenance method provided by Embodiment 1 of the present invention. This embodiment is applicable to the situation of monitoring and operating and maintaining devices serving as computing nodes on a cloud platform. This method can be executed by an automatic operation and maintenance device, which can be implemented in the form of hardware and / or software, and the automatic operation and maintenance device can be configured in a computer device. As Figure 1 shown, the method includes:

[0028] S101. Scan the pre-created triggers through the triggered service that is started and running to form a trigger set, where the triggers include the configuration files corresponding to the triggers and the operation and maintenance scripts.

[0029] It should be noted that the computer device executing the method provided in this embodiment can be considered as a computing node in the cloud platform. In practical applications, the automatic operation and maintenance of the computing node can be realized by installing the triggered service and the created triggers on each computing node respectively.

[0030] In this embodiment, a trigger component can be pre-installed on each execution device. The trigger service can be pre-written in the trigger component. The trigger service can be considered as a main process service, which is specifically used to implement automatic operation and maintenance for the computing node. The method provided in this embodiment can be applied as a set of logical execution methods to each execution entity serving as a computing node. Considering that the logic executed on each execution entity is the same, this embodiment specifically describes the operation and maintenance logic executed on the computing node itself, and does not specifically limit which computing node the execution entity is.

[0031] In this embodiment, after the computing node is in the running state of a certain service, the triggered service can be started accordingly. In this step, the triggered service that is started can be used to first scan the triggers pre-created and inserted into the computing node, and finally, based on the scanned triggers, a trigger set can be formed by using the relevant information of the scanned triggers.

[0032] In this embodiment, the file structure of the trigger can be set to include at least two files, one is the operation and maintenance script for executing the operation and maintenance function, and the other is the configuration file set relative to the operation and maintenance script. In one implementation, '.yaml' can be used as the extension name of the configuration file in the trigger, and '.py' or '.sh' can also be used as the extension name of the operation and maintenance script. In addition, the extension name of the operation and maintenance script can also not be set, or other formats of extension names can be agreed upon.

[0033] In this embodiment, the operation and maintenance script in the trigger can be considered to contain the execution code required for operation and maintenance, and the configuration file can be considered to contain the specific configuration of when the execution condition of the operation and maintenance script is met and what operation and maintenance service items it corresponds to.

[0034] S102. For each trigger in the trigger set, determine the execution determination result of the operation and maintenance script in the trigger according to the configuration file in the trigger.

[0035] In this embodiment, for each trigger in the determined trigger set, relevant script execution determination operations can be executed independently. Specifically, corresponding threads can be created for each trigger in the running trigger service, and in the created threads, the automatic execution of the operation and maintenance functions involved in the trigger can be implemented according to the configuration file in the trigger.

[0036] In this embodiment, the configuration items included in the configuration file can have at least one trigger factor item, and can also have the time range involved in the trigger determination, the determination threshold, the number of threshold values, the determination operator, and even include the reading method of the data to be determined involved in the trigger determination. At the same time, the configuration file also includes the operation logic configuration for the combined determination of trigger factor items, and also includes the configuration of the execution period and the involved sleep duration of the operation and maintenance script.

[0037] As an implementation method, the implementation process of determining the execution determination result of the operation and maintenance script in the trigger through the configuration file in the trigger can be described as follows: First, the data required for the trigger of the operation and maintenance script in the trigger within this time range can be obtained through the reading path and time range configured in the configuration file; then, the trigger factor items set in the configuration file can be determined through the obtained data, so as to determine whether the trigger factor items meet the trigger conditions. Then, according to the determination of the trigger factor items and the logical combination relationship between the trigger factor items, it can be determined whether the execution conditions of the operation and maintenance script are finally met, so as to obtain the execution determination result of the operation and maintenance script.

[0038] S103. If the execution determination result is that the operation and maintenance script meets the execution conditions, then run the operation and maintenance script at the set script execution time to obtain the corresponding operation and maintenance result.

[0039] In this embodiment, the execution determination result of the operation and maintenance script can be that the operation and maintenance script meets the execution conditions, or the operation and maintenance result does not meet the execution conditions. It can be known that if the operation and maintenance result does not meet the execution conditions, it is equivalent to not meeting the execution timing of the operation and maintenance script; if the operation and maintenance result meets the execution conditions, it can be further determined whether the current time has reached the script execution time of the operation and maintenance script, and after reaching the script execution time, the operation and maintenance script can be run, and the operation and maintenance result of the operation and maintenance script can also be obtained.

[0040] It can be known that, due to the different operation and maintenance functions involved in the operation and maintenance scripts, the specific operation logic executed during the operation stage is also different. The operation and maintenance functions involved in the operation and maintenance scripts can be reporting node memory pressure information, or reporting node processor pressure information, etc. The operation and maintenance results obtained in this step can be provided to the operation and maintenance terminal, so that the operation and maintenance personnel can use the operation and maintenance results for corresponding operation and maintenance processing.

[0041] It should be noted that the execution of the operation and maintenance scripts in the trigger is often periodic. To avoid frequent execution of the operation and maintenance scripts, which may bring some problems or troubles. For example, a certain operation and maintenance script is only used to send an alarm after running. If the operation and maintenance script is executed frequently, it may be executed multiple times and send alarms frequently when the operation and maintenance personnel solve the problem according to the alarm. This frequent alarm will only act as interference and affect the operation and maintenance personnel's analysis and handling of the alarm problem.

[0042] Based on this, this embodiment can also set an execution delay mechanism for the operation and maintenance scripts in the trigger in the configuration file, so as to delay the subsequent execution of the operation and maintenance scripts by setting a delay duration, thereby leaving time for the operation and maintenance personnel to solve the problem. In this embodiment, the delayed execution of the operation and maintenance scripts can be achieved by determining the script execution time for the operation and maintenance scripts. This script execution time can be determined according to the delay duration set in the configuration file. One determination method can be to use the sum of the pre-recorded trigger time and the delay duration as the script execution time.

[0043] In the actual operation of this embodiment, if the current time has not reached the script execution time, it can be temporarily delayed until the system time reaches the script execution time and then start the operation of the operation and maintenance script.

[0044] It should be noted that as long as the trigger service is in the startup state, the above steps of this embodiment can be considered to be executed cyclically until the trigger service is closed or the thread corresponding to the trigger in the trigger service is interrupted.

[0045] The above technical solution of this embodiment introduces an independent trigger service and trigger structure to achieve automatic operation and maintenance. The trigger can be regarded as a plug-in. As long as it is created and installed, it can be scanned by the trigger service and thus participate in the trigger determination and execution of the included operation and maintenance scripts. In the implementation of this execution scheme, technicians only need to consider the design of operation and maintenance functions and the corresponding configuration files during the design stage of the triggers involved in operation and maintenance, and do not need to modify the trigger service, which greatly reduces the operation complexity of adding new operation and maintenance scripts. Compared with the prior art, this technical solution better improves the maintainability of operation and maintenance, also ensures the flexibility and scalability of operation and maintenance implementation, and greatly reduces the investment in operation and maintenance labor costs.

[0046] Embodiment Two

[0047] Figure 2It is a flowchart of an automatic operation and maintenance method provided by Embodiment 2 of the present invention. The relationship between this embodiment and the above embodiments is that it further details the specific implementation of scanning the pre-created triggers through the triggered service started and running to form a trigger set. At the same time, on the basis of the above embodiments, this embodiment further details the specific implementation of determining the execution judgment result of the operation and maintenance script in the trigger according to the configuration file in the trigger. As Figure 2 shown, the method includes:

[0048] S201. In response to the start instruction, start the triggered service in the constructed trigger component.

[0049] In this embodiment, it can be considered that the triggered service and the trigger are integrated in the execution subject as a computing node in the form of a trigger component. The start instruction corresponding to this step can be considered as a control instruction for starting the triggered service in the constructed trigger component. This start instruction can be triggered by relevant operation and maintenance personnel or detected according to pre-set start conditions.

[0050] S202. Scan the triggers created in the set folder and perform compliance judgment on the configuration files of the triggers obtained by scanning.

[0051] In this embodiment, triggers containing operation and maintenance scripts and corresponding configuration files can be pre-created, and the triggers can be pre-installed according to the set path. After installation, the file content contained in the triggers is equivalent to existing in the set folder. The triggered service started in the above step can scan the triggers existing in this set folder according to the scan path.

[0052] It can be known that there may be one or more triggers stored in this set folder, and the operation and maintenance scripts contained in different triggers generally have different operation and maintenance functions. All the triggers contained in the set folder can be scanned in this step, and the configuration files in each scanned trigger can be obtained through this step.

[0053] Exemplarily, the detailed information contained in the configuration file in the trigger constructed in this embodiment can be described as:

[0054]

[0055] Among them, for the above specifically described configuration items

[0056] factors are trigger factors, which is a multi-factor design that defines a list to store the factor information that the trigger cares about. Among them:

[0057] The "item" is the name of the factor item, usually the same as the monitored item. For example, "cpu_usage" represents the CPU usage rate, and "memory_usage" represents the memory usage rate;

[0058] The "duration" is the time range, indicating that the monitoring data for the most recent period of time should be collected for calculation and analysis;

[0059] The "value" is the critical value. For example, if the critical value of the CPU usage rate is 90, it means that the critical value to be "calculated or compared" is 90, and the operator is the following "operator";

[0060] The "count" is the count that meets the critical value, indicating the number of monitoring data that meet the critical value calculated within a period of time;

[0061] The "operator" is the operator, indicating the operation relationship between the monitoring data and the critical value. For example, if the operator is ">", it means that the monitoring data should be greater than the critical value. Another example is that the critical value of the CPU usage rate is 90, then the number of monitoring data greater than 90 should be calculated.

[0062] The "interrupted" is a calculation flag. When it is 0, it means continuous compliance with the critical value; when it is 1, it means no continuity is required. For example: the count of continuous CPU usage rate greater than the critical value of 90 exceeds 10; or as long as the count of CPU usage rate greater than the critical value of 90 exceeds 10. "Continuous" means reaching the critical value continuously for a period of time, and "discontinuous" means that it can reach the critical value without continuity. This flag is used to control the counting method.

[0063] The "store1" is the script for reading monitoring data. Executing this script can read the required monitoring data for the most recent period of time. If it is not configured in the factor information, the "store" value configured at the first layer will be found as the configuration. This configuration item is an optional configuration. In the trigger component, a default method for reading monitoring data will be set. If not configured, the built-in monitoring reading method of the trigger component will be used to obtain the monitoring data.

[0064] In addition, the configuration file also includes:

[0065]

[0066] Similarly, for the above configuration items included in the configuration file

[0067] The factor_operator is an operator for multiple factors. "and" means that all multiple factors are satisfied, and "or" means that one factor is satisfied. It is extensible and can also perform linkage logic calculations. For example: (cpu_usage and memory_usage) or disk_iops, where the factor item names can be used as objects for logic calculations for linkage.

[0068] The check_interval is the periodic interval for checking the triggering factors. Normally, the execution time of the trigger script should be less than this value.

[0069] The trigger_delay is a trigger delay mechanism. When the triggering factor is satisfied, the trigger script will be executed, and after that, a period of time needs to elapse before the trigger can be enabled again. In some scenarios, it can avoid frequently executing the trigger, which may cause some problems or troubles. For example, if a certain trigger only issues alarms, then frequently issuing alarms will cause information interference and is not conducive to technicians analyzing other alarm information.

[0070] store2 is the same as the above description of store1. When there is no configuration in the factor information, the current configuration can be used. This configuration item is an optional configuration. The trigger component will set the default monitoring data reading method. If there is no configuration, the built-in monitoring reading method of the trigger component will be used to obtain the monitoring data. The built-in method of the trigger component can be hard-coded or the default configuration.

[0071] It should be noted that through the above description, it can be found that during the construction stage of the trigger, information can be configured in advance according to the configuration constraints of each configuration item in the configuration file. After obtaining the trigger configuration file in this embodiment through this step, the configuration information of each configuration item in the scanned configuration file can be checked for compliance through the constraints of the configuration items in the configuration file.

[0072] Exemplarily, it can be checked whether the configured operator 'operator' belongs to the required compliant operators. In this embodiment, only when all configuration items in the configuration file are checked to be compliant, can the trigger be considered a valid trigger. Thus, the following S203 can be continued to add the trigger to the trigger set. On the contrary, if it is detected that the configuration content is non-compliant, the trigger can be considered an invalid trigger and does not have the subsequent execution conditions, and there is no need to add the trigger to the trigger set.

[0073] S203. If it is determined that the configuration content of the configuration file is compliant, add the corresponding trigger to the constructed trigger set.

[0074] Through this step of this embodiment, all triggers with compliant configuration files can be obtained.

[0075] S204. For each trigger in the trigger set, parse the configuration file of the trigger to obtain the trigger factor item, time range, reading configuration, determination setting item for trigger determination, and factor item operator in the configuration file.

[0076] In this embodiment, S204 to S208 can all be regarded as logical steps executed for each trigger. Specifically, they are aimed at each trigger in the trigger set, which is equivalent to constructing an executable thread for each trigger.

[0077] For any trigger, it can first parse the configuration content of the configuration items included in the trigger configuration file through this step, and thus obtain each trigger factor item, time range, reading configuration, determination setting item for trigger determination, and factor item operator included in the configuration file. The parsed configuration content can be used for subsequent execution determination of the operation and maintenance script.

[0078] S205. According to the data reading path given by the reading configuration, obtain the device operation data including the trigger factor item within the time range. The device operation data is captured by a pre-constructed monitoring component, and the data reading path corresponds to the component construction path of the monitoring component.

[0079] In this embodiment, for the trigger of the operation and maintenance script execution, data support is first required. The required data can be determined according to the reading configuration in the configuration file through this step. The data reading path can be regarded as the interface path for obtaining data in the reading configuration, and specifically can be used to call data from the monitoring component.

[0080] Exemplarily, in an implementation of data acquisition, it can be considered that the monitoring component for data acquisition can be matched through the reading configuration. The monitoring component is used for capturing the operation data involved in the computing node. This step can call the data captured by the monitoring component through the reading interface. At the same time, it can be known that the data required for the execution determination has a time limit, and specifically, the data can be obtained according to the time range given in the configuration file. The obtained data often includes the device operation data representing the operation conditions of each trigger factor item.

[0081] In this embodiment, the monitoring component can be regarded as a functional component that independently implements data capture from the trigger component. It can set one or more monitoring components respectively for capturing different data according to the different data types or data sources captured. In this embodiment, each thread corresponding to a trigger can determine which monitoring component to interact with in advance according to the data reading path in the reading configuration, and obtain the device operation data from the monitoring component. The data reading path can be regarded as the component construction path involved in the construction of the monitoring component.

[0082] S206. Determine whether the trigger factor item meets the setting conditions in the determination setting item according to the device operation data.

[0083] In this embodiment, the device operation data may include data contents corresponding to multiple trigger factor items respectively. Exemplarily, when the trigger factor item is the memory usage, the data related to the memory usage can be analyzed from the device operation data; when the trigger factor item is the processor usage, the relevant usage data of the processor can be analyzed from the device operation data.

[0084] In this embodiment, it can be considered that the configuration file also contains the determination setting item, and settings have been made for each determination setting item in advance. The set content can be recorded as the setting conditions of the determination setting item. This step can compare the relevant data involved in the above trigger factor items with the setting conditions of the corresponding determination setting item, and the comparison result can be used as the determination result of the trigger factor item.

[0085] S207. Determine the execution determination result of the operation and maintenance script in the trigger according to the factor item operator and the determination results of each trigger factor item.

[0086] In this embodiment, the determination results can be determined for each trigger factor item through the above steps. The determination result may be that the relevant data of the trigger factor item reaches a certain critical value, or a certain index quantity reaches the critical value quantity, etc. It may also be that the critical value is not reached or the critical value quantity is not reached, etc.

[0087] In this embodiment, the idea of joint determination of multiple trigger factor items is carried out in the configuration file, and the idea of joint determination can be realized by setting the factor item operator. The factor item operator can represent an OR operation, an AND operation, or a mixed operation of OR and AND. Through the factor item operator, the determination results of each trigger factor item can be jointly operated, and finally the execution determination result of the operation and maintenance script in the trigger can be determined according to the joint operation result.

[0088] This trigger determination method in this embodiment can expand the usage range and usage scenarios of the operation and maintenance script, and better ensure the flexibility and scalability of operation and maintenance.

[0089] Further, this embodiment gives one implementation method. Specifically, determining the execution determination result of the operation and maintenance script in the trigger according to the factor item operator and the determination results of each trigger factor item can be concretized as:

[0090] a1) Determine the operation relationship between the determination results involved in each trigger factor item according to the factor item operator.

[0091] Among them, the operation relationship can be an AND operation, an OR operation, an AND-THEN-OR operation of multiple determination results, or an OR-THEN-AND operation of multiple determination results, etc. This embodiment mainly considers a single AND operation or a single OR operation.

[0092] b1) If the operation relationship is an AND logic operation, when the determination results of all the trigger factor items all meet the set conditions, it is determined that the execution determination result of the operation and maintenance script in the trigger is that the operation and maintenance script meets the execution conditions.

[0093] In this embodiment, considering that when all the trigger factor items are in an AND logic operation, the determination results of all the trigger factor items can be processed by an AND operation, and after the determination results all meet the set conditions of the corresponding determination setting items, it can be determined that the trigger meets the execution conditions of the operation and maintenance script at this time. Therefore, in this step, it can be determined that the execution determination result of the operation and maintenance script in the trigger is that the operation and maintenance script meets the execution conditions.

[0094] Similarly, it can be known that assuming that all the trigger factor items also perform an AND operation, but there is a determination result of a trigger factor item that does not meet the corresponding set conditions, in this case, it can be considered that the execution determination result of the operation and maintenance script in the trigger does not yet meet the execution conditions of the operation and maintenance script.

[0095] c1) If the operation relationship is an OR logic operation, when at least one of the determination results of all the trigger factor items meets the set conditions, it is determined that the execution determination result of the operation and maintenance script in the trigger is that the operation and maintenance script meets the execution conditions.

[0096] In this embodiment, considering that when all the trigger factor items are in an OR logic operation, the determination results of all the trigger factor items can be processed by an OR operation, and as long as there is a situation where the determination result meets the set conditions of the corresponding determination setting item, it can be determined that the trigger meets the execution conditions of the operation and maintenance script at this time. Therefore, in this step, it can be determined that the execution determination result of the operation and maintenance script in the trigger is that the operation and maintenance script meets the execution conditions.

[0097] S208. If the execution determination result is that the operation and maintenance script meets the execution conditions, then run the operation and maintenance script at the set script execution time to obtain the corresponding operation and maintenance result.

[0098] The above technical solution of this embodiment provides a specific implementation of the execution determination result involved in the operation and maintenance script. In this implementation, the setting of multiple trigger factor items is considered, the setting of the time range is considered, and the setting of the acquisition method of monitoring data is also considered. The determination of whether the data involved in the trigger factor items meets the set conditions has been carried out. Finally, according to the combined operation between the trigger factor items, it can be determined whether the execution conditions of the operation and maintenance script are met. This determination method realizes the accurate determination of the trigger of the operation and maintenance script, and also realizes the flexibility and expandability of the trigger of the operation and maintenance script. The technical solution of this embodiment adopts a decoupled design of the trigger component and the monitoring component. While ensuring that the operation and maintenance scripts are triggered automatically and independently respectively, it also greatly reduces the complexity of the participation of operation and maintenance personnel in the operation and maintenance process, enabling operation and maintenance personnel to only focus on the setting of operation and maintenance functions, without having to consider the acquisition and calculation analysis of operation and maintenance data additionally, and better ensuring the maintainability of operation and maintenance.

[0099] At the same time, the trigger concept proposed in this embodiment can be managed separately for each project, independently, without interfering with each other or depending on each other. For the convenience of implementation, management, and maintenance, the trigger component usually has a built-in default monitoring data acquisition method and docks with common reading interfaces, so that there is no need for operation and maintenance personnel to configure the reading script additionally, which better reduces the operation and maintenance cost.

[0100] Based on the above embodiment, this embodiment also proposes an alternative embodiment. Before running the operation and maintenance script at the set script execution time, this alternative embodiment can be further optimized to include: reading the record file of the trigger time and determining the script execution time of the operation and maintenance script according to the reading result of the record file.

[0101] In this embodiment, before starting the operation and maintenance script, it is necessary to determine the script execution time in advance. One implementation of this embodiment can be to store a record file in a set path in advance, which records the time information related to the start and operation of the operation and maintenance script and can be recorded as the trigger time. The specific content of this trigger time can be adjusted with the loop execution of the relevant logic by the thread corresponding to the trigger. When executed for the first time, the trigger time can be recorded as empty, or the setting of the trigger time can be not carried out. After that, the time value corresponding to a certain time node can be recorded as the trigger time in this record file.

[0102] It can be understood that the purpose of setting the script execution time in this embodiment is mainly to set a delay mechanism to slow down the frequent running of the operation and maintenance script after meeting the execution conditions. The setting of the delay mechanism can specifically set the delay duration in the configuration file first, and then the trigger time can be set in the record file.

[0103] This alternative embodiment can read the record file according to the storage path of the record file, and can further determine the script execution time of the operation and maintenance script based on the reading result of the record file. Specifically, when the trigger time is read, a script execution time for executing the operation and maintenance script can be determined according to the trigger time and the delay duration; when the trigger time is not successfully read, it can be considered that there is no need to delay the operation and maintenance script, and thus the current execution time can be directly determined as the script execution time of the operation and maintenance script.

[0104] Among them, this alternative embodiment can further specify determining the script execution time of the operation and maintenance script according to the reading result of the record file as follows: if the record file reading fails, the current time is determined as the script execution time; if the record file reading is successful, the trigger time recorded in the record file and the current time are obtained; the trigger time is added to the set time value, and if the sum result is less than or equal to the current time, the current time is determined as the script execution time; otherwise, the sum result is determined as the script execution time, and the operation and maintenance script is controlled to enter the execution waiting state.

[0105] In this embodiment, when the record file is not read according to the storage path or the content of the read record file is empty, it is considered that the record file reading fails. In this case, it can be considered that there is no need to delay the execution of the operation and maintenance script, and thus the current execution time can be directly determined as the script execution time of the operation and maintenance script, and the execution of the operation and maintenance script can be directly started at the current execution time.

[0106] This embodiment can also further obtain the set time value given by the relative delay configuration in the configuration file after finding the record file and reading the specific trigger time from the record file. Then, the time value of the trigger time can be added to the set time value, and the obtained sum result can be compared with the time value of the current execution time. When the sum result is greater than the time value, the sum result can be determined as the script execution time, and it can be considered that the execution time of the operation and maintenance script has not been met yet. The corresponding thread can be controlled to be in the sleep state first, that is, the operation and maintenance script is in the execution waiting state, until the operation and maintenance script is started when the time value corresponding to the sum result is reached. In addition, when the sum result is less than or equal to the time value, the time value of the current time can be determined as the script execution time, and it can also be considered that there is no need to delay the execution of the operation and maintenance script, and thus the execution of the operation and maintenance script can be directly started.

[0107] Based on the above embodiment, this embodiment also proposes another alternative embodiment, which can further execute when the set script execution time is reached: determining the script execution time as the new trigger time and updating it to the record file.

[0108] It can be known that the trigger executes in a loop, and it is necessary to determine a new trigger time in advance for the next execution of the operation and maintenance script, that is, to update the trigger time in the record file. In this embodiment, the script execution time corresponding to the current execution of the operation and maintenance script can be directly determined as the new trigger time and updated to the record file for the next loop operation.

[0109] Based on the above embodiment, this embodiment also provides another optional embodiment, which further includes: monitoring the cumulative running duration of the operation and maintenance script, and if the cumulative running duration exceeds the set timeout threshold, terminating the running of the operation and maintenance script.

[0110] It can be known that the execution of the operation and maintenance script is often in the form of a command prompt line. During its running process, the command prompt line will be in a waiting state until it obtains the running result and presents the running result. The operation and maintenance script may encounter running errors or no result return all the time during this running, making the command prompt line always in a waiting state. To avoid this situation, this embodiment further sets a forced interruption operation. Specifically, the running time of the operation and maintenance script can be counted. When the counted cumulative running duration exceeds the pre-determined command line timeout, that is, the timeout threshold, the running of the operation and maintenance script can be directly terminated.

[0111] Among them, the timeout threshold can be dynamically determined. Specifically, the cycle time determined by the relative trigger can be compared with a set duration, and the maximum value of the two can be selected as the timeout threshold for the current loop.

[0112] Based on the above embodiment, this embodiment also provides another optional embodiment, which further includes the following steps:

[0113] a2) When it is detected that the operation and maintenance script completes the current running, or when the operation and maintenance script terminates the current running, determine the sleep duration of the trigger according to the cycle time set in the configuration file of the trigger, and control the trigger to sleep according to the sleep duration.

[0114] In this embodiment, the cycle time can be understood as the interval time between the end of the current loop of the trigger and the entry into the next loop. This interval time is a set value pre-configured in the configuration file. It can be known that theoretically, the trigger can sleep for the length of the cycle time after the end of the current loop. However, in actual execution, there may be time deviations. Therefore, the actual sleep time of the trigger after each loop may be different from the set cycle time. Thus, it is necessary to dynamically determine the sleep time.

[0115] Among them, in one implementation of this embodiment, the determination of the sleep duration of the trigger according to the cycle time set in the configuration file of the trigger can be specifically implemented as follows: determining whether the cycle time is a set time value; if so, determining the sleep duration of the trigger according to the current time value at the current moment and the determination operation with the set time value; if not, determining the sleep duration of the trigger according to the determination operation between the current time value at the current moment and the script execution moment.

[0116] Specifically, this embodiment can first obtain the cycle time and determine whether the cycle time is set to a set time value (such as 5 seconds or 10 seconds). If so, the current time value at the current moment can be further obtained and a distance value calculation can be performed. Among them, the distance value can be considered as the difference between another set value and the remainder result, and the remainder result is the remainder of the current time value divided by the first set value.

[0117] Continuing with the above description, then it can be further determined that when the distance value is equal to the first set value, 0 is used as the sleep duration (that is, no sleep is performed), and when it is determined that the difference between the cycle time and the distance value is less than or equal to 2, the distance value is used as the sleep duration; it can also be determined that when the difference between the cycle time and the distance value is greater than 2, the cycle time is determined as the sleep duration.

[0118] In this embodiment, when the cycle time is not the set time value, the current time value at the current moment can also be continuously compared with the time value of the script execution moment (which is the time re-determined after updating the record file at this time). If the current time value is less than or equal to the time value of the script execution moment, the cycle time can be directly determined as the sleep duration; otherwise, the difference between the current time value and the time value of the script execution moment can be calculated. When the difference is greater than or equal to the cycle time, the minimum value among the cycle time and the pre-set second set value can be directly determined as the sleep duration; and when the difference is less than the cycle time, the result of subtracting the difference from the cycle time can be directly determined as the sleep duration.

[0119] Through this calculation method, the cycle time can be kept aligned at a certain time. Such as 5-second alignment, 0-second alignment, or fixed-cycle alignment. Of course, in the specific implementation, a random value can also be introduced for the purpose of staggering the trigger time. This embodiment does not limit this.

[0120] b2) After detecting that the trigger has completed the sleep of the sleep duration, return to execute again to determine the execution determination result of the operation and maintenance script in the trigger according to the configuration file in the trigger.

[0121] It can be known that after determining the sleep duration through the above steps and determining that the trigger has completed the sleep for this sleep duration, the condition for the trigger to enter the next cycle is satisfied. Thus, it is possible to return to S102 of this embodiment again to perform the execution determination logic of a new round of operation and maintenance scripts.

[0122] The above cycle of this embodiment can continue until the trigger service ends. The technical solution of this embodiment uses a plug-in architecture to manage triggers. The trigger service will automatically scan the triggers and read their configuration information for scheduled tasks. At the same time, the configuration file can define the delay mechanism of the trigger. By setting the delay time to implement the trigger mechanism, after enabling, it is necessary to sleep for the corresponding time before it can be triggered again.

[0123] Exemplarily, for better understanding of the automatic operation and maintenance method provided in this embodiment, an example implementation is given. Specifically, the trigger service can be regarded as a trigger process (main process) integrated on a computing node, and threads can also be created for each trigger to execute relevant logic.

[0124] Among them, for the trigger process (main process), its process steps can be described as follows: 1) Scan and detect the trigger configuration (if it fails, the trigger will not be added to the trigger set) to obtain the trigger set; 2) Add each trigger to a thread and continuously run the main process.

[0125] For the thread of each trigger, its process steps can be described as follows:

[0126] 1) Obtain the executable file (the configuration file of the trigger).

[0127] 2) Determine each trigger factor item that meets the trigger condition.

[0128] 3) Determine whether the combination of each trigger factor item meets the determination condition according to the operation logic in the configuration file.

[0129] 4) If it is satisfied, determine the script execution time according to the trigger time in the record file, run the operation and maintenance script after reaching the script execution time, and execute step 6).

[0130] 5) If it is not satisfied, execute step 9).

[0131] 6) Determine whether the cumulative running time of the operation and maintenance script reaches the determined timeout threshold.

[0132] 7) If it times out, terminate the running of the operation and maintenance script and execute step 9).

[0133] 8) If it does not time out, obtain the operation and maintenance result and display it, and execute step 9).

[0134] 9) End the current loop and enter the sleep state according to the determined sleep time until the execution of the next loop is satisfied, then return to step 2) and execute again.

[0135] Embodiment III

[0136] Figure 3 It is a schematic structural diagram of an automatic operation and maintenance device provided according to Embodiment III of the present invention.

[0137] As Figure 3 shown, the device includes:

[0138] A trigger scanning module 31, configured to scan pre-created triggers through a triggered service that is started and run, to form a trigger set, where the triggers include configuration files corresponding to the triggers and operation and maintenance scripts;

[0139] A trigger determination module 32, configured to determine an execution determination result of the operation and maintenance script in each trigger in the trigger set according to the configuration file in the trigger;

[0140] A script execution module 33, configured to run the operation and maintenance script when the execution determination result is that the operation and maintenance script meets the execution condition and reaches the set script execution time, to obtain a corresponding operation and maintenance result.

[0141] An automatic operation and maintenance device provided in this embodiment introduces an independent triggered service and a trigger structure to implement automatic operation and maintenance. The trigger can be regarded as a plug-in, and as long as it is created and installed, it can be scanned by the triggered service to participate in the trigger determination and execution of the included operation and maintenance scripts. In the implementation of this execution solution, technicians only need to consider the design of operation and maintenance functions and corresponding configuration files during the design stage of the triggers involved in operation and maintenance, without modifying the triggered service, which greatly reduces the operation complexity of adding new operation and maintenance scripts. Compared with the prior art, this technical solution better improves the maintainability of operation and maintenance, also ensures the flexibility and scalability of operation and maintenance implementation, and greatly reduces the investment in human resources for operation and maintenance.

[0142] Optionally, the trigger scanning module 31 may specifically be configured to:

[0143] Respond to a start instruction to start the triggered service in the constructed trigger component;

[0144] Scan the triggers created in a set folder, and perform compliance determination on the configuration files of the triggers obtained by scanning;

[0145] If it is determined that the configuration content of the configuration file is compliant, add the corresponding trigger to the constructed trigger set.

[0146] Optionally, the trigger determination module 32 may specifically include:

[0147] A parsing unit, configured to parse the configuration file of the trigger, and obtain a trigger factor item, a time range, a reading configuration, a determination setting item for trigger determination, and a factor item operator in the configuration file;

[0148] A data acquisition unit, configured to obtain device operation data including the trigger factor item within the time range according to a data reading path given by the reading configuration, where the device operation data is captured by a pre-constructed monitoring component, and the data reading path corresponds to a component construction path of the monitoring component;

[0149] A first determination unit, configured to determine whether the trigger factor item meets a setting condition in the determination setting item according to the device operation data;

[0150] A second determination unit, configured to determine an execution determination result of an operation and maintenance script in the trigger according to the factor item operator and determination results of each trigger factor item.

[0151] Optionally, the second determination unit may specifically be configured to:

[0152] Determine an operation relationship between determination results involved in each trigger factor item according to the factor item operator;

[0153] If the operation relationship is an AND logical operation, when determination results of all trigger factor items meet the setting condition, determine that the execution determination result of the operation and maintenance script in the trigger is that the operation and maintenance script meets the execution condition;

[0154] If the operation relationship is an OR logical operation, when there is at least one determination result of each trigger factor item that meets the setting condition, determine that the execution determination result of the operation and maintenance script in the trigger is that the operation and maintenance script meets the execution condition.

[0155] Optionally, the device may further include: a first determination module, configured to read a record file of a trigger time before running the operation and maintenance script at a set script execution moment, and determine the script execution moment of the operation and maintenance script according to a reading result of the record file.

[0156] Optionally, the first determination module may specifically be configured to:

[0157] If the record file reading fails, determine the current moment as the script execution moment;

[0158] If the record file reading is successful, obtain the trigger time recorded in the record file and the current moment;

[0159] Accumulate the trigger time with the set time value. If the accumulated result is less than or equal to the current moment, determine the current moment as the script execution moment; otherwise, determine the accumulated result as the script execution moment and control the operation and maintenance script to enter the execution waiting state.

[0160] Optionally, the device may further include: a file update module, configured to, when the set script execution moment is reached, determine the script execution moment as a new trigger time and update it to the record file.

[0161] Optionally, the device may further include: a termination monitoring module, configured to monitor the cumulative running duration of the operation and maintenance script, and if the cumulative running duration exceeds the set timeout threshold, terminate the running of the operation and maintenance script.

[0162] Optionally, the device may further include: a sleep determination module, configured to, when it is detected that the operation and maintenance script completes the current run or the operation and maintenance script terminates the current run, determine the sleep duration of the trigger according to the cycle time set in the configuration file of the trigger, and control the trigger to sleep according to the sleep duration;

[0163] A loop module, configured to, when it is detected that the trigger completes the sleep of the sleep duration, return to execute again to determine the execution determination result of the operation and maintenance script in the trigger according to the configuration file in the trigger.

[0164] Optionally, the sleep determination module may specifically be configured to:

[0165] Determine whether the cycle time is a set time value;

[0166] If so, determine the sleep duration of the trigger according to the current time value of the current moment and the determination operation with the set time value;

[0167] If not, determine the sleep duration of the trigger according to the determination operation between the current time value of the current moment and the script execution moment.

[0168] An automatic operation and maintenance device provided by an embodiment of the present invention can execute an automatic operation and maintenance method provided by any embodiment of the present invention, and has corresponding functional modules and beneficial effects for executing the method.

[0169] Embodiment Four

[0170] Figure 4The structural schematic diagram of an electronic device 40 that can be used to implement the embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or claimed herein.

[0171] As Figure 4 shown, the electronic device 40 includes at least one processor 41, and a memory communicatively connected to the at least one processor 41, such as a read-only memory (ROM) 42, a random access memory (RAM) 43, etc. The memory stores a computer program executable by the at least one processor. The processor 41 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 42 or the computer program loaded from the storage unit 48 into the random access memory (RAM) 43. In the RAM 43, various programs and data required for the operation of the electronic device 40 can also be stored. The processor 41, the ROM 42, and the RAM 43 are connected to each other through a bus 41. The input / output (I / O) interface 45 is also connected to the bus 41.

[0172] Multiple components in the electronic device 40 are connected to the I / O interface 45, including: an input unit 46, such as a keyboard, a mouse, etc.; an output unit 47, such as various types of displays, speakers, etc.; a storage unit 48, such as a magnetic disk, an optical disc, etc.; and a communication unit 49, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 49 allows the electronic device 40 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0173] The processor 41 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the processor 41 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The processor 41 executes the various methods and processes described above, such as method XXX.

[0174] In some embodiments, the method XXX may be implemented as a computer program tangibly embodied in a computer-readable storage medium, such as storage unit 48. In some embodiments, part or all of the computer program may be loaded and / or installed onto the electronic device 40 via the ROM 42 and / or the communication unit 49. When the computer program is loaded into the RAM 43 and executed by the processor 41, one or more steps of the method XXX described above may be performed. Alternatively, in other embodiments, the processor 41 may be configured to execute the method XXX in any other suitable manner (e.g., by means of firmware).

[0175] The various embodiments of the systems and techniques described above in this document can be implemented in digital electronic circuitry, integrated circuit systems, field-programmable gate arrays (FPGA), application-specific integrated circuits (ASIC), application-specific standard products (ASSP), systems-on-a-chip (SOC), complex programmable logic devices (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special-purpose or general-purpose programmable processor that receives data and instructions from a storage system, at least one input device, and at least one output device, and transmits the data and instructions to the storage system, the at least one input device, and the at least one output device.

[0176] The computer programs for implementing the methods of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when the computer programs are executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer programs can be executed entirely on the machine, partially on the machine, as a stand-alone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0177] In the context of the present invention, a computer-readable storage medium can be a tangible medium that can contain or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer-readable storage medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, the computer-readable storage medium can be a machine-readable signal medium. More specific examples of the machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0178] In order to provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the electronic device. Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0179] The systems and techniques described herein can be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer having a graphical user interface or a web browser through which the user can interact with an implementation of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0180] A computing system may include a client and a server. The client and the server are generally far from each other and usually interact via a communication network. The client-server relationship is created by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system, and solves the defects of difficult management and weak business scalability existing in traditional physical hosts and VPS services.

[0181] It should be understood that various forms of processes shown above can be used, steps can be reordered, added or deleted. For example, the steps described in the present invention can be executed in parallel, sequentially or in a different order, as long as the desired results of the technical solution of the present invention can be achieved, and no limitation is made herein.

[0182] The above specific embodiments do not constitute a limitation on the protection scope of the present invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.

Claims

1. An automatic operation and maintenance method, characterized in that, It includes: By means of the triggered service that is started and run, scan the pre-created triggers to form a set of triggers, where each trigger includes a configuration file corresponding to the trigger and an operation and maintenance script; For each trigger in the set of triggers, determine the execution determination result of the operation and maintenance script in the trigger according to the configuration file in the trigger; If the execution determination result is that the operation and maintenance script meets the execution conditions, run the operation and maintenance script at the set script execution time to obtain the corresponding operation and maintenance result.

2. The method according to claim 1, wherein The step of "by means of the triggered service that is started and run, scan the pre-created triggers to form a set of triggers" includes: In response to the start instruction, start the triggered service in the constructed trigger component; Scan the triggers created in the set folder and perform compliance determination on the configuration files of the triggers obtained by the scan; If it is determined that the configuration content of the configuration file is compliant, add the corresponding trigger to the constructed set of triggers.

3. The method according to claim 1, wherein The step of "determine the execution determination result of the operation and maintenance script in the trigger according to the configuration file in the trigger" includes: Parse the configuration file of the trigger to obtain the trigger factor item, time range, read configuration, determination setting item for trigger determination, and factor item operator in the configuration file; According to the data reading path given by the read configuration, obtain the device operation data containing the trigger factor item within the time range. The device operation data is captured by a pre-constructed monitoring component, and the data reading path corresponds to the component construction path of the monitoring component; According to the device operation data, determine whether the trigger factor item meets the setting conditions in the determination setting item; According to the factor item operator and combining the determination results of each trigger factor item, determine the execution determination result of the operation and maintenance script in the trigger.

4. The method according to claim 3, wherein The step of "according to the factor item operator and combining the determination results of each trigger factor item, determine the execution determination result of the operation and maintenance script in the trigger" includes: According to the factor item operator, determine the operation relationship between the determination results involved in each trigger factor item; If the operation relationship is an AND logical operation, when the determination results of each trigger factor item all meet the setting conditions, determine that the execution determination result of the operation and maintenance script in the trigger is that the operation and maintenance script meets the execution conditions; If the operation relationship is an OR logical operation, when at least one of the determination results of each trigger factor item meets the setting conditions, determine that the execution determination result of the operation and maintenance script in the trigger is that the operation and maintenance script meets the execution conditions.

5. The method according to claim 1, characterized in that Before the step of "run the operation and maintenance script at the set script execution time", it further includes: Read the record file of the trigger time and determine the script execution time of the operation and maintenance script according to the reading result of the record file.

6. The method according to claim 5, wherein The step of "determine the script execution time of the operation and maintenance script according to the reading result of the record file" includes: If the record file reading fails, determine the current time as the script execution time; If the record file reading is successful, obtain the trigger time recorded in the record file and the current time; Accumulate the trigger time and the set time value. If the accumulated result is less than or equal to the current moment, determine the current moment as the script execution moment; otherwise, determine the accumulated result as the script execution moment and control the operation and maintenance script to enter the execution waiting state.

7. The method according to claim 1, wherein When the set script execution moment is reached, it further includes: Determine the script execution moment as the new trigger time and update it to the record file.

8. The method according to claim 1, wherein It further includes: Monitor the cumulative running duration of the operation and maintenance script. If the cumulative running duration exceeds the set timeout threshold, terminate the running of the operation and maintenance script.

9. The method according to claim 1, wherein It further includes: When it is detected that the operation and maintenance script completes the current running or the operation and maintenance script terminates the current running, determine the sleep duration of the trigger according to the cycle time set in the configuration file in the trigger, and control the trigger to sleep according to the sleep duration. After it is detected that the trigger completes the sleep of the sleep duration, return to execute again to determine the execution determination result of the operation and maintenance script in the trigger according to the configuration file in the trigger.

10. The method according to claim 9, characterized in that, The determining the sleep duration of the trigger according to the cycle time set in the configuration file in the trigger includes: Determine whether the cycle time is a set time value. If so, determine the sleep duration of the trigger according to the current time value of the current moment and the determination operation with the set time value. If not, determine the sleep duration of the trigger according to the determination operation between the current time value of the current moment and the script execution moment.

11. An automatic operation and maintenance device, characterized in that, It includes: A trigger scanning module, which is used to scan the pre-created triggers through the started trigger service to form a trigger set. The trigger includes the configuration file corresponding to the trigger and the operation and maintenance script. A trigger determination module, which is used to determine the execution determination result of the operation and maintenance script in the trigger according to the configuration file in the trigger for each trigger in the trigger set. A script execution module, which is used to run the operation and maintenance script when the execution determination result is that the operation and maintenance script meets the execution conditions and when the set script execution moment is reached, and obtain the corresponding operation and maintenance result.

12. An electronic device, characterized in that, The electronic device includes: At least one processor; and a memory communicatively connected to the at least one processor; Wherein, the memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the automatic operation and maintenance method according to any one of claims 1-10.

13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the processor to execute the automatic operation and maintenance method according to any one of claims 1-10 when executed.

14. A computer program product, characterized in that, The computer program product includes a computer program, and the computer program realizes the automatic operation and maintenance method according to any one of 1-10 when executed by the processor.