Automatic conversion method and system for cross-manufacturer network equipment configuration

Through automated conversion methods, obtain and analyze the network equipment configuration commands of different manufacturers, convert it to the yang model file, and finally convert to the configuration file of the target manufacturer's equipment, solve the problem of manual configuration errors and management difficulty, and achieve efficient, accurate accuracy Inter -manufacturer network equipment configuration management.

CN119337871APending Publication Date: 2025-01-21CHINA TELECOM DIGITAL INTELLIGENCE TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411360408.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-27
Publication Date
2025-01-21

AI Technical Summary

Technical Problem

In the face of complex network environments and multi-vendor equipment, manual configuration of network equipment is likely to cause configuration errors, management is difficult, and work efficiency is inefficient.

Method used

Put forward a automated conversion method for cross -manufacturer network equipment configuration. By obtaining the command database, automatic extraction of the target configuration command data in the manufacturer's command manual, analyzing the target configuration file, converting to the yang model file, and finally converting to the configuration of the target manufacturer equipment Files to realize the automation conversion of different manufacturers' equipment configuration.

Benefits of technology

This method reduces the need for manual intervention, improves the efficiency and accuracy of configuration management, reduces errors caused by manual operations, and realizes automatic configuration conversion of cross-vendor equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119337871A_ABST
    Figure CN119337871A_ABST
Patent Text Reader

Abstract

The invention relates to an automatic conversion method and system for cross-manufacturer network equipment configuration, and belongs to the technical field of data processing. Obtaining a manufacturer command manual, automatically extracting target configuration command data in the manufacturer command manual, and filling the target configuration command data into a command database to obtain a target command database; analyzing a target configuration file of the target equipment based on the target command database to obtain command information of the target configuration file; and converting the command information into a YANG model file, and converting the YANG model file into a configuration file of the target manufacturer equipment. According to the method, automatic conversion of equipment configurations of different manufacturers is realized, the requirement of manual intervention is reduced, the efficiency and accuracy of configuration management are improved, and errors caused by manual operation are reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of data processing, and in particular relates to an automatic conversion method and system for cross-vendor network equipment configuration. Background Art

[0002] In the related technology, in the field of network device configuration management, the current mainstream configuration management method mainly includes manual configuration. The traditional manual configuration method relies on the network administrator to configure the device item by item according to the command manual provided by the manufacturer. Although this method is simple and direct, it is easy to cause configuration errors, difficult management, and low work efficiency when facing complex network environments and multi-vendor devices. Therefore, how to better implement network device configuration has become an urgent problem to be solved. Summary of the invention

[0003] In view of the above shortcomings of the prior art, the purpose of the invention is to provide a method and system for automatic conversion of cross-vendor network device configurations. The method realizes the automatic conversion of device configurations of different manufacturers, reduces the need for manual intervention, improves the efficiency and accuracy of configuration management, and reduces errors caused by manual operations.

[0004] According to a first aspect of the present invention, an automated conversion method for cross-vendor network device configuration is proposed, comprising: S1, obtaining a command database; S2, obtaining a vendor command manual, and automatically extracting target configuration command data from the vendor command manual, and filling the target configuration command data into the command database to obtain a target command database; S3, parsing a target configuration file of a target device based on the target command database to obtain command information of the target configuration file; S4, converting the command information into a YANG model file, and converting the YANG model file into a configuration file of a target vendor device.

[0005] Furthermore, the command database includes task group management, command data storage, parameter and instance configuration, and mapping between task group and the YANG model, wherein the task group management is used to record the command group required to complete the configuration task, each task group corresponds to a configuration function, the command data storage is used to store the configuration commands in each of the task groups, the parameter and instance configuration is used to record the configuration command parameters and the instances of the configuration commands, and the mapping between task group and the YANG model is used to record the corresponding relationship between the task group and the YANG model.

[0006] Further, each of the task groups includes a plurality of the configuration commands, each of the configuration commands includes a plurality of parameters, and each of the configuration commands includes a plurality of configuration instances, and each of the task groups maps one or more of the YANG models.

[0007] Furthermore, the target configuration command data in the manufacturer's command manual is automatically extracted, including: determining the text content of the manufacturer's command manual; performing text cleaning on the text content to obtain the cleaned target text content; using the trained BERT language model to parse the target text content to obtain the mapping relationship between the command group, command parameters, command configuration instances, command keywords, command function descriptions, and task groups of the manufacturer's command manual and the YANG model.

[0008] Furthermore, the trained BERT language model is obtained in the following manner: defining labels for word segmentation; performing word segmentation on the target text content, and dividing the target text content after word segmentation into a training data set and a validation set; inputting the labels for defining word segmentation and the training data set into the BERT language model, and pre-training the BERT language model; evaluating the pre-trained BERT language model based on the validation set, and adjusting the parameters of the pre-trained BERT language model to obtain the trained BERT language model.

[0009] Furthermore, the target configuration file of the target device is parsed based on the target command database to obtain command information of the target configuration file, including: obtaining first command information in the target command database; obtaining second command information of the target configuration file; matching the first command information with the second command information to obtain the command information of the target configuration file.

[0010] Furthermore, converting the YANG model file into a configuration file of a target manufacturer's device includes: obtaining configuration data in the YANG model file; searching for manufacturer device commands corresponding to the configuration data from the target command database; mapping the configuration data to the manufacturer device commands, and combining the mapped commands into a configuration file.

[0011] According to a second aspect of the present invention, an automatic conversion system for cross-vendor network device configuration is proposed, comprising: an acquisition module for acquiring a command database; a first acquisition module for acquiring a vendor command manual, and automatically extracting target configuration command data in the vendor command manual, and filling the target configuration command data into the command database to obtain a target command database; a second acquisition module for parsing a target configuration file of a target device based on the target command database to obtain command information of the target configuration file; and a conversion module for converting the command information into a YANG model file, and converting the YANG model file into a configuration file of a target vendor device.

[0012] According to a third aspect of the present invention, an electronic device is proposed, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute any of the methods described in the first aspect of the present invention.

[0013] According to a fourth aspect of the present invention, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute any one of the methods according to the first aspect of the present invention.

[0014] The beneficial effects of the present invention are as follows:

[0015] The method and system for automatic conversion of cross-vendor network device configurations of the present invention obtain a command database; obtain a vendor command manual, and automatically extract target configuration command data in the vendor command manual, and fill the target configuration command data into the command database to obtain a target command database; parse the target configuration file of the target device based on the target command database to obtain command information of the target configuration file; convert the command information into a YANG model file, and convert the YANG model file into a configuration file of the target vendor device. The method realizes automatic conversion of device configurations of different vendors, reduces the need for manual intervention, improves the efficiency and accuracy of configuration management, and reduces errors caused by manual operations. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] The accompanying drawings are only used to illustrate specific embodiments and are not considered to limit the present invention. In the entire drawings, the same reference symbols represent the same components. Obviously, the drawings described below are only some embodiments recorded in the embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings.

[0017] Figure 1 is a flow chart of an automated conversion method for cross-vendor network device configuration according to an embodiment of the present invention;

[0018] Figure 2 is a flow chart of an automated conversion method for cross-vendor network device configuration according to a specific embodiment of the present invention;

[0019] Figure 3 is a structural block diagram of an automated conversion system for cross-vendor network device configuration according to an embodiment of the present invention;

[0020] Figure 4 It is a structural block diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0021] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of the embodiments. It should be understood that these descriptions are only exemplary and are not intended to limit the scope of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in the field without making creative work should fall within the scope of protection of the present invention.

[0022] Furthermore, in the following description, descriptions of well-known structures and technologies are omitted to avoid unnecessarily obscuring the concepts disclosed in the present invention.

[0023] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the orientation or position relationship indicated by the terms "center", "upper", "lower", "left", "right", "vertical", "horizontal", "inside", "outside", etc. is based on the orientation or position relationship shown in the drawings, which is only for the convenience of describing the present invention and simplifying the description, and does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation of the present invention. In addition, the terms "first", "second", and "third" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. The terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be a connection between the two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0024] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Instead, they are merely examples of methods and systems consistent with some aspects of the present invention as detailed in the appended claims.

[0025] In the field of network device configuration management, the current mainstream configuration management methods mainly include manual configuration and script-based automated configuration. The traditional manual configuration method relies on network administrators to configure devices item by item according to the command manual provided by the manufacturer. Although this method is simple and direct, it is easy to cause configuration errors, difficult to manage, and inefficient when facing complex network environments and multi-vendor devices.

[0026] In order to improve efficiency, some network device management systems have introduced script-based automated configuration methods. This method automatically executes configuration commands by writing script files, usually using the scripting language or command line tools provided by the manufacturer. This method can reduce the workload of manual configuration and improve the speed and accuracy of configuration. However, script-based automated configuration still faces the following problems: 1. Manufacturer-specific command language: Network devices from different manufacturers often use their own specific configuration commands and syntax. Although network administrators can achieve automation by writing scripts from different manufacturers, this method does not have good compatibility in a multi-vendor environment. Every time the device manufacturer or model is switched, the administrator needs to rewrite or adjust the script. 2. Configuration consistency problem: Even in devices from the same manufacturer, devices of different models or versions may have different configuration requirements and command formats. This makes configuration consistency a difficult problem to solve during management and maintenance. Configuration files between different devices may not be directly universal, which increases the complexity of management. 3. Configuration file conversion problem: When faced with scenarios where configuration file conversion between devices is required, existing technologies often rely on manual intervention to achieve it. This method is time-consuming and error-prone, especially in a cross-vendor device environment. Errors in the conversion process may lead to inconsistent network configuration or abnormal device functions. 4. Lack of cross-vendor automation support: Existing automated configuration methods mainly rely on vendor-specific scripts or command languages, and lack a universal mechanism to achieve configuration automation and compatibility between devices from different vendors. This means that in a multi-vendor environment, configuration management and conversion work still requires a lot of manual intervention and adjustment. 5. Insufficient standardization: Although there are some network management standards, in terms of specific configuration management, there is a lack of a unified standardized model to support cross-vendor configuration data exchange and conversion. This limits the flexibility and scalability of the configuration management system. 6. High error rate and low efficiency: Existing methods often require manual intervention during the configuration conversion process, resulting in high error rates and low efficiency. This situation is particularly prominent when facing complex network environments and multi-device scenarios.

[0027] To this end, the present invention proposes an automated conversion method, system and related equipment for cross-vendor network device configurations. Specifically, the automated conversion method, system and related equipment for cross-vendor network device configurations of an embodiment of the present invention are described below with reference to the accompanying drawings.

[0028] Figure 1It is a flow chart of an automated conversion method for cross-vendor network device configuration according to an embodiment of the present invention. It should be noted that the automated conversion method for cross-vendor network device configuration in the embodiment of the present invention can be applied to the automated conversion system for cross-vendor network device configuration in the embodiment of the present invention. The automated conversion system for cross-vendor network device configuration can be configured on an electronic device or in a server. This embodiment of the present application does not limit this.

[0029] like Figure 1 As shown, the automated conversion method for cross-vendor network device configuration includes:

[0030] S110, obtaining a command database.

[0031] In an embodiment of the present invention, a command database includes task group management, command data storage, parameter and instance configuration, and task group and YANG model mapping, wherein the task group management is used to record the command groups required to complete the configuration tasks, each task group corresponds to a configuration function, the command data storage is used to store the configuration commands in each task group, the parameter and instance configuration is used to record the configuration command parameters and the instances of the configuration commands, and the task group and YANG model mapping is used to record the correspondence between the task group and the YANG model.

[0032] Each task group includes multiple configuration commands, each configuration command includes multiple parameters, and each configuration command includes multiple configuration instances, and each task group maps one or more YANG models.

[0033] Among them, the task group includes the task group name, description and the correspondence with the YANG model. Through this structure, the task group can combine related commands to complete specific configuration tasks; the command data storage includes the command name, function description, keywords, parameters and their descriptions. The command data storage ensures that the function and usage of each configuration command are clearly recorded. These data can accurately reflect the configuration requirements of each manufacturer's equipment. The effective version range and source documents of the command are also stored together to ensure the accuracy and traceability of the command; the parameter and instance configuration include the name, description, type and possible value range of each parameter, which can provide a detailed understanding of the usage and specific parameter configuration of each command; the mapping between the task group and the YANG model can ensure that the configuration commands of different manufacturers can be standardized and converted into the YANG model. The correspondence and version information between the task group and the YANG model are recorded. The mapping relationship defines how to convert the configuration commands in the task group into the standardized YANG model format, providing basic support for the automatic conversion of cross-vendor configurations.

[0034] In an embodiment of the present invention, the command database also includes description documents, version management and document source records, wherein the description documents are used to store detailed description documents of task groups, commands and parameters for guiding configuration and conversion. The detailed description documents provide comprehensive information on the use of configuration and commands to ensure that users have a basis to rely on during the configuration process. Version management is used to handle the differences between commands and task groups of different versions to ensure compatibility and accuracy. Through version management, users can flexibly switch and manage between commands and task groups of different versions. The document source record is used to record the source manufacturer document information of each command to ensure the reliability and traceability of the data source. Through the document source record, users can understand the specific source and usage background of each command.

[0035] S120, obtaining a manufacturer's command manual, automatically extracting target configuration command data in the manufacturer's command manual, and filling the target configuration command data into a command database to obtain a target command database.

[0036] In an embodiment of the present invention, a manufacturer's command manual can be obtained, the text content in the manufacturer's command manual can be determined, and then the target configuration command data can be extracted by preprocessing the text content and parsing it through a BERT language model, and then the target configuration command data can be filled into a subcommand database to obtain a target command database. The specific implementation method can refer to the subsequent embodiments.

[0037] S130, parsing the target configuration file of the target device based on the target command database to obtain command information of the target configuration file.

[0038] In the embodiment of the present invention, the command information of the target configuration file is obtained by matching the command information of the target command database with the command information in the target configuration file. The specific implementation method can refer to the subsequent embodiments.

[0039] S140, converting the command information into a YANG model file, and converting the YANG model file into a configuration file of a target manufacturer's device.

[0040] According to the automatic conversion method of cross-vendor network device configuration of the embodiment of the present invention, a command database is obtained; a vendor command manual is obtained, and target configuration command data in the vendor command manual is automatically extracted, and the target configuration command data is filled into the command database to obtain a target command database; a target configuration file of the target device is parsed based on the target command database to obtain command information of the target configuration file; the command information is converted into a YANG model file, and the YANG model file is converted into a configuration file of the target vendor device. The method realizes the automatic conversion of device configurations of different vendors, reduces the need for manual intervention, improves the efficiency and accuracy of configuration management, and reduces errors caused by manual operations.

[0041] In order to make it easier for those skilled in the art to understand the present invention, Figure 2 is an automated conversion method for cross-vendor network device configuration according to a specific embodiment of the present invention, such as Figure 2 As shown, the automatic conversion method of the cross-vendor network device configuration includes:

[0042] S210, acquiring a command database.

[0043] In an embodiment of the present invention, a command database includes task group management, command data storage, parameter and instance configuration, and task group and YANG model mapping, wherein the task group management is used to record the command groups required to complete the configuration tasks, each task group corresponds to a configuration function, the command data storage is used to store the configuration commands in each task group, the parameter and instance configuration is used to record the configuration command parameters and the instances of the configuration commands, and the task group and YANG model mapping is used to record the correspondence between the task group and the YANG model.

[0044] Among them, the task group management includes a task group table, as shown in Table 1, which is used to store information of different task groups, including task group ID, device manufacturer, device category, device model, task group version and description, etc.

[0045] Field Name type length Chinese instructions TaskGroupID int - Primary key, task group ID Vendor varchar 100 Equipment Manufacturer DeviceType varchar 100 Equipment Category Model varchar 100 Device Model Version varchar 50 Task Group Version Description varchar 500 Task Group Description

[0046] Table 1

[0047] The command data storage includes a command table, as shown in Table 2. The command table is used to store specific configuration commands in the task group, including command ID, task group ID, command keyword, function description, valid version range and source document.

[0048] Field Name type length Chinese instructions CommandID int - Primary key, command ID TaskGroupID int - Foreign key, task group ID Keyword varchar 100 Command Keywords Function Description varchar 500 Command Function Description ValidFromVersion varchar 50 Start of effective version ValidToVersion varchar 50 End of valid version SourceDoc varchar 200 Command source documentation

[0049] Table 2

[0050] Among them, the parameter and instance configuration includes a parameter table, as shown in Table 3, which is used to store parameter information of each command, including parameter ID, command ID, parameter name, type, default value, value range and description.

[0051] Field Name type length Chinese instructions ParameterID int - Primary key, parameter ID CommandID int - Foreign key, command ID Name varchar 100 Parameter name Type varchar 50 Parameter Type DefaultValue varchar 100 default value Description varchar 500 Parameter Description

[0052] Table 3

[0053] The parameter and instance configuration includes a configuration instance table, as shown in Table 4. The configuration instance table is used to store specific instances of configuration commands and provide configuration examples in actual use.

[0054] Field Name type length Chinese instructions ExampleID int - Primary key, instance ID CommandID int - Foreign key, command ID ExampleConfig text - Configuration Example

[0055] Table 4

[0056] The mapping between the task group and the YANG model includes a mapping table, as shown in Table 5. The mapping table is used to store the corresponding relationship between the task group and the YANG model, including a mapping ID, a task group ID, a task group version, and a YANG model ID and version.

[0057] Field Name type length Chinese instructions MappingID int - Primary key, mapping ID TaskGroupID int - Foreign key, task group ID TaskGroupVersion varchar 50 Task Group Version YangModelID int - Foreign key, YANG model ID YangModelVersion varchar 50 YANG model version

[0058] Table 5

[0059] The mapping between the task group and the YANG model includes a YANG model table, as shown in Table 6. The YANG model table is used to store the content and description of the YANG model.

[0060] Field Name type length Chinese instructions YangModelID int - Primary key, YANG model ID Version varchar 50 YANG model version Content text - YANG model content Description varchar 500 describe

[0061] Table 6

[0062] The command database also includes a description document table, as shown in Table 7. The command database is used to store detailed description documents of task groups, commands and parameters.

[0063] Field Name type length Chinese instructions DocID int - Primary key, document ID TaskGroupID int - Foreign key, task group ID CommandID int - Foreign key, command ID ParameterID int - Foreign key, parameter ID Content text - Detailed description

[0064] Table 7

[0065] For example, the relationship between task groups and commands: The TaskGroups table stores task group information. Each task group can contain multiple commands, so there is a one-to-many relationship between the TaskGroups table and the Commands table (TaskGroups.TaskGroupID corresponds to Commands.TaskGroupID).

[0066] Relationship between commands and parameters: The Commands table stores command information. Each command can have multiple parameters, so there is a one-to-many relationship between the Commands table and the Parameters table (Commands.CommandID corresponds to Parameters.CommandID).

[0067] Relationship between commands and instances: The Commands table stores command information. Each command can have multiple configuration instances. Therefore, there is a one-to-many relationship between the Commands table and the Examples table (Commands.CommandID corresponds to Examples.CommandID).

[0068] Mapping relationship between task groups and YANG models: A mapping relationship is established between the TaskGroups table and the YangModels table through the Mappings table. Each task group can be mapped to one or more YANG models. Therefore, the TaskGroups table and the Mappings table have a one-to-many relationship (TaskGroups.TaskGroupID corresponds to Mappings.TaskGroupID), and the Mappings table and the YangModels table also have a one-to-many relationship (Mappings.YangModelID corresponds to YangModels.YangModelID).

[0069] Relationship between task groups, commands and description documents: The Docs table stores detailed description documents of task groups, commands and parameters. There is a one-to-many relationship between the TaskGroups table, the Commands table, and the Parameters table and the Docs table respectively (TaskGroups.TaskGroupID, Commands.CommandID, Parameters.ParameterID correspond to Docs.TaskGroupID, Docs.CommandID, Docs.ParameterID).

[0070] S220, obtaining a manufacturer's command manual, and automatically extracting target configuration command data in the manufacturer's command manual.

[0071] In an embodiment of the present invention, the text content of the manufacturer's command manual is determined; the text content is cleaned to obtain the cleaned target text content; the target text content is parsed using the trained BERT language model to obtain the mapping relationship between the command group, command parameters, command configuration instances, command keywords, command function descriptions, and task groups of the manufacturer's command manual and the YANG model.

[0072] Among them, text cleaning of text content includes: noise removal: clearing irrelevant information in the text content. That is, using regular expressions to identify and delete headers, footers, comments, advertisements, etc.; replacing unnecessary characters and paragraph marks (such as "---", "***", etc.) with empty strings; deleting separators and marks that are not related to the actual content. Standardization: unifying the format and terminology of text content. That is, standardizing the format of date, time, and units, and converting different terms and expressions into unified standard terms. For example, "Router ID" and "Router Identification" are both converted to "Router ID". Processing special symbols and formats: processing special characters and formatting issues. That is, special characters (such as "—", ”) with standard characters; clean irregular spaces, line breaks and format errors. Formatting: Make the text content suitable for subsequent processing. That is, split long paragraphs of text content into sentences and words to ensure that the output text format is consistent and easy for model processing.

[0073] The trained BERT language model is obtained in the following manner: defining labels for word segmentation; performing word segmentation on the target text content, and dividing the target text content after word segmentation into a training data set and a validation set; inputting the labels for defining word segmentation and the training data set into the BERT language model to pre-train the BERT language model; evaluating the pre-trained BERT language model based on the validation set, and adjusting the parameters of the pre-trained BERT language model to obtain the trained BERT language model.

[0074] For example, the labels defining the word segmentation include: 0 for others, 1 for command keywords, and 2 for parameters.

[0075] For example, after pre-training the BERT language model, the pre-trained BERT language model can be evaluated by calculating indicators such as accuracy, recall, and F1 value. The evaluation results can be used to adjust the parameters of the pre-trained BERT language model to optimize the model performance.

[0076] Among them, the model after adjusting the parameters of the pre-trained BERT language model can be used to parse the manufacturer's command manual, and then parse and identify the following content: Command keywords: used to identify and describe the core part of the configuration command, usually the actual command text. For example, configure terminal, router ospf process-id; Command parameters: variable parts of the command, used to pass different values ​​to configure specific options or settings. For example, process-id, ip-address, wildcard-mask, area-id; Command function description: description of the function and purpose of the command. For example, to enable the OSPF function, you need to create an OSPF process first, specify the network address range associated with the process and the area to which the address range belongs; Command configuration example: actual configuration example, showing how to use the command in a specific situation. For example, network10.0.0.0 0.0.0.255area 0; Task group: classify related commands into the same task group for more systematic management and mapping to specific functional modules. For example, OSPF configuration task group; mapping relationship between task group and YANG model: Identify and establish the correspondence between vendor commands and IETF standard YANG model. For example, map router ospfprocess-id to the configuration node of OSPF process in YANG model. The mapping relationship between task group and YANG needs to be completed manually.

[0077] S230, filling the target configuration command data into the command database to obtain the target command database.

[0078] In an embodiment of the present invention, when the mapping relationship between the command group, command parameters, command configuration instances, command keywords, command function descriptions, task groups and YANG models in the manufacturer's command manual is obtained, the mapping relationship between the command group, command parameters, command configuration instances, command keywords, command function descriptions, task groups and YANG models in the manufacturer's command manual can be filled into a command database to obtain a target command database.

[0079] After being filled into the command database, the filled data can be verified to ensure the accuracy and completeness of the filled data.

[0080] S240: Parse the target configuration file of the target device based on the target command database to obtain command information of the target configuration file.

[0081] In an embodiment of the present invention, first command information in a target command database is obtained; second command information of a target configuration file is obtained; and the first command information is matched with the second command information to obtain command information of the target configuration file.

[0082] The first command information includes command description and parameter information.

[0083] That is, the command description and parameter information in the target command database are queried, and then the command description and parameter information are matched with the command information in the target configuration file to obtain the command information of the target configuration file.

[0084] S250: Convert the command information into a YANG model file.

[0085] In an embodiment of the present invention, a YANG model corresponding to the command information is searched from a target command database based on command information, the command information includes but is not limited to the manufacturer, model, and software version corresponding to the target device, wherein the YANG model corresponding to the command information is searched based on a mapping relationship between the task group and the YANG model. Then, the command information is filled into the data node of the YANG model, wherein the filling is performed according to the structure of the YANG model and the data node name, so as to obtain a YANG model file.

[0086] S260, converting the YANG model file into a configuration file of a target manufacturer's device.

[0087] In an embodiment of the present invention, configuration data in a YANG model file is obtained; the manufacturer device command corresponding to the configuration data is searched from a target command database; the configuration data is mapped to the manufacturer device command, and the mapped commands are combined into a configuration file.

[0088] For example, the configuration file of device A of the first manufacturer is converted into a YANG model file, and the YANG model file is converted into the configuration file of device B of the second manufacturer, that is, the configuration file of device A of the first manufacturer is converted into the configuration file of device B of the second manufacturer.

[0089] In a specific embodiment of the present invention, 1. Obtain the manufacturer's command manual: First, it is necessary to obtain the command manual provided by the manufacturer. These manuals may be provided in different formats, such as PDF, HTML, Word documents, etc. They record the configuration commands and instructions of the device in detail. The obtained manual should cover all relevant configuration instructions for the target device and its software version. 2. Text cleaning and preprocessing: After obtaining the command manual, text cleaning and preprocessing are key steps. During the cleaning process, the document format must first be unified and the text content must be extracted into a structured format (such as plain text or HTML). Next, irrelevant instructions, special characters and unnecessary format information are removed to ensure that the text content is clear and consistent. This step is to ensure that subsequent command parsing and model training can be performed on clean input data, thereby improving the effect of the model. 3. Annotation of command format: After the text content is cleaned, the content of the command manual needs to be annotated. The annotated content includes task groups, commands and their parameters, and descriptions of each command. Task groups are usually divided according to the indentation or structure of the command, and the command and its parameters need to be accurately annotated in the text. The annotation results should be stored in a structured data format, such as JSON or CSV files, to facilitate subsequent processing and model training. 4. Prepare fine-tuning dataset: Preparing fine-tuning dataset is the basis for training the model. This step involves dividing the labeled dataset into training set and validation set. The training set is used for actual training of the model, while the validation set is used to evaluate the performance of the model. Make sure that the dataset contains examples of various commands and task groups so that the model can handle different configuration scenarios and improve its robustness in practical applications. 5. Select pre-trained model: Selecting a suitable pre-trained model is a prerequisite for fine-tuning. The BERT model is one of the common choices because of its powerful language understanding ability. In this step, you need to download and load the selected pre-trained model and its weights. The pre-trained model provides a general language understanding foundation, which can be fine-tuned to better adapt to the specific needs of the manufacturer's command manual. 6. Fine-tune the model: Fine-tune the pre-trained model using the prepared dataset. This includes training the model with labeled data and adjusting the model's parameters to adapt to the specific data of the command manual. During the fine-tuning process, you need to set appropriate training parameters, such as learning rate, batch size, etc., to optimize the training effect of the model. During the training process, you should also monitor the performance of the model on the validation set to prevent overfitting and adjust the model parameters. 7. Use the fine-tuned model: After fine-tuning is complete, use the model to make predictions for a new command manual. The model will extract information such as commands, parameters, and instructions from the manual. Using the fine-tuned model, the structure and content of the commands can be accurately identified, and the information in the command manual can be converted into a structured format. 8. Connect to the command database: After extracting the information, establish a connection to the command database. Use a database connection tool (such as SQLAlchemy or SQLite) to insert the extracted data into the command database.This step ensures the storage and management of data, so that subsequent configuration file parsing and conversion can be based on the complete command database. 9. Fill the command database: Fill the commands, parameters and instructions extracted from the model into the corresponding tables of the command database. Insert data into the database according to the fields such as task group, command, parameter and description. Ensure that the data in the database is consistent with the information in the command manual and can accurately reflect the manual content. 10. Verify the database content: After filling, verify the database content to check the accuracy and completeness of all data. The verification process includes comparison with the original command manual to confirm whether the data in the database is consistent with the content in the manual. This step is a key link to ensure data quality. 11. Update and maintain the database: Finally, the command database needs to be updated and maintained regularly to adapt to new command manuals and device models. Back up the database regularly to ensure data security and stability. During the maintenance process, attention should be paid to new configuration requirements and device changes, and the database content should be updated in a timely manner to maintain its effectiveness in actual applications.

[0090] In a specific embodiment of the present invention, the implementation method of cross-vendor configuration files conversion is as follows: 1. Initialization and preparation work, determine the manufacturer, model and software version of the target device, manually specify through parameters or extract from the metadata of the configuration file. Ensure that the configuration file format, command database and YANG model file used are all the latest and compatible with the target device. 2. Configuration file parsing, obtain the configuration file of the target device and perform configuration file parsing. According to the indentation and keyword structure of the configuration file, identify and distinguish different task groups. After the parsing is completed, organize the configuration file content into a structured data format for subsequent processing. 3. Task group and command extraction, extract specific commands and their parameters according to the division of task groups. Use this information to find the corresponding entries in the command database. 4. Command database query, query the extracted commands and parameters through the command database. The command database contains command definitions, parameter descriptions and task group information of devices from different manufacturers. Match the commands in the device configuration file to determine their specific meanings and functions. 5. Map to the YANG model, map the commands and parameters queried from the command database to the YANG model. According to the mapping relationship between the task group and the YANG model recorded in the command database, fill the command and its parameters into the corresponding YANG model node. 6. Generate the YANG model and generate the target YANG model file according to the YANG model specification. Ensure that the final generated YANG model file complies with the YANG specification and can accurately reflect the configuration requirements of the target device. 7. Verify and test, verify and test the generated YANG model file to ensure the accuracy and completeness of its content. Verification includes comparison with the original configuration file, and testing includes application to the actual device to verify whether the model can be successfully applied and meet the configuration requirements. 8. Conversion reverse operation, when the YANG model needs to be converted to a configuration file of a specific manufacturer, parse the YANG model file and extract the configuration commands and parameters. Find the corresponding manufacturer device command through the command database, map the configuration content in the YANG model back to the configuration format of the target device, generate a configuration file that meets the requirements of the target device, and verify and test it. 9. Maintain and update, regularly update the command database and YANG model files to ensure that they can cover the latest device models and configuration commands. During the maintenance process, pay attention to changes in the configuration requirements of the device and adjust and optimize the conversion process in a timely manner.

[0091] According to the automatic conversion method of cross-vendor network device configuration of the embodiment of the present invention, by automatically converting the network device configuration commands of different vendors into a unified YANG model, and then converting it into the configuration file of the target vendor, the workload of manual configuration and conversion is greatly reduced, and the configuration efficiency is improved; the automatic conversion process reduces the errors caused by human operation and improves the accuracy and reliability of the configuration. Through strict database verification and model mapping, the accuracy and consistency of the conversion process are ensured; the configuration flexibility is enhanced: the method supports network devices of multiple vendors and multiple models, and by building and maintaining a comprehensive command database, it can flexibly respond to the configuration requirements of different devices and realize cross-vendor and cross-device configuration conversion; using the YANG model as an intermediate conversion format promotes the standardization of network device configuration. The YANG model is a data modeling language defined by the IETF, which is used to describe the configuration and management information of network devices, helps to achieve interoperability between devices of different vendors, and facilitates the rapid adjustment and expansion of network topology and configuration; through automated configuration conversion, the configuration update cost caused by equipment upgrade, replacement or maintenance is reduced. When the device is updated or upgraded, it only needs to update the corresponding information in the command database to achieve rapid conversion of the configuration. This method can handle complex configuration tasks. Through task group management, related commands are classified into the same task group, which is convenient for more systematic management and mapping to specific functional modules. At the same time, through detailed parameter and instance configuration, it supports complex configuration scenarios and requirements. The design of the command database and YANG model is scalable, and new manufacturers, device models and configuration commands can be easily added to adapt to the ever-changing network environment and device requirements.

[0092] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods of each embodiment of the present application.

[0093] According to one aspect of an embodiment of the present invention, a system for automatically converting cross-vendor network device configurations is also provided. Figure 3 is a structural block diagram of an automatic conversion system for cross-vendor network device configuration according to an embodiment of the present invention; Figure 3 As shown, including:

[0094] An acquisition module 310 is used to acquire a command database;

[0095] A first obtaining module 320 is used to obtain a manufacturer's command manual, automatically extract target configuration command data in the manufacturer's command manual, and fill the target configuration command data into the command database to obtain a target command database;

[0096] A second obtaining module 330 is used to parse the target configuration file of the target device based on the target command database to obtain command information of the target configuration file;

[0097] The conversion module 340 is used to convert the command information into a YANG model file, and convert the YANG model file into a configuration file of a target manufacturer's device.

[0098] According to the automatic conversion system of cross-vendor network device configuration of the embodiment of the present invention, a command database is obtained; a vendor command manual is obtained, and target configuration command data in the vendor command manual is automatically extracted, and the target configuration command data is filled into the command database to obtain a target command database; a target configuration file of the target device is parsed based on the target command database to obtain command information of the target configuration file; the command information is converted into a YANG model file, and the YANG model file is converted into a configuration file of the target vendor device. In this way, the automatic conversion of device configurations of different vendors is realized, the need for manual intervention is reduced, the efficiency and accuracy of configuration management are improved, and errors caused by manual operations are reduced.

[0099] Optionally, the command database includes task group management, command data storage, parameter and instance configuration, and mapping of task groups to the YANG model, wherein the task group management is used to record the command groups required to complete the configuration tasks, each task group corresponds to a configuration function, the command data storage is used to store the configuration commands in each of the task groups, the parameter and instance configuration is used to record the configuration command parameters and the instances of the configuration commands, and the mapping of task groups to the YANG model is used to record the correspondence between the task groups and the YANG model.

[0100] Optionally, each of the task groups includes a plurality of the configuration commands, each of the configuration commands includes a plurality of parameters, and each of the configuration commands includes a plurality of configuration instances, and each of the task groups maps one or more of the YANG models.

[0101] Optionally, the first obtaining module 320 is specifically used to determine the text content of the manufacturer's command manual; perform text cleaning on the text content to obtain the cleaned target text content; use the trained BERT language model to parse the target text content to obtain the mapping relationship between the command group, command parameters, command configuration instances, command keywords, command function descriptions, and task groups of the manufacturer's command manual and the YANG model.

[0102] Optionally, the first obtaining module 320 is specifically used to obtain the trained BERT language model in the following manner: define a label for word segmentation; perform word segmentation on the target text content, and divide the target text content after word segmentation into a training data set and a verification set; input the label for defining word segmentation and the training data set into the BERT language model to pre-train the BERT language model; evaluate the pre-trained BERT language model based on the verification set, and adjust the parameters of the pre-trained BERT language model to obtain the trained BERT language model.

[0103] Optionally, the second obtaining module 330 is specifically used to obtain the first command information in the target command database; obtain the second command information of the target configuration file; match the first command information with the second command information to obtain the command information of the target configuration file.

[0104] Optionally, the conversion module 340 is specifically used to obtain the configuration data in the YANG model file; search the manufacturer device command corresponding to the configuration data from the target command database; map the configuration data to the manufacturer device command, and combine the mapped commands into a configuration file.

[0105] According to one aspect of an embodiment of the present invention, an electronic device is provided.

[0106] Figure 4 Schematic diagram of the structure of an electronic device according to an embodiment of the present invention. Figure 4 As shown, the electronic device may include one or more ( Figure 4 Only one is shown in the figure) processor 102 (processor 102 may include but is not limited to a microprocessor (Microprocessor Unit, referred to as MPU) or a programmable logic device (Programmable logic device, referred to as PLD)) and a memory 104 for storing data. In an exemplary embodiment, the electronic device may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 4The structure shown is for illustration only and does not limit the structure of the above terminal device. Figure 4 More or fewer components as shown, or with Figure 4 Equivalent functions or comparisons shown Figure 4 A different configuration with more features is shown.

[0107] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the automatic conversion method of the cross-vendor network device configuration in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the terminal device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0108] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the switching device. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0109] The present invention provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable the computer to execute an automated conversion method for cross-vendor network device configuration.

[0110] The applicant of the present invention has made a detailed explanation and description of the implementation examples of the present invention in conjunction with the drawings in the specification. However, those skilled in the art should understand that the above implementation examples are only preferred implementation schemes of the present invention, and the detailed description is only to help readers better understand the spirit of the present invention, but not to limit the scope of protection of the present invention. On the contrary, any improvements or modifications based on the inventive spirit of the present invention should fall within the scope of protection of the present invention.

[0111] In addition, each functional unit in each embodiment of the present invention may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.

[0112] The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, etc. Although the embodiments of the present invention have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limiting the present invention. A person of ordinary skill in the art may change, modify, replace and modify the above embodiments within the scope of the present invention.

[0113] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the embodiments of the present invention, rather than to limit them. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions recorded in the above embodiments, or replace some of the technical features therein by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention. Any changes or replacements that can be easily thought of by those skilled in the art within the technical scope disclosed in the present invention should be covered within the protection scope of the present invention.

Claims

1. A method for automatic conversion of cross-vendor network device configuration, characterized in that: include: S1, obtain command database; S2, obtaining a manufacturer's command manual, automatically extracting target configuration command data in the manufacturer's command manual, and filling the target configuration command data into the command database to obtain a target command database; S3, parsing the target configuration file of the target device based on the target command database to obtain command information of the target configuration file; S4, converting the command information into a YANG model file, and converting the YANG model file into a configuration file of a target manufacturer's device.

2. The method for automatic conversion of cross-vendor network device configuration according to claim 1, characterized in that: The command database includes task group management, command data storage, parameter and instance configuration, and mapping between task group and the YANG model, wherein the task group management is used to record the command group required to complete the configuration task, each task group corresponds to a configuration function, the command data storage is used to store the configuration commands in each of the task groups, the parameter and instance configuration is used to record the configuration command parameters and the instances of the configuration commands, and the mapping between task group and the YANG model is used to record the corresponding relationship between the task group and the YANG model.

3. The method for automatic conversion of cross-vendor network device configuration according to claim 2, characterized in that: Each of the task groups includes a plurality of the configuration commands, each of the configuration commands includes a plurality of parameters, and each of the configuration commands includes a plurality of configuration instances, and each of the task groups maps one or more of the YANG models.

4. The method for automatic conversion of cross-vendor network device configuration according to claim 1, characterized in that: Automatically extract the target configuration command data in the manufacturer's command manual, including: determining the text content of the vendor command manual; Performing text cleaning on the text content to obtain cleaned target text content; The trained BERT language model is used to parse the target text content to obtain the mapping relationship between the command group, command parameters, command configuration instances, command keywords, command function descriptions, task groups and YANG models of the manufacturer's command manual.

5. The method for automatic conversion of cross-vendor network device configuration according to claim 4, characterized in that: The trained BERT language model is obtained by: Define the tags for the word segmentation; Segmenting the target text content, and dividing the target text content after segmentation into a training data set and a verification set; Inputting the label of the defined word segmentation and the training data set into the BERT language model to pre-train the BERT language model; The pre-trained BERT language model is evaluated based on the validation set, and parameters of the pre-trained BERT language model are adjusted to obtain the trained BERT language model.

6. The method for automatic conversion of cross-vendor network device configuration according to claim 1, characterized in that: Parsing a target configuration file of a target device based on the target command database to obtain command information of the target configuration file includes: Acquire first command information from the target command database; Acquire second command information of the target configuration file; The first command information is matched with the second command information to obtain the command information of the target configuration file.

7. The method for automatic conversion of cross-vendor network device configuration according to claim 1, characterized in that: Convert the YANG model file to the configuration file of the target manufacturer's device, including: Obtain configuration data in the YANG model file; Searching the target command database for the manufacturer's device command corresponding to the configuration data; The configuration data is mapped to the manufacturer's device commands, and the mapped commands are combined into a configuration file.

8. An automated conversion system for cross-vendor network device configuration, characterized in that: include: An acquisition module, used to acquire a command database; The first obtaining module is used to obtain the manufacturer's command manual, automatically extract the target configuration command data in the manufacturer's command manual, and fill the target configuration command data into the command database to obtain the target command database; A second obtaining module is used to parse the target configuration file of the target device based on the target command database to obtain command information of the target configuration file; The conversion module is used to convert the command information into a YANG model file, and convert the YANG model file into a configuration file of a target manufacturer's device.

9. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 7.

Citation Information

Cited By

  • Switch automatic configuration method and system, and medium

    CN120710861A

  • Support device

    WO2026176516A1