Equipment configuration method and device and related equipment
By maintaining common and device-specific configuration profiles on the controller and generating data configuration files for the target device, the problem of unified equipment management of different manufacturers is solved, and flexible device configuration management and efficient adaptation process is realized.
Patent Information
- Application Number
- CN202411463997.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-18
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2044-10-18
AI Technical Summary
In a complex network environment, how to achieve centralized management, unified monitoring and configuration management of network equipment of different manufacturers to ensure collaborative work between various devices has become an urgent problem.
By maintaining the general configuration description file and the device configuration description file of each type of device on the controller, and preconfiguring the mapping relationship between the device configuration parameter nodes of each type of device and the common configuration parameter nodes of each type of device, the device type information of the target device and the device type information and Parameter value, generates a data configuration file for configuring the target device and sends it to the target device.
It realizes flexible configuration management of equipment of different manufacturers, supports a unified business management interface and northbound Restful interface, reduces the hard-coded demand for device models, simplifies the adaptation process for new devices, and improves management efficiency and adaptation. sex.
Smart Images

Figure CN119420643A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of equipment management, and in particular to an equipment configuration method, apparatus and related equipment. Background Art
[0002] In a specific network environment, various types of network devices (such as switches, routers, firewalls, etc.) from different manufacturers are usually used. These network devices come from different manufacturers and may use different communication protocols, data formats, and management interfaces. This leads to many challenges for network managers, such as how to centrally manage these heterogeneous devices, how to achieve unified monitoring and configuration management, and how to ensure the coordination between various 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 connect to various third-party manufacturers' devices.
[0003] However, as customer services and equipment manufacturers develop, customer services and equipment manufacturers' equipment functions are becoming more and more complex. Network management software needs to have the following adaptable capabilities:
[0004] 1) Multi-vendor equipment docking capability. The network management software needs to be able to dock with network equipment from different vendors and support the management functions of equipment from different vendors.
[0005] 2) Unified service management interface. In order to achieve centralized management of network devices, network management software needs to provide a unified management interface so that network managers can easily monitor and configure various network devices, regardless of the manufacturer.
[0006] So, how to configure and connect equipment from different manufacturers has become a problem that needs to be solved urgently. Summary of the invention
[0007] The present application provides a device configuration method, apparatus and related equipment.
[0008] In a first aspect, the present application provides a device configuration method, which 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 each type of device and each parameter node included in the general configuration is pre-configured on the controller; the method comprises:
[0009] Acquire device type information of a target device and parameter values of each parameter node of the target device to be configured;
[0010] Based on the device type of the target device, determining a 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 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;
[0011] 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;
[0012] Send the data configuration file to the target device.
[0013] Optionally, 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 an input box for each parameter node included in the general configuration description file;
[0014] The step of obtaining device type information of a target device and parameter values of each parameter node of the target device to be configured includes:
[0015] The device type information of the target device and the parameter values of each parameter node of the target device to be configured are received by the user through the configuration interface.
[0016] Optionally, the method further comprises:
[0017] When detecting that the target device is connected to the network, obtaining device type information of the target device;
[0018] Determine whether there is a device configuration description file corresponding to the device type of the target device locally;
[0019] When it is determined that there is no device configuration description file corresponding to the device type of the target device locally, the device configuration description file of the target device is obtained from the target device, and a mapping relationship is established 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, obtaining each parameter node included in the device configuration of the target device, and displaying it to the user;
[0023] Based on the correspondence between the parameter nodes included in the device configuration of the target device and the parameter nodes included in the general configuration defined by the user through the parameter node mapping configuration interface, a 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.
[0024] Optionally, the general configuration description file is a general yang model including various parameter nodes customized by the user, and the device configuration description file of each type of device is a device yang model including various parameter nodes required to be configured by the device;
[0025] The step of generating a data configuration file for configuring the target device based on the parameter value of each parameter node of the target device and the target mapping relationship includes:
[0026] Based on the target mapping relationship, determining a device yang model corresponding to the target device;
[0027] Through the yang converter, based on the parameter values of each parameter node of the target device and the device yang model corresponding to the target device, the netconf xml configuration of the target device is generated.
[0028] In a second aspect, the present application provides a device configuration apparatus, which 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 each type of device and each parameter node included in the general configuration is pre-configured on the controller; the apparatus comprises:
[0029] An acquiring unit, used to acquire device type information of a target device and parameter values of each parameter node of the target device to be configured;
[0030] a determining unit, configured to determine, based on a device type of the target device, a 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 from 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;
[0031] A generating unit, configured to generate 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;
[0032] The sending unit is used to send the data configuration file to the target device.
[0033] Optionally, 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 an input box for each parameter node included in the general configuration description file;
[0034] When acquiring the device type information of the target device and the parameter values of each parameter node of the target device to be configured, the acquiring unit is specifically used to:
[0035] The device type information of the target device and the parameter values of each parameter node of the target device to be configured are received by the user through the configuration interface.
[0036] Optionally, the device further includes a judging unit and an establishing unit:
[0037] When it is detected that the target device is connected to the network, the acquisition unit is further used to acquire device type information of the target device;
[0038] A determination unit, configured to determine whether there is a device configuration description file corresponding to the device type of the target device locally;
[0039] When the judging unit determines that there is no device configuration description file corresponding to the device type of the target device locally, the acquiring unit is further configured to acquire the device configuration description file of the target device from the target device;
[0040] The establishing unit is used 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.
[0041] 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;
[0042] When 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, the establishing unit is specifically used to:
[0043] Parsing the device configuration description file of the target device, obtaining each parameter node included in the device configuration of the target device, and displaying it to the user;
[0044] Based on the correspondence between the parameter nodes included in the device configuration of the target device and the parameter nodes included in the general configuration defined by the user through the parameter node mapping configuration interface, a 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.
[0045] Optionally, the general configuration description file is a general yang model including various parameter nodes customized by the user, and the device configuration description file of each type of device is a device yang model including various parameter nodes required to be configured by the device;
[0046] 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, the generating unit is specifically used to:
[0047] Based on the target mapping relationship, determining a device yang model corresponding to the target device;
[0048] Through the yang converter, based on the parameter values of each parameter node of the target device and the device yang model corresponding to the target device, the netconf xml configuration of the target device is generated.
[0049] In a third aspect, an embodiment of the present application provides a device configuration apparatus, the device configuration apparatus comprising:
[0050] A memory for storing program instructions;
[0051] The processor is used to call the program instructions stored in the memory, and execute the steps of the method as described in any one of the first aspects above according to the obtained program instructions.
[0052] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable the computer to execute the steps of the method described in any one of the first aspects above.
[0053] In summary, the device configuration method provided in the embodiment of the present application is applied to a controller, on which a general configuration description file and device configuration description files of various types of devices are maintained, and the controller is pre-configured 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 includes: obtaining device type information of the target device and parameter values of each parameter node of the target device to be configured; based on the device type of the target device, determining 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 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; based on the parameter values of each parameter node of the target device and the target mapping relationship, generating a data configuration file for configuring the target device; and sending the data configuration file to the target device.
[0054] By adopting the device configuration method provided in the embodiment of the present application, the user uploads the universal yang model and the acquired yang models of each device, and provides a mapping table method to enable the user to configure the parameter node mapping relationship between the universal yang model and different device yang models. Combined with the yang converter function, the purpose of flexible docking with third-party devices from other manufacturers is achieved.
[0055] Specifically, it can achieve:
[0056] 1. It can be connected to new third-party devices at any time and flexibly without the need to update or change the system code version.
[0057] 2. For various devices of different manufacturers, models and versions, the configuration management interface can be unified. The operation logic of user configuration data can be unified and standardized.
[0058] 3. In the face of various devices of different manufacturers, models, and versions, the northbound RESTful interface can be unified. When the upper layer or other external systems perform automated orchestration of business management, they can connect to the provided northbound RESTful interface at one time to achieve permanent adaptation to different newly added heterogeneous third-party devices.
[0059] 4. There is no need to hard code the device models, and support for new device models can be expanded at any time. At the same time, users do not need to perform activities such as code development, and all business docking activities of third-party devices can be completed through system configuration. BRIEF DESCRIPTION OF THE DRAWINGS
[0060] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments of the present application or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For ordinary technicians in this field, other drawings can also be obtained based on these drawings of the embodiments of the present application.
[0061] Figure 1 A detailed flow chart of a device configuration method provided in an embodiment of the present application;
[0062] Figure 2 A schematic diagram of a device configuration delivery process provided in an embodiment of the present application;
[0063] Figure 3 A schematic diagram of the structure of a device configuration apparatus provided in an embodiment of the present application;
[0064] Figure 4 A schematic diagram of the hardware architecture of a device configuration apparatus provided in an embodiment of the present application. DETAILED DESCRIPTION
[0065] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, rather than limiting the present application. The singular forms of "a", "said" and "the" used in the present application and claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to any or all possible combinations of one or more associated listed items.
[0066] It should be understood that, although the terms first, second, third, etc. may be used to describe various information in the embodiments of the present application, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, in addition, the word "if" used may be interpreted as "at..." or "when..." or "in response to determination".
[0067] At present, when third-party devices of different manufacturers / types are uniformly managed, they are adapted at the business code layer. When there are third-party devices, 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 method can fully meet the requirements of docking with third-party devices, unifying the business management interface, and unifying the northbound Restful interface. However, in order to achieve these goals, the solution needs to hard-code different processing methods for different devices in the business logic. This requires developers to understand the different configuration models of different manufacturers and different devices, and develop different business codes according to the different configuration models of different devices. In addition, every time a new third-party manufacturer's device is adapted, the code must be redeveloped and the version must be released.
[0069] The embodiment of the present application provides a method for users to upload a universal yang model and obtain the device yang model to be configured, as well as a mapping relationship between the universal yang model configured by the user and parameter nodes of different device yangs, combined with the yang converter function, to jointly realize a solution for flexible connection with third-party devices of other manufacturers.
[0070] For example, see Figure 1 As shown, it is a detailed flow chart of a device configuration method provided by an embodiment of the present application. The method is applied to a controller, and a general configuration description file and device configuration description files of various types of devices are maintained on the controller. 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 is pre-configured on the controller; the method includes the following steps:
[0071] Step 100: Obtain 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 of the present application, the general configuration description file can be a general yang model including various parameter nodes customized by the user, and the device configuration description file of each type of device is a device yang model including various parameter nodes required to be configured by the device. The general yang model refers to a yang model that describes the device node parameters customized by the user, which is universal and not limited to any manufacturer or any device type.
[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 an input box for each parameter node included in the general configuration description file.
[0074] That is, the configuration interface includes a parameter input box corresponding to each parameter node included in the general configuration description, and the user can configure the value of each parameter node in the corresponding input box.
[0075] Correspondingly, when acquiring 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 method is:
[0076] The device type information of the target device and the parameter values of each parameter node of the target device to be configured are received by the user through the configuration interface.
[0077] In actual applications, when a new network device (such as a target device) is added to the managed network, the controller detects that the new network device has joined the network.
[0078] That is, in the embodiment of the present application, before executing step 100, the device configuration method may further include the following steps:
[0079] When it is detected that the target device is connected to the network, the device type information of the target device is obtained; it is determined whether there is a device configuration description file corresponding to the device type of the target device locally; when it is determined that there is no device configuration description file corresponding to the device type of the target device locally, the device configuration description file of the target device is obtained from the target device, and 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.
[0080] In the embodiment of the present application, the configuration interface also 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. Then, when 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, a preferred implementation method is:
[0081] Parse the device configuration description file of the target device to obtain the parameter nodes included in the device configuration of the target device and display them to the user; establish a mapping relationship between the parameter nodes included in the device configuration of the target device and the parameter nodes included in the general configuration based on the correspondence between the parameter nodes included in the device configuration of the target device and the parameter nodes included in the general configuration defined by the user through the parameter node mapping configuration interface.
[0082] Exemplarily, referring to Table 1, a mapping relationship between various parameter nodes included in a device configuration description file and various parameter nodes included in a general configuration description file provided in an embodiment of the present application is shown.
[0083]
[0084] Table 1
[0085] Specifically, the controller can obtain a device configuration description file corresponding to the target device from the target device, then parse the device configuration description file to obtain information of each parameter node included in the device configuration description file, and display the information of each parameter node to the user. The user configures 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 based on experience, and establishes a mapping relationship between each parameter node included in the device configuration and each parameter node included in the general configuration.
[0086] It should be noted that the mapping relationship also includes the 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, 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 from the mapping relationship between the parameter nodes included in the device configuration of each type of device and the parameter nodes included in the general configuration.
[0088] Specifically, the user selects the target device to be configured through the configuration interface, that is, selects the device type of the target device to be configured. The controller determines, based on the device type of the target device, 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 from the locally maintained mapping table.
[0089] Step 120: Generate 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.
[0090] In actual applications, the parameter node input boxes displayed on the configuration interface are associated with the parameter nodes included in the general configuration, that is, the values of the input parameter nodes correspond to the values of the corresponding parameter nodes included in the general configuration.
[0091] Then, after determining 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 an association relationship between the parameter value of each parameter node and each parameter node included in the target device configuration according to the first relationship between the parameter value of each parameter node input by the user through the configuration page and the parameter nodes included in the general configuration, and the second relationship between the parameter nodes included in the general configuration and the parameter nodes 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 value of each parameter node and the target device configuration description file.
[0093] In the embodiment of the present application, a preferred implementation 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 is:
[0094] Based on the target mapping relationship, a device yang model corresponding to the target device is determined; and through a yang converter, a netconf xml configuration of the target device is generated based on parameter values of each parameter node of the target device and the device yang model corresponding to the target device.
[0095] Step 130: Send the data configuration file to the target device.
[0096] The controller sends the device configuration file in XML format to the target device, so that the target device performs configuration based on the received device configuration file in XML format.
[0097] The following describes in detail the device configuration delivery process provided by the embodiment of the present application in combination with specific application scenarios. Figure 2 As shown, it is a schematic diagram of a device configuration delivery process provided in an embodiment of the present application, and the configuration delivery process is as follows:
[0098] 1) Generate UI configuration interface based on the general yang model.
[0099] The UI configuration interface is to display the nodes of Yang that need to be configured with user data so that users can 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 based on the general Yang model, it is irrelevant to different manufacturers / types of equipment.
[0100] 2) The user enters 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) According to the mapping table, the system automatically searches for the yang node of device 1 corresponding to the general yang node.
[0103] 4) The system automatically binds the user configuration data to the device's yang node.
[0104] 5) The Yang converter generates the XML configuration of device 1 based on the Yang model of device 1 and the user configuration data.
[0105] 6) The system sends the XML configuration to device 1 through the netconf sending module.
[0106] The system's configuration delivery process for device 2 is the same as that for device 1, except that when device 2 is selected, the parameter node mapping relationship between the yang model of device 2 and the general yang model is searched. Then the yang converter generates the xml configuration of device 2 based on the yang model of device 2 and the user data bound to the yang node of device 2, and delivers it to device 2.
[0107] In actual applications, when generating northbound Restful interfaces, you can also directly use the general yang model, which is independent of the yang models of each device. Therefore, northbound external system calls are unified and standardized. This realizes standardized calls to external systems.
[0108] Based on the same inventive concept as the above-mentioned embodiment of the invention, for example, refer to Figure 3, which is a schematic diagram of the structure of a device configuration apparatus provided in an embodiment of the present application, 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 pre-configured 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 apparatus includes:
[0109] An acquisition unit 30 is used to acquire device type information of a target device and parameter values of each parameter node of the target device to be configured;
[0110] A determining unit 31 is used to determine, based on the device type of the target device, a 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 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;
[0111] A generating unit 32, configured to generate 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;
[0112] The sending unit 33 is used to send the data configuration file to the target device.
[0113] Optionally, 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 an input box for each parameter node included in the general configuration description file;
[0114] When acquiring the device type information of the target device and the parameter values of each parameter node of the target device to be configured, the acquiring unit 30 is specifically used to:
[0115] The device type information of the target device and the parameter values of each parameter node of the target device to be configured are received by the user through the configuration interface.
[0116] Optionally, the device further includes a judging unit and an establishing unit:
[0117] When it is detected that the target device is connected to the network, the acquisition unit 30 is further used to acquire device type information of the target device;
[0118] A determination unit, configured to determine whether there is a device configuration description file corresponding to the device type of the target device locally;
[0119] When the judging unit determines that there is no device configuration description file corresponding to the device type of the target device locally, the acquiring unit 30 is further configured to acquire the device configuration description file of the target device from the target device;
[0120] The establishing unit is used 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 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, the establishing unit is specifically used to:
[0123] Parsing the device configuration description file of the target device, obtaining each parameter node included in the device configuration of the target device, and displaying it to the user;
[0124] Based on the correspondence between the parameter nodes included in the device configuration of the target device and the parameter nodes included in the general configuration defined by the user through the parameter node mapping configuration interface, a 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.
[0125] Optionally, the general configuration description file is a general yang model including various parameter nodes customized by the user, and the device configuration description file of each type of device is a device yang model including various parameter nodes required to be configured by the device;
[0126] 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, the generating unit 32 is specifically used to:
[0127] Based on the target mapping relationship, determining a device yang model corresponding to the target device;
[0128] Through the yang converter, based on the parameter values of each parameter node of the target device and the device yang model corresponding to the target device, the netconf xml configuration of the target device is generated.
[0129] The above units may be one or more integrated circuits configured to implement the above methods, such as one or more application specific integrated circuits (ASIC), or one or more digital signal processors (DSP), or one or more field programmable gate arrays (FPGA). For another example, when a certain unit is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call program code. For another example, these units may be integrated together and implemented in the form of a system-on-a-chip (SOC).
[0130] Furthermore, the device configuration apparatus provided in the embodiment of the present application, from the hardware level, the hardware architecture diagram of the device configuration apparatus can be seen in Figure 4 As shown, the device configuration apparatus may include: a memory 40 and a processor 41,
[0131] The memory 40 is used to store program instructions; the processor 41 calls the program instructions stored in the memory 40 and executes the above method embodiment according to the obtained program instructions. The specific implementation method and technical effect are similar and will not be repeated here.
[0132] Optionally, the present application also provides a controller, comprising at least one processing element (or chip) for executing the above method embodiment.
[0133] Optionally, the present application also provides a program product, such as a computer-readable storage medium, which stores computer-executable instructions, and the computer-executable instructions are used to enable the computer to execute the above method embodiments.
[0134] Here, the machine-readable storage medium may be any electronic, magnetic, optical or other physical storage device that may contain or store information, such as executable instructions, data, etc. For example, the machine-readable storage medium may be: RAM (RadomAccess Memory), volatile memory, non-volatile memory, flash memory, storage drive (such as hard disk drive), solid state drive, any type of storage disk (such as CD, DVD, etc.), or similar storage medium, or a combination thereof.
[0135] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer, which may be in the form of 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 transceiver, a game console, a tablet computer, a wearable device or a combination of any of these devices.
[0136] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing the present application, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0137] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the embodiments of the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain 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 process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, 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 device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0139] Moreover, these computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0140] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable device to implement the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0141] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
Claims
1. A device configuration method, characterized in that: 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 pre-configured 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 includes: Acquire device type information of a target device and parameter values of each parameter node of the target device to be configured; Based on the device type of the target device, determining a 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 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; 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; Send the data configuration file to the target device.
2. The method according to claim 1, characterized in that The general configuration description file is displayed to the user in the form of a user configuration interface, wherein the configuration interface includes a device selection option to be configured and an input box for each parameter node included in the general configuration description file; The step of obtaining device type information of a target device and parameter values of each parameter node of the target device to be configured includes: The device type information of the target device and the parameter values of each parameter node of the target device to be configured are received by the user through the configuration interface.
3. The method according to claim 1, characterized in that The method further comprises: When detecting that the target device is connected to the network, obtaining device type information of the target device; Determine whether there is a device configuration description file corresponding to the device type of the target device locally; When it is determined that there is no device configuration description file corresponding to the device type of the target device locally, the device configuration description file of the target device is obtained from the target device, and a mapping relationship is established between each parameter node included in the device configuration of the target device and each parameter node included in the general configuration.
4. The method according to claim 3, characterized in that The configuration interface also 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; 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: Parsing the device configuration description file of the target device, obtaining each parameter node included in the device configuration of the target device, and displaying it to the user; Based on the correspondence between the parameter nodes included in the device configuration of the target device and the parameter nodes included in the general configuration defined by the user through the parameter node mapping configuration interface, a 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.
5. The method according to claim 1, characterized in that The general configuration description file is a general yang model including various parameter nodes customized by the user, and the device configuration description file of each type of device is a device yang model including various parameter nodes required to be configured by the device; The step of generating a data configuration file for configuring the target device based on the parameter value of each parameter node of the target device and the target mapping relationship includes: Based on the target mapping relationship, determining a device yang model corresponding to the target device; Through the yang converter, based on the parameter values of each parameter node of the target device and the device yang model corresponding to the target device, the netconf xml configuration of the target device is generated.
6. A device configuration apparatus, characterized in that: 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 pre-configured 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 device comprises: An acquiring unit, used to acquire 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 a device type of the target device, a 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 from 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; A generating unit, configured to generate 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; The sending unit is used to send the data configuration file to the target device.
7. The device according to claim 6, characterized in that The general configuration description file is displayed to the user in the form of a user configuration interface, wherein the configuration interface includes a device selection option to be configured and an input box for each parameter node included in the general configuration description file; When acquiring the device type information of the target device and the parameter values of each parameter node of the target device to be configured, the acquiring unit is specifically used to: The device type information of the target device and the parameter values of each parameter node of the target device to be configured are received by the user through the configuration interface.
8. The device according to claim 6, characterized in that The device also includes a judging unit and an establishing unit: When it is detected that the target device is connected to the network, the acquisition unit is further used to acquire device type information of the target device; A determination unit, configured to determine whether there is a device configuration description file corresponding to the device type of the target device locally; When the judging unit determines that there is no device configuration description file corresponding to the device type of the target device locally, the acquiring unit is further configured to acquire the device configuration description file of the target device from the target device; The establishing unit is used 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.
9. The device according to claim 8, characterized in that The configuration interface also 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; When 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, the establishing unit is specifically used to: Parsing the device configuration description file of the target device, obtaining each parameter node included in the device configuration of the target device, and displaying it to the user; Based on the correspondence between the parameter nodes included in the device configuration of the target device and the parameter nodes included in the general configuration defined by the user through the parameter node mapping configuration interface, a 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.
10. The device according to claim 6, characterized in that The general configuration description file is a general yang model including various parameter nodes defined by the user, and the device configuration description file of each type of device is a device yang model including various parameter nodes required to be configured by the device; 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, the generating unit is specifically used to: Based on the target mapping relationship, determining a device yang model corresponding to the target device; Through the yang converter, based on the parameter values of each parameter node of the target device and the device yang model corresponding to the target device, the netconf xml configuration of the target device is generated.
11. A device configuration apparatus, characterized in that: The device configuration device comprises: A memory for storing program instructions; A processor is used to call the program instructions stored in the memory, and execute the steps of the method according to any one of claims 1 to 5 according to the obtained program instructions.
12. 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 enable the computer to execute the steps of the method according to any one of claims 1 to 5.
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
Parameter value acquisition method, controller, terminal equipment and readable storage medium
CN114490647A
Configuration issuing method and device
CN115037589A
Network equipment configuration method and device based on Yang model
CN117411782A
Cited By
Equipment configuration data integration method and device
CN120561078A
Device configuration data integration method and device
CN120561078B
Remote control method and device for energy storage equipment and energy storage system
CN121000752A