CN113572630A - Method and device for generating network configuration information, electronic equipment and medium - Google Patents
Method and device for generating network configuration information, electronic equipment and medium Download PDFInfo
- Publication number
- CN113572630A CN113572630A CN202110184910.XA CN202110184910A CN113572630A CN 113572630 A CN113572630 A CN 113572630A CN 202110184910 A CN202110184910 A CN 202110184910A CN 113572630 A CN113572630 A CN 113572630A
- Authority
- CN
- China
- Prior art keywords
- service
- node
- network
- attribute value
- identification information
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 49
- 238000012163 sequencing technique Methods 0.000 claims description 8
- 238000004891 communication Methods 0.000 abstract description 8
- 238000004590 computer program Methods 0.000 description 16
- 238000010586 diagram Methods 0.000 description 16
- 230000006870 function Effects 0.000 description 15
- 238000013515 script Methods 0.000 description 7
- 230000006978 adaptation Effects 0.000 description 4
- 230000003287 optical effect Effects 0.000 description 4
- 238000012545 processing Methods 0.000 description 3
- 230000009471 action Effects 0.000 description 2
- 230000008569 process Effects 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 239000004065 semiconductor Substances 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0803—Configuration setting
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/18—Multiprotocol handlers, e.g. single devices capable of handling multiple protocols
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Computer And Data Communications (AREA)
- Communication Control (AREA)
Abstract
The embodiment of the application provides a method and a device for generating network configuration information, electronic equipment and a medium, and relates to the technical field of communication. The method for generating the network configuration information in the embodiment of the application comprises the following steps: acquiring a network configuration structure model, wherein a service node is generated based on identification information corresponding to service attributes contained in a network protocol; and determining attribute value description information of the target network equipment on the service attribute corresponding to the service node based on the node definition information defined for the service node and the target equipment type of the target network equipment, and determining a standard service attribute value of the target network equipment on the service attribute corresponding to the service node based on the attribute value description information. According to the technical scheme, the network configuration information of the network equipment of any equipment manufacturer and any model is represented through a uniform network configuration information format, the workload of operators and developers is remarkably reduced, and the operation efficiency is improved.
Description
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method and an apparatus for generating network configuration information, an electronic device, and a computer program medium.
Background
In a scenario where many network devices are deployed, the network configuration information of each network device needs to be audited to determine whether the actual network configuration information of the network device meets a predetermined requirement.
Since the deployed network devices are from different device manufacturers, there is a large difference in the network configuration information of the network devices. In the related art, for network devices of different device manufacturers, a required script is usually written according to network configuration information of the network devices of the different device manufacturers, and different standard values need to be defined for configuration items of the different manufacturers, so that scripts to be written are scattered and have no standard, and further, types of the scripts to be written are more, writing difficulty is higher, and cost for script maintenance is correspondingly higher, so that how to express the network configuration information of all the network devices in a uniform format becomes a technical problem to be solved urgently.
Disclosure of Invention
Embodiments of the present application provide a method and an apparatus for generating network configuration information, an electronic device, and a computer program medium, which can solve the technical problem that network configuration information of all network devices cannot be expressed in a uniform format in the related art.
Other features and advantages of the present application will be apparent from the following detailed description, or may be learned by practice of the application.
According to an aspect of an embodiment of the present application, a method for generating network configuration information is provided, including: acquiring a network configuration structure model, wherein the network configuration structure model comprises a plurality of network protocol nodes, a plurality of service nodes and a node hierarchical relationship between the network protocol nodes and the service nodes, the network protocol nodes are generated based on identification information corresponding to a network protocol used by network equipment, and the service nodes are generated based on identification information corresponding to service attributes contained in the network protocol; determining attribute value description information of the target network device on a service attribute corresponding to the service node based on node definition information defined for the service node and a target device type of the target network device, wherein the node definition information is information defining the service attribute of the network device on the service node; determining a standard service attribute value of the target network equipment on a service attribute corresponding to the service node based on the attribute value description information, wherein the standard service attribute value refers to a service attribute value preset for the network equipment on the service attribute corresponding to the service node; determining a network protocol node to which the service node belongs based on the node hierarchical relationship; and generating standard network configuration information corresponding to the target network equipment based on the standard service attribute value, the identification information corresponding to the service node and the identification information corresponding to the network protocol node to which the service node belongs.
According to an aspect of the embodiments of the present application, there is provided an apparatus for generating network configuration information, including: a first obtaining unit, configured to obtain a network configuration structure model, where the network configuration structure model includes multiple network protocol nodes, multiple service nodes, and a node hierarchical relationship between the network protocol nodes and the service nodes, the network protocol nodes are generated based on identification information corresponding to a network protocol used by a network device, and the service nodes are generated based on identification information corresponding to a service attribute included in the network protocol; a first execution unit, configured to determine attribute value description information of a target network device on a service attribute corresponding to a service node based on node definition information defined for the service node and a target device type of the target network device, where the node definition information is information defining a service attribute that the network device has at the service node; a second execution unit, configured to determine, based on the attribute value description information, a standard service attribute value of the target network device on a service attribute corresponding to a service node, where the standard service attribute value is a service attribute value preset for the network device on the service attribute corresponding to the service node; a third execution unit, configured to determine, based on the node hierarchical relationship, a network protocol node to which the service node belongs; and the first generating unit is used for generating standard network configuration information corresponding to the target network equipment based on the standard service attribute value, the identification information corresponding to the service node and the identification information corresponding to the network protocol node to which the service node belongs.
In some embodiments of the present application, based on the foregoing scheme, the first obtaining unit is configured to: determining a network protocol used by a network equipment set and service attributes contained in the network protocol, wherein the network equipment set comprises network equipment of all equipment types; generating a network protocol node based on identification information corresponding to a network protocol used by the network equipment set; generating a service node based on the identification information corresponding to the service attribute contained in the network protocol; a network configuration structure model is created that includes the network protocol node and the service node.
In some embodiments of the present application, based on the foregoing scheme, the first obtaining unit is further configured to: creating node definition information for the service node; acquiring attribute value description information of the network equipment of each equipment type in the network equipment set on the service attribute corresponding to the service node; associating the obtained attribute value description information with the equipment type of each network equipment in the network equipment set to generate an attribute value description information set corresponding to the service node; and storing the attribute value description information set and the node definition information in association with the service node.
In some embodiments of the application, based on the foregoing scheme, the attribute value description information is a service attribute value preset by the network device on a service attribute corresponding to the service node, and the second execution unit is configured to: and taking the attribute value description information as a standard service attribute value of the target network equipment on the service attribute corresponding to the service node.
In some embodiments of the present application, based on the foregoing solution, the attribute value description information is an attribute value obtaining instruction, and the second execution unit is configured to: executing the attribute value acquisition instruction; and generating a standard service attribute value of the target network equipment on the service attribute corresponding to the service node based on an execution result of the attribute value acquisition instruction after execution.
In some embodiments of the present application, based on the foregoing scheme, the first generating unit is configured to: based on the node level relation, sequencing the service nodes and the network protocol nodes to which the service nodes belong according to the sequence of the node levels from top to bottom to generate a sequenced first node sequence; generating first data identification information of the standard service attribute value based on identification information corresponding to each node in the first node sequence; and storing the first data identification information and the standard service attribute value in an associated manner to generate standard network configuration information corresponding to the target network equipment.
In some embodiments of the present application, based on the foregoing solution, if the service node is a service node that refers to other service nodes in the network configuration structure model as primary key values, the first generating unit is configured to: and adding the standard service attribute value and the identification information corresponding to the service node quoted by the service node into the first data identification information.
In some embodiments of the present application, based on the foregoing solution, the generating configuration of the network configuration information further includes: a second obtaining unit, configured to obtain a network configuration file corresponding to the target network device, where the network configuration file includes a current service attribute value of the target network device on a service attribute corresponding to the service node, identification information of a service attribute to which the current service attribute value belongs, and identification information of a network protocol to which the current service attribute value belongs; a fourth execution unit, configured to determine, based on the network configuration structure model and the identification information of the service attribute to which the current service attribute value belongs and the identification information of the network protocol to which the current service attribute value belongs, a service node to which the current service attribute value belongs and a network protocol node to which the current service attribute value belongs; the sequencing unit is used for sequencing the service nodes to which the current service attribute values belong and the network protocol nodes to which the current service attribute values belong according to the sequence of the node levels from top to bottom based on the node level relationship to generate a sequenced second node sequence; a second generating unit, configured to generate second data identification information of the current service attribute value based on identification information corresponding to each node in the second node sequence; a third generating unit, configured to associate and store the second data identification information and the current service attribute value, and generate current network configuration information corresponding to the target network device; and the comparison unit is used for comparing the current network configuration information with the standard network configuration information and determining configuration difference information between the current network configuration and the standard network configuration of the target network equipment.
In some embodiments of the present application, based on the foregoing solution, if the service node is a service node that refers to other service nodes in the network configuration structure model as primary key values, the second generating unit is configured to: and adding the standard service attribute value and the identification information corresponding to the service node quoted by the service node into second data identification information.
According to an aspect of an embodiment of the present application, there is provided a computer-readable medium on which a computer program is stored, the computer program, when executed by a processor, implementing the method for generating network configuration information as described in the above embodiments.
According to an aspect of an embodiment of the present application, there is provided an electronic device including: one or more processors; a storage device for storing one or more programs which, when executed by the one or more processors, cause the one or more processors to implement the method of generating network configuration information as described in the above embodiments.
According to an aspect of embodiments herein, there is provided a computer program product or computer program comprising computer instructions 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 the method for generating the network configuration information provided in the above-mentioned various optional embodiments.
In the technical solutions provided in some embodiments of the present application, a network configuration structure model is constructed according to network protocols used by all types of network devices and service attributes included in the network protocols, attribute value description information of a target network device on a service attribute corresponding to a service node is determined according to node definition information defining the service attribute of the network device on the service node and the target device type of the target network device, a standard service attribute value of the target network device on the service attribute corresponding to the service node is determined based on the attribute value description information, so that for a network device of any device type, a standard service attribute value of the network device on the service attribute corresponding to the service node can be obtained through the device type and the network configuration structure model of the network device, and according to the standard service attribute value, The standard network configuration information corresponding to the target network equipment is generated according to the identification information corresponding to the service node and the identification information corresponding to the network protocol node to which the service node belongs, so that the network equipment of any model of any equipment manufacturer can be represented through a uniform network configuration information format, the situation that adaptation scripts need to be written for the network equipment of different equipment manufacturers and models is avoided, the network configuration information of the network equipment can be conveniently managed by operators, the workload of the operators and developers is remarkably reduced, and the operation efficiency is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the application.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and together with the description, serve to explain the principles of the application. It is obvious that the drawings in the following description are only some embodiments of the application, and that for a person skilled in the art, other drawings can be derived from them without inventive effort. In the drawings:
fig. 1 shows a schematic diagram of an exemplary system architecture to which the technical solution of the embodiments of the present application can be applied.
Fig. 2 shows a flow chart of a method of generating network configuration information according to an embodiment of the application.
Fig. 3 shows a schematic diagram of a network protocol used by a class of network devices in accordance with an embodiment of the present application.
Fig. 4 shows a detailed flowchart of step S210 of the method for generating network configuration information in an embodiment of the present application.
Fig. 5 illustrates a network configuration architecture model in one embodiment of the present application.
Fig. 6 shows a detailed flowchart of step S210 of the method for generating network configuration information in an embodiment of the present application.
Fig. 7 shows a detailed flowchart of step S230 of the method for generating network configuration information according to an embodiment of the present application.
Fig. 8 shows a detailed flowchart of step S250 of a method for generating network configuration information according to an embodiment of the present application.
Fig. 9 shows a flow chart of a method of generating network configuration information according to an embodiment of the application.
Fig. 10 shows a schematic diagram of a network profile corresponding to a target network device in an embodiment according to the application.
Fig. 11 shows a block diagram of a generation apparatus of network configuration information according to an embodiment of the present application.
FIG. 12 illustrates a schematic structural diagram of a computer system suitable for use in implementing the electronic device of an embodiment of the present application.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art.
Furthermore, the described features, structures, or characteristics may 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 embodiments of the application. One skilled in the relevant art will recognize, however, that the subject matter of the present application can be practiced without one or more of the specific details, or with other methods, components, devices, steps, and so forth. In other instances, well-known methods, devices, implementations, or operations have not been shown or described in detail to avoid obscuring aspects of the application.
The block diagrams shown in the figures are functional entities only and do not necessarily correspond to physically separate entities. I.e. these functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor means and/or microcontroller means.
The flow charts shown in the drawings are merely illustrative and do not necessarily include all of the contents and operations/steps, nor do they necessarily have to be performed in the order described. For example, some operations/steps may be decomposed, and some operations/steps may be combined or partially combined, so that the actual execution sequence may be changed according to the actual situation.
Fig. 1 shows a schematic diagram of an exemplary system architecture to which the technical solution of the embodiments of the present application can be applied.
As shown in fig. 1, the system architecture may include a network device management side 101, a network 102, and a network device 103. The network device management terminal 101 and the network device 103 are connected via a network 102, and perform data interaction based on the network 102, and the network may include various connection types, such as a wired communication link, a wireless communication link, and the like.
It should be understood that the numbers of the network device management side 101, the network 102, and the network device 103 in fig. 1 are merely illustrative. There may be any number of network device management peers 101, networks 102, and network devices 103, as desired for the implementation.
Optionally, the network device management terminal 101 may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server providing basic cloud computing services such as a cloud database, a cloud storage, a network service, and the like.
The network device management terminal 101 obtains a network configuration structure model, where the network configuration structure model includes multiple network protocol nodes, multiple service nodes, and a node hierarchy relationship between the network protocol nodes and the service nodes, the network protocol nodes are generated based on identification information corresponding to a network protocol used by the network device, and the service nodes are generated based on identification information corresponding to service attributes included in the network protocol; determining attribute value description information of the target network equipment on a service attribute corresponding to the service node based on node definition information defined for the service node and the target equipment type of the target network equipment, wherein the node definition information is information for defining the service attribute of the network equipment on the service node; determining a standard service attribute value of the target network equipment on the service attribute corresponding to the service node based on the attribute value description information, wherein the standard service attribute value refers to a service attribute value preset for the network equipment on the service attribute corresponding to the service node; determining a network protocol node to which a service node belongs based on a node hierarchy relationship; and generating standard network configuration information corresponding to the target network equipment based on the standard service attribute value, the identification information corresponding to the service node and the identification information corresponding to the network protocol node to which the service node belongs.
It can be seen from the above that, a network configuration structure model is constructed according to network protocols used by all types of network devices and service attributes contained in the network protocols, and according to node definition information defining service attributes of the network devices at service nodes and target device types of the target network devices, attribute value description information of the target network devices at the service attributes corresponding to the service nodes is determined, based on the attribute value description information, a standard service attribute value of the target network devices at the service attributes corresponding to the service nodes is determined, so that for any device type of network devices, a standard service attribute value of the network devices at the service attributes corresponding to the service nodes can be obtained through the device types of the network devices and the network configuration structure model, and according to the standard service attribute value, the identification information corresponding to the service nodes and the identification information corresponding to the network protocol nodes to which the service nodes belong, the standard network configuration information corresponding to the target network equipment is generated, so that the network equipment of any model of any equipment manufacturer can be represented through a uniform network configuration information format, the adaptation scripts are prevented from being required to be written for the network equipment of different equipment manufacturers and models, the network configuration information of the network equipment can be conveniently managed by operators, the workload of the operators and developers is remarkably reduced, and the operation efficiency is improved.
It should be noted that the method for generating network configuration information provided in the embodiment of the present application is generally executed by the network device management end 101, and accordingly, the network configuration information generating apparatus is generally disposed in the network device management end 101. The details of implementation of the technical solution of the embodiments of the present application are set forth in the following.
Fig. 2 shows a flowchart of a method for generating network configuration information according to an embodiment of the present application, where the method for generating network configuration information may be performed by a network device management side, which may be the network device management side 101 shown in fig. 1. Referring to fig. 2, the method for generating the network configuration information at least includes steps S210 to S240, which are described in detail as follows.
In step S210, a network configuration structure model is obtained, where the network configuration structure model includes a plurality of network protocol nodes, a plurality of service nodes, and a node hierarchy relationship between the network protocol nodes and the service nodes, the network protocol nodes are generated based on identification information corresponding to a network protocol used by the network device, and the service nodes are generated based on identification information corresponding to a service attribute included in the network protocol.
In one embodiment of the present application, a network device refers to a physical device entity connected to a network, which may be in various categories including, but not limited to, switches, gateways, routers, and the like. The network configuration structure model is created according to the network protocol used by the network equipment and the service attribute contained in the network protocol, and comprises a plurality of network protocol nodes, a plurality of service nodes and a node hierarchical relation between the network protocol nodes and the service nodes. The network protocol nodes are generated based on identification information corresponding to each network protocol used by the network equipment, the service nodes are generated based on identification information corresponding to each service attribute contained in the network protocol, and the node hierarchical relationship between the network protocol nodes and the service nodes reflects the hierarchical relationship between the network protocol and the service attributes contained in the network protocol.
It is understood that the network configuration structure models corresponding to different classes of target network devices are different, for example, the network configuration structure model corresponding to the switch and the network configuration structure model corresponding to the gateway are two different network configuration structure models.
Fig. 3 is a schematic diagram illustrating a network Protocol used by a class of network devices according to an embodiment of the present application, and as shown in fig. 3, the network Protocol used by the class of network devices may include multiple protocols such as Spanning Tree Protocol (STP), Link Layer Discovery Protocol (LLDP), Border Gateway Protocol (BGP), and the like.
In an embodiment of the present application, as shown in fig. 4, a specific flowchart of step S210 of a method for generating network configuration information in an embodiment of the present application is shown, and step S210 specifically includes step S410 to step S440, which is described in detail as follows.
In step S410, the network protocols used by the network device set and the service attributes included in the network protocols are determined, and the network device set includes network devices of all device types.
In an embodiment of the present application, for a certain category of target network devices, the device type refers to classification information for classifying the target network devices according to device manufacturers and models, taking the target network device as an example, a switch is a switch, a switch of a certain model developed by a certain device manufacturer corresponds to a switch of one device type, and switches of a device manufacturer B model, a device manufacturer C model, and a device manufacturer D model correspond to switches of three different device types, respectively.
For a certain class of network devices, because network protocols used by different device manufacturers and different models of network devices and service attributes included in the network protocols may differ, in order to characterize the network configuration information of the network devices of all device types according to a uniform format, a network configuration structure model may be created in advance for the network devices of all device types of the class. Specifically, a network device set formed by network devices of all device types under the category may be used to determine all network protocols used by the network devices in the network device set and all service attributes included in each network protocol.
In step S420, a network protocol node is generated based on the identification information corresponding to the network protocol used by the network device set.
In an embodiment of the present application, after determining a network protocol used by a network device set, a network protocol node may be generated according to identification information corresponding to each network protocol, where the identification information corresponding to the network protocol may be a protocol name of the network protocol.
In step S430, a service node is generated based on the identification information corresponding to the service attribute included in the network protocol.
In an embodiment of the present application, for each network protocol used by the network device set, a corresponding service node may be generated according to identification information corresponding to a service attribute included in each network protocol, and the identification information corresponding to the service node may be a service name of the service attribute.
In step S440, a network configuration structure model is created comprising network protocol nodes and service nodes.
In an embodiment of the present application, after each network protocol node and each service node are generated, a node hierarchical relationship between the network protocol node and the service node may be generated according to an inclusion relationship between the network protocol and a service attribute included in the network protocol node, so as to create a network configuration structure model including the network protocol node and the service node. It can be understood that the service node is a child node under the network protocol node.
Referring to fig. 5, fig. 5 shows a network configuration structure model in an embodiment of the present application, where "interface" is a network protocol node, and "Ethernet", "porName", "mtu", "portDesc", "address detail", "address mask", "vlan number", and "vlan desc" are service attribute nodes. It is understood that "vlan number" and "vlan desc" are child nodes of "vlan", and "address detail" and "address mask" are child nodes of "address", and that "porName", "mtu", "portDesc", "address" and "vlan" are child nodes of "Ethernet".
Referring to fig. 2 again, in step S220, attribute value description information of the target network device on the service attribute corresponding to the service node is determined based on node definition information defined for the service node and the target device type of the target network device, where the node definition information is information defining the service attribute that the network device has on the service node.
In an embodiment of the present application, for each service node in the network configuration structure model, node definition information defining each service node needs to be generated in advance. The node definition information is information for defining a service attribute of the network device at the service node, and is used to characterize a function implemented by the service attribute corresponding to the service node, for example, if the function implemented by the service attribute corresponding to the service node by the network device is to obtain a port address of the network device, the node definition information may be set to "getaddress", and what the "getaddress" represents is that the function of the service attribute is to obtain the port address of the network device.
In an embodiment of the present application, the attribute value description information is information describing a standard service attribute value preset on a service attribute included in a network protocol by a network device. The formats for describing the standard service attribute values preset on the same service attribute by different manufacturer equipment have great difference, so that the attribute value description information corresponding to the same service node of network equipment with different equipment types can be associated with the equipment type corresponding to the attribute value description information, and node definition information for defining the service node is generated. The target network device is a network device for which a service attribute value preset on a service attribute corresponding to the service node needs to be determined, and by obtaining the target device type of the target network device, the attribute value description information of the target network device on the service attribute corresponding to the service node can be determined according to the association relationship between the target device type and the attribute value description information in the node definition information defined for the service node and the device type.
As shown in fig. 6, a detailed flowchart of step S210 of the method for generating network configuration information in an embodiment of the present application is shown, and step S210 may further include step S610 to step S640, which are described in detail as follows.
In step S610, node definition information is created for the service node.
In an embodiment of the present application, for each service node in the network configuration structure model, it is necessary to create node definition information for the service node in advance according to a function implemented by a service attribute corresponding to each service node in the network configuration structure model, so as to characterize a specific function implemented by the service attribute corresponding to the service node.
In step S620, attribute value description information of the network device of each device type in the network device set on the service attribute corresponding to the service node is obtained.
In an embodiment of the present application, when creating a network configuration structure model, attribute value description information of network devices of each device type in a network device set on a service attribute corresponding to a service node needs to be further acquired.
In step S630, the obtained attribute value description information is associated with the device type of each network device in the network device set, and an attribute value description information set corresponding to the service node is generated.
In an embodiment of the present application, for each service node, the obtained attribute value description information is associated with a device type of each network device in a network device set, and an attribute value description information set corresponding to the service node is generated.
In step S640, the attribute value description information set and the node definition information are stored in association with the service node.
In an embodiment of the present application, the attribute value description information set, the node definition information, and the service nodes are stored in association, so as to implement, for each service node in the network configuration structure model, creating corresponding node definition information for the service node, and associating attribute value description information of all device types, thereby facilitating to obtain a standard service attribute value of a service attribute corresponding to each service node by the network device.
Referring to fig. 2 again, in step S230, based on the attribute value description information, a standard service attribute value of the target network device on the service attribute corresponding to the service node is determined, where the standard service attribute value is a service attribute value preset for the network device on the service attribute corresponding to the service node.
In an embodiment of the present application, the attribute value description information may be a service attribute value preset by the network device on a service attribute corresponding to the service node, and the step S230 of determining a standard service attribute value of the target network device on the service attribute corresponding to the service node based on the attribute value description information may specifically include: and using the attribute value description information as a standard service attribute value of the target network equipment on the service attribute corresponding to the service node.
In an embodiment, for a part of the service attributes, when the service attribute represents static function information that the network device has, the attribute value description information may be a service attribute value that is preset on the service attribute by the network device directly, for example, when the service attribute is a port number name for describing, the attribute value description information corresponds to a specific port number name of the network device of the device type, and thus, the attribute value description information may be used as a standard service attribute value of the target network device on the service attribute corresponding to the service node.
In an embodiment of the present application, as shown in fig. 7, a specific flowchart of step S230 of a method for generating network configuration information according to an embodiment of the present application is shown, and if the attribute value description information is an attribute value acquisition instruction, step S230 may include steps S710 to S720, which are described in detail below.
In step S710, an attribute value acquisition instruction is executed.
In an embodiment of the present application, for a part of the service attributes, when the service attribute represents dynamic function information that the network device has, the attribute value description information is an attribute value obtaining instruction for obtaining a standard service attribute value of the target network device on the service attribute corresponding to the service node. For example, when the service attribute is to obtain a port address of the network device, the attribute value description information is a port address obtaining instruction to obtain the port address of the network device. And executing the attribute value acquisition instruction so as to generate a standard service attribute value of the target network equipment on the service attribute corresponding to the service node.
In step S720, based on the execution result of the attribute value obtaining instruction after execution, a standard service attribute value of the target network device on the service attribute corresponding to the service node is generated.
In an embodiment of the present application, an execution result of the attribute value obtaining instruction after execution is a standard service attribute value of the target network device on a service attribute corresponding to the service node, and the execution result of the attribute value obtaining instruction after execution is used as the standard service attribute value of the target network device on the service attribute corresponding to the service node, that is, a standard service attribute value of the target network device on the service attribute corresponding to each service node can be generated.
Still referring to fig. 2, in step S240, the network protocol node to which the service node belongs is determined based on the node hierarchy relationship.
In an embodiment of the present application, after determining the standard service attribute value of the target network device on the service attribute corresponding to each service node, it is further required to determine a network protocol node to which the target network device belongs at each service node based on the node hierarchical relationship.
In step S250, standard network configuration information corresponding to the target network device is generated based on the standard service attribute value, the identification information corresponding to the service node, and the identification information corresponding to the network protocol node to which the service node belongs.
In an embodiment of the present application, after obtaining the standard service attribute value of the target network device on the service attribute corresponding to the service node and the network protocol node to which the target network device belongs, the standard network configuration information corresponding to the target network device may be generated based on the standard service attribute value, the identification information corresponding to the service node and the identification information corresponding to the network protocol node to which the service node belongs.
In an embodiment, as shown in fig. 8, a specific flowchart of step S250 of a method for generating network configuration information according to an embodiment of the present application is shown, and step S250 may further include step S810 to step S830, which are described in detail below.
In step S810, based on the node hierarchy relationship, the service nodes and the network protocol nodes to which the service nodes belong are sorted according to the order of the node hierarchy from top to bottom, and a sorted first node sequence is generated.
In an embodiment of the present application, in order to facilitate checking or auditing of standard network configuration information corresponding to a target network device, service nodes and network protocol nodes to which the service nodes belong may be sorted according to an order from top to bottom of a node hierarchy based on a node hierarchy relationship, so as to generate a sorted first node sequence.
In step S820, first data identification information of the standard service attribute value is generated based on the identification information corresponding to each node in the first node sequence.
In an embodiment of the present application, first data identification information of a standard service attribute value is generated based on identification information corresponding to each node in a first node sequence, a node arranged in the first node sequence is identification information of a network protocol node, and identification information of a service node corresponding to a service attribute included in a network protocol arranged later in the first node sequence jointly constitutes the first data identification information of the standard service attribute value. The first data identification information is used as a unique identification corresponding to the standard service attribute value and can be used as index information of the standard service attribute value.
In an embodiment of the present application, if the service node is a service node that refers to other service nodes in the network configuration structure model as primary key values, step S820 of generating first data identification information of a standard service attribute value based on identification information corresponding to each node in the first node sequence further includes: and adding the standard service attribute value and the identification information corresponding to the service node quoted by the service node into the first data identification information.
In this embodiment, for a certain target service attribute in the network device, since the service attribute value of the target service attribute can be determined only on the premise that the service attribute values corresponding to other service attributes need to be determined first, the target service attribute is a service node that refers to other service nodes in the network configuration structure model as primary key values. For a target service node which refers to other service nodes in the network configuration structure model as primary key values, when first data identification information of a standard service attribute value corresponding to the target service node is generated, the standard service attribute value and the identification information corresponding to the service node referred to by the target service node can be added to the first data identification information. The method can effectively avoid that the standard service attribute value corresponding to the target service node cannot be uniquely identified through the first data identification information under the condition that a plurality of standard service attribute values corresponding to the service node quoted by the target service node are provided.
In step S830, the first data identification information and the standard service attribute value are stored in association, so as to generate standard network configuration information corresponding to the target network device.
In an embodiment of the application, the first data identification information and the standard service attribute value are stored in an associated manner, so as to generate standard network configuration information corresponding to the target network device, and further, the corresponding standard service attribute value can be directly found according to the first data identification information of the standard service attribute value, so that convenience is brought to the standard network configuration information corresponding to the target network device.
In an embodiment, as shown in table 1, table 1 shows a schematic table of standard network configuration information corresponding to a target network device according to an embodiment of the present application, where the first data identification information includes identification information corresponding to a service node and identification information corresponding to a network protocol node to which the service node belongs, and a standard service attribute value is an acquired standard service attribute value of the network device on a service attribute corresponding to the service node.
TABLE 1
Referring to table 1, the service node "/server/address" shown in the second row of table 1 is a service node that does not refer to the service node "/server/address" as a primary key, and thus the first data identification information is generated directly from the identification information corresponding to each node in the first node sequence.
The service attribute corresponding to the service node "/configuration/version" shown in the third row of table 1 implements a function of acquiring version number information of a server performing time synchronization, and since there are a plurality of servers performing time synchronization, it is necessary to determine the IP address of each server and then determine the version number information of each server when determining the service attribute value corresponding to one service node of the version number information of the server performing time synchronization. Therefore, it can be seen that the service node "/config/version" is a service node that refers to the service node "/server/address" as a primary key, and therefore, a standard service attribute value and identification information corresponding to the service node referred to by the service node need to be added to the first data identification information. The standard service attribute value corresponding to the service node "/server/address" referred by the service node "/config/version" and the identification information "/server [ address ═ 172.16.0.203] are added to the first data identification information, so that the unique identification of the standard service attribute value corresponding to the service node"/server/address "is realized through"/system/ntp/servers/server [ address ═ 172.16.0.203]/config/version ".
It can be seen from the above that, a network configuration structure model is constructed according to network protocols used by all types of network devices and service attributes contained in the network protocols, and according to node definition information defining service attributes of the network devices at service nodes and target device types of the target network devices, attribute value description information of the target network devices at the service attributes corresponding to the service nodes is determined, based on the attribute value description information, a standard service attribute value of the target network devices at the service attributes corresponding to the service nodes is determined, so that for any device type of network devices, a standard service attribute value of the network devices at the service attributes corresponding to the service nodes can be obtained through the device types of the network devices and the network configuration structure model, and according to the standard service attribute value, the identification information corresponding to the service nodes and the identification information corresponding to the network protocol nodes to which the service nodes belong, the standard network configuration information corresponding to the target network equipment is generated, so that the network equipment of any model of any equipment manufacturer can be represented through a uniform network configuration information format, the adaptation scripts are prevented from being required to be written for the network equipment of different equipment manufacturers and models, the network configuration information of the network equipment can be conveniently managed by operators, the workload of the operators and developers is remarkably reduced, and the operation efficiency is improved.
In an embodiment of the present application, as shown in fig. 9, which shows a flowchart of a method for generating network configuration information according to an embodiment of the present application, after step S250, the method for generating network configuration information in the present embodiment may further include step S910 to step S960, which are described in detail below.
In step S910, a network configuration file corresponding to the target network device is obtained, where the network configuration file includes a current service attribute value of the target network device on a service attribute corresponding to the service node, identification information of a service attribute to which the current service attribute value belongs, and identification information of a network protocol to which the current service attribute value belongs.
In an embodiment of the present application, the network configuration file includes a current service attribute value of the target network device on a service attribute corresponding to the service node, identification information of a service attribute to which the current service attribute value belongs, and identification information of a network protocol to which the current service attribute value belongs.
Fig. 10 shows a schematic diagram of a network configuration file corresponding to a target network device in an embodiment according to the present application, and as shown in fig. 10, the network configuration file may be a text containing a current service attribute value of the target network device on a service attribute corresponding to a service node, identification information of the service attribute to which the current service attribute value belongs, and identification information of a network protocol to which the current service attribute value belongs.
In step S920, a service node to which the current service attribute value belongs and a network protocol node to which the current service attribute value belongs are determined based on the network configuration structure model and the identification information of the service attribute to which the current service attribute value belongs and the identification information of the network protocol to which the current service attribute value belongs.
In an embodiment of the present application, a service node to which a current service attribute value belongs and a network protocol node to which the current service attribute value belongs are determined by matching identification information of a service attribute to which the current service attribute value belongs and identification information corresponding to a service node in a network configuration structure model, and matching identification information of a network protocol to which the current service attribute value belongs and identification information corresponding to a network protocol node in the network configuration structure model.
In step S930, based on the node hierarchy relationship, the service nodes to which the current service attribute values belong and the network protocol nodes to which the current service attribute values belong are sorted in the order from top to bottom according to the node hierarchy, so as to generate a sorted second node sequence.
In an embodiment of the present application, based on the node hierarchy relationship, the service nodes to which the current service attribute values belong and the network protocol nodes to which the current service attribute values belong are sorted according to the order of the node hierarchy from top to bottom, and a sorted second node sequence is generated.
In step S940, second data identification information of the current service attribute value is generated based on identification information corresponding to each node in the second node sequence.
In an embodiment of the present application, second data identification information of the current service attribute value is generated based on identification information corresponding to each node in the second node sequence, where a node arranged in the second node sequence before is identification information of a network protocol node, and identification information of a service node corresponding to a service attribute included in a network protocol arranged after is in the second node sequence constitutes the second data identification information of the current service attribute value together. The second data identification information is used as a unique identification corresponding to the current service attribute value and can be used as index information of the current service attribute value.
In an embodiment of the present application, if the service node is a service node that refers to other service nodes in the network configuration structure model as primary key values, step S940, which is to generate second data identification information of a standard service attribute value based on identification information corresponding to each node in the second node sequence, further includes: and adding the standard service attribute value and the identification information corresponding to the service node quoted by the service node into the second data identification information.
In this embodiment, for a certain target service attribute in the network device, since the service attribute value of the target service attribute can be determined only on the premise that the service attribute values corresponding to other service attributes need to be determined first, the target service attribute is a service node that refers to other service nodes in the network configuration structure model as primary key values. For a target service node which refers to other service nodes in the network configuration structure model as primary key values, when second data identification information of a current service attribute value corresponding to the target service node is generated, the current service attribute value and the identification information corresponding to the service node referred to by the target service node can be added to the second data identification information. The method can effectively avoid that the current service attribute value corresponding to the target service node cannot be uniquely identified through the second data identification information under the condition that the current service attribute values corresponding to the service nodes quoted by the target service node are multiple.
As shown in table 2, a schematic table of standard network configuration information corresponding to a target network device according to an embodiment of the present application is shown, where the second data identification information includes identification information corresponding to a service node to which a current service attribute value belongs and identification information corresponding to a network protocol node to which the service node belongs, and the current service attribute value is a current service attribute value of the network device on a service attribute corresponding to the service node, which is determined according to a configuration text.
TABLE 2
Referring to table 2, the service node "/server/address" shown in the second row of table 2 is a service node that does not refer to the service node "/server/address" as a primary key, and thus the second data identification information is generated directly from the identification information corresponding to each node in the second node sequence.
The service attribute corresponding to the service node "/configuration/version" shown in the third row of table 2 implements a function of acquiring version number information of the servers performing time synchronization, and since there are a plurality of servers performing time synchronization, when determining the service attribute value corresponding to one service node of the version number information of the servers performing time synchronization, it is necessary to determine the IP address of each server first, and then determine the version number information of each server. Therefore, it can be seen that the service node "/config/version" is a service node that refers to the service node "/server/address" as a primary key, and therefore, a standard service attribute value and identification information corresponding to the service node referred to by the service node need to be added to the second data identification information. And adding a standard service attribute value corresponding to the service node/server/address referred by the service node/config/version and identification information "/server [ address is 172.16.0.203] into the second data identification information, so as to realize unique identification of the standard service attribute value corresponding to the service node/server/address through"/system/ntp/servers/server [ address is 172.16.0.203]/config/version ".
In step S950, the second data identification information and the current service attribute value are stored in association, so as to generate current network configuration information corresponding to the target network device.
In an embodiment of the application, the second data identification information and the current service attribute value are stored in an associated manner, and the current network configuration information corresponding to the target network device is generated, so that the corresponding current service attribute value can be directly found according to the second data identification information of the current service attribute value, and convenience is brought to the current network configuration information corresponding to the target network device.
In step S960, the current network configuration information is compared with the standard network configuration information, and configuration difference information between the current network configuration and the standard network configuration of the target network device is determined.
In an embodiment of the present application, when determining configuration difference information between a current network configuration of a target network device and a standard network configuration, specifically, searching is performed according to first data identification information and second data identification information, and a standard service attribute value and a current service attribute value under the same index information are compared to determine whether the two are consistent, if so, it is determined that the current network configuration of the target network device under the service attribute is the same as the standard network configuration, and if not, it is determined that the current network configuration of the target network device under the service attribute is different from the standard network configuration, and it is required to record the current network configuration.
In one embodiment, referring to the standard network configuration information of the target network shown in table 1 and the current network configuration information of the target network shown in table 2, it can be seen that when the index information is "/system/ntp/servers/server [ address ═ 172.16.0.203 ]/configuration/version" and "/system/ntp/servers/server [ address ═ 172.16.0.203 ]/configuration/preference", the standard service attribute value and the current service attribute value corresponding to the network device are different, and the configuration difference between the current network configuration and the standard network configuration of the target network device under the service attribute can be determined.
The following describes an embodiment of an apparatus of the present application, which may be used to perform the method for generating network configuration information in the foregoing embodiment of the present application. For details which are not disclosed in the embodiments of the apparatus of the present application, reference is made to the embodiments of the method described above in the present application.
Fig. 11 shows a block diagram of a generation apparatus of network configuration information according to an embodiment of the present application.
Referring to fig. 11, a network configuration information generation device 1100 according to an embodiment of the present application includes: a first obtaining unit 1110, a first executing unit 1120, a second executing unit 1130, a third executing unit 1140 and a first generating unit 1150. The first obtaining unit 1110 is configured to obtain a network configuration structure model, where the network configuration structure model includes a plurality of network protocol nodes, a plurality of service nodes, and a node hierarchical relationship between the network protocol nodes and the service nodes, the network protocol nodes are generated based on identification information corresponding to a network protocol used by a network device, and the service nodes are generated based on identification information corresponding to a service attribute included in the network protocol; a first executing unit 1120, configured to determine attribute value description information of a target network device on a service attribute corresponding to the service node based on node definition information defined for the service node and a target device type of the target network device, where the node definition information is information defining a service attribute that the network device has at the service node; a second executing unit 1130, configured to determine, based on the attribute value description information, a standard service attribute value of the target network device on a service attribute corresponding to a service node, where the standard service attribute value is a service attribute value preset for the network device on the service attribute corresponding to the service node; a third executing unit 1140, configured to determine, based on the node hierarchy relationship, a network protocol node to which the service node belongs; a first generating unit 1150, configured to generate standard network configuration information corresponding to the target network device based on the standard service attribute value, the identification information corresponding to the service node, and the identification information corresponding to the network protocol node to which the service node belongs.
In some embodiments of the present application, based on the foregoing scheme, the first obtaining unit 1110 is configured to: determining a network protocol used by a network equipment set and service attributes contained in the network protocol, wherein the network equipment set comprises network equipment of all equipment types; generating a network protocol node based on identification information corresponding to a network protocol used by the network equipment set; generating a service node based on the identification information corresponding to the service attribute contained in the network protocol; a network configuration structure model is created that includes the network protocol node and the service node.
In some embodiments of the present application, based on the foregoing solution, the first obtaining unit 1110 is further configured to: creating node definition information for the service node; acquiring attribute value description information of the network equipment of each equipment type in the network equipment set on the service attribute corresponding to the service node; associating the obtained attribute value description information with the equipment type of each network equipment in the network equipment set to generate an attribute value description information set corresponding to the service node; and storing the attribute value description information set and the node definition information in association with the service node.
In some embodiments of the present application, based on the foregoing solution, the attribute value description information is a service attribute value preset by the network device on a service attribute corresponding to a service node, and the second executing unit 1130 is configured to: and taking the attribute value description information as a standard service attribute value of the target network equipment on the service attribute corresponding to the service node.
In some embodiments of the present application, based on the foregoing solution, the attribute value description information is an attribute value obtaining instruction, and the second execution unit 1130 is configured to: executing the attribute value acquisition instruction; and generating a standard service attribute value of the target network equipment on the service attribute corresponding to the service node based on an execution result of the attribute value acquisition instruction after execution.
In some embodiments of the present application, based on the foregoing scheme, the first generating unit 1150 is configured to: based on the node level relation, sequencing the service nodes and the network protocol nodes to which the service nodes belong according to the sequence of the node levels from top to bottom to generate a sequenced first node sequence; generating first data identification information of the standard service attribute value based on identification information corresponding to each node in the first node sequence; and storing the first data identification information and the standard service attribute value in an associated manner to generate standard network configuration information corresponding to the target network equipment.
In some embodiments of the present application, based on the foregoing solution, if the service node is a service node that refers to other service nodes in the network configuration structure model as primary key values, the first generating unit is configured to: and adding the standard service attribute value and the identification information corresponding to the service node quoted by the service node into the first data identification information.
In some embodiments of the present application, based on the foregoing solution, the generating configuration of the network configuration information further includes: a second obtaining unit, configured to obtain a network configuration file corresponding to the target network device, where the network configuration file includes a current service attribute value of the target network device on a service attribute corresponding to the service node, identification information of a service attribute to which the current service attribute value belongs, and identification information of a network protocol to which the current service attribute value belongs; a fourth execution unit, configured to determine, based on the network configuration structure model and the identification information of the service attribute to which the current service attribute value belongs and the identification information of the network protocol to which the current service attribute value belongs, a service node to which the current service attribute value belongs and a network protocol node to which the current service attribute value belongs; the sequencing unit is used for sequencing the service nodes to which the current service attribute values belong and the network protocol nodes to which the current service attribute values belong according to the sequence of the node levels from top to bottom based on the node level relationship to generate a sequenced second node sequence; a second generating unit, configured to generate second data identification information of the current service attribute value based on identification information corresponding to each node in the second node sequence; a third generating unit, configured to associate and store the second data identification information and the current service attribute value, and generate current network configuration information corresponding to the target network device; and the comparison unit is used for comparing the current network configuration information with the standard network configuration information and determining configuration difference information between the current network configuration and the standard network configuration of the target network equipment.
In some embodiments of the present application, based on the foregoing solution, if the service node is a service node that refers to other service nodes in the network configuration structure model as primary key values, the second generating unit is configured to: and adding the standard service attribute value and the identification information corresponding to the service node quoted by the service node into second data identification information.
FIG. 12 illustrates a schematic structural diagram of a computer system suitable for use in implementing the electronic device of an embodiment of the present application.
It should be noted that the computer system 1200 of the electronic device shown in fig. 12 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present application.
As shown in fig. 12, the computer system 1210 includes a Central Processing Unit (CPU)1201, which can perform various appropriate actions and processes, such as performing the methods described in the above embodiments, according to a program stored in a Read-Only Memory (ROM) 1202 or a program loaded from a storage section 1208 into a Random Access Memory (RAM) 1203. In the RAM 1203, various programs and data necessary for system operation are also stored. The CPU 1201, ROM 1202, and RAM 1203 are connected to each other by a bus 1204. An Input/Output (I/O) interface 1205 is also connected to bus 1204.
The following components are connected to the I/O interface 1205: an input section 1206 including a keyboard, a mouse, and the like; an output section 1207 including a Display device such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and a speaker; a storage section 1208 including a hard disk and the like; and a communication section 1209 including a Network interface card such as a LAN (Local Area Network) card, a modem, or the like. The communication section 1209 performs communication processing via a network such as the internet. A driver 1210 is also connected to the I/O interface 1205 as needed. A removable medium 1211, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like, is mounted on the drive 1210 as necessary, so that a computer program read out therefrom is mounted into the storage section 1208 as necessary.
In particular, according to embodiments of the application, the processes described above with reference to the flow diagrams may be implemented as computer software programs. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising a computer program for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 1209, and/or installed from the removable medium 1211. The computer program executes various functions defined in the system of the present application when executed by a Central Processing Unit (CPU) 1201.
It should be noted that the computer readable medium shown in the embodiments of the present application may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A 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 of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: 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 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 foregoing. In 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. In this application, however, a computer readable signal medium may include a propagated data signal with a computer program embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. The computer program embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the foregoing.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. Each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present application may be implemented by software, or may be implemented by hardware, and the described units may also be disposed in a processor. Wherein the names of the elements do not in some way constitute a limitation on the elements themselves.
As another aspect, the present application also provides a computer-readable medium, which may be contained in the electronic device described in the above embodiments; or may exist separately without being assembled into the electronic device. The computer readable medium carries one or more programs which, when executed by an electronic device, cause the electronic device to implement the method described in the above embodiments.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the application. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution 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 (which can be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be 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.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the embodiments disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains.
It will be understood that the present application is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the application is limited only by the appended claims.
Claims (10)
1. A method for generating network configuration information is characterized by comprising the following steps:
acquiring a network configuration structure model, wherein the network configuration structure model comprises a plurality of network protocol nodes, a plurality of service nodes and a node hierarchical relationship between the network protocol nodes and the service nodes, the network protocol nodes are generated based on identification information corresponding to a network protocol used by network equipment, and the service nodes are generated based on identification information corresponding to service attributes contained in the network protocol;
determining attribute value description information of the target network equipment on a service attribute corresponding to the service node based on node definition information defined for the service node and a target equipment type of the target network equipment, wherein the node definition information is information defining the service attribute of the network equipment on the service node;
determining a standard service attribute value of the target network equipment on a service attribute corresponding to the service node based on the attribute value description information, wherein the standard service attribute value refers to a service attribute value preset for the network equipment on the service attribute corresponding to the service node;
determining a network protocol node to which the service node belongs based on the node hierarchical relationship;
and generating standard network configuration information corresponding to the target network equipment based on the standard service attribute value, the identification information corresponding to the service node and the identification information corresponding to the network protocol node to which the service node belongs.
2. The method of claim 1, wherein the obtaining the network configuration structure model comprises:
determining a network protocol used by a network equipment set and service attributes contained in the network protocol, wherein the network equipment set comprises network equipment of all equipment types;
generating a network protocol node based on identification information corresponding to a network protocol used by the network equipment set;
generating a service node based on the identification information corresponding to the service attribute contained in the network protocol;
a network configuration structure model is created that includes the network protocol node and the service node.
3. The method of claim 2, wherein the obtaining the network configuration structure model further comprises:
creating node definition information for the service node;
acquiring attribute value description information of the network equipment of each equipment type in the network equipment set on the service attribute corresponding to the service node;
associating the obtained attribute value description information with the equipment type of each network equipment in the network equipment set to generate an attribute value description information set corresponding to the service node;
and storing the attribute value description information set and the node definition information in association with the service node.
4. The method according to claim 1, wherein the attribute value description information is a service attribute value preset by the network device on a service attribute corresponding to the service node; based on the attribute value description information, determining a standard service attribute value of the target network device on a service attribute corresponding to a service node, including:
and using the attribute value description information as a standard service attribute value of the target network equipment on the service attribute corresponding to the service node.
5. The method according to claim 1, wherein the attribute value description information is an attribute value acquisition instruction; based on the attribute value description information, determining a standard service attribute value of the target network device on a service attribute corresponding to a service node, including:
executing the attribute value acquisition instruction;
and generating a standard service attribute value of the target network equipment on the service attribute corresponding to the service node based on an execution result of the attribute value acquisition instruction after execution.
6. The method according to claim 1, wherein the generating of the standard network configuration information corresponding to the target network device based on the standard service attribute value, the identification information corresponding to the service node, and the identification information corresponding to the network protocol node to which the service node belongs comprises:
based on the node level relation, sequencing the service nodes and the network protocol nodes to which the service nodes belong according to the sequence of the node levels from top to bottom to generate a sequenced first node sequence;
generating first data identification information of the standard service attribute value based on identification information corresponding to each node in the first node sequence;
and storing the first data identification information and the standard service attribute value in an associated manner to generate standard network configuration information corresponding to the target network equipment.
7. The method according to claim 6, wherein if the service node refers to another service node in the network configuration structure model as a service node of a primary key, generating first data identification information of the standard service attribute value based on identification information corresponding to each node in the first node sequence, further comprising:
and adding the standard service attribute value and the identification information corresponding to the service node quoted by the service node into the first data identification information.
8. The method for generating network configuration information according to claim 6, wherein after generating the standard network configuration information corresponding to the target network device based on the standard service attribute value, the identification information corresponding to the service node, and the identification information corresponding to the network protocol node to which the service node belongs, the method for generating network configuration information further comprises:
acquiring a network configuration file corresponding to the target network device, wherein the network configuration file comprises a current service attribute value of the target network device on a service attribute corresponding to the service node, identification information of the service attribute to which the current service attribute value belongs and identification information of a network protocol to which the current service attribute value belongs;
determining a service node to which the current service attribute value belongs and a network protocol node to which the current service attribute value belongs based on the network configuration structure model and identification information of the service attribute to which the current service attribute value belongs and identification information of the network protocol to which the current service attribute value belongs;
based on the node hierarchy relation, sequencing the service nodes to which the current service attribute values belong and the network protocol nodes to which the current service attribute values belong according to the sequence of node hierarchies from top to bottom, and generating a sequenced second node sequence;
generating second data identification information of the current service attribute value based on identification information corresponding to each node in the second node sequence;
storing the second data identification information and the current service attribute value in an associated manner to generate current network configuration information corresponding to the target network device;
and comparing the current network configuration information with the standard network configuration information, and determining configuration difference information between the current network configuration and the standard network configuration of the target network equipment.
9. The method according to claim 8, wherein if the service node refers to another service node in the network configuration structure model as a service node of the primary key, generating second data identification information of the standard service attribute value based on identification information corresponding to each node in the second node sequence, further comprising:
and adding the standard service attribute value and the identification information corresponding to the service node quoted by the service node into second data identification information.
10. An apparatus for generating network configuration information, comprising:
a first obtaining unit, configured to obtain a network configuration structure model, where the network configuration structure model includes multiple network protocol nodes, multiple service nodes, and a node hierarchical relationship between the network protocol nodes and the service nodes, the network protocol nodes are generated based on identification information corresponding to a network protocol used by a network device, and the service nodes are generated based on identification information corresponding to a service attribute included in the network protocol;
a first execution unit, configured to determine attribute value description information of a target network device on a service attribute corresponding to a service node based on node definition information defined for the service node and a target device type of the target network device, where the node definition information is information defining a service attribute that the network device has at the service node;
a second execution unit, configured to determine, based on the attribute value description information, a standard service attribute value of the target network device on a service attribute corresponding to a service node, where the standard service attribute value is a service attribute value preset for the network device on the service attribute corresponding to the service node;
a third execution unit, configured to determine, based on the node hierarchical relationship, a network protocol node to which the service node belongs;
and the first generating unit is used for generating standard network configuration information corresponding to the target network equipment based on the standard service attribute value, the identification information corresponding to the service node and the identification information corresponding to the network protocol node to which the service node belongs.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110184910.XA CN113572630B (en) | 2021-02-10 | 2021-02-10 | Method and device for generating network configuration information, electronic equipment, medium and product |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110184910.XA CN113572630B (en) | 2021-02-10 | 2021-02-10 | Method and device for generating network configuration information, electronic equipment, medium and product |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113572630A true CN113572630A (en) | 2021-10-29 |
CN113572630B CN113572630B (en) | 2024-06-28 |
Family
ID=78161145
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110184910.XA Active CN113572630B (en) | 2021-02-10 | 2021-02-10 | Method and device for generating network configuration information, electronic equipment, medium and product |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113572630B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114679487A (en) * | 2022-03-25 | 2022-06-28 | 度小满科技(北京)有限公司 | Link processing method, device, storage medium and processor |
CN115065594A (en) * | 2022-06-08 | 2022-09-16 | 亚信科技(中国)有限公司 | Data configuration method, device, equipment, readable storage medium and program product |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103491129A (en) * | 2013-07-05 | 2014-01-01 | 华为技术有限公司 | Service node configuration method and service node pool logger and system |
WO2019007403A1 (en) * | 2017-07-07 | 2019-01-10 | 南京中兴新软件有限责任公司 | Service configuration-driven flow table method and device |
CN110719209A (en) * | 2019-10-31 | 2020-01-21 | 北京浪潮数据技术有限公司 | Cluster network configuration method, system, equipment and readable storage medium |
CN111245898A (en) * | 2019-12-31 | 2020-06-05 | 中国建设银行股份有限公司 | Network equipment online method, device, server and storage medium |
CN111490899A (en) * | 2020-03-27 | 2020-08-04 | 腾讯科技(深圳)有限公司 | Network access method, device, computer readable medium and electronic equipment |
CN112260848A (en) * | 2015-11-30 | 2021-01-22 | 华为技术有限公司 | Configuration method and device of virtual network function |
CN112260863A (en) * | 2020-10-15 | 2021-01-22 | 腾讯科技(深圳)有限公司 | Organization-level network equipment connection management method and device and computer equipment |
-
2021
- 2021-02-10 CN CN202110184910.XA patent/CN113572630B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103491129A (en) * | 2013-07-05 | 2014-01-01 | 华为技术有限公司 | Service node configuration method and service node pool logger and system |
CN112260848A (en) * | 2015-11-30 | 2021-01-22 | 华为技术有限公司 | Configuration method and device of virtual network function |
WO2019007403A1 (en) * | 2017-07-07 | 2019-01-10 | 南京中兴新软件有限责任公司 | Service configuration-driven flow table method and device |
CN110719209A (en) * | 2019-10-31 | 2020-01-21 | 北京浪潮数据技术有限公司 | Cluster network configuration method, system, equipment and readable storage medium |
CN111245898A (en) * | 2019-12-31 | 2020-06-05 | 中国建设银行股份有限公司 | Network equipment online method, device, server and storage medium |
CN111490899A (en) * | 2020-03-27 | 2020-08-04 | 腾讯科技(深圳)有限公司 | Network access method, device, computer readable medium and electronic equipment |
CN112260863A (en) * | 2020-10-15 | 2021-01-22 | 腾讯科技(深圳)有限公司 | Organization-level network equipment connection management method and device and computer equipment |
Non-Patent Citations (1)
Title |
---|
朱涛;梁维泰;黄松华;张杰勇;: "面向任务的网络信息体系建模分析方法研究", 系统仿真学报, no. 04, 18 April 2020 (2020-04-18), pages 203 - 213 * |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114679487A (en) * | 2022-03-25 | 2022-06-28 | 度小满科技(北京)有限公司 | Link processing method, device, storage medium and processor |
CN114679487B (en) * | 2022-03-25 | 2023-12-22 | 度小满科技(北京)有限公司 | Link processing method, device, storage medium and processor |
CN115065594A (en) * | 2022-06-08 | 2022-09-16 | 亚信科技(中国)有限公司 | Data configuration method, device, equipment, readable storage medium and program product |
CN115065594B (en) * | 2022-06-08 | 2024-03-26 | 亚信科技(中国)有限公司 | Data configuration method, device, apparatus, readable storage medium and program product |
Also Published As
Publication number | Publication date |
---|---|
CN113572630B (en) | 2024-06-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111580884B (en) | Configuration updating method, device, server and electronic equipment | |
CN108989066B (en) | Equipment management method and device | |
CN109460220B (en) | Message predefined code generation method and device, electronic equipment and storage medium | |
US12045151B2 (en) | Graph-based impact analysis of misconfigured or compromised cloud resources | |
US20120054824A1 (en) | Access control policy template generating device, system, method and program | |
US9336019B2 (en) | Information processing apparatus and method therefor | |
CN110741602B (en) | Event generation in response to network intent form peering failure | |
CN113572630B (en) | Method and device for generating network configuration information, electronic equipment, medium and product | |
KR20050032619A (en) | Web services apparatus and methods | |
WO2017120814A1 (en) | Method and system for managing resource objects | |
US20240015071A1 (en) | Method and apparatus for holistic rendering of cloud network configuration | |
CN112311571A (en) | Network topology generation method and device, electronic equipment and non-transient storage medium | |
CN112417213B (en) | VMware self-discovery monitoring and instance topology self-discovery method | |
WO2022001924A1 (en) | Knowledge graph construction method, apparatus and system and computer storage medium | |
US20180196685A1 (en) | Key service for managing network components | |
CN115827380A (en) | Cloud platform monitoring method and cloud platform monitoring system | |
US20180196687A1 (en) | Adaptive data modeling | |
US11334461B2 (en) | Distributed application resource determination based on performance metrics | |
CN113742372A (en) | Method, device and system for accessing data in edge node | |
CN115168365B (en) | Data storage method and device, electronic equipment and storage medium | |
CN115442201B (en) | Method and equipment for dynamically collecting EMS data based on SNMP agent | |
CN116974906A (en) | Code verification method, device, computer equipment and storage medium | |
CN114003220B (en) | Workflow model implementation method, system, readable storage medium and computer equipment | |
CN109976868A (en) | DApp method for customizing, device and electronic equipment | |
US10469319B2 (en) | Certification tool gap analyzer |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |