A device configuration method, apparatus and related device

By establishing a mapping relationship between device parameter nodes and general configurations on the controller, and combining it with the Yang converter, the problem of unified configuration management for devices from different manufacturers is solved, achieving flexible device adaptation and a unified management interface, and reducing the need for code updates.

CN119420643BActive Publication Date: 2025-11-04NEW H3C TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411463997.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-18
Publication Date
2025-11-04
Estimated Expiration
2044-10-18

AI Technical Summary

Technical Problem

In network management, how to achieve unified configuration management and collaborative operation of network devices from different manufacturers, especially when the device types and communication protocols are inconsistent, requires existing technologies to use hard-coded processing methods, which leads to complex and inflexible development.

Method used

By maintaining a general configuration description file and a device configuration description file on the controller, a mapping relationship between parameter nodes is established. Combined with the YANG converter, a data configuration file is generated and sent to the target device, thereby realizing automatic mapping and configuration of device types.

Benefits of technology

It enables flexible configuration management for devices from different manufacturers, reduces the need for code updates, unifies the configuration interface and northbound RESTful interface, and supports automatic adaptation to different versions and types of devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119420643B_ABST
    Figure CN119420643B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of device management, in particular to a device configuration method and device and related equipment. The method comprises the following steps: obtaining device type information of a target device and parameter values of each parameter node of the target device to be configured; determining a target mapping relationship between each parameter node included in a target device configuration corresponding to the target device and each parameter node included in a general configuration from a mapping relationship between each parameter node included in the device configuration of each type device and each parameter node included in the general configuration based on the device type of the target device; generating a data configuration file used for configuring the target device based on the parameter values of each parameter node of the target device and the target mapping relationship; and delivering the data configuration file to the target device.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of device management, and in particular to a device configuration method and device, and related equipment. BACKGROUND

[0002] In a specific network environment, various types of network devices (such as switches, routers, firewalls, etc.) from different manufacturers are often used. These network devices come from different manufacturers and may use different communication protocols, data formats and management interfaces, which results in network management personnel facing many challenges, such as how to centrally manage these heterogeneous devices, how to implement unified monitoring and configuration management, and how to ensure the coordinated work between devices. At this time, network management software plays a huge role. In order to facilitate people to manage various different devices, network management software needs to have the ability to interface with devices of various third-party manufacturers.

[0003] However, with the development of customer business and equipment manufacturers, customer business and equipment manufacturer device functions have become more and more complex. Network management software needs to have the following on-demand capabilities:

[0004] 1) Multi-manufacturer device interfacing capability. Network management software needs to be able to interface with network devices from different manufacturers and support management functions of different manufacturer devices.

[0005] 2) Unified business management interface. In order to implement centralized management of network devices, network management software needs to provide a unified management interface, so that network management personnel can conveniently monitor and configure various network devices regardless of the manufacturer of the device.

[0006] Therefore, how to configure and interface different manufacturer devices has become a problem to be solved. SUMMARY

[0007] The present application provides a device configuration method, device and related equipment.

[0008] In a first aspect, the present application provides a device configuration method applied to a controller, wherein the controller maintains a general configuration description file and device configuration description files of various types of devices, and the controller is preconfigured with a mapping relationship between each parameter node included in the device configuration of each type of device and each parameter node included in the general configuration; and the method comprises:

[0009] obtaining device type information of a target device and parameter values of each parameter node of the target device to be configured;

[0010] determine a target mapping relationship between each parameter node included in the target device configuration and each parameter node included in the general configuration based on the device type of the target device and a mapping relationship between each parameter node included in the device configuration of each type of device and each parameter node included in the general configuration;

[0011] generate a data configuration file for configuring the target device based on the parameter values of each parameter node of the target device and the target mapping relationship;

[0012] issue the data configuration file to the target device.

[0013] Optionally, the general configuration description file is presented to a user in the form of a user configuration interface, and the configuration interface includes a to-be-configured device selection option and input boxes of each parameter node included in the general configuration description file.

[0014] The step of obtaining the device type information of the target device and the parameter values of each parameter node of the target device to be configured includes:

[0015] receiving the device type information of the target device and the parameter values of each parameter node of the target device to be configured input by the user through the configuration interface.

[0016] Optionally, the method further includes:

[0017] obtaining the device type information of the target device when it is detected that the target device accesses the network;

[0018] determining whether a device configuration description file corresponding to the device type of the target device exists locally;

[0019] when it is determined that the device configuration description file corresponding to the device type of the target device does not exist locally, obtaining the device configuration description file of the target device from the target device and establishing a mapping relationship between each parameter node included in the device configuration of the target device and each parameter node included in the general configuration.

[0020] Optionally, the configuration interface further includes a parameter node mapping configuration page for establishing a mapping relationship between each parameter node included in the device configuration and the general configuration.

[0021] The step of establishing a mapping relationship between each parameter node included in the device configuration of the target device and each parameter node included in the general configuration includes:

[0022] parsing the device configuration description file of the target device to obtain each parameter node included in the device configuration of the target device and present it to the user;

[0023] The mapping relationship between the parameter nodes included in the device configuration of the target device and the parameter nodes included in the general configuration is established based on the correspondence relationship between the parameter nodes defined by the user through the parameter node mapping configuration interface and the parameter nodes included in the general configuration.

[0024] Optionally, the general configuration description file is a general yang model including the parameter nodes customized by the user, and the device configuration description file of the type device is a device yang model including the parameter nodes required by the device configuration.

[0025] The step of generating the data configuration file for configuring the target device based on the parameter values of the parameter nodes of the target device and the target mapping relationship includes:

[0026] The device yang model corresponding to the target device is determined based on the target mapping relationship.

[0027] The netconf xml configuration of the target device is generated based on the parameter values of the parameter nodes of the target device and the device yang model corresponding to the target device through the yang converter.

[0028] In a second aspect, the present application provides a device configuration apparatus applied to a controller, wherein the general configuration description file and the device configuration description file of the type device are maintained on the controller, and the mapping relationship between the parameter nodes included in the device configuration of the type device and the parameter nodes included in the general configuration is pre-configured on the controller; the apparatus includes:

[0029] The obtaining unit is configured to obtain the device type information of a target device and the parameter values of the parameter nodes of the target device to be configured.

[0030] The determining unit is configured to determine the target mapping relationship between the parameter nodes included in the target device configuration corresponding to the target device and the parameter nodes included in the general configuration based on the device type of the target device and the mapping relationship between the parameter nodes included in the device configuration of the type device and the parameter nodes included in the general configuration.

[0031] The generating unit is configured to generate the data configuration file for configuring the target device based on the parameter values of the parameter nodes of the target device and the target mapping relationship.

[0032] The delivering unit is configured to deliver the data configuration file to the target device.

[0033] Optionally, the universal configuration description file is displayed to the user in the form of a user configuration interface, the configuration interface including a to-be-configured device selection option and input boxes of the parameter nodes included in the universal configuration description file.

[0034] When obtaining the device type information of the target device and the parameter values of the parameter nodes of the target device to be configured, the obtaining unit is specifically configured to:

[0035] The device type information of the target device and the parameter values of the parameter nodes of the target device to be configured input by the user through the configuration interface are received.

[0036] Optionally, the apparatus further includes a judging unit and a establishing unit:

[0037] When it is detected that the target device accesses the network, the obtaining unit is further configured to obtain the device type information of the target device.

[0038] The judging unit is configured to judge whether the device configuration description file corresponding to the device type of the target device exists in the local.

[0039] When it is judged that the device configuration description file corresponding to the device type of the target device does not exist in the local, the obtaining unit is further configured to obtain the device configuration description file of the target device from the target device.

[0040] The establishing unit is configured to establish a mapping relationship between the parameter nodes included in the device configuration of the target device and the parameter nodes included in the universal configuration.

[0041] Optionally, the configuration interface further includes a parameter node mapping configuration page for establishing the mapping relationship between the parameter nodes included in the device configuration and the universal configuration.

[0042] When the mapping relationship between the parameter nodes included in the device configuration of the target device and the parameter nodes included in the universal configuration is established, the establishing unit is specifically configured to:

[0043] The device configuration description file of the target device is parsed to obtain the parameter nodes included in the device configuration of the target device, and the parameter nodes are displayed to the user.

[0044] Based on the corresponding relationship between the parameter nodes included in the device configuration of the target device and the parameter nodes included in the universal configuration defined by the user through the parameter node mapping configuration interface, the mapping relationship between the parameter nodes included in the device configuration of the target device and the parameter nodes included in the universal configuration is established.

[0045] Optionally, the general configuration description file is a general yang model including user-defined parameter nodes, and the device configuration description file of each type of device is a device yang model including parameter nodes required for device configuration.

[0046] Based on the parameter values of the parameter nodes of the target device and the target mapping relationship, the generation unit is specifically configured to:

[0047] Based on the target mapping relationship, the generation unit determines the device yang model corresponding to the target device.

[0048] Based on the parameter values of the parameter nodes of the target device and the device yang model corresponding to the target device, the generation unit generates the netconf xml configuration of the target device through a yang converter.

[0049] In a third aspect, an embodiment of the present application provides a device configuration apparatus, which comprises:

[0050] a memory configured to store program instructions;

[0051] a processor configured to invoke the program instructions stored in the memory and execute the steps of the method according to any one of the above first aspect.

[0052] In a fourth aspect, an embodiment of the present application further provides a computer readable storage medium storing computer executable instructions, which are configured to cause the computer to execute the steps of the method according to any one of the above first aspect.

[0053] As can be seen from the above, the device configuration method provided by the embodiment of the present application is applied to a controller, the controller maintains a general configuration description file and device configuration description files of each type of device, and the controller is pre-configured with a mapping relationship between parameter nodes included in device configuration of each type of device and parameter nodes included in general configuration; the method comprises: obtaining device type information of a target device and parameter values of parameter nodes of the target device to be configured; based on the device type of the target device, determining a target mapping relationship between parameter nodes included in target device configuration corresponding to the target device and parameter nodes included in general configuration from the mapping relationship between parameter nodes included in device configuration of each type of device and parameter nodes included in general configuration; based on the parameter values of the parameter nodes of the target device and the target mapping relationship, generating a data configuration file for configuring the target device; and delivering the data configuration file to the target device.

[0054] The device configuration method provided in the embodiment of the application, through the user uploading the general yang model and the obtained device yang model, the mapping relationship between the parameter nodes of the general yang model and the different device yang models is configured by the user through the method of providing the mapping table, and the yang converter function is combined to realize the purpose of flexible docking of other manufacturers' third-party devices.

[0055] Specifically, the following can be achieved:

[0056] 1. The new model of third-party equipment can be docked at any time and flexibly, and the system code version does not need to be updated or changed.

[0057] 2. For different manufacturers, different models, and different versions of various devices, the configuration management interface can be unified, and the user configuration data operation logic can be unified and standardized.

[0058] 3. For different manufacturers, different models, and different versions of various devices, the northbound Restful interface can be unified. When the upper layer or other external system performs business management automation arrangement, the northbound Restful interface provided can be docked at one time, and permanent adaptation of different newly added heterogeneous third-party devices can be achieved.

[0059] 4. The device model does not need to be hard coded, and the newly added model device can be extended at any time; at the same time, the user does not need to perform code development activities, and all business docking activities of the third-party device can be completed through system configuration. DETAILED DESCRIPTION

[0060] In order to more clearly illustrate the technical solutions in the embodiments of the application or the prior art, the following will briefly introduce the drawings needed to be used in the description of the embodiments of the application or the prior art. Obviously, the drawings in the following description are only some embodiments described in the application, and other drawings can also be obtained by those skilled in the art according to these drawings of the embodiments of the application.

[0061] Figure 1 A detailed flowchart of a device configuration method provided in the embodiment of the application;

[0062] Figure 2 A device configuration and delivery process schematic diagram provided in the embodiment of the application;

[0063] Figure 3 A structure schematic diagram of a device configuration apparatus provided in the embodiment of the application;

[0064] Figure 4 A hardware architecture schematic diagram of a device configuration apparatus provided in the embodiment of the application. DETAILED DESCRIPTION

[0065] The terminology used in the description of the application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the description of the application and the claims, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It also will be understood that the term "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.

[0066] It is to be understood that the singular forms "a", "an", and "the" include plural referents unless the context clearly dictates otherwise. It is to be understood that the term "and / or" as used herein encompasses all possible combinations of one or more of the associated listed items and that terms describing conditional functions, such as "if," "when," "responding to," or "in response to," encompass both the positive conditions of the function as well as the negative "if not" condition of the function.

[0067] Currently, when uniformly managing different manufacturers / types of third-party devices, the business code layer world is adapted, and when there is a third-party device, the business module directly hard codes the netconf xml of the specific business configuration. This is also the most commonly used and most direct method of adapting and connecting third-party devices.

[0068] The above-mentioned manner can completely meet the connection of third-party devices, unified business management interface, and unified north Restful interface, but in order to achieve these purposes, the scheme needs to hard code different processing methods for different devices in the business logic. Therefore, the developer needs to understand different configuration models of different manufacturers and different devices, and develop different business codes according to different configuration models of different devices, and each time a new third-party manufacturer device is adapted, the code needs to be redeveloped and the version needs to be released.

[0069] The embodiments of the present application provide a scheme for flexibly connecting other manufacturer third-party devices by uploading a general yang model by a user, obtaining a yang model of a device to be configured, and obtaining a mapping relationship between the general yang model configured by the user and parameter nodes of different device yangs, and combining a yang converter function.

[0070] For example, referring to Figure 1 As shown in the figure, a detailed flowchart of a device configuration method provided by the embodiments of the present application is provided. The method is applied to a controller. The controller maintains a general configuration description file and device configuration description files of various types of devices. The controller is preconfigured with a mapping relationship between each parameter node included in the device configuration of each type of device and each parameter node included in the general configuration. The method comprises the following steps:

[0071] Step 100: obtaining device type information of a target device and parameter values of each parameter node of the target device to be configured.

[0072] In the embodiment, the general configuration description file can be a general yang model including each parameter node customized by a user, and the device configuration description file of each type of device can be a device yang model including each parameter node required to be configured by the device. The general yang model refers to a yang model describing each device node parameter customized by the user, which is general and not limited to any manufacturer or any type of device.

[0073] Preferably, the general configuration description file is displayed to the user in the form of a user configuration interface, and the configuration interface includes a device selection option to be configured and input boxes of each parameter node included in the general configuration description file.

[0074] That is, the configuration interface includes parameter input boxes corresponding to each parameter node included in the general configuration description file, and the user can configure values of each parameter node in the corresponding input boxes.

[0075] Correspondingly, when obtaining the device type information of the target device and the parameter values of each parameter node of the target device to be configured, a preferred implementation manner is as follows:

[0076] Receiving the device type information of the target device and the parameter values of each parameter node of the target device to be configured input by the user through the configuration interface.

[0077] In actual application, when a new network device (e.g., the target device) is added in the controller subnetwork networking, the controller can detect that the new network device is added in the networking.

[0078] That is, in the embodiment, before step 100 is performed, the above device configuration method can further include the following steps:

[0079] When it is detected that the target device accesses the networking, obtaining the device type information of the target device; determining whether the device configuration description file corresponding to the device type of the target device exists locally; when it is determined that the device configuration description file corresponding to the device type of the target device does not exist locally, obtaining the device configuration description file of the target device from the target device, and establishing a mapping relationship between each parameter node included in the device configuration of the target device and each parameter node included in the general configuration.

[0080] In the embodiment of the present application, the configuration interface further comprises a parameter node mapping configuration page for establishing a mapping relationship between each parameter node included in the device configuration of the target device and each parameter node included in the general configuration. Then, when establishing the mapping relationship between each parameter node included in the device configuration of the target device and each parameter node included in the general configuration, a preferred implementation is as follows:

[0081] analyzing the device configuration description file of the target device to obtain each parameter node included in the device configuration of the target device and display the same to the user; and establishing the mapping relationship between each parameter node included in the device configuration of the target device and each parameter node included in the general configuration based on the corresponding relationship between each parameter node included in the device configuration of the target device and each parameter node included in the general configuration defined by the user through the parameter node mapping configuration interface.

[0082] For example, referring to Table 1, the mapping relationship between each parameter node included in the device configuration description file provided by the embodiment of the present application and each parameter node included in the general configuration description file is shown.

[0083]

[0084] Table 1

[0085] Specifically, the controller can obtain the device configuration description file corresponding to the target device from the target device, analyze the device configuration description file to obtain each parameter node information included in the device configuration description file, and display the parameter node information to the user. The user establishes the mapping relationship between each parameter node included in the device configuration and each parameter node included in the general configuration based on the association relationship between each parameter node included in the device configuration description file and each parameter node included in the general configuration description file.

[0086] It should be noted that the mapping relationship further comprises device type information of the target device. That is, the corresponding mapping relationship can be found through the device type of the target device.

[0087] Step 110: based on the device type of the target device, determining the target mapping relationship between each parameter node included in the device configuration of the target device and each parameter node included in the general configuration from the mapping relationship between each parameter node included in the device configuration of each type of device and each parameter node included in the general configuration.

[0088] Specifically, the user selects the target device to be configured through the configuration interface, i.e., selects the device type of the target device to be configured, and the controller determines the target mapping relationship between each parameter node included in the target device configuration corresponding to the target device and each parameter node included in the general configuration based on the device type of the target device from the mapping table maintained locally.

[0089] Step 120: generating a data configuration file for configuring the target device based on the parameter values of each parameter node of the target device and the target mapping relationship.

[0090] In actual application, the parameter node input box displayed by the configuration interface is associated with each parameter node included in the general configuration, i.e., the input parameter values of each parameter node correspond to the values of the corresponding parameter nodes included in the general configuration.

[0091] Then, after the controller determines the target mapping relationship between each parameter node included in the target device configuration corresponding to the target device and each parameter node included in the general configuration, the controller can establish the association relationship between the parameter values of each parameter node and each parameter node included in the target device configuration according to the first relationship between the parameter values of each parameter node input by the user through the configuration page and each parameter node included in the general configuration, and the second relationship between each parameter node included in the general configuration and each parameter node included in the target device configuration.

[0092] In this way, the controller can generate a data configuration file for configuring the target device according to the parameter values of each parameter node and the target device configuration description file.

[0093] In the embodiments of the present application, a preferred implementation manner is that the general configuration description file is a general yang model including each parameter node customized by the user, and the device configuration description file of each type of device is a device yang model including each parameter node required to be configured by the device. Then, when generating a data configuration file for configuring the target device based on the parameter values of each parameter node of the target device and the target mapping relationship, a preferred implementation manner is:

[0094] determining the device yang model corresponding to the target device based on the target mapping relationship; and generating the netconf xml configuration of the target device based on the parameter values of each parameter node of the target device and the device yang model corresponding to the target device through a yang converter.

[0095] Step 130: issuing the data configuration file to the target device.

[0096] The controller issues the xml format device configuration file to the target device, so that the target device performs configuration based on the received xml format device configuration file.

[0097] The device configuration issuing process provided by the embodiment of the application is described in detail below in combination with a specific application scenario. For example, refer to Figure 2 Fig. 1 shows a device configuration issuing process provided by the embodiment of the application, and the configuration issuing process is as follows:

[0098] 1) A UI configuration interface is generated according to a general yang model.

[0099] The UI configuration interface is to display the nodes of yang that need to be configured by a user so as to fill in the corresponding data of each node. As can be seen from the above, since the UI configuration interface is a configuration interface generated according to the general yang model, it is irrelevant to different manufacturers / type devices.

[0100] 2) The user inputs data according to the UI configuration interface.

[0101] For example, index is 1 / 1 / 1, ip is 192.168.0.1, and mask is 255.255.255.0.

[0102] 3) The system automatically searches the yang nodes of device 1 corresponding to the general yang nodes according to the mapping table.

[0103] 4) The system automatically binds the user configuration data to the yang nodes of the device.

[0104] 5) The yang converter generates the xml configuration of device 1 according to the yang model of device 1 and the user configuration data.

[0105] 6) The system issues the xml configuration to device 1 through a netconf issuing module.

[0106] The configuration issuing process of the system to device 2 is the same as that to device 1, except that the parameter node mapping relationship between the yang model of device 2 and the general yang model is searched when device 2 is selected, and then the yang converter generates the xml configuration of device 2 according to the yang model of device 2 and the user data bound to the yang nodes of device 2 and issues the xml configuration to device 2.

[0107] In actual application, the general yang model can also be used to generate the northbound Restful interface, which is irrelevant to the yang models of various devices. Therefore, the northbound external system is called uniformly and standardized. The standardized calling of the external system is realized.

[0108] Based on the same inventive concept as the above embodiment, for example, refer to Figure 3As shown, a structural schematic diagram of a device configuration apparatus provided by an embodiment of the present application is shown, the apparatus is applied to a controller, the controller maintains a general configuration description file and device configuration description files of various types of devices, and the controller is preconfigured with a mapping relationship between parameter nodes included in device configurations of various types of devices and parameter nodes included in general configurations; the apparatus includes:

[0109] An acquisition unit 30 is configured to acquire device type information of a target device and parameter values of various parameter nodes of the target device to be configured;

[0110] A determination unit 31 is configured to determine, based on the device type of the target device, a target mapping relationship between various parameter nodes included in a target device configuration corresponding to the target device and various parameter nodes included in a general configuration from the mapping relationship between various parameter nodes included in device configurations of various types of devices and various parameter nodes included in the general configuration;

[0111] A generation unit 32 is configured to generate a data configuration file for configuring the target device based on the parameter values of various parameter nodes of the target device and the target mapping relationship;

[0112] A delivery unit 33 is configured to deliver the data configuration file to the target device.

[0113] Optionally, the general configuration description file is displayed to a user in a user configuration interface, and the configuration interface includes a to-be-configured device selection option and input boxes of various parameter nodes included in the general configuration description file.

[0114] When acquiring the device type information of the target device and the parameter values of various parameter nodes of the target device to be configured, the acquisition unit 30 is specifically configured to:

[0115] Receive the device type information of the target device and the parameter values of various parameter nodes of the target device to be configured input by the user through the configuration interface.

[0116] Optionally, the apparatus further includes a judgment unit and a building unit:

[0117] When detecting that the target device accesses a network, the acquisition unit 30 is further configured to acquire the device type information of the target device.

[0118] The judgment unit is configured to judge whether a device configuration description file corresponding to the device type of the target device exists locally.

[0119] The judgment unit determines that the device type corresponding to the device configuration description file of the target device does not exist locally, and the obtaining unit 30 is further configured to obtain the device configuration description file of the target device from the target device.

[0120] The establishing unit is configured to establish a mapping relationship between each parameter node included in the device configuration of the target device and each parameter node included in the general configuration.

[0121] Optionally, the configuration interface further includes a parameter node mapping configuration page for establishing a mapping relationship between each parameter node included in the device configuration and the general configuration.

[0122] When the mapping relationship between each parameter node included in the device configuration of the target device and each parameter node included in the general configuration is established, the establishing unit is specifically configured to:

[0123] Parse the device configuration description file of the target device to obtain each parameter node included in the device configuration of the target device, and display the parameter node to a user.

[0124] Based on the corresponding relationship between each parameter node included in the device configuration of the target device and each parameter node included in the general configuration defined by the user through the parameter node mapping configuration interface, a mapping relationship between each parameter node included in the device configuration of the target device and each parameter node included in the general configuration is established.

[0125] Optionally, the general configuration description file is a general yang model including each parameter node customized by a user, and the device configuration description file of each type of device is a device yang model including each parameter node required for configuration of a device.

[0126] When the data configuration file for configuring the target device is generated based on the parameter values of each parameter node of the target device and the target mapping relationship, the generating unit 32 is specifically configured to:

[0127] Based on the target mapping relationship, determine the device yang model corresponding to the target device.

[0128] Based on the parameter values of each parameter node of the target device and the device yang model corresponding to the target device, generate the netconf xml configuration of the target device through a yang converter.

[0129] The above units can be one or more integrated circuits configured to implement the above methods, for example, one or more Application Specific Integrated Circuits (ASICs), or one or more Digital Signal Processors (DSPs), or one or more Field Programmable Gate Arrays (FPGAs), etc. For example, when a certain unit above is implemented in the form of a processing element scheduling program code, the processing element can be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor that can invoke program code. For another example, the units can be integrated together to implement a system-on-a-chip (SOC).

[0130] Further, the device configuration apparatus provided by the embodiments of the present application, from the hardware level, the hardware architecture diagram of the device configuration apparatus can be seen from Figure 4 As shown in the figure, the device configuration apparatus can include a memory 40 and a processor 41,

[0131] The memory 40 is used to store program instructions; the processor 41 invokes the program instructions stored in the memory 40, and executes the above method embodiments according to the obtained program instructions. The specific implementation and technical effects are similar, and will not be repeated here.

[0132] Optionally, the present application also provides a controller, including at least one processing element (or chip) for executing the above method embodiments.

[0133] Optionally, the present application also provides a program product, for example, a computer readable storage medium, which stores computer executable instructions for causing the computer to execute the above method embodiments.

[0134] Here, the machine readable storage medium can be any electronic, magnetic, optical or other physical storage apparatus, which can contain or store information, such as executable instructions, data, etc. For example, the machine readable storage medium can be: RAM (Radom Access Memory, Random Access Memory), volatile memory, non-volatile memory, flash memory, storage drive (such as hard disk drive), solid state disk, any type of storage disk (such as optical disk, dvd, etc.), or similar storage medium, or combination thereof.

[0135] The systems, apparatuses, modules, or units disclosed in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, and the specific form of the computer can be a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0136] For the sake of clarity, the above apparatuses are described with reference to functional units for describing various functions. Of course, the functions of the units can be implemented in one or more software and / or hardware.

[0137] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the embodiments of the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer usable program code.

[0138] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of flows and / or blocks in the flowcharts and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing apparatus to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing apparatus produce the functions specified in the flowcharts and / or block diagrams. Figure 1 The functions specified in a flow or multiple flows and / or blocks Figure 1 The functions specified in a flow or multiple flows and / or blocks

[0139] Moreover, these computer program instructions can also be stored in a computer readable memory capable of directing the computer or other programmable data processing apparatus to work in a specific manner, so that the instructions stored in the computer readable memory produce a product including instruction apparatus, which implements the functions specified in the flowcharts and / or block diagrams. Figure 1 The functions specified in a flow or multiple flows and / or blocks Figure 1 The functions specified in a flow or multiple flows and / or blocks

[0140] These computer program instructions can also be loaded into a computer or other programmable data processing devices, so that a series of operation steps are performed on the computer or other programmable data processing devices to generate computer-implemented processes, thus the instructions executed on the computer or other programmable data processing devices provide processes for implementing the functions specified in the flow Figure 1 one flow or a plurality of flows and / or blocks Figure 1 one block or a plurality of blocks.

[0141] The above only the preferred embodiment of the present application has, not to limit the present application, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application, should be included in the scope of the present application.

Claims

1. A device configuration method, characterized by, The method is applied to a controller, wherein a general configuration description file and device configuration description files of various types of devices are maintained on the controller, and a mapping relationship between parameter nodes included in device configurations of various types of devices and parameter nodes included in the general configuration is pre-configured on the controller; the method comprises the following steps: obtaining device type information of a target device and parameter values of parameter nodes of the target device to be configured; based on the device type of the target device, determining a target mapping relationship between parameter nodes included in a target device configuration corresponding to the target device and parameter nodes included in the general configuration from the mapping relationship between parameter nodes included in device configurations of various types of devices and parameter nodes included in the general configuration; generating a data configuration file for configuring the target device based on the parameter values of the parameter nodes of the target device and the target mapping relationship; downloading the data configuration file to the target device; the general configuration description file is displayed to a user in the form of a user configuration interface, and the configuration interface comprises a device selection option to be configured and input boxes of parameter nodes included in the general configuration description file; the step of obtaining device type information of a target device and parameter values of parameter nodes of the target device to be configured comprises: receiving device type information of a target device and parameter values of parameter nodes of the target device to be configured input by a user through the configuration interface; the general configuration description file is a general yang model comprising parameter nodes customized by a user, and the device configuration description files of various types of devices are device yang models comprising parameter nodes required to be configured by devices; the step of generating a data configuration file for configuring the target device based on the parameter values of the parameter nodes of the target device and the target mapping relationship comprises: determining a device yang model corresponding to the target device based on the target mapping relationship; generating a netconf xml configuration of the target device based on the parameter values of the parameter nodes of the target device and the device yang model corresponding to the target device through a yang converter.

2. The method of claim 1, wherein, The method further comprises: obtaining device type information of the target device when it is detected that the target device accesses a network; judging whether a device configuration description file corresponding to the device type of the target device exists locally; when it is judged that the device configuration description file corresponding to the device type of the target device does not exist locally, obtaining the device configuration description file of the target device from the target device and establishing a mapping relationship between parameter nodes included in the device configuration of the target device and parameter nodes included in the general configuration.

3. The method of claim 2, wherein, The configuration interface further comprises a parameter node mapping configuration page for establishing a mapping relationship between parameter nodes included in the device configuration and the general configuration; the step of establishing a mapping relationship between parameter nodes included in the device configuration of the target device and parameter nodes included in the general configuration comprises: parsing a device configuration description file of the target device to obtain each parameter node included in the device configuration of the target device and display the same to a user; based on a corresponding relationship between each parameter node included in the device configuration of the target device and each parameter node included in the general configuration defined by the user through the parameter node mapping configuration interface, establishing a mapping relationship between each parameter node included in the device configuration of the target device and each parameter node included in the general configuration.

4. An apparatus configuration device, characterized by comprising: The application is applied to a controller, wherein a general configuration description file and device configuration description files of various types of devices are maintained on the controller, and a mapping relationship between each parameter node included in the device configuration of various types of devices and each parameter node included in the general configuration is pre-configured on the controller; the device comprises: an obtaining unit configured to obtain device type information of a target device and parameter values of each parameter node of the target device to be configured; a determining unit configured to determine, based on the device type of the target device, a target mapping relationship between each parameter node included in a target device configuration corresponding to the target device and each parameter node included in the general configuration from the mapping relationship between each parameter node included in the device configuration of various types of devices and each parameter node included in the general configuration; a generating unit configured to generate a data configuration file for configuring the target device based on the parameter values of each parameter node of the target device and the target mapping relationship; a delivering unit configured to deliver the data configuration file to the target device; the general configuration description file is displayed to a user in the form of a user configuration interface, and the configuration interface comprises a to-be-configured device selection option and input boxes of each parameter node included in the general configuration description file; when obtaining the device type information of the target device and the parameter values of each parameter node of the target device to be configured, the obtaining unit is specifically configured to: receive the device type information of the target device and the parameter values of each parameter node of the target device to be configured input by the user through the configuration interface; the general configuration description file is a general yang model comprising each parameter node defined by the user, and the device configuration description files of various types of devices are device yang models comprising each parameter node required to be configured by the device; when generating the data configuration file for configuring the target device based on the parameter values of each parameter node of the target device and the target mapping relationship, the generating unit is specifically configured to: determine a device yang model corresponding to the target device based on the target mapping relationship; generate a netconf xml configuration of the target device based on the parameter values of each parameter node of the target device and the device yang model corresponding to the target device through a yang converter.

5. The apparatus of claim 4, wherein, The device further comprises a judging unit and an establishing unit: when detecting that the target device accesses a network, the obtaining unit is further configured to obtain the device type information of the target device; the judging unit is configured to judge whether a device configuration description file corresponding to the device type of the target device exists locally or not; The judging unit, when judging that the device type corresponding to the device configuration description file of the target device does not exist locally, the obtaining unit is further configured to obtain the device configuration description file of the target device from the target device; The establishing unit is configured to establish a mapping relationship between each parameter node included in the device configuration of the target device and each parameter node included in the general configuration.

6. The apparatus of claim 5, wherein, The configuration interface further includes a parameter node mapping configuration page for establishing the mapping relationship between each parameter node included in the device configuration and the general configuration; When the mapping relationship between each parameter node included in the device configuration of the target device and each parameter node included in the general configuration is established, the establishing unit is specifically configured to: parse the device configuration description file of the target device to obtain each parameter node included in the device configuration of the target device, and display the same to a user; establish the mapping relationship between each parameter node included in the device configuration of the target device and each parameter node included in the general configuration based on the corresponding relationship between each parameter node included in the device configuration of the target device and each parameter node included in the general configuration defined by the user through the parameter node mapping configuration interface.

7. An apparatus configuration device, characterized by comprising: The device configuration apparatus includes: a memory configured to store program instructions; a processor configured to invoke the program instructions stored in the memory and perform the steps of the method according to any one of claims 1-3 according to the obtained program instructions.

8. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer executable instructions, and the computer executable instructions are used to make the computer execute the steps of the method according to any one of claims 1-3.

Citation Information

Patent Citations

  • Network equipment configuration management method, device and equipment

    CN109361550A

  • An automatic mapping method and system for a high-level model and a low-level model

    CN109947995A