Operation and maintenance management method and device for heterogeneous network equipment, storage medium and electronic equipment

Through the combination of Ansible and Netmiko tools, an automated strategy issuance and cancellation mechanism is designed, which solves the complexity of operation and maintenance management of heterogeneous network equipment, and realizes efficient and flexible strategy issuance and cancellation, improving operation and maintenance efficiency and adaptability.

CN120281653APending Publication Date: 2025-07-08NO 30 INST OF CHINA ELECTRONIC TECH GRP CORP +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510459724.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-14
Publication Date
2025-07-08

AI Technical Summary

Technical Problem

In heterogeneous network equipment, it is difficult for the existing technology to achieve efficient and reliable operation and maintenance management, especially the complex policy issuance and revocation operations between equipment of different manufacturers, and the adaptability of the NETCONF protocol and the YANG data model is insufficient.

Method used

Ansible tools combined with Netmiko are used to design three strategies: automatic issuance, interactive issuance and manual issuance. By building scripts and standard policy templates, unified management of heterogeneous network devices is achieved, and a unified policy revocation method is designed.

Benefits of technology

It improves the operation and maintenance efficiency and reliability of heterogeneous network equipment, reduces operation and maintenance costs, and realizes flexible adaptation and dynamic adjustment of different equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120281653A_ABST
    Figure CN120281653A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an operation and maintenance management method and device for heterogeneous network equipment, a storage medium and electronic equipment, and relates to the technical field of network equipment operation and maintenance management, and the method comprises the steps: constructing a script according to a CLI command of the network equipment; constructing a uniform standard strategy according to the script content, and complementing a standard strategy template into a complete strategy according to the network equipment information; according to the actual situation, the complete strategy is sent to the target network equipment in an automatic issuing mode, an interactive issuing mode or a manual issuing mode; and when issuing needs to be cancelled, issuing of the complete strategy is cancelled according to the issuing mode of the complete strategy. According to the technical scheme provided by the invention, centralized management of strategy processing operations of network equipment of different manufacturers and types is realized, and the processing flexibility can be enhanced and the operation and maintenance cost of the network equipment can be effectively reduced on the basis of ensuring the adaptability and the reliability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of network device operation and maintenance management. Specifically, it relates to an operation and maintenance management method, device, storage medium, and electronic device for heterogeneous network devices. Background Art

[0002] In modern networks, the command-line interface (CLI) is the core method for configuring and managing network devices. With the expansion of the network scale and the continuous development of technology, the types of network devices are increasing day by day. Especially in large-scale data centers, enterprise networks, and multinational network environments, there are significant differences in the brands, models, protocols, and functions of network devices. This heterogeneity poses great challenges to network management. Especially when it is necessary to perform unified configuration and policy distribution for devices from different manufacturers, the complexity and error rate of operations increase significantly.

[0003] Network devices from different manufacturers differ in the following two aspects:

[0004] Configuration command format: For the same policy, it may be necessary to use completely different command grammars on devices from different manufacturers. For example, when setting speed limit policies or access control lists (ACLs), the commands and their parameter grammars of Huawei and Cisco devices are different. Command parameter definition: Even for policies with the same function, different manufacturers may have different names, formats, and ranges for parameters, increasing the cost of understanding the configuration.

[0005] This difference causes network administrators to need to adapt the configuration for each device one by one when facing complex heterogeneous networks, consuming a large amount of time and effort. At the same time, the command configuration methods of different devices also pose challenges to automated management, and traditional command-line methods are difficult to meet the requirements of policy adjustment in dynamic environments.

[0006] To address the above problems, the industry has proposed some standardized solutions, such as network management methods based on the NETCONF protocol and YANG data model. In theory, this solution can simplify network device operation and maintenance and provide a consistent interface across devices. Major manufacturers are also working hard to promote the development of the NETCONF protocol and have released their own YANG data models. However, in actual applications, limited by device models and versions, the YANG data models launched by major manufacturers currently cannot be adapted or even lack maintenance. Currently, using the NETCONF protocol to dispose of devices completely depends on the secondary development documents provided by the manufacturers, and this method is even more complex than the traditional command-line configuration method, and a large part of the current devices do not support this protocol. Therefore, in order to make network devices have wide adaptability, using the command line is still essential. Summary of the Invention

[0007] Embodiments of the present application provide an operation and maintenance management method, device, storage medium, and electronic device for heterogeneous network devices, which realize centralized management of policy handling operations for network devices of different manufacturers and types, and can enhance the flexibility of handling and effectively reduce the operation and maintenance costs of network devices on the basis of ensuring adaptability and reliability.

[0008] Other features and advantages of the present application will become apparent through the following detailed description, or will be learned in part through the practice of the present application.

[0009] According to a first aspect of an embodiment of the present application, there is provided an operation and maintenance management method for heterogeneous network devices, including:

[0010] Construct a playbook according to the CLI commands of the network device;

[0011] Construct a unified standard policy according to the content of the playbook, and complete the standard policy template into a complete policy according to the network device information;

[0012] Send the complete policy to the target network device by means of automatic distribution, interactive distribution, or manual distribution according to the actual situation;

[0013] When it is necessary to revoke the distribution, revoke the distribution of the complete policy according to the distribution method of the complete policy.

[0014] In some embodiments of the present application, based on the foregoing solution, the constructing a playbook according to the CLI commands of the network device includes:

[0015] Construct the playbook according to the network devices to be managed and the CLI commands in the required policy space, and modify the playbook according to the parameters in the CLI commands.

[0016] In some embodiments of the present application, based on the foregoing solution, the constructing a unified standard policy according to the content of the playbook includes:

[0017] Establish a unified standard policy for all network devices and action types according to the content in the playbook;

[0018] Among them, the standard policy includes a fixed field part and a variable field part. The fixed field part is the field that all policies need to fill in, and the variable field part is the CLI command variable.

[0019] In some embodiments of the present application, based on the foregoing solution, sending the complete policy to the target network device by means of automatic distribution includes:

[0020] Ansible generates executable CLI commands according to the complete policy and distributes them to the target network device.

[0021] In some embodiments of the present application, based on the foregoing solution, sending the complete policy to the target network device by means of interactive distribution includes:

[0022] Ansible generates executable CLI commands according to the complete policy, stores them in the database, and marks them as undistributed;

[0023] Query the database to obtain the undistributed policy and manually modify the undistributed policy;

[0024] Use Netmiko to send the modified policy to the target network device and re-mark the policy as distributed in the database.

[0025] In some embodiments of the present application, based on the foregoing solution, sending the complete policy to the target network device by means of manual distribution includes:

[0026] Ansible generates executable CLI commands according to the complete policy, stores them in the database, and marks them as undistributed;

[0027] Query the database to obtain the undistributed policy;

[0028] Default the fixed field part in the undistributed policy to 0, manually fill in the variable field part in the undistributed policy, and use Netmiko to send the policy to the target network device after filling, and re-mark the policy as distributed in the database.

[0029] In some embodiments of the present application, based on the foregoing solution, the method for canceling the distribution of the complete policy according to the distribution method of the complete policy includes:

[0030] Judge whether the complete policy is automatically distributed. If so, obtain the record information about the executable CLI commands in the database, restore the complete policy according to the record information, and then perform automatic cancellation;

[0031] If it is interactive distribution or manual distribution, convert the generated executable CLI commands into the format of the complete policy to generate a cancellation policy.

[0032] According to the second aspect of the embodiments of the present application, there is provided an operation and maintenance management device for heterogeneous network devices, including:

[0033] A first construction unit for constructing a playbook according to the CLI commands of the network device;

[0034] A second construction unit for constructing a unified standard policy according to the playbook content, and complementing the standard policy template into a complete policy according to the network device information;

[0035] A sending unit, configured to send a complete policy to a target network device according to actual situations in a manner of automatic sending, interactive sending or manual sending;

[0036] A revocation unit, configured to revoke the sending of the complete policy according to the sending manner of the complete policy when revocation of sending is required.

[0037] According to a third aspect of the embodiments of the present application, there is provided a computer-readable storage medium, in which computer instructions are stored, and when the computer instructions run on a computer, the computer is caused to execute the method described in the first aspect.

[0038] According to a fourth aspect of the embodiments of the present application, there is provided an electronic device, including: a memory and a processor;

[0039] The memory is configured to store computer instructions;

[0040] The processor is configured to call the computer instructions stored in the memory, so that the electronic device executes the method described in the first aspect.

[0041] In the technical solution of the present application, aiming at the current situation that heterogeneous network devices lack a convenient and efficient automated operation and maintenance management method, the ansible and Netmiko tools are combined to design a standardized policy template and a set of policy sending and dynamic adjustment frameworks. This framework sends policies to heterogeneous network devices in three ways: automatic sending, interactive sending and manual sending, and a unified revocation method is designed for the policies sent in the three sending ways.

[0042] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present application, and are used together with the specification to explain the principles of the present application. Obviously, the following drawings are only some embodiments of the present application, and those of ordinary skill in the art can obtain other drawings according to these drawings without creative efforts. In the drawings:

[0044] Figure 1 A flowchart showing a method for operation and maintenance management of heterogeneous network devices according to an embodiment of the present application;

[0045] Figure 2 A schematic code diagram showing the block division of a playbook device according to an embodiment of the present application;

[0046] Figure 3Shows a schematic code diagram of a standard policy according to an embodiment of the present application;

[0047] Figure 4 Shows a schematic code diagram of an unissued policy according to an embodiment of the present application;

[0048] Figure 5 Shows a schematic diagram of a deployment solution according to an embodiment of the present application;

[0049] Figure 6 Shows a block diagram of an operation and maintenance management device for heterogeneous network devices according to an embodiment of the present application;

[0050] Figure 7 Shows a block diagram of an electronic device according to an embodiment of the present application;

[0051] Figure 8 Shows a schematic structural diagram of a computer system of an electronic device suitable for implementing the embodiments of the present application. Detailed implementation manners

[0052] Now, example embodiments will be described more fully with reference to the accompanying drawings. However, the example embodiments can be implemented in various forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this application will be more complete and comprehensive, and will fully convey the concept of the example embodiments to those skilled in the art.

[0053] In addition, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of the embodiments of the present application. However, those skilled in the art will realize that the technical solutions of the present application can be practiced without one or more of the specific details, or other methods, components, devices, steps, etc. can be adopted. In other cases, well-known methods, devices, implementations, or operations are not shown or described in detail to avoid obscuring aspects of the present application.

[0054] The block diagrams shown in the drawings are only functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.

[0055] The flowcharts shown in the drawings are only illustrative and do not necessarily include all the content and operations / steps, nor do they necessarily have to be executed in the described order. For example, some operations / steps can be decomposed, while some operations / steps can be combined or partially combined, so the actual execution order may change according to the actual situation.

[0056] It should be noted that the terms "first", "second", etc. in the description, claims and above-mentioned drawings of this application are used to distinguish similar objects, and do not necessarily describe a specific order or sequence. It should be understood that the objects so used can be interchanged under appropriate circumstances so that the embodiments of this application described herein can be implemented in an order other than those illustrated or described.

[0057] To make the objectives, technical solutions and advantages of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0058] The following will describe in detail some embodiments of this application in conjunction with the accompanying drawings. Without conflict, the following embodiments and the features in the embodiments can be combined with each other.

[0059] The existing network device operation and maintenance methods generally involve network engineers manually connecting to devices from a terminal and using CLI command lines for configuration, or logging in to the network device Web management interface for configuration. Both of these methods are time-consuming and laborious, and the NETCONF protocol and YANG data model are difficult to adapt to the real operation and maintenance environment. A more efficient and reliable operation and maintenance management method is needed to manage network devices in heterogeneous networks.

[0060] This application mainly proposes a method for the strategy disposal of existing heterogeneous network devices, and specifically proposes solutions to the following problems:

[0061] 1) How to reduce the complexity and cost of operating and maintaining heterogeneous network devices on the basis of ensuring adaptability and reliability, and achieve automated operation and maintenance.

[0062] 2) How to design a script to eliminate the differences in commands under different parameters and achieve rapid dynamic adjustment of command parameters.

[0063] 3) How to design a strategy management mechanism to support dynamic adjustment of strategies, realize the combination of multiple operation and maintenance methods, and improve the operation and maintenance work efficiency and operation and maintenance controllability.

[0064] The method proposed in this application takes the Ansible tool as the core, designs three strategy distribution methods, namely automatic distribution, interactive distribution and manual distribution, and corresponding revocation methods for the operation and maintenance requirements of real heterogeneous networks, realizes rapid dynamic adjustment of strategies, and improves the operation and maintenance efficiency and reliability.

[0065] Specifically, seeFigure 1 , which shows a schematic flowchart of an operation and maintenance management method for heterogeneous network devices according to an embodiment of the present application.

[0066] As Figure 1 shown, it shows an operation and maintenance management method for heterogeneous network devices, including steps S100 to S400.

[0067] Referring to Figure 1 , in step S100, a playbook is constructed according to the CLI commands of the network device.

[0068] In some feasible embodiments, based on the foregoing solution, the constructing a playbook according to the CLI commands of the network device includes:

[0069] Constructing the playbook according to the network devices to be managed and the CLI commands in the policy space to be used, and modifying the playbook according to the parameters in the CLI commands.

[0070] It should be noted that the CLI command refers to the Command Line Interface command. It is a way to interact with the computer system by entering specific instructions in the text interface.

[0071] Exemplarily, the playbook is the basis for managing heterogeneous network devices. In this example, the CLI commands executable by the network device and the conditions for executing the commands are pre-written in the playbook, and the automation management is realized by setting the parameter part of each CLI command as a Jinja2 template variable. According to the configuration of the devices in the actual network, the Ansible playbook is first divided into blocks according to the devices, that is, one device corresponds to one block, and then in each block, it is further divided into lower-level blocks according to the action type, that is, multiple action blocks correspond to each device block.

[0072] In addition, since the fields required to execute the same action type for the same device are not fixed, there may be more than one action block corresponding to each action type, and in the case of different fields, the command template for executing this action will also be different. This difference increases the complexity and cost of operation and maintenance. Therefore, in this example, the variable fields are checked in the playbook and the command template is automatically located. That is to say, the operation and maintenance personnel only need to pay attention to which template variables need to be filled in to issue the policy. As Figure 2Shown is an example of the script device segmentation. This script defines the relevant operations for IP blocking in the ACL rules of a certain Huawei router. Under normal operations, IP blocking can be divided into source IP blocking, destination IP blocking, and source-destination IP blocking. The template variables include three variables: srcip, dstip, and timerange. Among them, srcip is the source IP address, dstip is the destination IP address; timerange is the effective time of the ACL. And the rule_id variable in the command template will automatically generate an available number by querying the existing ACL rule numbers in the device ACL table. When the action to be executed is source IP blocking, only the dstip needs to be set to empty, and vice versa.

[0073] Continue to refer to Figure 1 , step S200, construct a unified standard policy according to the script content, and complete the standard policy template into a complete policy according to the network device information.

[0074] In some feasible embodiments, based on the foregoing solution, the constructing a unified standard policy according to the script content includes:

[0075] Establish a unified standard policy for all network devices and action types according to the content in the script;

[0076] Among them, the standard policy includes a fixed field part and a variable field part. The fixed field part is the field that all policies need to fill in, and the variable field part is the CLI command variable.

[0077] It can be understood that the purpose of establishing the standard policy is to eliminate the differences in CLI commands for different network devices and different action types, and reduce the repetitive work of operation and maintenance personnel.

[0078] The fixed field part is the field that all policies need to fill in, which has nothing to do with the above template variables. It includes the event id, policy id, action type, and device number. Among them, the event id and policy id can facilitate tracing the operation history and undoing operations. The device number is used to query the username and password for SSH connection, and the action type is used to index to the specific CLI command template.

[0079] The variable field part is the above template variable. The variable field can fill in the template variables of all CLI command templates at the same time. The operation and maintenance personnel only need to fill in the values of the required template variables and leave the other variables empty.

[0080] Determine the fields in the standard policy according to the set action type and parameter type. The fields in a standard policy are divided into fixed fields and variable fields. The fixed fields are the fields that all policies must fill in; the variable fields are the parameters required in the command template. Such as Figure 3An example of a standard policy is shown below.

[0081] Continue to refer to Figure 1 , step S300, according to the actual situation, send the complete policy to the target network device by means of automatic distribution, interactive distribution or manual distribution.

[0082] In some feasible embodiments, based on the foregoing solution, sending the complete policy to the target network device by means of automatic distribution includes:

[0083] Ansible generates executable CLI commands according to the complete policy and distributes them to the target network device.

[0084] In some feasible embodiments, based on the foregoing solution, sending the complete policy to the target network device by means of interactive distribution includes:

[0085] Ansible generates executable CLI commands according to the complete policy and stores them in the database and marks them as undistributed;

[0086] Query the database to obtain the undistributed policy and manually modify the undistributed policy;

[0087] Use Netmiko to distribute the modified policy to the target network device and re-mark the policy as distributed in the database.

[0088] In some feasible embodiments, based on the foregoing solution, sending the complete policy to the target network device by means of manual distribution includes:

[0089] Ansible generates executable CLI commands according to the complete policy and stores them in the database and marks them as undistributed;

[0090] Query the database to obtain the undistributed policy;

[0091] Default the fixed field part in the undistributed policy to 0, manually fill in the variable field part in the undistributed policy, and after filling, use Netmiko to distribute the policy to the target network device and re-mark the policy as distributed in the database.

[0092] The following provides a distribution process for the complete policy:

[0093] First, by default, the complete policy will use the automatic distribution method, that is, input the standard policy and complete it as the complete policy by querying the device connection information. Ansible generates executable CLI commands according to the playbook and the input template variables and distributes them to the target network device.

[0094] Next, if the interactive distribution method is selected, Ansible will simulate the execution of the above policy, but the generated CLI commands will not be distributed. Instead, they will be stored in the database and marked as undistributed. The operation and maintenance management personnel can obtain all the undistributed policies by querying the database. The undistributed policies also include fixed fields and variable fields. The fixed fields are the same as those of the standard policy, and the variable fields are the generated CLI commands. The management personnel can check and manually modify the CLI commands in the variable fields or modify the values of the parameters in the fixed fields, and then use Netmiko to distribute this policy. After successful distribution, rewrite the previous record in the database and record it as distributed.

[0095] Finally, the manual distribution method uses the same fields as the undistributed policy. Since the manually distributed policy is not associated with events by default, the fixed fields strategy_id, event_id, and id are all defaulted to 0. The action, device_id, and variable fields need to be filled in manually. After all are filled in, the Netmiko method is also used for distribution and storage in the database. As Figure 4 shown is an example of an undistributed policy. Among them, commands is the variable field, and strategy_information is the fixed field. The id in the fixed field is the database index, which is automatically generated in the interactive distribution mode.

[0096] Continue to refer to Figure 1 , step S400, when it is necessary to revoke the distribution, revoke the complete policy according to the distribution method of the complete policy.

[0097] In some feasible embodiments, based on the foregoing solution, the revocation of the complete policy according to the distribution method of the complete policy includes:

[0098] Determine whether the complete policy is automatically distributed. If so, obtain the record information about the executable CLI commands in the database, restore the complete policy according to the record information, and then perform automatic revocation;

[0099] If it is interactive distribution or manual distribution, convert the generated executable CLI commands into the format of the complete policy to generate a revocation policy.

[0100] It can be understood that the basis for policy revocation is the distribution record generated during the policy distribution process. Since the information recorded by the three policy distribution methods is different, the methods for revoking them are also different. To reduce the complexity and tediousness of operations, the policy distribution process described in this embodiment designs a unified policy revocation method to eliminate the differences in these revocation operations.

[0101] It should be noted that the database records the relevant information of CLI commands through a deployment_information field. When an undo operation is to be performed, first query the historical execution records from the database, and select the effective policies that need to be undone. Since the policies automatically issued directly record the fields and parameters used in the deployment_information field, while the policies issued interactively and manually directly record the CLI commands, it is necessary to determine whether the policy is automatically issued.

[0102] The following provides an example of the policy revocation process:

[0103] If the policy to be revoked is automatically issued, the information of this record can be directly retrieved and restored to the complete policy, and it is automatically rewritten as an undo action. The modified policy can be directly executed through ansible. If the policy to be revoked is issued interactively and manually, it needs to be converted into the format of a complete policy. In this example, the method of string matching is used to extract the fields and parameters used from the original CLI command. Using these extracted fields, parameters and other information of this record in the data, a complete policy for revoking this policy can be generated, and finally executed through ansible. After the policy is revoked, the original policy will be deleted from the database.

[0104] The system for operation and maintenance management using the method provided by this application is deployed as follows:

[0105] Deploy a switch and a terminal control machine of the Linux system. Then, it is necessary to connect the management ports of all managed network devices to this switch and set the IP to be in the same network segment as the terminal control machine. Then, it is necessary to configure the SSH connections between the terminal control machine and all managed network devices, and use the terminal control machine to perform at least one SSH connection with all network devices to ensure that the terminal control machine can stably connect to all network devices through SSH. A typical deployment plan is as Figure 5 shown, where the method of this application is applied to the terminal control machine, and all policies are issued to three managed network devices (service switch, service router and firewall) through the control switch.

[0106] In summary, the method provided by this application has the following advantages:

[0107] 1. A standardized policy template is designed, which shields the differences in policy issuance for heterogeneous network devices, and all are issued through CLI commands, ensuring the adaptability to most network devices.

[0108] 2. Through the design of ansile playbooks, the differences generated by different parameters under the same action type are eliminated, further reducing the workload of operation and maintenance management personnel.

[0109] 3. Based on the standard template of the policy, a framework for policy distribution and dynamic adjustment is designed, realizing automated operation and maintenance and enhancing the flexibility of operation and maintenance management.

[0110] The following introduces the device embodiments of the present application, which can be used to execute a method for operation and maintenance management of heterogeneous network devices in the above embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the embodiments of the above method of the present application.

[0111] Refer to Figure 6 As shown, a device 600 for operation and maintenance management of heterogeneous network devices according to an embodiment of the present application includes:

[0112] A first construction unit 601 for constructing a script according to the CLI commands of the network device;

[0113] A second construction unit 602 for constructing a unified standard policy according to the script content and complementing the standard policy template into a complete policy according to the network device information;

[0114] A distribution unit 603 for sending the complete policy to the target network device in a manner of automatic distribution, interactive distribution or manual distribution according to the actual situation;

[0115] A revocation unit 604 for revoking the distribution of the complete policy according to the distribution method of the complete policy when revocation of distribution is required.

[0116] As Figure 7 shown, an embodiment of the present application also provides an electronic device 700, including a memory 710, a processor 720, and a computer program 711 stored on the memory 710 and executable on the processor. When the processor 720 executes the computer program 711, the steps of the above method for operation and maintenance management of heterogeneous network devices are implemented.

[0117] Since the electronic device introduced in this embodiment is the device adopted by an operation and maintenance management device for heterogeneous network devices in an embodiment of the present application, based on the method introduced in the embodiment of the present application, those skilled in the art can understand the specific implementation manners and various variations of the electronic device in this embodiment. Therefore, the implementation of how this electronic device realizes the method in the embodiment of the present application will not be described in detail here. As long as the device adopted by those skilled in the art to implement the method in the embodiment of the present application belongs to the scope protected by the present application.

[0118] In the specific implementation process, when the computer program 711 is executed by the processor, it can implement any implementation manner in the corresponding embodiment of the first aspect.

[0119] Figure 8The figure shows a schematic structural diagram of a computer system of an electronic device suitable for implementing the embodiments of the present application.

[0120] It should be noted that Figure 8 The computer system 800 of the shown electronic device is only an example, and should not impose any limitations on the functions and usage scope of the embodiments of the present application.

[0121] As Figure 6 shown, the computer system 800 includes a central processing unit (CPU) 801, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 802 or the program loaded from the storage section 808 into the random access memory (RAM) 803, such as executing the method described in the above embodiments. In the RAM 803, various programs and data required for system operation are also stored. The CPU 801, ROM 802, and RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0122] The following components are connected to the I / O interface 805: an input section 806 including a keyboard, a mouse, etc.; an output section 807 including, for example, a cathode ray tube (CRT), a liquid crystal display (LCD), etc. and a speaker, etc.; a storage section 808 including a hard disk, etc.; and a communication section 809 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the I / O interface 805 as required. A removable medium 811, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 810 as required, so that the computer program read from it can be installed into the storage section 808 as required.

[0123] In particular, according to an embodiment of the present application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium. The computer program contains program codes for performing the methods shown in the flowcharts. In such an embodiment, the computer program can be downloaded and installed from a network through the communication section 809, and / or installed from the removable medium 811. When the computer program is executed by the central processing unit (CPU) 801, various functions defined in the system of the present application are performed.

[0124] It should be noted that the computer-readable medium shown in the embodiments of the present application can be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of the computer-readable storage medium can include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, the computer-readable storage medium can be any tangible medium that contains or stores a program, and the program can be used by or combined with an instruction execution system, apparatus, or device. In the present application, the computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, which carries the computer-readable program code. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal medium can also be any computer-readable medium other than the computer-readable storage medium, and the computer-readable medium can send, propagate, or transmit a program for use by or combined with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted by any suitable medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

[0125] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present application. Among them, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code, and the above-mentioned module, program segment, or part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order from that marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram or flowchart, as well as the combination of blocks in the block diagram or flowchart, may be implemented by a dedicated hardware-based system for performing the specified functions or operations, or may be implemented by a combination of dedicated hardware and computer instructions.

[0126] The units involved in the embodiments described in the present application can be implemented in software or in hardware, and the described units can also be provided in a processor. Among them, the names of these units do not constitute a limitation on the units themselves in some cases.

[0127] On the other hand, the present application also provides a computer program product or a computer program. The computer program product or the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes an operation and maintenance management method for heterogeneous network devices described in the above embodiments.

[0128] On the other hand, the present application also provides a computer-readable medium. The computer-readable medium may be included in the electronic device described in the above embodiments; or it may exist separately and not be assembled into the electronic device. The above computer-readable medium carries one or more programs. When the one or more programs are executed by an electronic device, the electronic device implements an operation and maintenance management method for heterogeneous network devices described in the above embodiments.

[0129] It should be noted that although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present application, the features and functions of the two or more modules or units described above may be embodied in one module or unit. Conversely, the features and functions of one module or unit described above may be further divided and embodied by multiple modules or units.

[0130] Those skilled in the art can easily understand from the description of the above embodiments that the example embodiments described herein can be implemented by software or by a combination of software and necessary hardware. Therefore, the technical solutions according to the embodiments of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (such as a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the embodiments of the present application.

[0131] After considering the specification and practicing the disclosed embodiments herein, those skilled in the art will readily conceive of other embodiments of the present application. The present application is intended to cover any variations, uses, or adaptations of the present application, which follow the general principles of the present application and include common general knowledge or conventional technical means in the technical field not disclosed in the present application. It should be understood that the present application is not limited to the exact structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present application is only limited by the appended claims.

Claims

1. An operation and maintenance management method for heterogeneous network devices, characterized in that Including: Constructing a playbook according to the CLI commands of the network device; Constructing a unified standard policy according to the playbook content, and complementing the standard policy template into a complete policy according to the network device information; Sending the complete policy to the target network device by means of automatic distribution, interactive distribution or manual distribution according to the actual situation; When it is necessary to revoke the distribution, revoking the distribution of the complete policy according to the distribution method of the complete policy.

2. The method according to claim 1, characterized in that, The constructing of the playbook according to the CLI commands of the network device includes: Constructing the playbook according to the network devices to be managed and the CLI commands in the policy space to be used, and modifying the playbook according to the parameters in the CLI commands.

3. The method according to claim 1, wherein The constructing of the unified standard policy according to the playbook content includes: Establishing a unified standard policy for all network devices and action types according to the content in the playbook; Among them, the standard policy includes a fixed field part and a variable field part. The fixed field part is the field that all policies need to fill in, and the variable field part is the CLI command variable.

4. The method according to claim 1, wherein Sending the complete policy to the target network device by means of automatic distribution includes: Ansible generates executable CLI commands according to the complete policy and distributes them to the target network device.

5. The method according to claim 1, wherein Sending the complete policy to the target network device by means of interactive distribution includes: Ansible generates executable CLI commands according to the complete policy and stores them in the database and marks them as not distributed; Querying the database to obtain the undistributed policy and manually modifying the undistributed policy; Using Netmiko to distribute the modified policy to the target network device and re-marking the policy as distributed in the database.

6. The method according to claim 1, wherein Sending the complete policy to the target network device by means of manual distribution includes: Ansible generates executable CLI commands according to the complete policy and stores them in the database and marks them as not distributed; Querying the database to obtain the undistributed policy; Defaulting the fixed field part in the undistributed policy to 0, manually filling in the variable field part in the undistributed policy, and using Netmiko to distribute the policy to the target network device and re-marking the policy as distributed in the database after filling.

7. The method according to claim 6, characterized in that, The revoking of the distribution of the complete policy according to the distribution method of the complete policy includes: Judging whether the complete policy is automatically distributed. If so, obtaining the record information about the executable CLI commands in the database, restoring the complete policy according to the record information, and then performing automatic revocation; If it is interactive distribution or manual distribution, converting the generated executable CLI commands into the format of the complete policy to generate a revocation policy.

8. An operation and maintenance management device for heterogeneous network devices, characterized in that, Including: The first construction unit is used to construct a playbook according to the CLI commands of the network device; The second construction unit is used to construct a unified standard policy according to the playbook content, and complement the standard policy template into a complete policy according to the network device information; The distribution unit is used to send the complete policy to the target network device by means of automatic distribution, interactive distribution or manual distribution according to the actual situation; The revocation unit is used to revoke the distribution of the complete policy according to the distribution method of the complete policy when it is necessary to revoke the distribution.

9. A computer-readable storage medium, characterized in that, The computer instructions are stored in the storage medium, and when the computer instructions run on a computer, the computer is caused to execute the method according to any one of claims 1-7.

10. An electronic device, characterized in that, Comprising: a memory and a processor; the memory for storing computer instructions; the processor for calling the computer instructions stored in the memory, such that the electronic device executes the method according to any one of claims 1-7.