Detailed Description
The device adaptation method, the network management apparatus and the system provided by the embodiment of the present invention are described in detail below with reference to the accompanying drawings.
The term "and/or" herein is merely an association describing an associated object, meaning that three relationships may exist, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone.
The terms "first" and "second" and the like in the description of the present invention and the drawings are used for distinguishing different objects or for distinguishing different processes for the same object, and are not used for describing a specific order of the objects.
Furthermore, the terms "comprising" and "having" and any variations thereof as referred to in the description of the invention are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements but may alternatively include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be noted that, in the embodiments of the present invention, words such as "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplary" or "e.g.," an embodiment of the present invention is not necessarily to be construed as preferred or advantageous over other embodiments or designs. Rather, use of the word "exemplary" or "such as" is intended to present concepts related in a concrete fashion.
In the description of the present invention, the meaning of "a plurality" means two or more unless otherwise specified.
First, technical terms related to the technical solution of the present application are explained:
management information base, MIB: the management information base is one of contents of a standard framework of a TCP/IP network management protocol, and the MIB defines data items that the managed device must hold, operations allowed to be performed on each data item, and meanings thereof, i.e., data variables such as control and status information of the managed device accessible to the management system, are held in the MIB. The generalized format defined by the MIB supports the definition of its specific MIB set for each new managed device, so manufacturers can define their dedicated management objects using standard methods, and thus can manage many new protocols and devices with good scalability.
Object Identifier (OID): the object identifier is also called the domain name of the internet of things, and is an identification mechanism commonly proposed by the ISO/IEC and ITU international standards organizations for carrying out globally unambiguous and unique naming on any type of object, concept or 'thing'. Once named, the name is valid for the lifetime. The OID has the characteristics of flexible layering, strong expandability and the like, and is suitable to be used as a meta-identifier mechanism for exchanging among various existing coding schemes.
Network Management System (NMS): an NMS is a network management system in a communication network, whose management objects may include all entities in the network, such as: network devices, applications, server systems, routers, switches, HUBs, auxiliary devices, etc., provide a system-wide view of the network to the network system administrator. The NMS manages the networks of different regions and different equipment providers. The network administrator monitors the network comprehensively through the NMS. In the network management system of the chinese operator, NMS refers to a provincial communication network management system or a future regional network management system.
Simple Network Management Protocol (SNMP): the system consists of a set of standards for network management, including an application layer protocol (application layer protocol), a database model (database schema) and a set of resource objects. The protocol can support a network management system to monitor devices connected to the network for any regulatory concerns.
Relational database: a relational database is a database created according to a relational model. In short, a relational model refers to a two-dimensional table model, and a relational database is a data organization composed of two-dimensional tables and their relations.
The application scenarios of the device adaptation method and the network management device provided by the embodiment of the application are as follows: the equipment is accessed to a network management system, and a network management device needs to acquire hardware structure information of the equipment, including model information of the equipment and information of hardware resources such as machine frames, board cards, interfaces and the like, so that resource adaptation with the equipment is completed, and the resources of the equipment are managed conveniently.
An embodiment of the present invention provides an apparatus adaptation method, as shown in fig. 1, which includes the following steps:
s101, the network management device acquires resource information of the equipment.
Illustratively, the resource information includes a management information base MIB of the device, and the network management apparatus collects the MIB of the device using SNMP, so as to obtain the resource information of the device.
Illustratively, the hardware resources of the device include subracks, boards, interfaces, and the like. The MIB is a database containing information about managed resources, each of which is represented by an object, and managed resources, which is a structured collection of these objects. The information that each managed object needs to define is basically the same, and generally includes information such as an object identifier OID, a data type, a value range, access control, an object state, description information, and the like. For the network management apparatus, the model information and the chassis information of the device can be directly obtained by reading and analyzing the original MIB, but the board card information and the interface information cannot. Then, step S102 is executed.
S102, the network management device generates a relational database according to the logical relation among the resource information.
The relational database stores resource information organized according to preset rules. Illustratively, the preset rule is to convert a logical relationship between resource information into a hierarchical relationship between hardware resources.
Illustratively, hardware resources of the device include a subrack, a board card and an interface, and at a physical level, there is a hierarchical relationship between the hardware resources and the included hardware resources, and in the MIB, managed objects corresponding to the hardware resources form a hierarchical tree structure and there is a logical relationship.
Illustratively, the network management device obtains the hierarchical relationship between the hardware resources of the device according to the logical relationship between the managed objects in the MIB, and converts the MIB into a relational database. In contrast to the original MIB, relational databases employ relational models to organize data, which can reflect "one-to-one", "one-to-many", or "many-to-one" relationships that exist between data. The relational database has the function of combing the disordered MIB data once, and the original MIB managed object information still keeps the original format, but forms a relational model capable of reflecting the hierarchical relationship among hardware resources of the equipment.
It should be noted that the logical relationship between managed objects in the MIB may not completely reflect the hierarchical relationship between hardware resources, in other words, the managed objects in the MIB may be explicit parent-child relationships or may not be explicit. After the network management device converts the MIB into the relational database, the managed object information maintains the same logical relationship as in the MIB, and meanwhile, if the logical relationship is ambiguous, the managed object information also maintains the hierarchical relationship corresponding to the hardware resource, for example, the board slot information should be at the lower layer or lower layers of the chassis information, the board information should be at the lower layer of the board slot information, and the interface information should be at the lower layer of the board information. Then, step S103 is executed.
S103, the network management device acquires the adaptive parameters of the equipment from the relational database according to a preset configuration file template to generate a configuration file of the equipment.
The network management device obtains the hardware structure information of the equipment by reading the adaptation parameters, and then completes the adaptation of the equipment.
Illustratively, the preset profile template specifically includes the following adaptation parameters: the equipment type, the equipment type object identifier OID, the equipment subrack index, the equipment board card OID, the equipment board card index, the equipment main control board OID, the equipment main control board index, the equipment switch board OID, the equipment switch board index, the equipment main control board description, the equipment main control board forwarding capability, the equipment switch board description and the equipment switch board forwarding capability.
In a possible implementation manner, if the logical relationship is an explicit parent-child relationship, the network management apparatus obtains the adaptation parameter of the device from the relational database information according to a preset file template through the following steps to generate a configuration file of the device:
the method comprises the following steps: and determining the adaptive parameters to be acquired according to a preset configuration file template.
The preset configuration file template specifies adaptation parameters required to be acquired by adapting the network management device and the equipment, and meets the requirements of all types of equipment of all manufacturers. However, it should be noted that the preset configuration file template does not limit the network management apparatus to obtain all the above adaptation parameters to complete the adaptation with the device, nor does the network management apparatus to obtain other types of adaptation parameters to complete the adaptation with the device.
Step two: and according to a preset rule, sequentially acquiring the model information, the machine frame information, the board card information and the interface information of the equipment from the relational database information, wherein the machine frame information, the board card information and the interface information keep the parent-child relationship which is the same as the logical relationship.
As described above, the model information and the frame information of the device are obtained by directly reading and analyzing the relational database, and since the frame information, the board information and the interface information maintain the parent-child relationship identical to the logical relationship, the network management apparatus sequentially obtains the board slot position information from the child node of the frame node, obtains the board information from the child node of the board slot position node, and obtains the interface information from the child node of the board slot position node.
Step three: and converting the model information, the machine frame information, the board card information and the interface information into adaptive parameters.
As described above, the information that each managed object needs to define is basically the same, and the network management apparatus obtains the adaptation parameters required by the configuration file template from the model information, the machine frame information, the board information, and the interface information.
Step four: and filling the adaptive parameters into a preset configuration file template to generate a configuration file of the equipment.
Illustratively, the network management apparatus fills the obtained adaptive parameters into a preset configuration file template to generate a configuration file of the device. It should be noted that, the present application does not limit that the network management device must obtain all the adaptation parameters required by the preset profile template.
In another possible implementation manner, if the logical relationship is ambiguous, the network management apparatus obtains the adaptation parameters of the device from the relational database information according to a preset file template, and generates a configuration file of the device by the following steps:
the method comprises the following steps: and determining the adaptive parameters to be acquired according to a preset configuration file template.
Step two: and reading the analysis relational database, and acquiring the model information and the machine frame information of the equipment.
Step three: and searching corresponding board card slot position information from the machine frame node to the lower layer node in a recursion manner.
As described above, the card slot information should be at the lower layer of the machine frame information or at the lower layer, and after the network management device acquires the machine frame information, the network management device first searches for the corresponding card slot information from the machine frame node to the lower layer node in a recursion manner.
Step four: and if the board card slot position information is found, acquiring the board card information corresponding to the board card slot position from the child node of the board card slot position node.
Step five: and searching for the lower-layer node from the board card node in a recursion manner to obtain the interface information corresponding to the board card.
Step six: and converting the model information, the machine frame information, the board card information and the interface information into adaptive parameters.
Step seven: and filling the adaptive parameters into a preset configuration file template to generate a configuration file of the equipment.
In another possible implementation manner, the following steps may need to be performed between the third step and the fourth step:
if the slave frame node recursively searches for the lower layer node, and corresponding board card slot position information is not found, continuing searching for the lower layer node, and acquiring the board card slot position information of the equipment from the grandchild node of the slave frame node.
As described above, the card slot information should be at the lower layer of the frame information or the lower layer again, and after the network management device acquires the frame information, the network management device first recursively searches for corresponding card slot information from the frame node to the lower layer node, and if the card slot information is not acquired in the layer node, the network management device continues searching to the lower layer node again, and acquires the card slot information of the device from the grandchild node of the frame node.
In another possible implementation manner, the following steps may be required between the above step five and step six:
and if the slave board card node recursively searches for the lower layer node and the interface information corresponding to the board card is not found, defining the interface information in a standard physical interface definition format, and hanging the interface information to the lower layer of the corresponding board card node.
Illustratively, the interface information includes a format of the interface, and a subrack, a board card, and an interface position corresponding to the interface.
S104, the network management device reads the configuration file to complete the adaptation with the equipment.
Illustratively, the network management apparatus reads the configuration file of the device, and then may obtain the adaptation parameters required for adapting to the device, and quickly complete resource adaptation to the device.
According to the equipment adaptation method, after the network management device obtains the resource information of the equipment, a relational database is generated according to the logical relationship between the resource information; the relational database stores resource information organized according to preset rules; acquiring adaptation parameters of the equipment from a relational database according to a preset configuration file template to generate a configuration file of the equipment; wherein the adaptation parameter is used for describing hardware structure information of the device; and reading the configuration file to complete equipment adaptation. Compared with the prior art, the adaptation of the equipment is completed through the processes of MIB analysis, equipment model and machine frame board card logic analysis, code expansion adaptation and redeployment verification. According to the equipment adaptation method, a universal adaptation template is formed by defining a preset configuration file template, a relational database is generated according to the logical relation among the resource information, the adaptation parameters of the equipment are obtained from the relational database, the configuration file of the equipment is generated, and the resource adaptation with the equipment is completed. Therefore, resource adaptation can be realized for different equipment models of different manufacturers, adaptation steps are greatly reduced, complex repeated adaptation processes are omitted, programs do not need to be expanded and developed infinitely, the problem that cold deployment affects on-line services is solved, and the management efficiency of the comprehensive network management system on network resources is improved.
The above description mainly introduces the solution provided by the embodiment of the present invention from the perspective of a network management device. It is understood that the network management apparatus includes hardware structures and/or software modules for performing the respective functions in order to implement the above functions. Those of skill in the art will readily appreciate that the present invention can be implemented in hardware or a combination of hardware and computer software, with the exemplary network management devices and algorithm steps described in connection with the embodiments disclosed herein. Whether a function is performed as hardware or computer software drives hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The network management device according to the embodiment of the present invention may perform the division of the functional modules or the functional units according to the above method examples, for example, each functional module or functional unit may be divided corresponding to each function, or two or more functions may be integrated into one processing module. The integrated module may be implemented in a form of hardware, or may be implemented in a form of a software functional module or a functional unit. The division of the modules or units in the embodiments of the present invention is schematic, and is only a logic function division, and there may be another division manner in actual implementation.
Fig. 2 is a schematic diagram illustrating a possible structure of the network management device according to the above embodiment, in a case where each functional module is divided according to each function. The network management device comprises an acquisition module 201, a generation module 202, a processing module 203 and a reading module 204.
The obtaining module 201 is configured to obtain resource information of a device.
The generating module 202 is configured to generate a relational database according to the logical relationship between the resource information; the relational database stores resource information organized according to preset rules.
The processing module 203 is configured to obtain an adaptation parameter of the device from the relational database according to a preset configuration file template, and generate a configuration file of the device; wherein the adaptation parameter is used to describe hardware structure information of the device.
The reading module 204 is configured to read the configuration file to complete device adaptation.
The network management device provided by the embodiment of the invention generates a relational database according to the logical relationship between the resource information after acquiring the resource information of the equipment; the relational database stores resource information organized according to preset rules; acquiring adaptation parameters of the equipment from a relational database according to a preset configuration file template to generate a configuration file of the equipment; wherein the adaptation parameter is used for describing hardware structure information of the device; and reading the configuration file to complete equipment adaptation. Compared with the prior art, the adaptation of the equipment is completed through the processes of MIB analysis, equipment model and machine frame board card logic analysis, code expansion adaptation and redeployment verification. According to the equipment adaptation method, a universal adaptation template is formed by defining a preset configuration file template, a relational database is generated according to the logical relation among the resource information, the adaptation parameters of the equipment are obtained from the relational database, the configuration file of the equipment is generated, and the resource adaptation with the equipment is completed. Therefore, resource adaptation can be realized for different equipment models of different manufacturers, adaptation steps are greatly reduced, complex repeated adaptation processes are omitted, programs do not need to be expanded and developed infinitely, the problem that cold deployment affects on-line services is solved, and the management efficiency of the comprehensive network management system on network resources is improved.
Fig. 3 shows a schematic diagram of another possible structure of the network management device involved in the above embodiments. The network management apparatus includes: a processor 302 and a communication interface 303. The processor 302 is configured to control and manage actions of the network management apparatus, for example, execute the steps performed by the obtaining module 201, the generating module 202, the processing module 203, the reading module 204, and/or other processes for executing the techniques described herein. The communication interface 303 is used to support communication of the network management device with other network entities. The network management device may further comprise a memory 301 and a bus 304, the memory 301 being used for storing program codes and data of the network management device.
The memory 301 may be a memory in the network management apparatus, and the like, and the memory may include a volatile memory, such as a random access memory; the memory may also include non-volatile memory, such as read-only memory, flash memory, a hard disk, or a solid state disk; the memory may also comprise a combination of memories of the kind described above.
The processor 302 may be implemented or performed with various illustrative logical blocks, modules, and circuits described in connection with the disclosure. The processor may be a central processing unit, general purpose processor, digital signal processor, application specific integrated circuit, field programmable gate array or other programmable logic device, transistor logic device, hardware component, or any combination thereof. Which may implement or perform the various illustrative logical blocks, modules, and circuits described in connection with the disclosure. The processor may also be a combination of computing functions, e.g., comprising one or more microprocessors, DSPs, and microprocessors, among others.
The bus 304 may be an Extended Industry Standard Architecture (EISA) bus or the like. The bus 304 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in FIG. 3, but this does not mean only one bus or one type of bus.
An embodiment of the present invention provides a network management system, and as shown in fig. 4, the network management system may include a network management apparatus and a managed device, where the network management apparatus is configured to collect resource information of the managed device to execute the device adaptation method provided in the embodiment of the present invention. For the description of the network management apparatus and the managed device, reference may be made to the above description in the method embodiment and the apparatus embodiment, and details are not described here again.
The embodiments of the present application further provide a computer program product containing instructions, which when run on a computer, cause the computer to execute the device adaptation method described in the above method embodiments.
An embodiment of the present invention further provides a computer-readable storage medium, where one or more programs are stored in the computer-readable storage medium, where the one or more programs include instructions, and when the processor of the network management device executes the instructions, the network management device executes the steps performed by the network management device in the method flow shown in the foregoing method embodiment.
The computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a Read-Only Memory (ROM), an Erasable Programmable Read-Only Memory (EPROM), a register, a hard disk, an optical fiber, a portable Compact Disc Read-Only Memory (CD-ROM), an optical storage device, a magnetic storage device, any suitable combination of the above, or any other form of computer readable storage medium known in the art. An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. Of course, the storage medium may also be integral to the processor. The processor and the storage medium may reside in an Application Specific Integrated Circuit (ASIC). In embodiments of the present application, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
Through the above description of the embodiments, it is clear to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional modules is merely used as an example, and in practical applications, the above function distribution may be completed by different functional modules according to needs, that is, the internal structure of the device may be divided into different functional modules to complete all or part of the above described functions. For the specific working processes of the system, the apparatus and the unit described above, reference may be made to the corresponding processes in the foregoing method embodiments, and details are not described here again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) or a processor to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: flash memory, removable hard drive, read only memory, random access memory, magnetic or optical disk, and the like.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.