CN115065594A - Data configuration method, device, equipment, readable storage medium and program product - Google Patents

Data configuration method, device, equipment, readable storage medium and program product Download PDF

Info

Publication number
CN115065594A
CN115065594A CN202210646006.0A CN202210646006A CN115065594A CN 115065594 A CN115065594 A CN 115065594A CN 202210646006 A CN202210646006 A CN 202210646006A CN 115065594 A CN115065594 A CN 115065594A
Authority
CN
China
Prior art keywords
tree structure
service
configuration
determining
business model
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210646006.0A
Other languages
Chinese (zh)
Other versions
CN115065594B (en
Inventor
李青川
刘椿
欧阳晔
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Asiainfo Technologies China Inc
Original Assignee
Asiainfo Technologies China Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Asiainfo Technologies China Inc filed Critical Asiainfo Technologies China Inc
Priority to CN202210646006.0A priority Critical patent/CN115065594B/en
Publication of CN115065594A publication Critical patent/CN115065594A/en
Application granted granted Critical
Publication of CN115065594B publication Critical patent/CN115065594B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0889Techniques to speed-up the configuration process

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the application provides a data configuration method, a data configuration device, readable storage medium and a program product, and relates to the field of network management. The method comprises the following steps: acquiring a modeling language file of target equipment; determining a tree structure corresponding to a modeling language file of target equipment; determining a business model matched with the tree structure in the business model set based on the tree structure and a preset business model set; determining configuration data of target equipment based on the tree structure and a business model matched with the tree structure; therefore, by determining the configuration data of the target device, a network management user does not need to be familiar with the device configuration parameters and distinguish the device configuration any more, and only needs to understand the network configuration from the service model, so that the complexity and error probability of network management are reduced, and the management efficiency of the network configuration is improved.

Description

Data configuration method, device, equipment, readable storage medium and program product
Technical Field
The present application relates to the field of computer technologies, and in particular, to a data configuration method, apparatus, device, readable storage medium, and program product.
Background
In the prior art, a Network Configuration Protocol (Netconf) provides a set of mechanisms for managing Network devices, and a user can add, modify, and delete configurations of the Network devices by using the set of mechanisms to obtain Configuration and state information of the Network devices. Compared with other Network configuration management protocols, Netconf is widely applied to centralized control of an SDN (Software Defined Network) due to its good functionality and expansibility, and one of the most significant features in an SDN architecture is to use a centralized controller.
When a centralized controller manages a network with a large number of different devices by using Netconf, managers need to read product documents of different network devices, know different YANG models of manufacturers, devices and software versions, select a correct YANG model according to specific devices, and organize correct XML configuration of extensible markup language (XML) to be issued to the devices, but the above process is very difficult to implement. In order to solve the problem of difficulty in implementing the above process, the currently adopted solution is: the YANG model of the southbound device is mapped to the northbound interface based on a general purpose controller (e.g., Open dayright). The scheme obtains a YANG model of the equipment through connection negotiation between the universal controller and the network equipment, then the universal controller automatically analyzes the YANG model of the equipment and maps the model into a northbound Restful + JSON interface; therefore, when the network manager selects the configuration equipment, the differential YANG model does not need to be analyzed, the XML configuration message does not need to be organized, and only the parameters of JSON displayed in the north direction need to be directly configured; however, this solution requires the user to know what configuration on the device corresponds to the parameters in the northbound JSON, and needs to distinguish the differences between different vendors, the differences between different device types, and the differences between different software versions, thereby resulting in inefficient management of network configurations.
Disclosure of Invention
The present application provides a data configuration method, apparatus, device, computer-readable storage medium, and computer program product, which are used to solve the problem of how to improve the management efficiency of network configuration.
In a first aspect, the present application provides a data configuration method, including:
acquiring a modeling language file of target equipment;
determining a tree structure corresponding to a modeling language file of target equipment;
determining a business model matched with the tree structure in the business model set based on the tree structure and a preset business model set;
and determining the configuration data of the target equipment based on the tree structure and the business model matched with the tree structure.
In one embodiment, determining a business model in the business model set, which matches the tree structure, based on the tree structure and a preset business model set includes:
and aiming at one service model in a preset service model set, if relevant information of equipment included in the service model is the same as relevant information of target equipment in the tree structure, determining that the service model is matched with the tree structure.
In one embodiment, determining the configuration data of the target device based on the tree structure and the business model matched with the tree structure includes:
setting each service parameter at a corresponding position in a tree structure based on the position information of each service parameter in a service model matched with the tree structure to obtain the tree structure filled with the service parameters;
cutting the tree structure filled with the service parameters to obtain a cut tree structure;
and converting the cut tree structure into configuration data of the target equipment.
In one embodiment, the step of setting each service parameter at a corresponding position in the tree structure based on the position information of each service parameter in the service model matched with the tree structure to obtain the tree structure filled with the service parameters includes:
based on the position information of each service parameter in the service model matched with the tree structure, setting each service parameter at a corresponding position in the tree structure to obtain a single sub-tree corresponding to each service parameter;
and merging the single subtrees to obtain the tree structure filled with the service parameters.
In one embodiment, the configuration data of the target device is an extensible markup language message that conforms to a content layer format in a network configuration protocol.
In one embodiment, obtaining a modeling language file for a target device includes:
and acquiring a modeling language file of the target equipment through a network configuration protocol.
In a second aspect, the present application provides a data configuration apparatus, including:
the first processing module is used for acquiring a modeling language file of the target equipment;
the second processing module is used for determining a tree structure corresponding to the modeling language file of the target equipment;
the third processing module is used for determining a business model matched with the tree structure in the business model set based on the tree structure and a preset business model set;
and the fourth processing module is used for determining the configuration data of the target equipment based on the tree structure and the service model matched with the tree structure.
In a third aspect, the present application provides an electronic device, comprising: a processor, a memory, and a bus;
a bus for connecting the processor and the memory;
a memory for storing operating instructions;
and the processor is used for executing the data configuration method of the first aspect of the application by calling the operation instruction.
In a fourth aspect, the present application provides a computer-readable storage medium storing a computer program for executing the data arrangement method of the first aspect of the present application.
In a fifth aspect, the present application provides a computer program product comprising a computer program which, when executed by a processor, performs the steps of the data arrangement method of the first aspect of the present application.
The technical scheme provided by the embodiment of the application has at least the following beneficial effects:
acquiring a modeling language file of target equipment; determining a tree structure corresponding to a modeling language file of target equipment; determining a business model matched with the tree structure in the business model set based on the tree structure and a preset business model set; determining configuration data of target equipment based on the tree structure and a business model matched with the tree structure; therefore, by determining the configuration data of the target device, a network management user does not need to be familiar with the device configuration parameters and distinguish the device configuration any more, and only needs to understand the network configuration from the service model, so that the complexity and error probability of network management are reduced, and the management efficiency of the network configuration is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings used in the description of the embodiments of the present application will be briefly described below.
FIG. 1 is a schematic diagram of a data configuration system architecture according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a data configuration method according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a data configuration provided by an embodiment of the present application;
fig. 4 is a schematic flowchart of another data configuration method according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a data configuration provided by an embodiment of the present application;
fig. 6 is a schematic structural diagram of a data configuration apparatus according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
Embodiments of the present application are described below in conjunction with the drawings in the present application. It should be understood that the embodiments set forth below in connection with the drawings are exemplary descriptions for explaining technical solutions of the embodiments of the present application, and do not limit the technical solutions of the embodiments of the present application.
As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should be further understood that the terms "comprises" and/or "comprising," when used in this specification in connection with embodiments of the present application, specify the presence of stated features, information, data, steps, operations, elements, and/or components, but do not preclude the presence or addition of other features, information, data, steps, operations, elements, components, and/or groups thereof, as embodied in the art. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may be present. Further, "connected" or "coupled" as used herein may include wirelessly connected or wirelessly coupled. The term "and/or" as used herein indicates at least one of the items defined by the term, e.g., "a and/or B" indicates either an implementation as "a", or an implementation as "B", or an implementation as "a and B".
It is understood that in the specific implementation of the present application, data related to data configuration is referred to, when the above embodiments of the present application are applied to specific products or technologies, user permission or consent needs to be obtained, and the collection, use and processing of the related data need to comply with relevant laws and regulations and standards of relevant countries and regions.
To make the objects, technical solutions and advantages of the present application more clear, embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
The embodiment of the application relates to a data configuration method provided by a data configuration system, and relates to the fields of network management and the like.
For better understanding and description of the embodiments of the present application, some technical terms used in the embodiments of the present application will be briefly described below.
And (5) Netconf: netconf provides a set of mechanisms for managing network devices, which can be used by a user to add, modify or delete the configuration of the network devices and acquire the configuration and state information of the network devices; through Netconf, the network device can provide a complete set of standardized APIs (Application Programming Interface), and the Application program can directly use these APIs to issue and obtain configuration to the network device; netconf is based on XML completely, all configuration data and protocol messages are represented by XML, and XML can express complex modeled management objects with inherent logical relationships; netconf uses a layered structure (transport layer, message layer, operation layer and content layer), the configuration data and protocol messages of the content layer are represented by XML, and the XML can express complex modeled management objects with inherent logical relationship; compared with the traditional network equipment configuration mode, through Netconf configuration, the configuration of equipment is changed from the traditional command to the configuration of equipment after artificially learning a product manual to the learning of a configuration tree, and an XML configuration is compiled to configure the equipment.
YANG: YANG is a language used to build data models; YANG is used to model configuration data, state data, remote procedure calls and notifications used by network configuration management protocols (e.g., Netconf, restcon f); a YANG model, i.e., a YANG file, is formed by YANG describing data structures, data integrity constraints, and data operations.
The solution provided in the embodiment of the present application relates to a network management technology, and the following describes the technical solution of the present application in detail with specific embodiments. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
In order to better understand the scheme provided by the embodiment of the present application, the scheme is described below with reference to a specific application scenario.
In an embodiment, fig. 1 is a schematic diagram illustrating a data configuration system architecture to which the embodiment of the present application is applicable, and it is understood that the data configuration method provided by the embodiment of the present application may be applicable to, but is not limited to, the application scenario shown in fig. 1.
In this example, as shown in fig. 1, the data configuration system architecture in this example may include, but is not limited to, a controller in a server, such as a network controller, and a network device in an SDN network, such as an a vendor router, an a vendor switch, a B vendor router, a B vendor switch, a C vendor new router, a C vendor old router, and the like. The controller acquires a modeling language file of each of at least two target devices (network devices), wherein the modeling language files are such as a YANG model A, YANG model B, YANG model C, YANG model D, YANG model E, YANG model F and the like; the controller determines a tree structure corresponding to the modeling language file of each target device; the controller determines a business model matched with the tree structure in the business model set based on the tree structure and a preset business model set; the controller determines configuration data (unified configuration) of each target device based on the tree structure and the service model matched with the tree structure; the controller sends configuration data to each target device. The controller and the network equipment are communicated through Netconf.
It is understood that the above is only an example, and the present embodiment is not limited thereto.
The server may be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, or a cloud server or a server cluster providing basic cloud computing services such as a cloud service, a cloud database, cloud computing, a cloud function, cloud storage, a Network service, cloud communication, a middleware service, a domain name service, a security service, a CDN (Content Delivery Network), a big data and artificial intelligence platform, and the like.
Referring to fig. 2, fig. 2 shows a flowchart of a data configuration method provided in an embodiment of the present application, where the method may be executed by any electronic device, such as a server, a controller in the server, and as an alternative implementation, the method may be executed by the server or the controller in the server. As shown in fig. 2, the data configuration method provided in the embodiment of the present application includes the following steps:
s201, obtaining a modeling language file of the target device.
Specifically, as shown in fig. 1, the target device may be a network device, such as an a vendor router, an a vendor switch, a B vendor router, a B vendor switch, a C vendor new router, a C vendor old router, and the like, where the a vendor router, the a vendor switch, the B vendor router, the B vendor switch, the C vendor new router, and the C vendor old router are different types of network devices. The modeling language file may be a YANG model, i.e., a YANG file; modeling language documents such as YANG model A, YANG model B, YANG model C, YANG model D, YANG model E, YANG model F, and the like. Each type of network device corresponds to a modeling language file. The controller may be a network controller and the controller may be in a server.
As shown in fig. 3, the controller includes a service model, a Netconf communication module, a YANG model parsing module, a service model and YANG model adapting module, a data conversion module, and the like. Wherein:
(1) and (3) a service model: the service model of network configuration is a model of services which can be configured on the network through a controller during network management, such as L3VPN services, SR-TE tunnel services, internet sub-interfaces and the like; by fixing parameters to be configured for various services through service modeling, a User can perform network management through a User Interface (UI) only by knowing the specific meanings of the services and the parameters.
(2) A Netconf communication module: the support module for the controller to perform Netconf communication with the network device can establish and maintain Netconf connection between the controller and the network device, and support acquisition of network device data and RPC (Remote Procedure Call) by sending and receiving xml (Netconf message) messages.
(3) YANG model analysis module: the controller obtains a YANG model of the network equipment through the Netconf communication module, and the YANG model analysis module analyzes the YANG model to generate a tree structure which is in accordance with the YANG model and is the basis for converting the business model into XML configuration data.
(4) The business model and YANG model adaptation module: the business models and the data models of all network devices in the YANG model adaptation module are organized together, firstly, the business models and the YANG model adaptation module automatically select correct tree structures generated by analyzing the YANG model through preset device information (the device information can be the business models), and then the business models and the YANG model adaptation module combine business model parameters configured by users with the tree structures to form a structural body containing business data; each network device can correspond to a YANG model, that is, each network device can correspond to a tree structure; since the business model can describe the position of the relevant information and business data of the network equipment in the tree structure, one business model and one tree structure can be matched with each other.
(5) The data conversion module: the tree structure including the service data is converted into a Netconf message (in an XML format) in the data conversion module through operations such as merging and cutting, the Netconf message is configuration data of each network device, and the configuration data of each network device is sent to the network device through the Netconf communication module.
S202, determining a tree structure corresponding to the modeling language file of the target device.
Specifically, the target devices may be network devices, and each network device may correspond to a YANG model corresponding to a tree structure, that is, each network device may correspond to a tree structure.
S203, based on the tree structure and the preset service model set, determining the service model matched with the tree structure in the service model set.
Specifically, the service model is configured by a network, and the service model is a model of a service which can be configured by a controller when the network is managed, such as an L3VPN service, an SR-TE tunnel service, an internet sub-interface, and the like; by fixing parameters which are required to be configured for various services through service modeling, a user can carry out network management through the UI only by knowing the specific meanings of the services and the parameters.
S204, determining the configuration data of the target equipment based on the tree structure and the business model matched with the tree structure.
Specifically, the configuration data of the target device may be a Netconf message (XML format), and the configuration data of the target device may be sent to the target device through a Netconf communication module.
In the embodiment of the application, a modeling language file of target equipment is obtained; determining a tree structure corresponding to a modeling language file of target equipment; determining a business model matched with the tree structure in the business model set based on the tree structure and a preset business model set; determining configuration data of target equipment based on the tree structure and a business model matched with the tree structure; therefore, by determining the configuration data of the target device, a network management user does not need to be familiar with the device configuration parameters and distinguish the device configuration any more, and only needs to understand the network configuration from the service model, so that the complexity and error probability of network management are reduced, and the management efficiency of the network configuration is improved.
In one embodiment, determining a business model in the business model set matching with the tree structure based on the tree structure and a preset business model set includes:
and aiming at one service model in a preset service model set, if relevant information of equipment included in the service model is the same as relevant information of target equipment in the tree structure, determining that the service model is matched with the tree structure.
Specifically, as shown in fig. 3, through the service model and YANG model adaptation module, for one service model in the preset service model set, if the relevant information of one network device included in one service model is the same as the relevant information of one network device in the tree structure, it is determined that the service model is the service model matched with the tree structure. The business models and the data models of all network devices in the YANG model adaptation module are organized together, firstly, the business models and the YANG model adaptation module automatically select correct tree structures generated by analyzing the YANG model through device information (the device information can be the business models), and then the business models and the YANG model adaptation module combine business model parameters configured by users with the tree structures to form a structural body containing business data; each network device can correspond to a YANG model, that is, each network device can correspond to a tree structure; since the business model can describe the position of the relevant information and business data of the network equipment in the tree structure, one business model and one tree structure can be matched with each other.
In one embodiment, determining the configuration data of the target device based on the tree structure and the business model matched with the tree structure includes:
setting each service parameter at a corresponding position in a tree structure based on the position information of each service parameter in a service model matched with the tree structure to obtain the tree structure filled with the service parameters;
cutting the tree structure filled with the service parameters to obtain a cut tree structure;
and converting the cut tree structure into configuration data of the target equipment.
Specifically, the controller analyzes the YANG file of the network equipment into a tree-shaped structure and stores the tree-shaped structure; the controller selects a tree structure corresponding to the network equipment according to the configured network equipment; the controller respectively fills the service model parameters into the tree structure, and each parameter is filled to form a single sub-tree; the controller combines the filling results of all the parameters (each parameter in all the parameters corresponds to a single subtree respectively) to form a complete tree which can completely correspond to a YANG file (YANG model); and the controller cuts the complete tree, removes invalid nodes which do not need to be configured, and obtains a final tree structure.
In one embodiment, the step of setting each service parameter at a corresponding position in the tree structure based on the position information of each service parameter in the service model matched with the tree structure to obtain the tree structure filled with the service parameters includes:
based on the position information of each service parameter in the service model matched with the tree structure, setting each service parameter at a corresponding position in the tree structure to obtain a single sub-tree corresponding to each service parameter;
and merging the single subtrees to obtain the tree structure filled with the service parameters.
Specifically, based on the position information of each service parameter in the service model matched with the tree structure, the controller respectively fills the service model parameters (each service parameter) into the tree structure (each service parameter is set at a corresponding position in the tree structure), and the filling of each parameter forms a single sub-tree, namely, the single sub-tree corresponding to each service parameter is obtained; the controller combines the filling results of all the parameters (the single subtrees respectively corresponding to each parameter in all the parameters), namely, the single subtrees are combined to form a complete tree which can completely correspond to the YANG file (YANG model), namely, a tree structure after the business parameters are filled.
In one embodiment, the configuration data of the target device is an extensible markup language message that conforms to a content layer format in a network configuration protocol.
Specifically, the configuration data of the network device is an extensible markup language message XML conforming to a content layer format in a network configuration protocol, where the network configuration protocol may be a Netconf protocol.
In one embodiment, obtaining a modeling language file for a target device includes:
and acquiring a modeling language file of the target equipment through a network configuration protocol.
Specifically, the network configuration protocol may be a Netconf protocol, and the modeling language file, i.e., a YANG file (YANG model), of the target device is acquired through the Netconf protocol.
The application of the embodiment of the application has at least the following beneficial effects:
by determining the configuration data of the network equipment, a network management user does not need to be familiar with the configuration parameters of the network equipment any more and distinguish the configuration of the network equipment any more, and only needs to understand the network configuration from a service model, so that the complexity and the error probability of network management are reduced, and the management efficiency of the network configuration is improved.
For better understanding of the method provided by the embodiment of the present application, the following further describes the scheme of the embodiment of the present application with reference to an example of a specific application scenario.
The method provided by the embodiment of the application can be applied to a network equipment management scene.
In a specific application scenario embodiment, for example, a network device management scenario, see fig. 4, which shows a processing flow of a data configuration method, and as shown in fig. 4, the processing flow of the data configuration method provided in the embodiment of the present application includes the following steps:
s401, the controller establishes a secure shell protocol SSH or a secure transport protocol TLS connection, i.e. a secure transport layer of the Netconf protocol, with the network device (target device) through the Netconf communication module.
S402, the controller acquires the YANG model of the network device through get-config RPC of the operation layer, namely downloading a YANG file to the controller.
S403, the controller stores the YANG file of the network device in the YANG system as a structure that is parsed into a tree.
S404, the user configures the service through the UI, and the service is converted into the service model parameter of the back end through the calling of the front end and the back end.
S405, the controller selects the tree structure corresponding to the network equipment according to the configured network equipment.
S406, the controller respectively fills the service model parameters into the tree structure, and each parameter is filled to form a single sub-tree.
S407, the controller combines the filling results of all the parameters (the single subtree corresponding to each parameter in all the parameters) to form a complete tree that can completely correspond to the YANG file (YANG model).
S408, the controller cuts the complete tree, removes invalid nodes which do not need to be configured, and obtains a final tree structure.
Specifically, as shown in fig. 5, the business model includes business parameters (business model parameters) and parameter positions (name space and position relative to the tree structure) of the business parameters; filling a plurality of service parameters into the tree structure respectively, wherein the intermediate result of a single tree can be generated by filling one service parameter each time; combining the filling results (a plurality of single trees) of a plurality of service parameters into a complete tree; cutting out invalid nodes in the complete tree through an algorithm; and converting the cut tree comprising a plurality of service parameters needing to be configured into an XML message conforming to the Netconf protocol content layer format.
S409, the controller converts the final tree structure into a content layer data XML (configuration data of the target device) of a Netconf protocol, and sends the XML to the network device through the Netconf communication module.
The application of the embodiment of the application has at least the following beneficial effects:
abstracting management of the SDN network into a service domain; changing the network management originally based on the network equipment parameter configuration into the network management driven by the service model through the modeling of the service and the automatic adaptation of the YANG model configured by the service and the network equipment; the network management user does not need to be familiar with the configuration parameters of the network equipment any more and distinguish the configuration of the network equipment any more, and only needs to understand the network configuration from the service model, so that the complexity and the error probability of network management are reduced, and the management efficiency of the network configuration is improved.
The embodiment of the present application further provides a data configuration apparatus, a schematic structural diagram of the data configuration apparatus is shown in fig. 6, and the data configuration apparatus 70 includes a first processing module 701, a second processing module 702, a third processing module 703 and a fourth processing module 704.
A first processing module 701, configured to obtain a modeling language file of a target device;
a second processing module 702, configured to determine a tree structure corresponding to the modeling language file of the target device;
a third processing module 703, configured to determine, based on the tree structure and a preset service model set, a service model in the service model set that matches the tree structure;
a fourth processing module 704, configured to determine configuration data of the target device based on the tree structure and the service model matched with the tree structure.
In an embodiment, the third processing module 703 is specifically configured to:
and aiming at one service model in a preset service model set, if relevant information of equipment included in the service model is the same as relevant information of target equipment in the tree structure, determining that the service model is matched with the tree structure.
In an embodiment, the fourth processing module 704 is specifically configured to:
setting each service parameter at a corresponding position in a tree structure based on the position information of each service parameter in a service model matched with the tree structure to obtain the tree structure filled with the service parameters;
cutting the tree structure filled with the service parameters to obtain a cut tree structure;
and converting the cut tree structure into configuration data of the target equipment.
In an embodiment, the fourth processing module 704 is specifically configured to:
based on the position information of each service parameter in the service model matched with the tree structure, setting each service parameter at a corresponding position in the tree structure to obtain a single sub-tree corresponding to each service parameter;
and merging the single subtrees to obtain the tree structure filled with the service parameters.
In one embodiment, the configuration data of the target device is an extensible markup language message that conforms to a content layer format in a network configuration protocol.
In an embodiment, the first processing module 701 is specifically configured to:
and acquiring a modeling language file of the target equipment through a network configuration protocol.
The application of the embodiment of the application has at least the following beneficial effects:
acquiring a modeling language file of target equipment; determining a tree structure corresponding to a modeling language file of target equipment; determining a business model matched with the tree structure in the business model set based on the tree structure and a preset business model set; determining configuration data of target equipment based on the tree structure and a business model matched with the tree structure; therefore, by determining the configuration data of the target device, a network management user does not need to be familiar with the device configuration parameters and distinguish the device configuration any more, and only needs to understand the network configuration from the service model, so that the complexity and error probability of network management are reduced, and the management efficiency of the network configuration is improved.
An embodiment of the present application further provides an electronic device, a schematic structural diagram of the electronic device is shown in fig. 7, and an electronic device 4000 shown in fig. 7 includes: a processor 4001 and a memory 4003. Processor 4001 is coupled to memory 4003, such as via bus 4002. Optionally, the electronic device 4000 may further include a transceiver 4004, and the transceiver 4004 may be used for data interaction between the electronic device and other electronic devices, such as transmission of data and/or reception of data. In addition, the transceiver 4004 is not limited to one in practical applications, and the structure of the electronic device 4000 is not limited to the embodiment of the present application.
The Processor 4001 may be a CPU (Central Processing Unit), a general-purpose Processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other Programmable logic device, a transistor logic device, a hardware component, or any combination thereof. Which may implement or perform the various illustrative logical blocks, modules, and circuits described in connection with the disclosure. The processor 4001 may also be a combination that performs a computing function, e.g., comprising one or more microprocessors, a combination of DSPs and microprocessors, etc.
Bus 4002 may include a path that carries information between the aforementioned components. The bus 4002 may be a PCI (Peripheral Component Interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, or the like. The bus 4002 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in FIG. 7, but this is not intended to represent only one bus or type of bus.
The Memory 4003 may be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical Disc storage, optical Disc storage (including Compact Disc, laser Disc, optical Disc, digital versatile Disc, blu-ray Disc, etc.), a magnetic Disc storage medium, other magnetic storage devices, or any other medium that can be used to carry or store a computer program and that can be Read by a computer, without limitation.
The memory 4003 is used for storing computer programs for executing the embodiments of the present application, and is controlled by the processor 4001 to execute. The processor 4001 is used to execute computer programs stored in the memory 4003 to implement the steps shown in the foregoing method embodiments.
Among them, electronic devices include but are not limited to: a server, etc.
The application of the embodiment of the application has at least the following beneficial effects:
acquiring a modeling language file of target equipment; determining a tree structure corresponding to a modeling language file of target equipment; determining a business model matched with the tree structure in the business model set based on the tree structure and a preset business model set; determining configuration data of target equipment based on the tree structure and a business model matched with the tree structure; therefore, by determining the configuration data of the target device, a network management user does not need to be familiar with the device configuration parameters and distinguish the device configuration any more, and only needs to understand the network configuration from the service model, so that the complexity and error probability of network management are reduced, and the management efficiency of the network configuration is improved.
Embodiments of the present application provide a computer-readable storage medium, on which a computer program is stored, and when being executed by a processor, the computer program may implement the steps and corresponding contents of the foregoing method embodiments.
Embodiments of the present application further provide a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps and corresponding contents of the foregoing method embodiments can be implemented.
Based on the same principle as the method provided by the embodiment of the present application, the embodiment of the present application also provides a computer program product or a computer program, which includes computer instructions, and the computer instructions are stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions to cause the computer device to perform the method provided in any of the alternative embodiments of the present application.
It should be understood that, although each operation step is indicated by an arrow in the flowchart of the embodiment of the present application, the implementation order of the steps is not limited to the order indicated by the arrow. In some implementation scenarios of the embodiments of the present application, the implementation steps in the flowcharts may be performed in other sequences as desired, unless explicitly stated otherwise herein. In addition, some or all of the steps in each flowchart may include multiple sub-steps or multiple stages based on an actual implementation scenario. Some or all of these sub-steps or stages may be performed at the same time, or each of these sub-steps or stages may be performed at different times, respectively. In a scenario where execution times are different, an execution sequence of the sub-steps or the phases may be flexibly configured according to requirements, which is not limited in the embodiment of the present application.
The foregoing is only an optional implementation manner of a part of implementation scenarios in this application, and it should be noted that, for those skilled in the art, other similar implementation means based on the technical idea of this application are also within the protection scope of the embodiments of this application without departing from the technical idea of this application.

Claims (10)

1. A method for configuring data, comprising:
acquiring a modeling language file of target equipment;
determining a tree structure corresponding to the modeling language file of the target equipment;
determining a business model matched with the tree structure in the business model set based on the tree structure and a preset business model set;
and determining the configuration data of the target equipment based on the tree structure and the business model matched with the tree structure.
2. The method according to claim 1, wherein the determining, based on the tree structure and a preset business model set, a business model in the business model set that matches the tree structure includes:
and aiming at one service model in the preset service model set, if the relevant information of one device included in the service model is the same as the relevant information of the target device in the tree structure, determining that the service model is a service model matched with the tree structure.
3. The method of claim 1, wherein determining the configuration data of the target device based on the tree structure and the business model matching the tree structure comprises:
setting each service parameter at a corresponding position in the tree structure based on the position information of each service parameter in the service model matched with the tree structure to obtain the tree structure filled with the service parameters;
cutting the tree structure filled with the service parameters to obtain a cut tree structure;
and converting the cut tree structure into the configuration data of the target equipment.
4. The method according to claim 3, wherein the setting each service parameter at a corresponding position in the tree structure based on the position information of each service parameter in the service model matched with the tree structure to obtain the tree structure filled with service parameters comprises:
setting each service parameter at a corresponding position in the tree structure based on the position information of each service parameter in the service model matched with the tree structure to obtain a single sub-tree corresponding to each service parameter;
and merging the single subtrees to obtain the tree structure filled with the service parameters.
5. The method according to claim 1 or 3, wherein the configuration data of the target device is an extensible markup language message conforming to a content layer format in a network configuration protocol.
6. The method of claim 1, wherein obtaining a modeling language file for a target device comprises:
and acquiring a modeling language file of the target equipment through a network configuration protocol.
7. A data configuration apparatus, comprising:
the first processing module is used for acquiring a modeling language file of the target equipment;
the second processing module is used for determining a tree structure corresponding to the modeling language file of the target equipment;
the third processing module is used for determining a business model matched with the tree structure in the business model set based on the tree structure and a preset business model set;
and the fourth processing module is used for determining the configuration data of the target equipment based on the tree structure and the service model matched with the tree structure.
8. An electronic device comprising a memory, a processor and a computer program stored on the memory, characterized in that the processor executes the computer program to implement the steps of the method of any of claims 1-6.
9. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that the computer program realizes the steps of the method of any one of claims 1-6 when executed by a processor.
CN202210646006.0A 2022-06-08 2022-06-08 Data configuration method, device, apparatus, readable storage medium and program product Active CN115065594B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210646006.0A CN115065594B (en) 2022-06-08 2022-06-08 Data configuration method, device, apparatus, readable storage medium and program product

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210646006.0A CN115065594B (en) 2022-06-08 2022-06-08 Data configuration method, device, apparatus, readable storage medium and program product

Publications (2)

Publication Number Publication Date
CN115065594A true CN115065594A (en) 2022-09-16
CN115065594B CN115065594B (en) 2024-03-26

Family

ID=83201104

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210646006.0A Active CN115065594B (en) 2022-06-08 2022-06-08 Data configuration method, device, apparatus, readable storage medium and program product

Country Status (1)

Country Link
CN (1) CN115065594B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018219322A1 (en) * 2017-05-31 2018-12-06 中兴通讯股份有限公司 Device management method and apparatus, and processor and storage medium
CN111010305A (en) * 2019-12-23 2020-04-14 烽火通信科技股份有限公司 Configuration management system and method based on NETCONF protocol
CN111711532A (en) * 2020-04-30 2020-09-25 国家计算机网络与信息安全管理中心 Unified management method for heterogeneous network equipment
CN111865662A (en) * 2020-06-16 2020-10-30 新浪网技术(中国)有限公司 Network equipment configuration method and system
CN112398683A (en) * 2020-10-27 2021-02-23 烽火通信科技股份有限公司 Configuration method and device of multi-device hybrid networking supporting yang protocol
CN112688794A (en) * 2019-10-18 2021-04-20 华为技术有限公司 YANG model management method, device, system, equipment and storage medium
CN113572630A (en) * 2021-02-10 2021-10-29 腾讯科技(深圳)有限公司 Method and device for generating network configuration information, electronic equipment and medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018219322A1 (en) * 2017-05-31 2018-12-06 中兴通讯股份有限公司 Device management method and apparatus, and processor and storage medium
CN112688794A (en) * 2019-10-18 2021-04-20 华为技术有限公司 YANG model management method, device, system, equipment and storage medium
CN111010305A (en) * 2019-12-23 2020-04-14 烽火通信科技股份有限公司 Configuration management system and method based on NETCONF protocol
CN111711532A (en) * 2020-04-30 2020-09-25 国家计算机网络与信息安全管理中心 Unified management method for heterogeneous network equipment
CN111865662A (en) * 2020-06-16 2020-10-30 新浪网技术(中国)有限公司 Network equipment configuration method and system
CN112398683A (en) * 2020-10-27 2021-02-23 烽火通信科技股份有限公司 Configuration method and device of multi-device hybrid networking supporting yang protocol
CN113572630A (en) * 2021-02-10 2021-10-29 腾讯科技(深圳)有限公司 Method and device for generating network configuration information, electronic equipment and medium

Also Published As

Publication number Publication date
CN115065594B (en) 2024-03-26

Similar Documents

Publication Publication Date Title
EP3432517B1 (en) Device configuration method and apparatus based on network configuration protocol
CN112187632B (en) Industrial equipment integration model and construction method, edge gateway device and industrial equipment integration system
CN109361550B (en) Method, device and equipment for network equipment configuration management
US8656417B2 (en) Interface for telecommunication services using uniform resource identifiers
US8838653B2 (en) Translating an object-oriented data model to a YANG data model
WO2017054531A1 (en) Yang model-based compiling method, and corresponding interface, component, and system
CN110324169B (en) Interface management method and device
CN108989066B (en) Equipment management method and device
EP1793529A1 (en) A method and system for configuring network devices through an operations support system interface
CN111683066B (en) Heterogeneous system integration method, heterogeneous system integration device, computer equipment and storage medium
US20170270157A1 (en) TCP/IP Network Automation and Orchestration Tools
EP3764596A1 (en) Data configuration method and apparatus
CN112688952B (en) Message processing method, device, radio remote unit and medium
CN111552462A (en) Equipment model construction method and device of Internet of things equipment and storage medium
CN113039498A (en) Method for commissioning field devices in an industrial system network
CN114024821A (en) Northbound interface management method and device
US11354491B1 (en) Systems and methods for improved data modeling and translation
WO2016110070A1 (en) Data acquiring method and device, and storage medium
CN116954607A (en) Multi-source heterogeneous real-time task processing method, system, equipment and medium
CN115065594A (en) Data configuration method, device, equipment, readable storage medium and program product
EP3629616B1 (en) Data interaction method, device and equipment
CN109257264B (en) System and method for opening Ethernet virtual private network service
CN109117152B (en) Service generation system and method
CN113079029A (en) Configuration information subscription method and device
CN113014411B (en) Method, device and system for managing network device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant