A software automation operation and maintenance method for multiple servers

By using guardian robot program devices on multiple servers, the software is automated operation and maintenance is achieved, and the problem of large-scale resource investment on multiple servers is solved, and the operation and maintenance efficiency and reliability of server software are improved.

CN118733099BActive Publication Date: 2025-04-15水利部信息中心(水利部水文水资源监测预报中心) +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410903806.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-05
Publication Date
2025-04-15
Estimated Expiration
2044-07-05

AI Technical Summary

Technical Problem

Traditional operation and maintenance methods require a lot of manpower and resources to be invested on multiple servers, and the exit of scripts or monitoring programs will cause the server software protection to fail, making it difficult to achieve efficient and automated operation and maintenance.

Method used

Using software automation operation and maintenance methods for multiple servers, the guardian robot program device establishes a control relationship between the master mode server and the slave mode server, and realizes the automation of operation and maintenance tasks such as automatic software version update, automatic software service recovery, and automatic log alarm notification.

Benefits of technology

It improves operation and maintenance efficiency, reduces investment in manpower and server resources, and ensures reliable protection and high availability of server software.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118733099B_ABST
    Figure CN118733099B_ABST
Patent Text Reader

Abstract

The present application discloses a method for automated software operation and maintenance for multiple servers. The present application establishes a control relationship with multiple servers; enters the corresponding application scenario according to the acquired operation and maintenance instructions, and deploys the software program files corresponding to the application scenario in the master mode server; finally, the software program is obtained through the master mode server interface in each slave mode server, and automated operation and maintenance is implemented according to the current application scenario. The present application specifically implements automatic software version updates, automatic software service recovery, and automatic log alarm notifications in different application scenarios, thereby achieving the purpose of automated software operation and maintenance on multiple servers.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of operation and maintenance technology, and in particular to a software automation operation and maintenance method for multiple servers. Background Art

[0002] The server software needs to run continuously on the server to provide services to the outside world. In order to achieve high availability of services, some operation and maintenance guarantees are required, including: updating software to fix defects, monitoring software running status, guarding software running processes, restarting the system, etc.

[0003] The traditional method requires operation and maintenance personnel to regularly inspect the server and check the monitoring alarm information of the server software system. In order to protect the running process of the server program, it is generally guarded by regular checks through scripts or by configuring monitoring programs.

[0004] Traditional operation and maintenance methods require more manpower or server resources, especially when the server software is deployed on multiple servers. Operation and maintenance personnel need to configure them one by one. When performing operation and maintenance inspections or updating service software, they need to check and operate them one by one through command lines or web pages, which is time-consuming and labor-intensive. Using scripts to regularly check or configure monitoring programs to guard server software has the problem of protecting its own processes. If the script or monitoring program itself exits, the protection of the service will become invalid. Summary of the invention

[0005] Based on this, the embodiment of the present application provides a method for automated software operation and maintenance for multiple servers, which can not only reliably protect the server-side software, but also quickly deploy and operate and maintain the protection method on multiple servers. By using the protection robot program device, the repeated steps of deploying, updating, and protecting the server-side software on multiple servers are automatically completed, improving the efficiency of operation and maintenance and reducing the investment of manpower and server resources.

[0006] In a first aspect, a software automation operation and maintenance method for multiple servers is provided, the method comprising:

[0007] Establishing a control relationship with multiple servers; wherein one of the multiple servers is set as a master mode server, and the remaining servers are set as slave mode servers;

[0008] Enter the corresponding application scenario according to the acquired operation and maintenance instructions, and deploy the software program files corresponding to the application scenario in the main mode server; wherein the application scenario at least includes a software version automatic update scenario, a software service automatic recovery scenario, and a log alarm automatic notification scenario;

[0009] The software program is obtained in each slave mode server through the master mode server interface, and automated operation and maintenance is implemented according to the current application scenario.

[0010] Optionally, when the application scenario is a software version automatic update scenario, deploying a software program file corresponding to the application scenario in the main mode server includes:

[0011] Obtain program files of the software warehouse module and the software update module; wherein the software warehouse module is used to manage program files, service unit files and configuration files of the server-side software; the software update module is used to check available updates for the server-side software and download files required for the updates; save the program files, service unit files and configuration files of the server-side software to be deployed to the software warehouse directory on the main mode server.

[0012] Optionally, each slave mode server is configured to interface with the master mode server to obtain the software program, and realize automated operation and maintenance according to the current application scenario, specifically including:

[0013] Configure the interface with the master mode server in each slave mode server;

[0014] Each slave mode server automatically obtains the relevant files of the service software from the master mode server through the software update module of the daemon program calling the update interface to complete the installation and daemonization of the software;

[0015] When the service program needs to be updated, the update package and verification code are uploaded to the main mode server using the software warehouse module. After the verification is passed, the update will be immediately updated or delayed and the service will be restarted according to the update strategy;

[0016] The software update module periodically accesses the update interface to check whether there is a new version; if a new version is found, it will call the interface to download it to each slave mode server locally. After verification, it will update and restart the service at an appropriate time according to the update strategy.

[0017] Optionally, when the application scenario is a software service automatic recovery scenario, deploying a software program file corresponding to the application scenario in the main mode server includes:

[0018] Obtain program files of an operation control module and a software warehouse module; wherein the operation control module is used to execute startup, shutdown, and restart operations on the server-side software; and the software warehouse module is used to manage program files, service unit files, and configuration files of the server-side software.

[0019] Optionally, each slave mode server is configured to interface with the master mode server to obtain the software program, and realize automated operation and maintenance according to the current application scenario, specifically including:

[0020] Register its own service unit file to the system service by running the control module, so as to ensure that it can be pulled up by the operating system;

[0021] Use the software warehouse module to register the service unit file of the server software scanned from the software warehouse into the system service;

[0022] The operation control module sets the guard state of the server software to enabled;

[0023] When the server is restarted or the server software process exits abnormally, the operating system service will start the daemon and server software again; when the server software is running but loses response and is in a dead state, the operation control module can automatically restart the software.

[0024] Optionally, when the application scenario is a log alarm automatic notification scenario, deploying a software program file corresponding to the application scenario in the main mode server includes:

[0025] Obtain program files of a log analysis module and an alarm notification module; wherein the log analysis module is used to scan and detect the logs of the server-side software; and the alarm notification module is used to notify the operation and maintenance personnel of abnormal information of the server-side software via mobile phone messages.

[0026] Optionally, each slave mode server is configured to interface with the master mode server to obtain the software program, and realize automated operation and maintenance according to the current application scenario, specifically including:

[0027] The log analysis module reads the log content of the server software and counts the log entries according to the log type;

[0028] When the number of warning or error logs within a time window reaches the set threshold, the log analysis module merges similar logs and generates a log alarm summary;

[0029] The alarm notification module calls the external notification interface to send the log alarm summary to the operation and maintenance personnel.

[0030] In a second aspect, a software automation operation and maintenance device for multiple servers is provided, comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, it implements any software automation operation and maintenance method for multiple servers as described in the first aspect.

[0031] In a third aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method for automated software operation and maintenance for multiple servers described in any one of the first aspects above is implemented.

[0032] In a fourth aspect, a computer program product is provided, including a computer program / instruction, which, when executed by a processor, implements the software automation operation and maintenance method for multiple servers described in any one of the first aspects above.

[0033] The beneficial effects brought about by the technical solution provided in the embodiment of the present application include the ability to use the operating system to reliably protect the server-side software, and at the same time, the ability to automate operation and maintenance tasks such as operation protection, software updates, monitoring and alarms when multiple server-side software and multiple servers are deployed, thereby improving operation and maintenance efficiency and reducing operation and maintenance costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the implementation methods of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for the implementation methods or the description of the prior art. Obviously, the drawings in the following description are only exemplary, and for ordinary technicians in this field, other implementation drawings can be derived from the provided drawings without creative work.

[0035] Figure 1 Schematic diagram of the calling relationship and internal guard relationship between the servers provided for this application;

[0036] Figure 2 The software version automatically updated by the main daemon running flow chart provided by this application;

[0037] Figure 3 Automatic update of the software version provided for this application from the daemon program running flow chart;

[0038] Figure 4 The software version automatically updates the timing diagram provided for this application;

[0039] Figure 5 Automatic recovery flow chart of the software service provided for this application;

[0040] Figure 6 The log alarm automatic notification flow chart provided for this application. DETAILED DESCRIPTION

[0041] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0042] In the description of the present invention, the terms "comprises", "has" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or apparatus comprising a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may also include other steps or units that are not explicitly listed but are inherent to these processes, methods, products or apparatuses, or steps or units added based on further optimization schemes conceived by the present invention.

[0043] The server software needs to run continuously on the server to provide services to the outside world. In order to achieve high availability of services, some operation and maintenance guarantees are required, including: updating software to fix defects, monitoring software running status, guarding software running processes, restarting the system, etc.

[0044] The traditional method requires operation and maintenance personnel to regularly inspect the server and check the monitoring alarm information of the server software system. In order to protect the running process of the server program, it is generally guarded by regular script checks or by configuring a monitoring program. The former uses the system scheduled task or script program to cyclically check the process name to determine whether the server software is running. If it is not running, the server software will be started again. To configure the monitoring program guard, you first need to install a monitoring software, set it to start at boot, and configure the server software to be monitored in the monitoring program. When the server software process stops, the monitoring program will start the server software again. In addition, there is also a deployment method using primary and standby servers to enhance high availability, using redundant server resources to deal with abnormal situations, and switching to the backup server when a server goes down.

[0045] The purpose of the present invention is to propose a method that can both reliably guard server software and quickly deploy and maintain guard on multiple servers. By using the guard robot program device, the repeated steps of deploying, updating, and guarding the server software on multiple servers are automatically completed, thereby improving the efficiency of operation and maintenance and reducing the investment of manpower and server resources. Figure 1 A schematic diagram of the calling relationship between servers and the internal guardian relationship is given.

[0046] An automated software operation and maintenance method for multiple servers provided in an embodiment of the present application can achieve the purpose of automated operation and maintenance of software on multiple servers through a daemon robot program device, and can include the following steps:

[0047] S1, establish control relationships with multiple servers.

[0048] Among them, one of the multiple servers is set as a master mode server, and the remaining servers are set as slave mode servers. In the embodiment of the present application, the guard robot device establishes a control relationship with multiple servers through the guard robot program device to achieve the purpose of automatic operation and maintenance of software on multiple servers.

[0049] The program modules of the guardian robot device include five modules, namely, software warehouse module, software update module, operation control module, log analysis module, and alarm notification module. Among them, the software warehouse module is used to manage the program files, service unit files, and configuration files of the server software. The software update module is used to check the available updates of the server software and download the files required for the update. The operation control module has the function of starting, shutting down, restarting, etc. the server software. The log analysis module scans the logs of the server software to detect problems. The alarm notification module notifies the operation and maintenance personnel of the abnormal information of the server software through mobile phone messages and other means.

[0050] S2, entering the corresponding application scenario according to the obtained operation and maintenance instructions, and deploying the software program files corresponding to the application scenario in the main mode server.

[0051] In the embodiment of the present application, in order to realize automated operation and maintenance, the prerequisite is to install the daemon robot program device on the server. The main application scenarios of automated operation and maintenance are: automatic update of software version, automatic recovery of software service, and automatic notification of log alarm. That is, the application scenarios at least include automatic update of software version, automatic recovery of software service, and automatic notification of log alarm.

[0052] S3, configure each slave mode server to interface with the master mode server to obtain the software program, and implement automated operation and maintenance according to the current application scenario.

[0053] Specifically, the methods for implementing automated operation and maintenance in corresponding scenarios are as follows:

[0054] In the software version automatic update scenario, the software version automatic update mainly uses the software warehouse module and the software update module, such as Figure 2 As shown in the figure, a flowchart of the main daemon program for automatic software version update is given, and the specific processing process of the program module of the daemon robot device applied to the main server is given, such as Figure 3 As shown in the figure, the flowchart of automatic software version update from the daemon program is given. The steps are as follows:

[0055] (1) Select a server, set the daemon program to the master mode, and save the program files, service unit files, and configuration files of the server software to be deployed to the software warehouse directory on the server.

[0056] (2) Start the daemon on the main mode server through the system service. The daemon will use the software warehouse module to scan the warehouse directory to check whether the deployment has been completed. If not, it will automatically configure the installation.

[0057] (3) Set the daemon programs on other servers to slave mode, configure the address of the server where the master daemon program is located in the software update module, and start the daemon program.

[0058] (4) Other servers will automatically obtain the relevant files of the service software from the first server through the software update module of the daemon program by calling the update interface to complete the installation and daemonization of the software.

[0059] (5) When the service program needs to be updated, the operation and maintenance personnel upload the update package and verification code to the server using the software warehouse module of the main daemon. After the main daemon passes the verification, it will update immediately or delay the update and restart the service according to the update strategy.

[0060] (6) The slave daemon will periodically access the update interface of the master daemon through the software update module to check whether there is a new version. If a new version is found, it will call the interface to download it to the local computer. After verification, it will update and restart the service at an appropriate time according to the update strategy.

[0061] In addition, if Figure 4 The figure shows the timing diagram of automatic software version update.

[0062] In the software service automatic recovery scenario, software service automatic recovery mainly uses the operation control module and the software warehouse module, such as Figure 5 As shown in the figure, a flowchart of automatic recovery of software services is given, and the steps are as follows:

[0063] (1) The daemon program registers its service unit file with the system service by running the control module, thereby ensuring that it can be started by the operating system.

[0064] (2) The daemon program uses the software warehouse module to register the system service unit file of the server software scanned from the software warehouse into the system service.

[0065] (3) The operation and maintenance personnel set the daemon status of the server software to enabled through the daemon operation control module.

[0066] (4) When the server software is in a dead state due to insufficient resources, execution errors, etc. and cannot respond normally, the operation control module is used to automatically restart the problematic service.

[0067] (5) When the server is restarted or the server software process exits abnormally, the operating system service will start the daemon and server software again.

[0068] In the log alarm automatic notification scenario, the log alarm automatic notification mainly uses the log analysis module and the alarm notification module, such as Figure 6 The following is a flow chart of the automatic notification of log alarms. The steps are as follows:

[0069] (1) The daemon reads the log content of the server software through the log analysis module and counts the log entries according to the log type.

[0070] (2) When the number of warning or error logs within a time window reaches a set threshold, the log analysis module merges similar logs and generates a log alarm summary.

[0071] (3) The alarm notification module calls the external notification interface to send the log alarm summary to the operation and maintenance personnel.

[0072] From the above, it can be seen that the guardian robot program device proposed in the present invention can use the operating system to reliably protect the server software. At the same time, it can realize the automation of operation and maintenance tasks such as operation protection, software updates, monitoring and alarm when multiple server software and multiple servers are deployed, which can improve operation and maintenance efficiency and reduce operation and maintenance costs.

[0073] The embodiment of the present application also provides a software automation operation and maintenance device for multiple servers. For the specific definition of the software automation operation and maintenance device for multiple servers, please refer to the definition of the software automation operation and maintenance method for multiple servers in the above text, which will not be repeated here. Each module in the above-mentioned software automation operation and maintenance device for multiple servers can be fully or partially implemented by software, hardware and their combination. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0074] In one embodiment, an electronic device is provided, which may be a computer. The electronic device includes a processor, a memory, and a network interface connected via a system bus. The processor of the device is used to provide computing and control capabilities. The memory of the device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used for software automation operation and maintenance data for multiple servers. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a software automation operation and maintenance method for multiple servers is implemented.

[0075] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which involves all or part of the processes in the above-mentioned embodiment method.

[0076] In one embodiment, a computer program product is also provided, including a computer program / instruction, which involves all or part of the process in the above embodiment method.

[0077] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0078] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be construed as limiting the scope of the patent application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent application shall be subject to the attached claims.

Claims

1. A software automation operation and maintenance method for multiple servers, characterized in that: The method comprises: Establishing a control relationship with multiple servers; wherein one of the multiple servers is set as a master mode server, and the remaining servers are set as slave mode servers; Enter the corresponding application scenario according to the acquired operation and maintenance instructions, and deploy the software program files corresponding to the application scenario in the main mode server; wherein the application scenario at least includes a software version automatic update scenario, a software service automatic recovery scenario, and a log alarm automatic notification scenario; Configure each slave mode server to interface with the master mode server to obtain the software program, and implement automated operation and maintenance according to the current application scenario; When the application scenario is a software version automatic update scenario, the software program file corresponding to the application scenario is deployed in the main mode server, including: Obtain program files of a software warehouse module and a software update module; wherein the software warehouse module is used to manage program files, service unit files and configuration files of the server software; the software update module is used to check available updates for the server software and download files required for the updates; save the program files, system service unit files and configuration files of the server software to be deployed to the software warehouse directory on the master mode server; The interface of the master mode server is configured in each slave mode server, the software program is obtained through the interface, and automatic operation and maintenance is implemented according to the current application scenario, specifically including: Configure the master mode server interface in each slave mode server; Each slave mode server automatically obtains the relevant files of the service software from the master mode server through the software update module of the daemon program calling the update interface to complete the installation and daemonization of the software; When the service program needs to be updated, the update package and verification code are uploaded to the main mode server using the software warehouse module. After the verification is passed, the update will be immediately updated or delayed and the service will be restarted according to the update strategy; The software update module periodically accesses the update interface to check whether there is a new version; if a new version is found, it will call the interface to download it to each slave mode server locally. After verification, it will update and restart the service at an appropriate time according to the update strategy.

2. The software automated operation and maintenance method according to claim 1, characterized in that: When the application scenario is a software service automatic recovery scenario, the software program file corresponding to the application scenario is deployed in the main mode server, including: Obtain program files of an operation control module and a software warehouse module; wherein the operation control module is used to execute startup, shutdown, and restart operations on the server-side software; and the software warehouse module is used to manage program files, service unit files, and configuration files of the server-side software.

3. The software automation operation and maintenance method according to claim 2, characterized in that: The software program is obtained in each slave mode server through the master mode server interface, and automated operation and maintenance is implemented according to the current application scenario, specifically including: Register its own service unit file to the system service by running the control module, so as to ensure that it can be pulled up by the operating system; Use the software warehouse module to register the service unit file of the server software scanned from the software warehouse into the system service; The operation control module sets the guard state of the server software to enabled; When the server is restarted or the server software process exits abnormally, the operating system service will start the daemon and server software again; when the server software is running but loses response and is in a dead state, the operation control module can automatically restart the software.

4. The software automated operation and maintenance method according to claim 1, characterized in that: When the application scenario is a log alarm automatic notification scenario, the software program file corresponding to the application scenario is deployed in the main mode server, including: Obtain program files of a log analysis module and an alarm notification module; wherein the log analysis module is used to scan and detect the logs of the server-side software; and the alarm notification module is used to notify the operation and maintenance personnel of abnormal information of the server-side software via mobile phone messages.

5. The software automated operation and maintenance method according to claim 4, characterized in that: The software program is obtained in each slave mode server through the master mode server interface, and automatic operation and maintenance is realized according to the current application scenario, and also includes: The log analysis module reads the log content of the server software and counts the log entries according to the log type; When the number of warning or error logs within a time window reaches the set threshold, the log analysis module merges similar logs and generates a log alarm summary; The alarm notification module calls the external notification interface to send the log alarm summary to the operation and maintenance personnel.

6. A software automated operation and maintenance device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the steps of the method according to any one of claims 1 to 5 are implemented.

7. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.

8. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Operation and maintenance method and device for server, platform and electronic equipment

    CN113014445A

  • Operation and maintenance service deployment method and device and operation and maintenance system

    CN116647434A