Operation and maintenance method and device, computer equipment, readable storage medium and program product
By automatically determining the role information of the target host device in the distributed system and performing operation and maintenance tasks, the problem of low operation and maintenance efficiency in the existing technology is solved, and automated operation and maintenance is realized, reducing costs and improving efficiency.
Patent Information
- Application Number
- CN202411727851.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-28
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2044-11-28
AI Technical Summary
In the prior art, operation and maintenance tools are used to assist technicians in performing operation and maintenance tasks of distributed systems, and there is still a problem of low operation and maintenance efficiency.
It provides an operation and maintenance method, by obtaining the operation and maintenance tasks of the target distributed system and the functional information of the target host device, generating role identification information, using preset naming rules and role recognition models, automatically determining the role information of the target host device, and performing operation and maintenance tasks based on this information.
The operation and maintenance tools are realized to automatically perform operation and maintenance tasks of distributed systems, without the assistance of technical personnel, reduce costs, and improve operation and maintenance efficiency and success rate.
Smart Images

Figure CN119520216A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of automated operation and maintenance technology, and in particular to an operation and maintenance method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Art
[0002] Large-scale distributed systems are usually composed of a large number of interconnected hosts. Different hosts often play different roles in the system to collaborate and achieve efficient operation of the entire system. When there are operation and maintenance tasks in distributed systems, most technicians manually configure each host to complete the operation and maintenance tasks.
[0003] In the prior art, in order to improve the operation and maintenance efficiency of distributed systems, operation and maintenance tools are mostly used to assist technical personnel in performing operation and maintenance tasks of distributed systems.
[0004] However, this method of using operation and maintenance tools to assist technicians in performing operation and maintenance tasks of distributed systems still has the problem of low operation and maintenance efficiency. Summary of the invention
[0005] Based on this, it is necessary to provide an operation and maintenance method, device, computer equipment, computer-readable storage medium and computer program product that can improve operation and maintenance efficiency in response to the above technical problems.
[0006] In a first aspect, the present application provides an operation and maintenance method, comprising:
[0007] Obtaining an operation and maintenance task of a target distributed system, and determining a target host device in the target distributed system involved in the operation and maintenance task;
[0008] Determine a host device list of a target operation and maintenance tool according to the target host device, the host device list including role identification information and an Internet of Things protocol IP address of the target host device, the role identification information being determined according to function information of the target host device;
[0009] The target operation and maintenance tool is used to determine the role information of the target host device according to the host device list, and the operation and maintenance task is executed according to the role information, the script file of the operation and maintenance task and the target host device.
[0010] In one of the embodiments, the method further includes: when the target host device joins the target distributed system, obtaining functional information of the target host device, the functional information being used to characterize the services that the target host device can provide; and generating role identification information of the target host device according to the functional information using a preset naming rule.
[0011] In one of the embodiments, the target operation and maintenance tool is used to determine the role information of the target host device according to the host device list, including: using the target operation and maintenance tool to call a preset acquisition variable, and obtaining the role identification information from the host device list based on the preset acquisition variable; using the target operation and maintenance tool to determine the role information according to the role identification information.
[0012] In one of the embodiments, the target operation and maintenance tool is used to determine the role information according to the role identification information, including: using the target operation and maintenance tool to call a role recognition model, wherein the role recognition model is determined according to the preset naming rule; inputting the role identification information into the role recognition model to obtain the role information of the host device output by the role recognition model.
[0013] In one of the embodiments, the operation and maintenance task is executed based on the role information, the script file of the operation and maintenance task and the target host device, including: determining the operation and maintenance subtask to be executed by the target host device in the operation and maintenance task from the script file based on the role information, and executing the operation and maintenance subtask based on the target host device.
[0014] In one of the embodiments, executing the operation and maintenance subtask based on the target host device includes: obtaining an IP address of the target host device, and establishing a connection with the target host device using the IP address, so that the target host device executes the operation and maintenance subtask.
[0015] In a second aspect, the present application also provides an operation and maintenance device, including:
[0016] An acquisition module, used to acquire an operation and maintenance task of a target distributed system, and determine a target host device in the target distributed system involved in the operation and maintenance task;
[0017] A determination module, used to determine a host device list of a target operation and maintenance tool according to the target host device, wherein the host device list includes role identification information and an Internet of Things protocol IP address of the target host device, wherein the role identification information is determined according to function information of the target host device;
[0018] The execution module is used to use the target operation and maintenance tool to determine the role information of the target host device according to the host device list, and execute the operation and maintenance task according to the role information, the script file of the operation and maintenance task and the target host device.
[0019] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the method described in any embodiment of the first aspect when executing the computer program.
[0020] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in any embodiment of the first aspect above.
[0021] In a fifth aspect, the present application further provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the method described in any embodiment of the first aspect above.
[0022] The above-mentioned operation and maintenance method, apparatus, computer equipment, computer-readable storage medium and computer program product obtain the operation and maintenance task of the target distributed system, and determine the target host device in the target distributed system involved in the operation and maintenance task; determine the host device list of the target operation and maintenance tool according to the target host device, and the host device list includes the role identification information and the Internet of Things protocol IP address of the target host device, and the role identification information is determined according to the functional information of the target host device; use the target operation and maintenance tool to determine the role information of the target host device according to the host device list, and perform the operation and maintenance task according to the role information, the script file of the operation and maintenance task and the target host device. The operation and maintenance method provided by the present application can use the operation and maintenance tool to automatically perform the operation and maintenance tasks of the distributed system without the assistance of technical personnel, and can effectively improve the efficiency of the operation and maintenance tasks while reducing costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0024] Figure 1 A schematic diagram of a flow chart of an operation and maintenance method in an embodiment;
[0025] Figure 2 A schematic flow chart of a method when a target host device joins a target distributed system in one embodiment;
[0026] Figure 3 A flowchart of a method for determining role information of a target host device according to a host device list in one embodiment;
[0027] Figure 4 A schematic diagram of a flow chart of a method for determining role information according to role identification information in one embodiment;
[0028] Figure 5 A flowchart of an operation and maintenance method in another embodiment;
[0029] Figure 6 is a structural block diagram of an operation and maintenance device in an embodiment;
[0030] Figure 7 is an internal structure diagram of a computer device in one embodiment;
[0031] Figure 8 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0032] 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.
[0033] Large-scale distributed systems are usually composed of a large number of interconnected hosts. Different hosts often play different roles in the system to collaborate and achieve efficient operation of the entire system. When there are operation and maintenance tasks in distributed systems, most technicians manually configure each host to complete the operation and maintenance tasks.
[0034] In the prior art, in order to improve the operation and maintenance efficiency of distributed systems, most of the operation and maintenance tools are used to assist technicians in performing the operation and maintenance tasks of distributed systems. However, this method of using operation and maintenance tools to assist technicians in performing the operation and maintenance tasks of distributed systems still has the problem of low operation and maintenance efficiency.
[0035] In view of this, the present application provides an operation and maintenance method. The operation and maintenance method provided by the present application can utilize operation and maintenance tools to realize the automated execution of operation and maintenance tasks of distributed systems without the assistance of technical personnel. While reducing costs, it can also effectively improve operation and maintenance efficiency.
[0036] The operation and maintenance method provided in the present application can be executed by a computer device, which can be a terminal or a server. The computer device is installed with a target operation and maintenance tool.
[0037] In an exemplary embodiment, Figure 1 As shown, an operation and maintenance method is provided, which should include the following steps:
[0038] Step 101: Acquire an operation and maintenance task of a target distributed system, and determine a target host device in the target distributed system involved in the operation and maintenance task.
[0039] Optionally, a distributed system refers to a system composed of multiple computer nodes that communicate and collaborate through a network. These computer nodes can be servers or terminal devices. These nodes are physically or logically distributed in different geographical locations and work together to complete specific tasks or provide a series of services. The target distributed node refers to a distributed system for which an operation and maintenance task is to be performed.
[0040] In some optional embodiments, the target distributed system may be a large-scale distributed system, that is, the number of computer nodes included is greater than the number of computer nodes in a conventional distributed system.
[0041] The operation and maintenance task refers to a series of management and maintenance tasks to ensure that the target distributed system can run stably, efficiently and securely to meet business needs. The operation and maintenance task can specifically include deployment tasks, configuration tasks and other types of operation and maintenance tasks.
[0042] In some exemplary embodiments, when an operation and maintenance task of a target distributed system is received, a target host device that needs to perform the operation and maintenance task can be determined from multiple host devices in the target distributed system according to the operation and maintenance task. The host device can be understood as a computer node in the distributed system described above.
[0043] Step 102: Determine a host device list of a target operation and maintenance tool according to the target host device.
[0044] The host device list includes role identification information and an Internet of Things protocol IP address of the target host device, and the role identification information is determined based on the function information of the target host device.
[0045] Optionally, the target operation and maintenance tool may be Ansible. The host device list is an AnsibleInventory file in Ansible.
[0046] The role identification information may be used to indicate the role of the target host device.
[0047] For example, when the target operation and maintenance tool automatically performs the operation and maintenance tasks, there will be a "script" corresponding to the operation and maintenance tasks. Therefore, it is necessary to determine the role of each target host device, so as to determine the corresponding content of the target host device in the script according to the role of the target host device, that is, the action or task that the target host device needs to perform. The actions or tasks that the target host device can perform are also determined according to the function of the target host device. Therefore, it can be understood that the function information of the target host device determines the role identification information of the target host device, and the role identification information of the target host device is used to characterize the role of the target host device.
[0048] In some exemplary embodiments, after obtaining the operation and maintenance task of the target distributed system and determining the target host device in the target distributed system involved in the operation and maintenance task, the role identification information and IP address of the target host device can be determined to generate a host device list of the target operation and maintenance tool.
[0049] Step 103: using the target operation and maintenance tool, determine the role information of the target host device according to the host device list, and execute the operation and maintenance task according to the role information, the script file of the operation and maintenance task and the target host device.
[0050] Optionally, the script file can be an Ansible Playbook. The Ansible Playbook is a script file used to describe a series of automated operations for operation and maintenance tasks. It can be regarded as a task list or operation manual, which specifies in detail a series of tasks that Ansible is to perform on the target host, as well as the execution order and dependencies of these tasks. The script file is also the playbook mentioned above.
[0051] In some exemplary embodiments, after determining the host device list of the target operation and maintenance tool, the target operation and maintenance tool can be used to identify the role identification information in the host device list to obtain the role information of the target host device. Specifically, the identification can be based on a pre-trained model or a keyword recognition algorithm.
[0052] Furthermore, after determining the role information of the target host device, the action or task that the target host device needs to perform may be determined according to the role information and the script file, so that the target host device performs the corresponding action or task.
[0053] The above operation and maintenance method obtains the operation and maintenance task of the target distributed system, and determines the target host device in the target distributed system involved in the operation and maintenance task; determines the host device list of the target operation and maintenance tool based on the target host device, and the host device list includes the role identification information and the Internet of Things protocol IP address of the target host device, and the role identification information is determined based on the functional information of the target host device; uses the target operation and maintenance tool to determine the role information of the target host device based on the host device list, and executes the operation and maintenance task based on the role information, the script file of the operation and maintenance task and the target host device. The operation and maintenance method provided by the present application can use the operation and maintenance tool to automatically execute the operation and maintenance tasks of the distributed system without the assistance of technical personnel, and can effectively improve the efficiency of the operation and maintenance tasks while reducing costs.
[0054] In an exemplary embodiment, Figure 2 As shown, when the target host device joins the target distributed system, the method further includes the following steps:
[0055] Step 201: Acquire the function information of the target host device.
[0056] The function information is used to characterize the services that the target host device can provide.
[0057] Optionally, the functional information may include applications, databases, and networks.
[0058] In some exemplary embodiments, the functional information of the target host device may be determined by acquiring basic information of the target host device, where the basic information may be basic information such as an operating system version, hardware configuration, and network settings.
[0059] Functional information of the target host device may also be determined by acquiring performance data and status data of the target host device.
[0060] The function information of the target host device may also be determined through a hardware device manual of the target host device, which includes the functional characteristics, supported service types, and port usage of the target host device.
[0061] Step 202: Generate role identification information of the target host device according to the function information by using a preset naming rule.
[0062] Optionally, the preset naming rule may be preset by a technician according to actual needs. The preset naming rule may enable the role identification information of the generated target host device to include the role of the target host device.
[0063] In some exemplary embodiments, after obtaining the functional information of the target host device, the role identification information of the target host device can be generated according to the functional information using a preset naming rule. For example, if the functional information of the target host device indicates that the target host device is a computing server, and the node information of the target host device in the target distributed system is node cm7, then using the preset rule, the role identification information generated according to the functional information of the target host device can be "compute-cm7-XX". If the functional information of the target host device indicates that the target host device is a database server, then using the preset rule, the role identification information generated according to the functional information of the target host device can be "db-server-XX". Wherein, "XX" is a serial number or other identifier.
[0064] In an exemplary embodiment, Figure 3 As shown, the target operation and maintenance tool is used to determine the role information of the target host device according to the host device list, including the following steps:
[0065] Step 301: Use the target operation and maintenance tool to call a preset acquisition variable, and obtain the role identification information from the host device list based on the preset acquisition variable.
[0066] Optionally, the preset acquisition variable can be a built-in variable of Ansible, such as inventory_hostname.
[0067] In some exemplary embodiments, after obtaining the host device inventory, Ansible may be used to call inventory_hostname to obtain the role identification information from the host device inventory based on the inventory_hostname.
[0068] Step 302: Using the target operation and maintenance tool, determine the role information according to the role identification information.
[0069] In some exemplary embodiments, a preset role recognition script may be stored in the target operation and maintenance tool. The script may be a role recognition model, so as to utilize the target operation and maintenance tool to determine the role information according to the role identification information.
[0070] The script may also be a keyword recognition algorithm to utilize the target operation and maintenance tool to determine the role information according to the role identification information.
[0071] In an exemplary embodiment, Figure 4 As shown, the target operation and maintenance tool is used to determine the role information according to the role identification information, including the following steps:
[0072] Step 401 uses the target operation and maintenance tool to call the role identification model.
[0073] The role identification model is determined according to the preset naming rule.
[0074] In some exemplary embodiments, since the role identification model is determined according to the preset naming rule, that is, it can identify the role identification information to determine its corresponding role information. Therefore, after obtaining the role identification information, the role identification model can be first called by the target operation and maintenance tool.
[0075] Step 402: input the role identification information into the role recognition model to obtain the role information of the host device output by the role recognition model.
[0076] In some exemplary embodiments, after the target operation and maintenance tool is used to call the role recognition model, the role identification information may be input into the role recognition model to obtain the role information of the host device output by the role recognition model.
[0077] For example, in the existing operation and maintenance methods, role groups are usually set in the host device list, and then the technical personnel identify the roles of the target host devices to determine the role groups of the target host devices. When the number of target host devices is large, the role grouping operation is time-consuming, and because it is a manual operation, errors are prone to occur, which not only leads to low efficiency of the operation and maintenance tasks, but also may cause the failure of the operation and maintenance tasks. The present application realizes the automation of role identification through the combination of preset naming rules and role identification models, which reduces time consumption and improves accuracy at the same time, which not only improves the efficiency of the operation and maintenance tasks, but also improves the success rate of the operation and maintenance tasks.
[0078] In an exemplary embodiment, the operation and maintenance task is executed based on the role information, the script file of the operation and maintenance task and the target host device, including: determining the operation and maintenance subtask to be executed by the target host device in the operation and maintenance task from the script file based on the role information, and executing the operation and maintenance subtask based on the target host device.
[0079] In some exemplary embodiments, an operation and maintenance task is usually performed by multiple target host devices. Therefore, the conditional statement of the target operation and maintenance tool can be called first, and then the operation and maintenance subtasks to be performed by each target host device in the operation and maintenance task can be determined from the script file based on the role information and the conditional statement.
[0080] Furthermore, after determining the operation and maintenance subtasks that each target host device needs to perform, each operation and maintenance subtask can be performed based on each target host device to complete the operation and maintenance task.
[0081] In an exemplary embodiment, executing the operation and maintenance subtask based on the target host device includes: obtaining the IP address of the target host device, and establishing a connection with the target host device using the IP address, so that the target host device executes the operation and maintenance subtask.
[0082] In some exemplary embodiments, after determining the operation and maintenance subtasks that each target host device needs to perform, the IP address of each target host device can be first obtained to establish a connection with each target host device using the IP address so that the target host device performs the operation and maintenance subtask. Specifically, the IP address can also be obtained by calling a preset acquisition variable in the target operation and maintenance tool, and the preset acquisition variable is different from the preset acquisition variable used to obtain the role identification information described above.
[0083] In an exemplary embodiment, Figure 5 As shown, another operation and maintenance method is provided, which includes the following steps:
[0084] Step 501: Acquire an operation and maintenance task of a target distributed system, and determine a target host device in the target distributed system involved in the operation and maintenance task;
[0085] Step 502: determining a host device list of a target operation and maintenance tool according to the target host device, the host device list including role identification information and an Internet of Things protocol IP address of the target host device, the role identification information being determined according to the function information of the target host device; the identification information is generated according to the function information obtained when the target host device joins the target distributed system, using a preset naming rule, and the function information is used to characterize the services that the target host device can provide;
[0086] Step 503: using the target operation and maintenance tool to call a preset acquisition variable, and based on the preset acquisition variable, obtaining the role identification information from the host device list; using the target operation and maintenance tool to call a role identification model, the role identification model is determined according to the preset naming rule; inputting the role identification information into the role identification model to obtain the role information of the host device output by the role identification model;
[0087] Step 504: determine the operation and maintenance subtask to be performed by the target host device in the operation and maintenance task from the script file according to the role information, obtain the IP address of the target host device, and use the IP address to establish a connection with the target host device so that the target host device performs the operation and maintenance subtask.
[0088] It should be understood that, although the steps in the flowcharts of the embodiments described above are shown in sequence according to the instructions of the arrows, these steps are not necessarily performed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be performed in other orders. Moreover, at least a portion of the steps in the flowcharts of the embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily performed at the same time, but can be performed at different times, and the execution order of these steps or stages is not necessarily performed in sequence, but can be performed in turn or alternately with other steps or at least a portion of the steps or stages in other steps.
[0089] Based on the same inventive concept, the embodiment of the present application also provides an operation and maintenance device for implementing the above-mentioned operation and maintenance method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above-mentioned method, so the specific limitations in one or more operation and maintenance device embodiments provided below can refer to the limitations on the operation and maintenance method above, and will not be repeated here.
[0090] In an exemplary embodiment, Figure 6 As shown, an operation and maintenance device 600 is provided, including: an acquisition module 601, a determination module 602 and an execution module 603, wherein:
[0091] An acquisition module 601 is used to acquire an operation and maintenance task of a target distributed system, and determine a target host device in the target distributed system involved in the operation and maintenance task;
[0092] A determination module 602 is used to determine a host device list of a target operation and maintenance tool according to the target host device, wherein the host device list includes role identification information and an Internet of Things protocol IP address of the target host device, wherein the role identification information is determined according to function information of the target host device;
[0093] The execution module 603 is used to use the target operation and maintenance tool to determine the role information of the target host device according to the host device list, and execute the operation and maintenance task according to the role information, the script file of the operation and maintenance task and the target host device.
[0094] In one embodiment, the determination module 602 is also used to obtain functional information of the target host device when the target host device joins the target distributed system, and the functional information is used to characterize the services that the target host device can provide; and to generate role identification information of the target host device according to the functional information using preset naming rules.
[0095] In one embodiment, the execution module 603 is specifically used to use the target operation and maintenance tool to call a preset acquisition variable, and obtain the role identification information from the host device list based on the preset acquisition variable; and use the target operation and maintenance tool to determine the role information according to the role identification information.
[0096] In one embodiment, the execution module 603 is specifically used to use the target operation and maintenance tool to call the role identification model, which is determined according to the preset naming rule; the role identification information is input into the role identification model to obtain the role information of the host device output by the role identification model.
[0097] In one embodiment, the execution module 603 is specifically used to determine the operation and maintenance subtask to be executed by the target host device in the operation and maintenance task from the script file according to the role information, and execute the operation and maintenance subtask based on the target host device.
[0098] In one embodiment, the execution module 603 is specifically used to obtain the IP address of the target host device, and establish a connection with the target host device using the IP address, so that the target host device executes the operation and maintenance subtask.
[0099] Each module in the above operation and maintenance device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0100] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 7 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer 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 to store data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, an operation and maintenance method is implemented.
[0101] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Figure 8 As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, near field communication (NFC) or other technologies. When the computer program is executed by the processor, an operation and maintenance method is implemented.
[0102] Those skilled in the art will understand that Figure 7 and Figure 8 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0103] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0104] Obtaining an operation and maintenance task of a target distributed system, and determining a target host device in the target distributed system involved in the operation and maintenance task;
[0105] Determine a host device list of a target operation and maintenance tool according to the target host device, the host device list including role identification information and an Internet of Things protocol IP address of the target host device, the role identification information being determined according to function information of the target host device;
[0106] The target operation and maintenance tool is used to determine the role information of the target host device according to the host device list, and the operation and maintenance task is executed according to the role information, the script file of the operation and maintenance task and the target host device.
[0107] In one embodiment, when the processor executes the computer program, the following steps are also implemented: when the target host device joins the target distributed system, functional information of the target host device is obtained, and the functional information is used to characterize the services that the target host device can provide; using a preset naming rule, role identification information of the target host device is generated according to the functional information.
[0108] In one embodiment, when the processor executes the computer program, the following steps are also implemented: using the target operation and maintenance tool to call a preset acquisition variable, and obtaining the role identification information from the host device list based on the preset acquisition variable; using the target operation and maintenance tool to determine the role information according to the role identification information.
[0109] In one embodiment, when the processor executes the computer program, the following steps are also implemented: using the target operation and maintenance tool to call the role identification model, the role identification model is determined according to the preset naming rule; inputting the role identification information into the role identification model to obtain the role information of the host device output by the role identification model.
[0110] In one embodiment, when the processor executes the computer program, the following steps are also implemented: determining the operation and maintenance subtask to be performed by the target host device in the operation and maintenance task from the script file according to the role information, and executing the operation and maintenance subtask based on the target host device.
[0111] In one embodiment, when the processor executes the computer program, the following steps are also implemented: obtaining the IP address of the target host device, and establishing a connection with the target host device using the IP address, so that the target host device performs the operation and maintenance subtask.
[0112] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0113] Obtaining an operation and maintenance task of a target distributed system, and determining a target host device in the target distributed system involved in the operation and maintenance task;
[0114] Determine a host device list of a target operation and maintenance tool according to the target host device, the host device list including role identification information and an Internet of Things protocol IP address of the target host device, the role identification information being determined according to function information of the target host device;
[0115] The target operation and maintenance tool is used to determine the role information of the target host device according to the host device list, and the operation and maintenance task is executed according to the role information, the script file of the operation and maintenance task and the target host device.
[0116] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: when the target host device joins the target distributed system, functional information of the target host device is obtained, and the functional information is used to characterize the services that the target host device can provide; using preset naming rules, role identification information of the target host device is generated according to the functional information.
[0117] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: using the target operation and maintenance tool to call a preset acquisition variable, and obtaining the role identification information from the host device list based on the preset acquisition variable; using the target operation and maintenance tool to determine the role information based on the role identification information.
[0118] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: using the target operation and maintenance tool to call the role identification model, the role identification model is determined according to the preset naming rule; inputting the role identification information into the role identification model to obtain the role information of the host device output by the role identification model.
[0119] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: determining the operation and maintenance subtask to be performed by the target host device in the operation and maintenance task from the script file according to the role information, and executing the operation and maintenance subtask based on the target host device.
[0120] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: obtaining the IP address of the target host device, and establishing a connection with the target host device using the IP address, so that the target host device performs the operation and maintenance subtask.
[0121] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:
[0122] Obtaining an operation and maintenance task of a target distributed system, and determining a target host device in the target distributed system involved in the operation and maintenance task;
[0123] Determine a host device list of a target operation and maintenance tool according to the target host device, the host device list including role identification information and an Internet of Things protocol IP address of the target host device, the role identification information being determined according to function information of the target host device;
[0124] The target operation and maintenance tool is used to determine the role information of the target host device according to the host device list, and the operation and maintenance task is executed according to the role information, the script file of the operation and maintenance task and the target host device.
[0125] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: when the target host device joins the target distributed system, functional information of the target host device is obtained, and the functional information is used to characterize the services that the target host device can provide; using preset naming rules, role identification information of the target host device is generated according to the functional information.
[0126] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: using the target operation and maintenance tool to call a preset acquisition variable, and obtaining the role identification information from the host device list based on the preset acquisition variable; using the target operation and maintenance tool to determine the role information based on the role identification information.
[0127] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: using the target operation and maintenance tool to call the role identification model, the role identification model is determined according to the preset naming rule; inputting the role identification information into the role identification model to obtain the role information of the host device output by the role identification model.
[0128] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: determining the operation and maintenance subtask to be performed by the target host device in the operation and maintenance task from the script file according to the role information, and executing the operation and maintenance subtask based on the target host device.
[0129] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: obtaining the IP address of the target host device, and establishing a connection with the target host device using the IP address, so that the target host device performs the operation and maintenance subtask.
[0130] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0131] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above 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 application.
[0132] 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 understood as limiting the scope of the present 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 present application shall be subject to the attached claims.
Claims
1. An operation and maintenance method, characterized in that: The method comprises: Acquire an operation and maintenance task of a target distributed system, and determine a target host device in the target distributed system involved in the operation and maintenance task; Determine a host device list of a target operation and maintenance tool according to the target host device, wherein the host device list includes role identification information and an Internet of Things protocol IP address of the target host device, and the role identification information is determined according to function information of the target host device; The target operation and maintenance tool is used to determine the role information of the target host device according to the host device list, and the operation and maintenance task is performed according to the role information, the script file of the operation and maintenance task and the target host device.
2. The method according to claim 1, characterized in that The method further comprises: When the target host device joins the target distributed system, acquiring function information of the target host device, wherein the function information is used to characterize services that the target host device can provide; The role identification information of the target host device is generated according to the function information by using a preset naming rule.
3. The method according to claim 2, characterized in that The using the target operation and maintenance tool to determine the role information of the target host device according to the host device list includes: Using the target operation and maintenance tool to call a preset acquisition variable, and acquiring the role identification information from the host device list based on the preset acquisition variable; The target operation and maintenance tool is used to determine the role information according to the role identification information.
4. The method according to claim 3, characterized in that The using the target operation and maintenance tool to determine the role information according to the role identification information includes: Using the target operation and maintenance tool to call a role identification model, the role identification model is determined according to the preset naming rule; The role identification information is input into the role recognition model to obtain the role information of the host device output by the role recognition model.
5. The method according to claim 1, characterized in that The performing the operation and maintenance task according to the role information, the script file of the operation and maintenance task and the target host device comprises: The operation and maintenance subtask to be performed by the target host device in the operation and maintenance task is determined from the script file according to the role information, and the operation and maintenance subtask is performed based on the target host device.
6. The method according to claim 5, characterized in that The performing the operation and maintenance subtask based on the target host device includes: The IP address of the target host device is obtained, and a connection is established with the target host device using the IP address, so that the target host device performs the operation and maintenance subtask.
7. An operation and maintenance device, characterized in that: The device comprises: An acquisition module, used to acquire an operation and maintenance task of a target distributed system, and determine a target host device in the target distributed system involved in the operation and maintenance task; A determination module, configured to determine a host device list of a target operation and maintenance tool according to the target host device, wherein the host device list includes role identification information and an Internet of Things protocol IP address of the target host device, and the role identification information is determined according to function information of the target host device; An execution module is used to use the target operation and maintenance tool to determine the role information of the target host device according to the host device list, and execute the operation and maintenance task according to the role information, the script file of the operation and maintenance task and the target host device.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Method and device for operating large-scale computer cluster
CN106681956A
Method and equipment for automatically building container platform based on ansible
CN114416290A
Ansible-based micro-service deployment method and system
CN115291892A
Automatic cluster deployment method and system based on ansible
CN117560281A
Operation and maintenance management method and device, equipment, computer storage medium and program product
CN118071275A