An operation and maintenance operation method and device, a server and a storage medium

CN115168231BActive Publication Date: 2026-10-09AGRICULTURAL BANK OF CHINA
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210895495.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-27
Publication Date
2026-10-09
Estimated Expiration
2042-07-27

AI Technical Summary

Technical Problem

[0004]本发明实施例提供了一种运维操作方法、装置、服务器及存储介质,解决了在运维操作过程中存在的操作效率低下以及误操作风险高的问题

Benefits of technology

[0018] The technical solution of this invention receives an operation and maintenance command and the corresponding script input parameters; determines the policy identifier corresponding to the operation and maintenance command, and determines the script identifier corresponding to the policy identifier based on a pre-established policy script mapping mechanism; then, for the operation and maintenance script represented by the script identifier, it runs a client machine to pass the script input parameters to the operation and maintenance script, and executes the operation and maintenance script that has received the script input parameters, thereby realizing the operation and maintenance operation process corresponding to the operation and maintenance command. This technical solution of this invention, through automated operation and maintenance processes, can improve operational efficiency during operation and maintenance and reduce the risk of misoperation during operation and maintenance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115168231B_ABST
    Figure CN115168231B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose an operation and maintenance operation method and device, a server and a storage medium. The method comprises: receiving an operation and maintenance operation command and script input parameters corresponding to the operation and maintenance operation command; determining a policy identifier corresponding to the operation and maintenance operation command, and determining a script identifier corresponding to the policy identifier based on a pre-established policy script mapping mechanism; for an operation and maintenance operation script represented by the script identifier, delivering the script input parameters to the operation and maintenance operation script through a running client, and executing the operation and maintenance operation script that receives the script input parameters, to realize an operation and maintenance operation process corresponding to the operation and maintenance operation command. The technical solution of the embodiments of the present application can improve the operation efficiency in the operation and maintenance operation process, and can also reduce the risk of misoperation in the operation and maintenance operation process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of computer technology, and in particular to an operation and maintenance method, apparatus, server and storage medium. Background Technology

[0002] Currently, many applications are deployed on Web Application Server (WAS) environments, and application iteration updates or production deployments require operations and maintenance personnel to manually perform operations and maintenance through the WAS console.

[0003] However, the above solution involves manual operation and maintenance, which results in low efficiency and a high risk of misoperation. Summary of the Invention

[0004] This invention provides an operation and maintenance method, device, server, and storage medium, which solves the problems of low operation efficiency and high risk of misoperation in the operation and maintenance process.

[0005] According to one aspect of the present invention, an operation and maintenance method is provided, which may include:

[0006] Receive operation and maintenance commands and the corresponding script parameters for the operation and maintenance commands;

[0007] Determine the policy identifier corresponding to the operation and maintenance command, and determine the script identifier corresponding to the policy identifier based on the pre-established policy script mapping mechanism;

[0008] For the operation and maintenance script represented by the script identifier, the script input parameters are passed to the operation and maintenance script by running the client, and the operation and maintenance script that receives the script input parameters is executed to realize the operation and maintenance operation process corresponding to the operation and maintenance operation command.

[0009] According to another aspect of the present invention, an operation and maintenance device is provided, which may include:

[0010] The script input parameter receiving module is used to receive operation and maintenance commands and the corresponding script input parameters of the operation and maintenance commands.

[0011] The script identifier determination module is used to determine the policy identifier corresponding to the operation and maintenance command, and to determine the script identifier corresponding to the policy identifier based on the pre-established policy script mapping mechanism.

[0012] The operation and maintenance script execution module is used to execute the operation and maintenance script represented by the script identifier by running the client, passing the script input parameters to the operation and maintenance script, and executing the operation and maintenance script that has received the script input parameters to realize the operation and maintenance operation process corresponding to the operation and maintenance operation command.

[0013] According to another aspect of the present invention, a server is provided, which may include:

[0014] At least one processor; and

[0015] A storage device communicatively connected to at least one processor; wherein,

[0016] The storage device stores a computer program that can be executed by at least one processor, such that when the at least one processor executes the program, it implements the operation and maintenance method provided in any embodiment of the present invention.

[0017] According to another aspect of the present invention, a computer-readable storage medium is provided having computer instructions stored thereon, which are used to cause a processor to execute and implement the operation and maintenance method provided in any embodiment of the present invention.

[0018] The technical solution of this invention receives an operation and maintenance command and the corresponding script input parameters; determines the policy identifier corresponding to the operation and maintenance command, and determines the script identifier corresponding to the policy identifier based on a pre-established policy script mapping mechanism; then, for the operation and maintenance script represented by the script identifier, it runs a client machine to pass the script input parameters to the operation and maintenance script, and executes the operation and maintenance script that has received the script input parameters, thereby realizing the operation and maintenance operation process corresponding to the operation and maintenance command. This technical solution of this invention, through automated operation and maintenance processes, can improve operational efficiency during operation and maintenance and reduce the risk of misoperation during operation and maintenance.

[0019] It should be understood that the description in this section is not intended to identify key or important features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0020] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

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

[0022] Figure 2 This is a flowchart of an optional example of an operation and maintenance method provided in Embodiment 1 of the present invention;

[0023] Figure 3 This is a flowchart of another operation and maintenance method provided in Embodiment 2 of the present invention;

[0024] Figure 4 This is a flowchart of an optional example of another operation and maintenance method provided in Embodiment 2 of the present invention;

[0025] Figure 5 This is a structural block diagram of an operation and maintenance device provided in Embodiment 3 of the present invention;

[0026] Figure 6 This is a schematic diagram of the structure of a server provided in Embodiment 4 of the present invention. Detailed Implementation

[0027] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0028] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. The same applies to "target," "original," etc., and will not be repeated here. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, apparatus, product, or device that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices.

[0029] Example 1

[0030] Figure 1 This is a flowchart of an operation and maintenance method provided in Embodiment 1 of the present invention. This embodiment is applicable to automated operation and maintenance. The method can be executed by the operation and maintenance device provided in this embodiment of the present invention. This device can be implemented in software and / or hardware, and can be integrated into a server.

[0031] See Figure 1 The method of this invention specifically includes the following steps:

[0032] S110: Receives operation and maintenance commands and the corresponding script input parameters.

[0033] Specifically, when maintenance operations are required, the agent program deployed on the server can receive maintenance operation commands to instruct the execution of these operations. For example, it can receive commands to install or start / stop applications, as well as the corresponding script input parameters. The agent program can be understood as a program that can perform maintenance operations on behalf of others. Script input parameters are the parameters used in the maintenance operation script. Setting script input parameters enhances the reusability of the maintenance operation script. For instance, if the maintenance operation script is an installation script for installing a program in a WAS environment, the program name is one of the script input parameters. Different programs may have different names, and these differences can be input into the installation script as script parameters, allowing different programs to be installed in the WAS environment using this installation script, thus ensuring the reusability of the installation script. In practical applications, optionally, the aforementioned maintenance operation commands and script input parameters can be sent to the agent program by maintenance personnel through an operating client.

[0034] S120. Determine the policy identifier corresponding to the operation and maintenance command, and determine the script identifier corresponding to the policy identifier based on the pre-established policy script mapping mechanism.

[0035] It's important to note that different operation and maintenance (O&M) commands can correspond to specific O&M processes, such as an application installation command corresponding to an application installation process. A specific O&M process can be broken down into at least one O&M step, and each step can have its own pre-defined policy identifier. This policy identifier can be the step name, a preset number, or a label, etc., without specific limitations here. Therefore, the agent program can determine the policy identifier corresponding to the O&M command.

[0036] Different policy identifiers have corresponding script identifiers, which uniquely represent a specific operation and maintenance script. For example, a script identifier can be the script name, a pre-defined number, or a tag of the corresponding operation and maintenance script; no specific limitations are made here. In practical applications, a policy-script mapping mechanism can be pre-established based on the correspondence between each policy identifier and each script identifier. The agent program can then use this mapping mechanism to find and determine the script identifier corresponding to the policy identifier, thus enabling the agent program to identify the operation and maintenance script represented by the script identifier.

[0037] S130. For the operation and maintenance script represented by the script identifier, the script input parameters are passed to the operation and maintenance script by running the client, and the operation and maintenance script that receives the script input parameters is executed to realize the operation and maintenance operation process corresponding to the operation and maintenance operation command.

[0038] The agent program, after determining the operation and maintenance script, can run a client machine to pass script input parameters to the operation and maintenance script, thereby executing the script and performing the corresponding operation and maintenance operations. In practical applications, this client machine can optionally be a wsadmin client.

[0039] The technical solution of this invention receives an operation and maintenance command and the corresponding script input parameters; determines the policy identifier corresponding to the operation and maintenance command, and determines the script identifier corresponding to the policy identifier based on a pre-established policy script mapping mechanism; then, for the operation and maintenance script represented by the script identifier, it runs a client machine to pass the script input parameters to the operation and maintenance script, and executes the operation and maintenance script that has received the script input parameters, thereby realizing the operation and maintenance operation process corresponding to the operation and maintenance command. This technical solution of this invention, through automated operation and maintenance processes, can improve operational efficiency during operation and maintenance and reduce the risk of misoperation during operation and maintenance.

[0040] Optionally, the operation and maintenance scripts include candidate operation scripts corresponding to script identifiers from a pool of pre-written candidate operation scripts. The candidate operation scripts are written based on operation and maintenance operation steps, which are obtained by breaking down the operation and maintenance process manually performed by operation and maintenance personnel based on preset operation commands.

[0041] As mentioned above, for manual operation and maintenance (O&M) processes performed by O&M personnel, the process can be broken down into one or more atomic O&M operation steps based on preset operation commands. In the context of potential application scenarios in this invention, these preset operation commands can be operation commands in the Jython language provided by WAS. Furthermore, for each O&M operation step, to automate its implementation, candidate operation scripts capable of automating the step can be pre-written. For example, candidate operation scripts can be pre-written to automate various O&M operation steps such as starting / stopping the cluster, starting / stopping applications, installing programs, setting parent classes, and setting shared libraries. The candidate operation script corresponding to the script identifier can be used as the O&M operation script, i.e., the candidate operation script required in this O&M operation. In this invention embodiment, by atomically breaking down the O&M process into O&M operation steps and writing corresponding candidate operation scripts, the candidate operation scripts can be reused in different O&M operation processes.

[0042] In practical applications, optionally, these pre-written candidate operation scripts can be stored in the agent program's script library. Alternatively, candidate operation scripts can not only be written from the operation and maintenance steps derived from breaking down the operation and maintenance process, but also be written separately by operations and maintenance personnel according to their specific operation and maintenance scenarios, thereby improving the scalability and flexibility of the operation and maintenance process. In fact, the richer the candidate operation scripts and the more diverse the policy identifiers supported by the agent program, the richer the range of operation and maintenance scenarios that can be supported.

[0043] An optional technical solution involves determining the policy identifier corresponding to an operation and maintenance command, including: determining a policy file corresponding to the operation and maintenance command, wherein the policy file stores at least two policy identifiers, and the storage order of each policy identifier in the policy file is the same as the execution order of the operation and maintenance scripts corresponding to each policy identifier; reading at least two policy identifiers from the policy file; and passing script input parameters to the operation and maintenance script and executing the operation and maintenance script that receives the script input parameters, including: according to the execution order, taking the currently to-be-executed operation and maintenance script in the operation and maintenance scripts corresponding to each policy identifier as the currently to-be-executed script, taking the script input parameters corresponding to the currently to-be-executed script as the current input parameters, passing the current input parameters to the currently to-be-executed script, and executing the currently to-be-executed script that receives the current input parameters.

[0044] The policy file can be understood as a file composed of policy identifiers corresponding to the operation and maintenance steps obtained after breaking down the operation and maintenance process. It can store at least two policy identifiers. Since the operation and maintenance steps involved in the entire operation and maintenance process performed manually by operation and maintenance personnel have a certain execution order, when the policy file stores at least two policy identifiers, it is also necessary to specify the execution order of the operation and maintenance scripts corresponding to the policy identifiers. Therefore, in this embodiment of the invention, it can be pre-set that the storage order of each policy identifier in the policy file is the same as the execution order of the operation and maintenance scripts corresponding to each policy identifier. Optionally, the policy file can also store each policy identifier and its execution order separately.

[0045] Specifically, the policy file corresponding to the operation and maintenance command can be determined. At least two policy identifiers are read from the policy file, and the storage order of these two policy identifiers in the policy file is used as the execution order of the corresponding operation and maintenance scripts. It is important to note that the operation and maintenance scripts have an execution order. Currently, only the operation and maintenance script to be executed needs to be processed for input parameters, and only the operation and maintenance script corresponding to the currently executed operation and maintenance script needs to be used as input parameters. Therefore, based on the execution order, the operation and maintenance script to be executed from the operation and maintenance scripts corresponding to each policy identifier can be used as the current execution script, and the script input parameters corresponding to the current execution script can be used as the current input parameters. The current input parameters are then passed to the current execution script, and the script receiving the current input parameters is executed. Here, the current execution script represents the operation and maintenance script to be executed based on the execution order. The current input parameters represent the script input parameters required by the currently executed operation and maintenance script.

[0046] An optional technical solution in this invention involves determining the policy file corresponding to the operation and maintenance command, reading at least two policy identifiers from the policy file, and then, according to the execution order, taking the currently to-be-executed operation and maintenance script in the operation and maintenance operation script corresponding to each policy identifier as the currently to-be-executed script, and taking the script input parameter corresponding to the currently to-be-executed script as the current input parameter. Finally, the current input parameter is passed to the currently to-be-executed script, and the currently to-be-executed script that receives the current input parameter is executed. This allows for the correct execution of multiple operation and maintenance operation scripts in the order of the required operation and maintenance operation steps when multiple operation and maintenance operation steps need to be implemented during the operation and maintenance operation process.

[0047] Another optional technical solution involves receiving operation and maintenance commands and corresponding script input parameters, including: receiving at least two operation and maintenance commands and script input parameters corresponding to each operation and maintenance command; determining the policy identifier corresponding to the operation and maintenance command, including: determining the policy identifier corresponding to each operation and maintenance command; passing the script input parameters to the operation and maintenance script, and executing the operation and maintenance script that has received the script input parameters, including: using the script input parameters corresponding to the operation and maintenance command as corresponding input parameters, passing the corresponding input parameters to the operation and maintenance script, and executing the operation and maintenance script that has received the corresponding input parameters.

[0048] When the agent program receives at least two operation and maintenance commands, it can process each command based on the following steps. The corresponding input parameters can be understood as the script input parameters corresponding to the operation and maintenance command.

[0049] Specifically, during operation and maintenance (O&M) processes, especially complex ones, it's possible to receive more than one O&M command. For example, different O&M processes might be handled concurrently within the same WAS environment, such as non-mutually exclusive queries and validations. Therefore, when receiving at least two O&M commands and corresponding script parameters for each command, the script parameters for each command can be used as the corresponding input parameters. A policy identifier for the command can be determined, and the corresponding input parameters are then passed to the O&M script corresponding to that policy identifier. The O&M script receiving the corresponding input parameters is then executed.

[0050] An optional technical solution of this invention involves receiving at least two operation and maintenance (O&M) commands and script input parameters corresponding to each O&M command. For each O&M command, a policy identifier corresponding to the O&M command is determined, and the script input parameters corresponding to the O&M command are used as corresponding input parameters. The corresponding input parameters are then passed to the O&M operation script, and the O&M operation script receiving the corresponding input parameters is executed. This enables the correct passing of the script input parameters corresponding to each O&M command to its corresponding O&M operation script for execution in the case of multiple O&M commands. Furthermore, it can achieve automated execution in complex O&M operation scenarios or when O&M tasks involve multiple O&M commands, thereby improving the automation capability of the O&M operation process.

[0051] To better understand the technical solutions of the above embodiments of the present invention, an optional example is provided herein. For example, see... Figure 2 In a WAS environment with clusters, applications, servers, nodes, and shared libraries, operations and maintenance (O&M) can be performed. O&M personnel can send O&M operation commands and their corresponding script input parameters via the Nebula client. The agent program in the WAS environment stores a pre-established policy-script mapping mechanism that maps policy identifiers to script identifiers. The agent program receives O&M operation commands and their corresponding script input parameters from the Nebula client, retrieves the policy file from the deployment resource package based on the O&M operation command, and determines the corresponding script identifier based on the policy identifiers in the policy file using the policy-script mapping mechanism. The agent program sends the script input parameters and script identifiers to the wsadmin client. The wsadmin client uses each script identifier to determine the corresponding O&M operation script in the Jython script library, then passes the script input parameters to each O&M operation script and executes the O&M operation script that received the script input parameters.

[0052] Example 2

[0053] Figure 3This is a flowchart of another operation and maintenance method provided in Embodiment 2 of the present invention. This embodiment is based on the above-mentioned technical solutions and optimized. In this embodiment, optionally, when executing the operation and maintenance script that has received script input parameters, the above-mentioned operation and maintenance method further includes: receiving the exit identifier output by the operation and maintenance script, and determining the first error description in the first language corresponding to the exit identifier based on a pre-established exit description mapping mechanism, and returning the first error description to the command sender of the operation and maintenance command. The explanations of terms that are the same as or corresponding to those in the above embodiments will not be repeated here.

[0054] See Figure 3 The method in this embodiment may specifically include the following steps:

[0055] S210: Receive operation and maintenance commands and the corresponding script input parameters.

[0056] S220. Determine the policy identifier corresponding to the operation and maintenance command, and determine the script identifier corresponding to the policy identifier based on the pre-established policy script mapping mechanism.

[0057] S230. For the operation and maintenance script represented by the script identifier, the script input parameters are passed to the operation and maintenance script by running the client, and the operation and maintenance script that receives the script input parameters is executed to realize the operation and maintenance operation process corresponding to the operation and maintenance operation command.

[0058] S240: Receive the exit identifier output by the operation and maintenance script, and determine the first error description in the first language corresponding to the exit identifier based on the pre-established exit description mapping mechanism.

[0059] It's important to note that error scenarios may occur during operation and maintenance scripts. However, the error descriptions often don't allow maintenance personnel to clearly identify the error. For example, when a Jython script executed by the wsadmin client encounters an error, it returns an error description in English, making it difficult for maintenance personnel to directly identify the error. They need to review the specific error return information.

[0060] In this context, the exit identifier can be understood as the identifier corresponding to the error description returned by the operation and maintenance script when an error occurs. The exit mapping mechanism can be understood as the mapping relationship between the exit identifier and its corresponding first error description in the first language. The first error description can be understood as the error description corresponding to a pre-determined first language type, such as a Chinese error description.

[0061] In this embodiment of the invention, an exit description mapping mechanism can be pre-established, which includes exit identifiers returned by the operation and maintenance script that cannot be directly recognized by the operation and maintenance personnel, and first error descriptions corresponding to the exit identifiers that can be recognized by the operation and maintenance personnel. When an error occurs in the operation and maintenance script, the agent program can receive the exit identifiers output by the operation and maintenance script and, based on the pre-established exit description mapping mechanism, determine the first error description corresponding to the exit identifier.

[0062] S250. Return the first error description to the sender of the operation and maintenance command.

[0063] In this context, the command sender can be understood as the client that sends operation and maintenance commands. For example, if an operations and maintenance personnel use the Nebula client to send operation and maintenance commands, then the Nebula client can be regarded as the command sender.

[0064] It should be noted that, in this embodiment of the invention, if the operation and maintenance script outputs an exit flag, S240 to S250 are executed.

[0065] The technical solution of this invention receives the exit identifier output by the operation and maintenance script, and determines the first error description in the first language corresponding to the exit identifier based on a pre-established exit description mapping mechanism. The first error description is then returned to the command sender of the operation and maintenance command. This allows for the rapid provision of the error description in the required language to the command sender when an error occurs during the execution of the operation and maintenance script, and improves the intuitiveness of the error message, thereby enhancing the user experience.

[0066] An optional technical solution involves the operation script outputting an exit flag through the following steps: upon obtaining a second error description in a second language returned by the client, the script identifies the second error description, obtains the exit flag corresponding to the second error description, and outputs the exit flag.

[0067] The second error description can be understood as the error description returned by the client that corresponds to the second language type, such as an English error description that the operations and maintenance personnel cannot directly recognize.

[0068] In this embodiment of the invention, a corresponding exit identifier can be pre-established for each second error description that the client may return. The exit identifier can be the content of the second error description itself, or it can be the name, preset number, or label corresponding to the second error description, etc., without specific limitations. When the operation script captures a second error description returned by the client, the operation script can identify the second error description, obtain the exit identifier corresponding to the second error description according to the pre-established correspondence between each second error description and each exit identifier, and output the exit identifier to the agent program.

[0069] The advantage of setting an exit identifier for the second error description in the optional technical solution of the present invention is that it eliminates the need to map the potentially very lengthy second error description to the first error description, saving storage space for the exit description mapping mechanism, and speeding up the subsequent determination of the first error description corresponding to the exit identifier based on the pre-established exit description mapping mechanism.

[0070] Another optional technical solution involves returning the first error description to the sender of the operation and maintenance command, including: obtaining the second error description in a second language returned by the client and the script execution result output by the operation and maintenance script, and returning the first error description, the second error description, and the script execution result to the sender of the operation and maintenance command.

[0071] The script execution result can be understood as the execution result of the operation and maintenance script. For example, if an error occurs in the operation and maintenance script, the script execution result will be "execution failed".

[0072] In this embodiment of the invention, the agent program can obtain the second error description in the second language returned by the client and the script execution result output by the operation and maintenance script. Then, it returns the first error description, the second error description, and the script execution result that can be identified by the operation and maintenance personnel to the command sender of the operation and maintenance command, so that the operation and maintenance personnel can know the reason for the error in the operation and maintenance script and the execution result of the operation and maintenance script in the first time.

[0073] To better understand the technical solutions of the above embodiments of the present invention, an optional example is provided herein. For example, see... Figure 4 In a WAS environment with clusters, applications, servers, nodes, and shared libraries, operation and maintenance are performed. During the execution of Jython scripts by the wsadmin client, if an exception or error occurs in the Jython script, the wsadmin client can identify the error message and return the corresponding English error description, as well as the script execution result, to the agent program. The Jython script can capture the English error description returned by the wsadmin client, identify the corresponding exit flag, and return the exit flag to the wsadmin client. The wsadmin client then outputs the exit flag to the agent program. The agent program determines the corresponding Chinese error description based on the exit flag and a pre-established exit description mapping mechanism, and then returns the Chinese error description, English error description, and script execution result to the Nebula client.

[0074] Example 3

[0075] Figure 5This is a structural block diagram of the operation and maintenance device provided in Embodiment 3 of the present invention. This device is used to execute the operation and maintenance methods provided in any of the above embodiments. This device and the operation and maintenance methods of the above embodiments belong to the same inventive concept. Details not described in detail in the embodiments of the operation and maintenance device can be found in the embodiments of the above operation and maintenance methods. See also... Figure 5 The device may specifically include: a script input parameter receiving module 310, a script identifier determination module 320, and an operation and maintenance script execution module 330.

[0076] The script input parameter receiving module 310 is used to receive operation and maintenance commands and the corresponding script input parameters of the operation and maintenance commands.

[0077] The script identifier determination module 320 is used to determine the policy identifier corresponding to the operation and maintenance command, and to determine the script identifier corresponding to the policy identifier based on the pre-established policy script mapping mechanism.

[0078] The operation and maintenance operation script execution module 330 is used to pass the script input parameters to the operation and maintenance operation script represented by the script identifier through the running client, and execute the operation and maintenance operation script that receives the script input parameters to realize the operation and maintenance operation process corresponding to the operation and maintenance operation command.

[0079] Optionally, the script identifier determination module 320 may include: a policy file determination unit, used to determine the policy file corresponding to the operation and maintenance command, wherein the policy file stores at least two policy identifiers, and the storage order of each policy identifier in the policy file is the same as the execution order of the operation and maintenance scripts corresponding to each policy identifier; a policy identifier reading unit, used to read at least two policy identifiers from the policy file; and the operation and maintenance script execution module 330 may include: a current input parameter taking unit, used to take the currently to-be-executed operation and maintenance script in the operation and maintenance scripts corresponding to each policy identifier as the current to-be-executed script according to the execution order, and take the script input parameter corresponding to the current to-be-executed script as the current input parameter; and a current to-be-executed script execution unit, used to pass the current input parameter to the current to-be-executed script and execute the current to-be-executed script that receives the current input parameter.

[0080] Optionally, the script input parameter receiving module 310 can be used to: receive at least two operation and maintenance operation commands and script input parameters corresponding to each operation and maintenance operation command; the script identifier determination module 320 can include: a policy identifier determination unit, used to determine the policy identifier corresponding to each operation and maintenance operation command; the operation and maintenance operation script execution module 330 can include: an operation and maintenance operation script execution unit, used to take the script input parameters corresponding to the operation and maintenance operation command as corresponding input parameters, pass the corresponding input parameters to the operation and maintenance operation script, and execute the operation and maintenance operation script that receives the corresponding input parameters.

[0081] Optionally, the operation and maintenance scripts include candidate operation scripts corresponding to script identifiers from a pool of pre-written candidate operation scripts. The candidate operation scripts are written based on operation and maintenance operation steps, which are obtained by breaking down the operation and maintenance process manually performed by operation and maintenance personnel based on preset operation commands.

[0082] Optionally, the operation and maintenance device may further include: a first error description determination module, used to receive an exit identifier output by the operation and maintenance script when executing the operation and maintenance script that has received script input parameters, and determine the first error description in the first language corresponding to the exit identifier based on a pre-established exit description mapping mechanism; and a first error description return module, used to return the first error description to the command sender of the operation and maintenance command.

[0083] Optionally, based on the above scheme, the operation and maintenance script outputs the exit identifier through the following modules: an exit identifier acquisition module, which is used to identify the second error description in the second language returned by the client and obtain the exit identifier corresponding to the second error description; and an exit identifier output module, which is used to output the exit identifier.

[0084] Optionally, based on the above scheme, the first error description return module may include: a script execution result acquisition unit, used to acquire the second error description in the second language returned by the client and the script execution result output by the operation and maintenance script; and a script execution result return unit, used to return the first error description, the second error description, and the script execution result to the command sender of the operation and maintenance command.

[0085] The operation and maintenance device provided in Embodiment 3 of the present invention receives operation and maintenance commands and corresponding script parameters through a script input parameter receiving module; determines the policy identifier corresponding to the operation and maintenance command through a script identifier determination module, and determines the script identifier corresponding to the policy identifier based on a pre-established policy script mapping mechanism; then, through an operation and maintenance script execution module, for the operation and maintenance script represented by the script identifier, the client machine transmits the script input parameters to the operation and maintenance script, and executes the operation and maintenance script that has received the script input parameters, thereby realizing the operation and maintenance operation process corresponding to the operation and maintenance command. The above device, through the automated operation and maintenance process, can improve the operational efficiency during operation and maintenance, and also reduce the risk of misoperation during operation and maintenance.

[0086] The operation and maintenance device provided in the embodiments of the present invention can execute the operation and maintenance method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the method.

[0087] It is worth noting that in the embodiments of the above-mentioned operation and maintenance device, the various units and modules included are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of each functional unit are only for easy differentiation and are not used to limit the scope of protection of the present invention.

[0088] Example 4

[0089] Figure 6 This is a schematic diagram of the structure of a server provided in Embodiment 4 of the present invention. Figure 6 A block diagram of an exemplary server 412 suitable for implementing embodiments of the present invention is shown. Figure 6 The server 412 shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of the present invention.

[0090] like Figure 6 As shown, server 412 is presented in the form of a general-purpose server. The components of server 412 may include, but are not limited to: one or more processors 416, storage device 428, and bus 418 connecting different system components (including storage device 428 and processor 416).

[0091] Bus 418 represents one or more of several bus architectures, including a memory device bus or memory device controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of the various bus architectures. Examples of these architectures include, but are not limited to, the Industry Subversive Alliance (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.

[0092] Server 412 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by server 412, including volatile and non-volatile media, removable and non-removable media.

[0093] Storage device 428 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 430 and / or cache memory 432. Server 412 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 434 may be used to read and write non-removable, non-volatile magnetic media (… Figure 6 Not shown; usually referred to as a "hard drive"). Although Figure 6 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk") and an optical disc drive for reading and writing to a removable non-volatile optical disc (e.g., a Compact Disc Read-Only Memory, CD-ROM), a Digital Video Disc Read-Only Memory, DVD-ROM, or other optical media may be provided. In these cases, each drive may be connected to bus 418 via one or more data media interfaces. Storage device 428 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of the present invention.

[0094] A program / utility 440 having a set (at least one) of program modules 442 may be stored in, for example, a storage device 428. Such program modules 442 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 442 typically perform the functions and / or methods described in the embodiments of the present invention.

[0095] Server 412 can also communicate with one or more external devices 414 (e.g., keyboard, pointing terminal, display 424, etc.), and with one or more terminals that enable users to interact with server 412, and / or with any terminal that enables server 412 to communicate with one or more other computing terminals (e.g., network card, modem, etc.). This communication can be performed via input / output (I / O) interface 422. Furthermore, server 412 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 420. Figure 6As shown, network adapter 420 communicates with other modules of server 412 via bus 418. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with server 412, including but not limited to: microcode, terminal drivers, redundant processors, external disk drive arrays, Redundant Arrays of Independent Disks (RAID) systems, tape drives, and data backup storage systems.

[0096] Processor 416 executes various functional applications and data processing by running programs stored in storage device 428, such as implementing an operation and maintenance method provided in any embodiment of the present invention, which may include:

[0097] Receive operation and maintenance commands and the corresponding script parameters for the operation and maintenance commands;

[0098] Determine the policy identifier corresponding to the operation and maintenance command, and determine the script identifier corresponding to the policy identifier based on the pre-established policy script mapping mechanism;

[0099] For the operation and maintenance script represented by the script identifier, the script input parameters are passed to the operation and maintenance script by running the client, and the operation and maintenance script that receives the script input parameters is executed to realize the operation and maintenance operation process corresponding to the operation and maintenance operation command.

[0100] Example 5

[0101] Embodiment 5 of the present invention also provides a computer-readable storage medium having a computer program stored thereon. When executed by a processor, the program implements an operation and maintenance method as provided in any embodiment of the present invention. The method may include:

[0102] Receive operation and maintenance commands and the corresponding script parameters for the operation and maintenance commands;

[0103] Determine the policy identifier corresponding to the operation and maintenance command, and determine the script identifier corresponding to the policy identifier based on the pre-established policy script mapping mechanism;

[0104] For the operation and maintenance script represented by the script identifier, the script input parameters are passed to the operation and maintenance script by running the client, and the operation and maintenance script that receives the script input parameters is executed to realize the operation and maintenance operation process corresponding to the operation and maintenance operation command.

[0105] The computer-readable storage medium of this invention can be any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. For example, a computer-readable storage medium can be—but is not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0106] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of sending, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.

[0107] The program code contained on the storage medium can be transmitted using any suitable medium, including—but not limited to—wireless, wired, optical fiber, RF, etc., or any suitable combination thereof.

[0108] Computer program code for performing the operations of this invention can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or terminal. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0109] Note that the above description is merely a preferred embodiment of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, the scope of which is determined by the scope of the appended claims.

Claims

1. A method for operation and maintenance, characterized in that, include: Receive operation and maintenance commands and the script input parameters corresponding to the operation and maintenance commands; Determine the policy identifier corresponding to the operation and maintenance command, and determine the script identifier corresponding to the policy identifier based on the pre-established policy script mapping mechanism; For the operation and maintenance script represented by the script identifier, the script input parameters are passed to the operation and maintenance script by running the client, and the operation and maintenance script that receives the script input parameters is executed to realize the operation and maintenance operation process corresponding to the operation and maintenance operation command. In the case of executing the operation script that receives the script input parameters, the method further includes: Receive the exit identifier output by the operation and maintenance script, and determine the first error description in the first language that can be recognized by operation and maintenance personnel based on the pre-established exit description mapping mechanism. The first error description is returned to the sender of the operation and maintenance command; The operation script outputs the exit identifier through the following steps: Upon receiving a second error description in a second language returned by the client, the second error description is identified to obtain the exit identifier corresponding to the second error description, wherein the exit identifier is the name, preset number, or label corresponding to the second error description; Output the exit flag.

2. The method according to claim 1, characterized in that, The step of determining the policy identifier corresponding to the operation and maintenance command includes: The strategy file corresponding to the operation and maintenance command is determined, wherein the strategy file stores at least two strategy identifiers, and the storage order of the strategy identifiers in the strategy file is the same as the execution order of the operation and maintenance scripts corresponding to each strategy identifier. Read the at least two policy identifiers from the policy file; The step of passing the script input parameters to the operation and maintenance script and executing the operation and maintenance script that has received the script input parameters includes: According to the execution order, the currently executed operation script in the operation and maintenance operation script corresponding to each of the strategy identifiers is taken as the currently executed script, and the script input parameter corresponding to the currently executed script is taken as the current input parameter; The current input parameter is passed to the current script to be executed, and the current script to be executed is executed upon receiving the current input parameter.

3. The method according to claim 1, characterized in that, The receiving of operation and maintenance commands and the corresponding script input parameters includes: Receive at least two operation and maintenance commands and script input parameters corresponding to each operation and maintenance command; The step of determining the policy identifier corresponding to the operation and maintenance command includes: For each of the operation and maintenance operation commands, determine the policy identifier corresponding to the operation and maintenance operation command; The step of passing the script input parameters to the operation and maintenance script and executing the operation and maintenance script that has received the script input parameters includes: The script input parameters corresponding to the operation and maintenance command are used as corresponding input parameters, the corresponding input parameters are passed to the operation and maintenance script, and the operation and maintenance script that receives the corresponding input parameters is executed.

4. The method according to claim 1, characterized in that, The operation and maintenance script includes candidate operation scripts that correspond to the script identifier from a series of pre-written candidate operation scripts. The candidate operation scripts are written based on operation and maintenance operation steps, which are obtained by breaking down the operation and maintenance process manually performed by operation and maintenance personnel based on preset operation commands.

5. The method according to claim 1, characterized in that, The step of returning the first error description to the command sender of the operation and maintenance command includes: Obtain the second error description in the second language returned by the client and the script execution result output by the operation and maintenance script; The first error description, the second error description, and the script execution result are returned to the command sender of the operation and maintenance command.

6. A maintenance operation device, characterized in that, include: The script input parameter receiving module is used to receive operation and maintenance commands and the script input parameters corresponding to the operation and maintenance commands. The script identifier determination module is used to determine the policy identifier corresponding to the operation and maintenance command, and to determine the script identifier corresponding to the policy identifier based on a pre-established policy script mapping mechanism. The operation and maintenance operation script execution module is used to, for the operation and maintenance operation script represented by the script identifier, pass the script input parameters to the operation and maintenance operation script by running a client, and execute the operation and maintenance operation script that receives the script input parameters, so as to realize the operation and maintenance operation process corresponding to the operation and maintenance operation command. The operation and maintenance device also includes: The first error description determination module is used to receive the exit identifier output by the operation and maintenance operation script when the operation and maintenance operation script that has received the script input parameters is executed, and to determine the first error description in the first language that can be recognized by operation and maintenance personnel based on the pre-established exit description mapping mechanism. The first error description return module is used to return the first error description to the command sender of the operation and maintenance command; The operation script outputs the exit identifier through the following module: The exit identifier acquisition module is used to identify the second error description in the second language returned by the client and obtain the exit identifier corresponding to the second error description, wherein the exit identifier is the name, preset number or label corresponding to the second error description; The exit flag output module is used to output the exit flag.

7. A server, characterized in that, include: At least one processor; as well as A storage device communicatively connected to the at least one processor; wherein, The storage device stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to cause the at least one processor to perform the operation and maintenance method as described in any one of claims 1-5.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that are used to cause a processor to execute and implement the operation and maintenance method as described in any one of claims 1-5.

Citation Information

Patent Citations

  • Operation and maintenance method and apparatus

    CN110569140A